You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2013/08/14 16:08:44 UTC

Checkboxes automatically disabled in ListView repeater

We have a Panel which contains a WebMarkupContainer which contains a ListView
repeater. The ListView repeats rows of 3 checkboxes; its populateItem is:

protected void populateItem(ListItem<EDocsPermissionModel> item) {
  EDocsPermissionModel perm = item.getModelObject();

  CheckBox cb1 = new CheckBox("view_flag", new PropertyModel(perm
"viewAccessFlag"));
  item.add(cb1);

  CheckBox cb2 = new CheckBox("upload_flag", new PropertyModel(perm
"uploadAccessFlag"));
  item.add(cb2);

  CheckBox cb3 = new CheckBox("delete_flag", new PropertyModel(perm
"deleteAccessFlag"));
  item.add(cb3);

}

When the page is displayed all the checkboxes are mysteriously disabled.

We removed all behaviors that related to either the checkboxes or the
top-level containers (Panel and WMC). Also, we added this, for every
checkbox, to no effect:

CheckBox cb1 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb2 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb3 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};

This didn't help. Also, the debugger shows that all the top-level containers
are themselves Enabled. The Panel is enabled and the WMC is enabled.

Any ideas? Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Checkboxes automatically disabled in ListView repeater

Posted by eugenebalt <eu...@yahoo.com>.
YES. That was the exact issue. Thanks Sven.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888p4660890.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Checkboxes automatically disabled in ListView repeater

Posted by Sven Meier <sv...@meiers.net>.
Do you have the disabled attribute in your markup source?

Sven



On 08/14/2013 04:08 PM, eugenebalt wrote:
> We have a Panel which contains a WebMarkupContainer which contains a ListView
> repeater. The ListView repeats rows of 3 checkboxes; its populateItem is:
>
> protected void populateItem(ListItem<EDocsPermissionModel> item) {
>    EDocsPermissionModel perm = item.getModelObject();
>
>    CheckBox cb1 = new CheckBox("view_flag", new PropertyModel(perm
> "viewAccessFlag"));
>    item.add(cb1);
>
>    CheckBox cb2 = new CheckBox("upload_flag", new PropertyModel(perm
> "uploadAccessFlag"));
>    item.add(cb2);
>
>    CheckBox cb3 = new CheckBox("delete_flag", new PropertyModel(perm
> "deleteAccessFlag"));
>    item.add(cb3);
>
> }
>
> When the page is displayed all the checkboxes are mysteriously disabled.
>
> We removed all behaviors that related to either the checkboxes or the
> top-level containers (Panel and WMC). Also, we added this, for every
> checkbox, to no effect:
>
> CheckBox cb1 = new CheckBox ( .. ) {
>    @Override
>    public boolean isEnabled { return true; }
> };
> CheckBox cb2 = new CheckBox ( .. ) {
>    @Override
>    public boolean isEnabled { return true; }
> };
> CheckBox cb3 = new CheckBox ( .. ) {
>    @Override
>    public boolean isEnabled { return true; }
> };
>
> This didn't help. Also, the debugger shows that all the top-level containers
> are themselves Enabled. The Panel is enabled and the WMC is enabled.
>
> Any ideas? Thanks
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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