我们在Wildlfy 8.1.0 Final上使用Primefaces 5.09和JSF 2.1.2
我们有一个包含大量内容的数据表,这需要花费相当多的时间来加载(这是好的) 在每一行中,我们都有一个commandLink,它引用一个动态加载的overlayPanel,它在一个合成中定义:
print ("\t\t\tWelcome to the guess my word challenge")
print ("\nThe computer will pick and random word and you have to guess it in five tries")
import random
#create sequence of words
WORDS = ("computer","laptop","mouse","keyboard")
#pick random word
word=random.choice(WORDS)
correct=word
tries=0
print ("This word has ",len(word), "letters")
i=""
while word != "" and tries<5:
for i in word:
i=input("Guess a letter: ")
if i not in word:
print ("No")
else:
print ("\nYes")
tries+=1
if tries==5:
print("You've run out of tries")
final=input("\nGuess my word: ")
if word==correct:
print ("Well done that was my word!")
else:
print ("Better luck next time")
input ("\n\nPress the enter key to exit")
Ajax请求本身工作正常,因为结果只包含overlayPanel的内容。 我们现在的问题是,overlayPanel上的更新似乎也在内部呈现页面的其余部分,因为它正在加载数据表的项目等。 因此,为面板请求这么小的内容大约需要加载整个数据表。
整页和背景的背景豆已经分开了。
是否有可能让Primefaces只渲染这个单一组件?