aspose file tools
The moose likes JSF and the fly likes How to rendered a <tr:commandButton (trinidad) via ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to rendered a <tr:commandButton (trinidad) via ajax " Watch "How to rendered a <tr:commandButton (trinidad) via ajax " New topic
Author

How to rendered a <tr:commandButton (trinidad) via ajax

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 177
Hi All,

In order to rendered a button in a form I am using the onchange=this.form.submit();


Is there a more elegant why?
Meaning instead of using java script maybe I can use ajax ?
I know that there is the autoSubmit option but I didn’t succeed to implement it in my code

Thanks

Kumaravadivel Subramani
Ranch Hand

Joined: Jul 05, 2008
Posts: 162

Using Ajax is not only elegant way, it's more probably of dealing with performance. (Requesting only want we need, refresh will happen only on particular component). If you use form.submit() the whole form elements will be send with request and re-rendered which is not need as per your requirement.

<f:ajax render="which component id to be rendered" event="on which event" onevent="where to hit" />


No pain, No gain.
OCJP 1.6
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 177
Thank you
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 177
Hi,

I have one more questions regarding this issue:

The following example is working ok:


But when I change it to a <h:selectBooleanCheckBox> the rendered option is not working:


Do you know why ?


Thanks

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to rendered a <tr:commandButton (trinidad) via ajax
 
Similar Threads
Problem regarding the ValueChangeEvent and the commandButton
"h:selectOneMenu" with Ajax4JSF passing selection to backing bean on the "fly"
Form calling a session scoped backing bean constructor twice
Trinidad / Weblogic
Run the MethodeBean & display the fields that corresponds to selectMenu