Thank you a lot
CheckBox("personItem.personReceiveEmailOnDeals", new
PropertyModel<Boolean>(this,"personItem.personReceiveEmailOnDeals"));
it can not work, can we use PropertyModel<Boolean> ?
thanks
Dipu-3 wrote:
>
> why is it not working ? I tried and its working
>
> public class TestPage extends WebPage
> {
>
> private PersonItem personItem = new PersonItem();
>
>
> public TestPage()
> {
>
> Form<Void> form = new Form<Void>("inform");
> add(form);
>
> CheckBox checkBoxPersonReceiveEmailOnDeals = new
> CheckBox("personItem.personReceiveEmailOnDeals", new
> PropertyModel<Boolean>(this,"personItem.personReceiveEmailOnDeals"));
> form.add(checkBoxPersonReceiveEmailOnDeals);
>
> }
>
> private class PersonItem
> {
> private boolean personReceiveEmailOnDeals = true;
>
> public boolean isPersonReceiveEmailOnDeals() {
> return personReceiveEmailOnDeals;
> }
>
> public void setPersonReceiveEmailOnDeals(boolean
> personReceiveEmailOnDeals) {
> this.personReceiveEmailOnDeals =
> personReceiveEmailOnDeals;
> }
> }
> }
>
>
> Regards
> Dipu
>
> On Mon, Dec 29, 2008 at 9:46 AM, wch2001 <[email protected]> wrote:
>>
>> Dear all,
>>
>> CheckBox checkBoxPersonReceiveEmailOnDeals = new
>> CheckBox("personItem.personReceiveEmailOnDeals", new PropertyModel(this,
>> "personItem.personReceiveEmailOnDeals")) ;
>>
>> Now personItem.personReceiveEmailOnDeals is true. but it also show it is
>> not
>> "checked", how can i do ?
>>
>> Thank you for your help
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-Checkbox-can-be-showed-with-%22checked%22-when-it-value-is-matched--tp21200883p21200883.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/how-Checkbox-can-be-showed-with-%22checked%22-when-it-value-is-matched--tp21200883p21211764.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]