You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kevin Liu <mr...@yahoo.com> on 2007/09/13 10:37:00 UTC

How to create my own components with HiddenFiled and TextField

Hi!
  I wanna create my own components with HiddenField and TextField
  This is HTML:
  <wicket:panel>
<input type="hidden" wicket:id="hiddenFiled"></input>
<input type="text" wicket:id="displayField"></input>
</wicket:panel>
   
  But I have no idea about which kind of IModel to use to bind a POJO. 
  Thank you~


-Kevin Liu
       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 

Re: How to create my own components with HiddenFiled and TextField

Posted by Carlos Pita <ca...@gmail.com>.
What about PropertyModel with TextField and HiddenField, the usual way?

add(new HiddenField("hiddenField", new PropertyModel(bean, "property1")));
add(new TextField("displayField", new PropertyModel(bean, "property2")));

Regards,
Carlos

On 9/13/07, Kevin Liu <mr...@yahoo.com> wrote:
> Hi!
>   I wanna create my own components with HiddenField and TextField
>   This is HTML:
>   <wicket:panel>
> <input type="hidden" wicket:id="hiddenFiled"></input>
> <input type="text" wicket:id="displayField"></input>
> </wicket:panel>
>
>   But I have no idea about which kind of IModel to use to bind a POJO.
>   Thank you~
>
>
> -Kevin Liu
>
> ---------------------------------
> Moody friends. Drama queens. Your life? Nope! - their life, your story.
>  Play Sims Stories at Yahoo! Games.

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