Re: JSF commandButton

Splash Forums PrettyFaces Users JSF commandButton Re: JSF commandButton

#20308

dave_r12
Participant

We are using JSF 1.2, as well as Spring (3.0.3.RELEASE) and have registered the SpringBeanFacesELResolver in the faces-config.xml.

version: prettyfaces-jsf12-3.1.0

pretty-config.xml

<url-mapping id="viewItem" >
<pattern value="/location/details/#{ itemId }" />
<view-id>/location/detail.xhtml</view-id>
<action onPostback="false">#{locationCrud.detailSetup}</action>
</url-mapping>

locationCrud is a bean registered in Spring application context (normal POJO).

/location/detail.xhtml (stripped down)

<head>
</head>
<body>
<ui:composition template="/templates/skeleton.xhtml">
<ui:define name="listing">
<ui:include src="list.xhtml" />
</ui:define>
<ui:define name="display">
<h1>#{msg.locationDetails}</h1>
<h:form>
<h:commandButton action="#{locationCrud.editSetup}" value="#{msg.btnEdit}">
<f:setPropertyActionListener target="#{jsfService.itemId}" value="#{locationCrud.item.uuid}" />
</h:commandButton>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>