Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-15 Thread Carl-Eric Menzel
Since there was no ticket filed yet for this, I created a new one:
https://issues.apache.org/jira/browse/WICKET-3718

It contains a patch that adds this feature (I called it "auto update")
to CheckGroupSelector, and provides select-all components for the other
types of checkboxes too.

Please have a look at it and let me know whether it's any good :)

Carl-Eric
www.wicketbuch.de

On Thu, 12 May 2011 15:31:16 +0200
Carl-Eric Menzel  wrote:

> 
> I ran into the same issue some time ago and did some work on (I think)
> the CheckGroupSelector, as well as Javascript selectors for the other
> types of checkboxes. I'll see over the weekend whether I can extract
> all that into a useful patch. Once heapifyman opens the ticket, I'll
> attach it there.
> 
> Carl-Eric
> 
> On Thu, 12 May 2011 15:17:00 +0200
> Martin Grigorov  wrote:
> 
> > It looks like CheckGroupSelector doesn't support that right now.
> > Please file a ticket.
> > Attaching a quickstart will make it easier for us and it will be
> > improved sooner.
> > 
> > On Thu, May 12, 2011 at 1:44 PM, heapifyman 
> > wrote:
> > 
> > >
> > > Hello,
> > >
> > > I have a CheckGroup and the CheckGroupSelector. Everythings
> > > working fine so far except for one thing. If I check all
> > > checkboxes in the group (manually or through checking the
> > > CheckGroupSelector), save this to a database and reload the page,
> > > the individual checkboxes are correctly displayed as checked but
> > > the CheckGroupSelector is not, i.e.I have to click the
> > > CheckGroupSelector twice to uncheck all the individual checkboxes.
> > > So how do I let the CheckGroupSelector reflect the current state
> > > of the individual checkboxes when the page is loaded?
> > >
> > > Thanks for any hints
> > >
> > >
> > 
> > 
> 
>   
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

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



Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-13 Thread heapifyman
Am 12.05.2011 15:41, schrieb Martin Grigorov:
> I am not sure whether you solution actually works.
> I think they will be always the same.

it is working fine for me here.

> On Thu, May 12, 2011 at 3:35 PM, heapifyman  wrote:
>
>> Am 12.05.2011 15:17, schrieb Martin Grigorov:
>>> It looks like CheckGroupSelector doesn't support that right now.
>>> Please file a ticket.
>>> Attaching a quickstart will make it easier for us and it will be improved
>>> sooner.
>> in the meantime I found a "solution":
>>
>> if (selected.size() == all.size()) {
>>checkGroupSelector.add(new SimpleAttributeModifier("checked",
>> "checked"));
>> }
>>
>> where "selected" is the collection passed to the CheckGroup and "all" is
>> the collection passed to the ListView populating the individual checkboxes.
>>
>> Do you guys still think there's need for a ticket? Maybe this should at
>> least be added to the documentation for the CheckGroup?
>>
>>> On Thu, May 12, 2011 at 1:44 PM, heapifyman 
>> wrote:
 Hello,

 I have a CheckGroup and the CheckGroupSelector. Everythings working fine
 so far except for one thing. If I check all checkboxes in the group
 (manually or through checking the CheckGroupSelector), save this to a
 database and reload the page, the individual checkboxes are correctly
 displayed as checked but the CheckGroupSelector is not, i.e.I have to
 click the CheckGroupSelector twice to uncheck all the individual
 checkboxes.
 So how do I let the CheckGroupSelector reflect the current state of the
 individual checkboxes when the page is loaded?

 Thanks for any hints


>>
>>
>




signature.asc
Description: OpenPGP digital signature


Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread Martin Grigorov
I am not sure whether you solution actually works.
I think they will be always the same.

On Thu, May 12, 2011 at 3:35 PM, heapifyman  wrote:

> Am 12.05.2011 15:17, schrieb Martin Grigorov:
> > It looks like CheckGroupSelector doesn't support that right now.
> > Please file a ticket.
> > Attaching a quickstart will make it easier for us and it will be improved
> > sooner.
>
> in the meantime I found a "solution":
>
> if (selected.size() == all.size()) {
>checkGroupSelector.add(new SimpleAttributeModifier("checked",
> "checked"));
> }
>
> where "selected" is the collection passed to the CheckGroup and "all" is
> the collection passed to the ListView populating the individual checkboxes.
>
> Do you guys still think there's need for a ticket? Maybe this should at
> least be added to the documentation for the CheckGroup?
>
> > On Thu, May 12, 2011 at 1:44 PM, heapifyman 
> wrote:
> >
> >> Hello,
> >>
> >> I have a CheckGroup and the CheckGroupSelector. Everythings working fine
> >> so far except for one thing. If I check all checkboxes in the group
> >> (manually or through checking the CheckGroupSelector), save this to a
> >> database and reload the page, the individual checkboxes are correctly
> >> displayed as checked but the CheckGroupSelector is not, i.e.I have to
> >> click the CheckGroupSelector twice to uncheck all the individual
> >> checkboxes.
> >> So how do I let the CheckGroupSelector reflect the current state of the
> >> individual checkboxes when the page is loaded?
> >>
> >> Thanks for any hints
> >>
> >>
> >
>
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread heapifyman
Am 12.05.2011 15:17, schrieb Martin Grigorov:
> It looks like CheckGroupSelector doesn't support that right now.
> Please file a ticket.
> Attaching a quickstart will make it easier for us and it will be improved
> sooner.

in the meantime I found a "solution":

if (selected.size() == all.size()) {
checkGroupSelector.add(new SimpleAttributeModifier("checked",
"checked"));
}

where "selected" is the collection passed to the CheckGroup and "all" is
the collection passed to the ListView populating the individual checkboxes.

Do you guys still think there's need for a ticket? Maybe this should at
least be added to the documentation for the CheckGroup?

> On Thu, May 12, 2011 at 1:44 PM, heapifyman  wrote:
>
>> Hello,
>>
>> I have a CheckGroup and the CheckGroupSelector. Everythings working fine
>> so far except for one thing. If I check all checkboxes in the group
>> (manually or through checking the CheckGroupSelector), save this to a
>> database and reload the page, the individual checkboxes are correctly
>> displayed as checked but the CheckGroupSelector is not, i.e.I have to
>> click the CheckGroupSelector twice to uncheck all the individual
>> checkboxes.
>> So how do I let the CheckGroupSelector reflect the current state of the
>> individual checkboxes when the page is loaded?
>>
>> Thanks for any hints
>>
>>
>




signature.asc
Description: OpenPGP digital signature


Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread Carl-Eric Menzel

I ran into the same issue some time ago and did some work on (I think)
the CheckGroupSelector, as well as Javascript selectors for the other
types of checkboxes. I'll see over the weekend whether I can extract
all that into a useful patch. Once heapifyman opens the ticket, I'll
attach it there.

Carl-Eric

On Thu, 12 May 2011 15:17:00 +0200
Martin Grigorov  wrote:

> It looks like CheckGroupSelector doesn't support that right now.
> Please file a ticket.
> Attaching a quickstart will make it easier for us and it will be
> improved sooner.
> 
> On Thu, May 12, 2011 at 1:44 PM, heapifyman 
> wrote:
> 
> >
> > Hello,
> >
> > I have a CheckGroup and the CheckGroupSelector. Everythings working
> > fine so far except for one thing. If I check all checkboxes in the
> > group (manually or through checking the CheckGroupSelector), save
> > this to a database and reload the page, the individual checkboxes
> > are correctly displayed as checked but the CheckGroupSelector is
> > not, i.e.I have to click the CheckGroupSelector twice to uncheck
> > all the individual checkboxes.
> > So how do I let the CheckGroupSelector reflect the current state of
> > the individual checkboxes when the page is loaded?
> >
> > Thanks for any hints
> >
> >
> 
> 



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



Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread Martin Grigorov
It looks like CheckGroupSelector doesn't support that right now.
Please file a ticket.
Attaching a quickstart will make it easier for us and it will be improved
sooner.

On Thu, May 12, 2011 at 1:44 PM, heapifyman  wrote:

>
> Hello,
>
> I have a CheckGroup and the CheckGroupSelector. Everythings working fine
> so far except for one thing. If I check all checkboxes in the group
> (manually or through checking the CheckGroupSelector), save this to a
> database and reload the page, the individual checkboxes are correctly
> displayed as checked but the CheckGroupSelector is not, i.e.I have to
> click the CheckGroupSelector twice to uncheck all the individual
> checkboxes.
> So how do I let the CheckGroupSelector reflect the current state of the
> individual checkboxes when the page is loaded?
>
> Thanks for any hints
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread heapifyman

Hello,

I have a CheckGroup and the CheckGroupSelector. Everythings working fine
so far except for one thing. If I check all checkboxes in the group
(manually or through checking the CheckGroupSelector), save this to a
database and reload the page, the individual checkboxes are correctly
displayed as checked but the CheckGroupSelector is not, i.e.I have to
click the CheckGroupSelector twice to uncheck all the individual checkboxes.
So how do I let the CheckGroupSelector reflect the current state of the
individual checkboxes when the page is loaded?

Thanks for any hints



signature.asc
Description: OpenPGP digital signature