سؤال

I try to load an include in a "layoutUnit" via "commandLink" but nothing is displayed but if i refreshes the page all is correct.

the commandLink :

<p:commandLink update=":center" actionListener="#{sidePviewTest.sideBarAction}" value="Center1">
    <f:param name="pageViewId" value="center1" />
</p:commandLink>

the layoutUnit :

<p:layoutUnit id="center" position="center">
    <ui:include src="#{sidePviewTest.includedPage}" />
</p:layoutUnit>

I do not understand what the problem is. Any ideas ?

JSF 2.1 PrimeFaces 3.5

هل كانت مفيدة؟

المحلول

I found how to display correctly the content. I added a panel and I refreshes it instead of the layout.

<p:commandLink update=":myPanel" actionListener="#{sidePviewTest.sideBarAction}" value="Center1">
    <f:param name="pageViewId" value="center1" />
</p:commandLink>

<p:layoutUnit id="center" position="center">
    <p:panel id="myPanel">
    <ui:include src="#{sidePviewTest.includedPage}" />
    </p:panel>
</p:layoutUnit>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top