Thanks.
Yes. It answers well. I wanted to make sure I understand this correctly,
that CheckBoxItem's content is searched starting from its parent's base
downwards.
Indeed my example has an error. CheckboxList will have a content looking
more like:
items { $("li").moduleList(CheckboxItem) }
someSelExpr will then be fashioned to return a single-element navigator
(e.g. a ul).
Much appreciated!
On Thursday, August 17, 2017 at 4:50:25 PM UTC+10, Marcin Erdmann wrote:
>
> As long as someSelExpr returns a single element navigator the bases for
> CheckboxItem and CheckboxList will be exactly the same. I suspect it is not
> the case and someSelExpr returns multiple element navigator (why would you
> use moduleList otherwise?). In that case the base for CheckboxList will be
> a multi element navigator and bases for CheckboxItems will be single
> element navigators that together constitute the elements of CheckboxList
> base. CheckboxItems will be therefore confined to one of subtrees rooted at
> someSelExpr.
>
> Does that answer your question?
>
> On Wed, 16 Aug 2017 at 10:58, Samuel Rossinovic <[email protected]
> <javascript:>> wrote:
>
>> Given this hierarchy:
>>
>> class ConfirmDialog extends Module{
>> //...}
>>
>>
>>
>> class CheckboxItem extends Module {
>> static content = {
>> label { $(".tree-title").text() }
>> checkbox { $(".tree-checkbox")}
>> isChecked { $(".tree-checkbox1")}
>> }
>> }
>>
>>
>> class CheckboxList extends ConfirmDialog {
>> static content = {
>> items { moduleList(CheckboxItem)}
>> }
>> }
>>
>>
>> I instantiate CheckboxList like so:
>>
>>
>> def someSelExpr = /* some selector */
>>
>> $(someSelExpr).module(CheckboxList)
>>
>>
>>
>>
>> I want the base for the moduleList to be the same as CheckboxList's (I.E.
>> that the $() selectors in CheckboxItem shall be confined to the subtree
>> rooted at someSelExpr)
>>
>>
>> Is that how this will work? If not, how do I bend it so that it does?
>>
>>
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Geb User Mailing List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/geb-user/510f1298-3ab2-4a19-aa45-1de797abb234%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/geb-user/510f1298-3ab2-4a19-aa45-1de797abb234%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups "Geb
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/a7e0e34b-2122-44be-9c47-322f32bd8197%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.