This content has been marked as final.
Show 3 replies
-
1. Re: s:link and s:button action problem with ui:include
jagin Jan 23, 2009 10:20 AM (in response to jagin)The same is with s:button
-
2. Re: s:link and s:button action problem with ui:include
dbernstein Feb 6, 2009 1:51 AM (in response to jagin)I'm having exactly the same problem. Have you found a resolution?
-
3. Re: s:link and s:button action problem with ui:include
jkronegg Aug 6, 2009 2:23 PM (in response to jagin)I had the same problem with s:button. BTW, this is a Seam issue JBSEAM-666 (also occurs on Seam 2.1.2).
I solved it by using two ui:include and without using ui:param. The structure is as follow:
In main.xhtml:
<ui:include src="layout/removeForComponentHome.xhtml"/>
In removeForComponentHome.xhtml:
<h:form> <ui:include src="layout/remove.xhtml"/> <div id="actionButtons"> <s:link value="#{messages['yes']}" action="#{componentHome.remove}" /> <h:commandLink value="#{messages['yes']}" action="#{componentHome.remove}" / </div> </h:form>
In remove.xhtml:
... <!-- The fields without action buttons -->
If I want the remove.xhtml file with action buttons referring another entity home (let's say #{anotherHome}), I'm using another intermediate include file removeForAnotherHome.xhtml:
<h:form> <ui:include src="layout/remove.xhtml"/> <div id="actionButtons"> <s:link value="#{messages['yes']}" action="#{anotherHome.remove}" /> <h:commandLink value="#{messages['yes']}" action="#{anotherHome.remove}" / </div> </h:form>
This is not perfect because the action button code is duplicated, but at least I could factorize remove.xhtml fields.