[jboss-user] [JBoss Seam] - Re: Seam + JSF
lara
do-not-reply at jboss.com
Tue Nov 28 10:51:56 EST 2006
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989367#3989367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989367
More information about the jboss-user
mailing list