I found the better way

#AllowModel.class

import java.io.Serializable;
import java.util.ArrayList;

public class AllowModel implements Serializable {

        private static final long serialVersionUID = 1L;

        private Long id = null;

        private ArrayList list = new ArrayList();

        public AllowModel() {
                super();
        }

        public Long getId() {
                return id;
        }

        public void setId(Long id) {
                this.id = id;
        }

        public ArrayList getList() {
                return list;
        }

        public void setList(ArrayList list) {
                this.list = list;
        }

}

#init model<in populateItem>
AllowModel tempmodule = new AllowModel();
tempmodule.setId(tempdbmap.getRole());
allowmap.put(tempdbmap.getSerialID(), tempmodule);

#role Label<in Form>
Label role = new Label("role", new PropertyModel((AllowModel)
allowmap.get(tempdbmap.getSerialID()),"id"));
arg0.add(role);

#othergroup<in DataView>
CheckGroup othergroup = new CheckGroup("othergroup",new
PropertyModel((AllowModel) allowmap.get(tempdbmap.getSerialID()), "list"));
othercontainer.add(othergroup);


Dreamltf wrote:
> 
> Thanks for your reply.
> 
> I upgraded to version 1.3.2, but still no help.
> 
> So, I changed a way to get the value
> 
> private HashMap allowmap = new HashMap();
> 
> #allowgroup<in Form>
> CheckGroup allowgroup = new CheckGroup("allowgroup", new ArrayList());
> 
> #othergroup<in DataView>
> allowmap.put(item.getIndex(), new ArrayList());
> CheckGroup othergroup = new CheckGroup("othergroup", (List)
> allowmap.get(item.getIndex()));
> item.add(othergroup);
> 
> But I don't know is this a good way
> 
> 
> igor.vaynberg wrote:
>> 
>> we have just released 1.2.7 which is the last 1.2.x release we will make.
>> 
>> there is a patch on how to make this work in jira assigned to 1.3, you
>> can take that and roll your own checkgroup/check variants.
>> 
>> -igor
>> 
>> 
>> On Thu, Mar 27, 2008 at 1:41 AM, Dreamltf <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi all,
>>>
>>>  I want to use a CheckGroup (allowgroup) with a DataView, and there is
>>>  another CheckGroup (othergroup) in the inside of the DataView.
>>>  I can get the allowgroup's value,
>>>  but I can't get the othergroup's value.
>>>
>>>  submitform<Form>
>>>  allowgroup<CheckGroup>
>>>         allowselector<CheckGroupSelector>
>>>         sortuid<Label>
>>>         sortrole<Label>
>>>         comments<DataView>
>>>                 allowcheck<Check>
>>>                 uid<Label>
>>>                 role<Label>
>>>                 othergroup<CheckGroup>
>>>                         otheradd<Check>
>>>                         otherdelete<Check>
>>>                         otherquery<Check>
>>>                         otheredit<Check>
>>>                         otherselector<CheckGroupSelector>
>>>         navigator
>>>
>>>  I use a HashMap to be a Model Like this.
>>>
>>>  CheckGroup allowgroup = new CheckGroup("allowgroup", new
>>>  Model((Serializable) othermap.keySet()));
>>>  submitform.add(allowgroup);
>>>
>>>  CheckGroup othergroup = new CheckGroup("othergroup",
>>>                                                         new
>>> ArrayList());
>>>                                         arg0.add(othergroup);
>>>
>>>  http://www.nabble.com/file/p16323358/checkbox_with_dataview.jpg
>>>
>>>  Wicket1.2.6
>>>  Thanks for help!!
>>>  --
>>>  View this message in context:
>>> http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16323358.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/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16696196.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]

Reply via email to