CommandButton and PropertyActionListener not being called

UI Components for JSF
Post Reply
oranheim
Posts: 64
Joined: 23 Jun 2010, 12:37
Location: Oslo, Norway
Contact:

06 Jan 2012, 13:57

I have a dataTable with a commandButton where the setPropertyActionListener is not being invoked.

Code: Select all

<p:commandButton icon="ui-icon ui-icon-trash" oncomplete="unitDeleteAddressDialog.show();" update=":#{cc.attrs.deleteRefId}:delete-addresses-dialog-form">
    <f:setPropertyActionListener value="#{_address.id}" target="#{unitAddressHome.selectedAddressId}" />
</p:commandButton>
The XHR is executed, but since the action listener is not invoked, it's not able to load data before the dialog is shown.

Any idea?
JBoss AS 7.1
Mojarra 2.1.5
Seam 3.1.0.Final
PrimeFaces 3.1.1
PrettyFaces 3.3.2

headgrowe
Posts: 18
Joined: 05 Dec 2011, 22:16

06 Jan 2012, 17:20

try this... had the same prob...ajax="false" important

<h:form id="persons">

Code: Select all

				<p:dataTable id="dl" value="#{homeView.personList}" var="output"
					rowKey="#{output.name}" rows="10" paginator="true">
					<p:column>
						<p:commandButton action="#{homeView.enterPerson}" ajax="false"
							image="ui-icon ui-icon-search">
							<f:setPropertyActionListener value="#{output}"
								target="#{homeView.selectedOutput}" />
						</p:commandButton>
					</p:column>
					<p:column>  
						#{output.name} 
					</p:column>
					<p:column>  
						#{output.txt} 
					</p:column>
				</p:dataTable>
			</h:form>

headgrowe
Posts: 18
Joined: 05 Dec 2011, 22:16

06 Jan 2012, 17:23

ohhh sry... you are using ajax... sry i was entering a new view...

hmmm try to but it in a <h:form> and put a method in the action="...." of the command button...

oranheim
Posts: 64
Joined: 23 Jun 2010, 12:37
Location: Oslo, Norway
Contact:

06 Jan 2012, 19:50

Yeah. I use ajax and nothing else is not an option :)

Thanks for your response anyway.
JBoss AS 7.1
Mojarra 2.1.5
Seam 3.1.0.Final
PrimeFaces 3.1.1
PrettyFaces 3.3.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 47 guests