This content has been marked as final.
Show 5 replies
-
1. Re: Seam + JSF
norman.richards Nov 28, 2006 10:14 AM (in response to lara)Do you actually need anything from the h:form that h:commandButton would require? If not, why not try Seam's s:button?
-
2. Re: Seam + JSF
lara Nov 28, 2006 10:51 AM (in response to lara)Thanks for replying..
Well this is my JSF page:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" template="templates/admin.xhtml"> <ui:define name="content"> <f:view> <f:loadBundle basename="messages" var="msg" /> <head> <title> <h:outputText value="#{msg.pageTitleModifyActor}" rendered="#{!actorEditor.new}" /> </title> </head> <body> <div class="pageTitle"><h:outputText value="#{msg.pageTitleModifyActor}" rendered="#{!actorEditor.new}"/></div> <h:form enctype="multipart/form-data"> <table class="tableProperties"> <tr> <td> <h:outputLabel value="#{msg.name}"></h:outputLabel> </td> <td> <h:inputText value="#{actorEditor.instance.name}" id="name" required="true" rendered="#{actorEditor.new}"/> <h:outputText value="#{actorEditor.instance.name}" rendered="#{!actorEditor.new}" class="viewText"/> </td> </tr> </table> <div style="padding-left:10px"> <span> <h:commandButton type="submit" value="#{msg.Update}" action="#{actorEditor.update}" rendered="#{! actorEditor.new}" /> </span> </div> </h:form> <h:form rendered="#{!actorEditor.new}"> <table class="tableProperties"> <tr> <td><h:outputLabel value="New Password"></h:outputLabel></td> <td> <h:inputSecret value="#{updatePasswordAction.password}" id="password" required="true"/> </td> </tr> </table> <div style="padding-left:10px"> <h:commandLink type="submit" value="Apply" action="#{updatePasswordAction.UpdatePassword}"> <f:param name="name" value="#{actorEditor.instance.name}"/> <f:param name="actorId" value="#{actorEditor.instance.id}"/> </h:commandLink> </div> </h:form> </body> </f:view> </ui:define> </ui:composition>
In this JSF page, I showed the main code. There are two forms:
the first form contains the name of the actor to be edited and the bean in question is actorEditor bean
the second form contains the password field to be edited and the bean in question is updatePasswordAction
Inside the second form there is the following code:<h:commandLink type="submit" value="Apply" action="#{updatePasswordAction.UpdatePassword}"> <f:param name="name" value="#{actorEditor.instance.name}"/> <f:param name="actorId" value="#{actorEditor.instance.id}"/> </h:commandLink>
I am passing as parameters the name and id of the actor inside the <f:param> using <h:commandLink>
How can do the same assuming that I have a button Apply instead of a link and knowing that I am getting the value of the parameters from the other form?
Regards,
Lara -
3. Re: Seam + JSF
gavin.king Nov 28, 2006 4:02 PM (in response to lara)Try using a Seam page parameter.
-
4. Re: Seam + JSF
lara Nov 29, 2006 2:45 AM (in response to lara)Thx for replying but could you be more specific and give me a simplified example?
The parameter as I already mentioned in not constant.
Regards,