| Author |
Command Buttons Rendering
|
Mohammad Jaber
Ranch Hand
Joined: Apr 10, 2006
Posts: 46
|
|
Hi, iam developing an application using JSF , i wonder how can i alter the Default renderation behavior for CommandButtons , lets say for example , if the Text of the command is "xx" to be disabled ( by Renderer ) , is this applicable with the Existed renderer (i don't want to create a new rendrer for this) and how , Thanks in advance Regards,
|
OCP , SCJP 5.0
|
 |
Amit Nair
Greenhorn
Joined: May 23, 2006
Posts: 16
|
|
Hi, iam developing an application using JSF , i wonder how can i alter the Default renderation behavior for CommandButtons , lets say for example , if the Text of the command is "xx" to be disabled ( by Renderer ) , is this applicable with the Existed renderer (i don't want to create a new rendrer for this) and how , Thanks in advance Regards, -------------------- OCP , SCJP 5.0 Hi I am not sure whether I got your problem correctly, but as per my understanding I think that probaly you want to disable a command button if it's title is "xx". I am putting down the code of the backing bean along with that of JSP. Hope this is what you are looking for =====Backing Bean===== public class MyBean { private String text ="xx"; /** * @return Returns the text. */ public String getText() { return text; } /** * @param text The text to set. */ public void setText(String text) { this.text = text; } } =====JSP===== <h:commandButton value="#{myBean.text}" disabled="#{myBean.text eq 'xx'}"/> Regards Amit
|
 |
 |
|
|
subject: Command Buttons Rendering
|
|
|