By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,320 Members | 2,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,320 IT Pros & Developers. It's quick & easy.

Dynamic JavaServer Faces components

P: 1
I have problems with a dynamically created form using this code:
Expand|Select|Wrap|Line Numbers
  2.   private HtmlPanelGrid grid; 
  4.   public HtmlPanelGrid getDynamicPanelGrid() {
  5.     if (grid == null) {
  6.       Application app = FacesContext.getCurrentInstance().getApplication();
  7.       grid = (HtmlPanelGrid) app.createComponent(HtmlPanelGrid.COMPONENT_TYPE);
  9.       HtmlOutputText text = (HtmlOutputText) app.createComponent(HtmlOutputText.COMPONENT_TYPE);
  10.       text.setValue("some text");
  11.       grid.getChildren().add(text);
  12.     }
  14.     return grid;
  15.   }
I take it from

If I create dynamically an object HtmlInputText (a text field) in this way, I can't get the value of it, modified by the user.
I tried with getValue(), getLocalValue() and I can't :(

Can you help me please?
Sep 25 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.