Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Command Buttons Rendering  RSS feed

 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Amit Nair
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!