wood burning stoves 2.0*
The moose likes JSF and the fly likes MyFaces displayValueOnly from Java does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "MyFaces displayValueOnly from Java does not work" Watch "MyFaces displayValueOnly from Java does not work" New topic
Author

MyFaces displayValueOnly from Java does not work

A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
I am trying to set the displayValueOnly property to true for a textarea component in the backing bean Java code. But it does not work. The widget is still displayed. The same works when I give t:inputTextArea directly in the JSP. All the components that I am creating in the backing bean are from org.apache.myfaces.component.html.ext package. Is this the correct package to use the displayValueOnly?
I need to create components in the backing bean since I do not know the number of components until run time.
The textarea is embedded in a panelGrid which is also from the same package.

Experts, please advise.
Tushar Kherde
Ranch Hand

Joined: Apr 28, 2006
Posts: 56
Hi,

Can you provide code snipplet


This is how i have creating component in runtime.


HtmlInputText component = (HtmlInputText) application.createComponent((HtmlInputText.COMPONENT_TYPE));
component.setId(paramName);

htmlPanelGroup.getChildren().add(component);


Tushar
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
By the way .. What's in your opinion the difference between:

and
A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
I could not know the difference. When I tried, both approaches seemed to create the component. Could you please explain how one should decide upon choosing an approach to creating the components given a situation.
But in either of the approaches, the displayValueOnly is still not working.

Please advise.

Thanks in advance.
RAPHEAD
Greenhorn

Joined: Feb 23, 2007
Posts: 1
Hi Dusi,

were you able to solve your issue?
I'm having the same problem here.
I just posted a bug to Apache because I cannot
see any way to get this working.

R.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MyFaces displayValueOnly from Java does not work