Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MyFaces displayValueOnly from Java does not work

 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way .. What's in your opinion the difference between:

and
 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic