-
1. Re: Hardcoding (dynamic) tabs
fmarwede Nov 11, 2007 8:18 AM (in response to bradmesserle)I'not sure if I really understand your question. Perhaps this helps:
What about:HtmlTab tab = new HtmlTab(); HtmlPanel panel = new HtmlPanel(); panel.setParent(tab); //and so on
And do you know the binding attribute and the use of it? -
2. Re: Hardcoding (dynamic) tabs
bradmesserle Nov 11, 2007 9:07 AM (in response to bradmesserle)That part works fine..
I am having trouble putting content in the tab.. For example a simple table with a few columns and text..
Thanks! -
3. Re: Hardcoding (dynamic) tabs
fmarwede Nov 11, 2007 10:01 AM (in response to bradmesserle)Hmm...I'm confused. Was that post from you a "Thanks for help" or a "Thanks but my problem is not solved"???
Let's assume the second case :-) Perhaps I'm totally wrong put I think the key to your problem is to set the parent. What I mean:
1.) Create your table with this Html*-Classes.
2.) Create a panel.
3.) Set the panel as parent of the table.
4.) Create a tab.
5.) Set the tab as parent of the panel.
Or does that not work? -
4. Re: Hardcoding (dynamic) tabs
bradmesserle Nov 11, 2007 4:10 PM (in response to bradmesserle)Sorry this might be a dumb question..
But the part i am having trouble with is item 1. :)
I dont know how/having trouble creating Html code via java code.
I think once I know the set of classes i am good..
Here is some code i have tried and is not working I get dup id as an error..
HtmlPanel aPanel = new HtmlPanel();
HtmlPanelGrid grid = new HtmlPanelGrid();
grid.setId("test_1");
HtmlOutputText html1Text = new HtmlOutputText();
html1Text.setValue("Testing 1 2 3");
html1Text.setId("Test_2");
HtmlOutputText html2Text = new HtmlOutputText();
html2Text.setValue("Testing 3 4 5 6");
html2Text.setId("Test_3");
grid.getChildren().add(html1Text);
grid.getChildren().add(html2Text);
aPanel.getChildren().add(grid);
-Brad -
5. Re: Hardcoding (dynamic) tabs
fmarwede Nov 11, 2007 5:58 PM (in response to bradmesserle)I'm not an expert in writing html pages this way but what is wrong with this code (corresponding to my suggestion above):
//1. HtmlDataTable table = new HtmlDataTable(); //2. HtmlPanel panel = new HtmlPanel(); //3. table.setParent(panel); //4. HtmlTab tab = new HtmlTab(); //5. panel.setParent(tab);
Please notice: Set Parent, not child. -
6. Re: Hardcoding (dynamic) tabs
bradmesserle Nov 11, 2007 8:25 PM (in response to bradmesserle)ok i will give that a try.
Thank you for all your help. -
7. Re: Hardcoding (dynamic) tabs
fmarwede Nov 12, 2007 2:30 AM (in response to bradmesserle)Ah, don't mention it. I did not say that works. I only wanna say, I understand the documentation in this way ;-)
Nice to have: The sections with headings "Creating the Component Dynamically Using Java" should not be so...short. Or what do you think? -
8. Re: Hardcoding (dynamic) tabs
bradmesserle Nov 13, 2007 1:39 PM (in response to bradmesserle)Exactly.. I think they should come up with some really good sample code.
Setting the parent did not work for me. The page did not display the controls.
Thanks!