Update property not working in commandButton

UI Components for JSF
Post Reply
daniel.grane
Posts: 30
Joined: 23 Oct 2009, 06:08

07 Apr 2010, 22:41

Hi Cagatay,

I've been trying to use some of the ajax controls available in primefaces, but I've found that the update property of the command button is not working for me. I've tested and I've seen that is going to the server and executing the right method, but I don't know why it is not being render in my page.

This is how I've implemented my page :

Code: Select all

<!DOCTYPE composition 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:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
	  			xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:sf="http://www.springframework.org/tags/faces"
				template="/WEB-INF/layouts/standard.xhtml">

<ui:define name="content">
<div class="section">
	<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id6" /> 
	<h4>Ingresar nuevo Gasto para la Obra #{gasto.obra.name} </h4>
	<ui:fragment id="messages">
		<div id="messagesInsertionPoint">
			<p:messages errorClass="errors" />
		</div>
	</ui:fragment>
 <h:form id="myform">   
     <h:inputText id="txt"  value="#{expense.cuit}" />  
           
     <p:commandButton value="Count" actionListener="#{expense.test}"   
                      update="txt" />  
 </h:form>
</div>

</ui:define>
</ui:composition>

I've also try with the property prependId="false" and no luck with that. Another thing I'd like to know is that in Chapter 8 you mention a Class called RequestContext, could you specify the package of that class ?

Thanks a lot!

Daniel

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Apr 2010, 11:18

Hi Daniel,

Can you test with;

Code: Select all

<h:form id="myform">   
     <h:inputText id="txt"  value="#{expense.cuit}" />  
           
     <p:commandButton value="Count" actionListener="#{expense.test}"   
                      update="txt_out" />  

     <h:outputText id="txt_out" value="#{expense.cuit}" />
</h:form>
Which version are you using, RequestContext should be in org.primefaces.context.*;

daniel.grane
Posts: 30
Joined: 23 Oct 2009, 06:08

08 Apr 2010, 16:34

Hi Cagatay,

Nothing happens, I'm currently using primefaces-1.0.0.RC.jar.


Let me know if you can have any other ideas....


Thanks!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Apr 2010, 17:03

Please upgrade to a newer version Daniel, that is pretty old.

daniel.grane
Posts: 30
Joined: 23 Oct 2009, 06:08

08 Apr 2010, 21:15

Can I update to a newer version (2.0) using spring Faces 1.2 ? I am little worried about the compatibility....


Thanks!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Apr 2010, 17:20

For JSF 1.2 you need PrimeFaces 1.x and for JSF 2.0 it should be PrimeFaces 2.x.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests