Adding dynamic content

View: New views
4 Messages — Rating Filter:   Alert me  

Adding dynamic content

by Scott-181 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Does anyone know of an easy way to create dynamic fields on a JSF page based on the selection of a combo box? My combo box has constraint types listed in it, one of them being a range.  For instance, the user can specify that an integer value must be between a minimum and maximum value.  When this constraint is selected, I want to create a min and a max field as inputs and dynamically create them on the page.  I want to be able to have these fields be h:inputText fields. 
 
Any ideas?  For now, unless there is a cooler way, I am going to try creating all the different constraint edits within div tags and simply disable the fields and hide the divs.  Then with an onchange event on the selection I can bring the appropriate field to the forefront. 
 
Thanks,
 
Scott

Re: Adding dynamic content

by Roger Kitain :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Scott -

Take a look at the stock-faces example under jsf-extensions samples dir.
Alternatively you can look at:
http://weblogs.java.net/blog/rogerk/archive/2007/07/back_to_basics.html

-roger

Scott wrote:

> Does anyone know of an easy way to create dynamic fields on a JSF page
> based on the selection of a combo box? My combo box has constraint
> types listed in it, one of them being a range.  For instance, the user
> can specify that an integer value must be between a minimum and
> maximum value.  When this constraint is selected, I want to create a
> min and a max field as inputs and dynamically create them on the
> page.  I want to be able to have these fields be h:inputText fields.
>  
> Any ideas?  For now, unless there is a cooler way, I am going to try
> creating all the different constraint edits within div tags and simply
> disable the fields and hide the divs.  Then with an onchange event on
> the selection I can bring the appropriate field to the forefront.
>  
> Thanks,
>  
> Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Adding dynamic content

by Scott-181 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks, Roger.  I took a quick look and decided it will take a little longer than that!  Thanks for the reply.  I'll let you know how it turns out.
 
Scott

----- Original Message ----
From: Roger Kitain <Roger.Kitain@...>
To: users@...
Sent: Wednesday, October 24, 2007 2:40:33 PM
Subject: Re: Adding dynamic content

Hello Scott -

Take a look at the stock-faces example under jsf-extensions samples dir.
Alternatively you can look at:
http://weblogs.java.net/blog/rogerk/archive/2007/07/back_to_basics.html

-roger

Scott wrote:

> Does anyone know of an easy way to create dynamic fields on a JSF page
> based on the selection of a combo box? My combo box has constraint
> types listed in it, one of them being a range.  For instance, the user
> can specify that an integer value must be between a minimum and
> maximum value.  When this constraint is selected, I want to create a
> min and a max field as inputs and dynamically create them on the
> page.  I want to be able to have these fields be h:inputText fields.
>  
> Any ideas?  For now, unless there is a cooler way, I am going to try
> creating all the different constraint edits within div tags and simply
> disable the fields and hide the divs.  Then with an onchange event on
> the selection I can bring the appropriate field to the forefront.
>  
> Thanks,
>  
> Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Adding dynamic content

by Nasim_sa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Of course you can,you an fine a smart sample here with ful details,if you need more to know please email to me:
Dynamic Input field generation-velocity

Scott-181 wrote:
Does anyone know of an easy way to create dynamic fields on a JSF page based on the selection of a combo box? My combo box has constraint types listed in it, one of them being a range.  For instance, the user can specify that an integer value must be between a minimum and maximum value.  When this constraint is selected, I want to create a min and a max field as inputs and dynamically create them on the page.  I want to be able to have these fields be h:inputText fields.  

Any ideas?  For now, unless there is a cooler way, I am going to try creating all the different constraint edits within div tags and simply disable the fields and hide the divs.  Then with an onchange event on the selection I can bring the appropriate field to the forefront.  

Thanks,

Scott
LightInTheBox - Buy quality products at wholesale price