This content has been marked as final.
Show 3 replies
-
1. Re: dynamicaly add html components to a HtmlOrderingList
maksimkaszynski Jan 29, 2008 8:26 AM (in response to xterm2)Probably, you have NullPointerException because haven't initialized richComponentList yet. You need to first initialize richComponentList first, and then add child components to it
-
2. Re: dynamicaly add html components to a HtmlOrderingList
xterm2 Jan 29, 2008 9:13 AM (in response to xterm2)You've right. So I instantiated it like this:
private HtmlOrderingList richQuestionList = new HtmlOrderingList(); public HtmlOrderingList getRichComponentList() { //test richComponentList HtmlOutputText test = new HtmlOutputText(); test.setTitle("title"); test.setValue("value"); test.setId("id"); richComponentList.getChildren().add(test); return richComponentList; }
And that got rid of the error message from facelets. No output text is rendered in the richOrderingList though. And no error message is outputed either. So I'm still stuck!
Am I adding the component to the OrderingList in the right way? -
3. Re: dynamicaly add html components to a HtmlOrderingList
xterm2 Jan 29, 2008 9:15 AM (in response to xterm2)oh... and nevermind the typo. The first line of code should read:
private HtmlOrderingList richComponentList = new HtmlOrderingList();
Just a cut and paste error from my part. Sorry...