Is there any way to create a dynamic form?

Hi,

I am writing a database driven application that creates jsf forms depending on the structure of the database provided. You have the first page asking for the db url, user and pass and a button next. When you it next, the application introspects the database and create a form for each table. When the process is finished i redirect to the first (new) form created.

Actually what i do is :

For each table

create jsf form

create form bean (also compile it)

add navigation case to faces-config.xml

My problem is that i must reboot the server to access my new forms...this is not user oriented at all. Any solution out there?

Thank you.

[699 byte] By [akademiksa] at [2007-11-27 2:24:28]
# 1
If they have to be created only once, first create them all.If they have to be purely dynamic, then just dynamically populate the viewroot instead.
BalusCa at 2007-7-12 2:31:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I don't really understand the concept of populating the viewroot...do you have any examples?
akademiksa at 2007-7-12 2:31:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

JSF<h:panelGroup binding="#{myBean.group}" />

<h:commandButton value="add" action="#{myBean.add}" />

MyBeanprivate HtmlPanelGroup group; // + getter + setter

public void add() {

HtmlOutputText text = new HtmlOutputText();

text.setValue("foo");

group.getChildren().add(text);

}

BalusCa at 2007-7-12 2:31:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...