You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/08/30 23:53:55 UTC
Re: Data binding expression with list items
It isn't currently supported, though it would be trivial to add. I'm curious about the use case, though. It seems a bit fragile to rely on a numeric index, but maybe there is a valid use for it.
G
On Aug 30, 2010, at 3:33 PM, A. J. wrote:
> Hi,
>
> Is it possible to have binding expressions that refer to list items using index accessor such as the following one (myList being of type java.util.List) ?
>
> ...
> <TextInput textKey="myObj.myList[2]" />
> ...
>
> thanks in advance
> AJ.
Re: Data binding expression with list items
Posted by Olivier Dutrieux <ol...@pasteur.fr>.
Ahh Sorry I don't know :s
Le 31/08/2010 14:57, Greg Brown a écrit :
> This feature has been implemented, so you should be able to use it.
> Let me know if you run into any issues.
>
> On Aug 31, 2010, at 8:35 AM, Olivier Dutrieux wrote:
>
>> Hello,
>>
>> Be carrefull I don't thinks this feature is properly support at this
>> time on 2.0 . It's a proposal feature do by Greg Brown but
>> implemented at this time.
>>
>> Duto
>>
>> Le 31/08/2010 14:20, A. J. a écrit :
>>> ok, looking forward to try this in 2.0
>>>
>>> thanks
>>> AJ
>>>
>>> On Tue, Aug 31, 2010 at 12:21 PM, Dirk Möbius
>>> <dmoebius@scoop-gmbh.de <ma...@scoop-gmbh.de>> wrote:
>>>
>>> I think in Pivot 2.0 it would be possible with a little script
>>> trick:
>>>
>>> <script>
>>> function myListAt(index) {
>>> return myObj.myList[index];
>>> }
>>> </script>
>>>
>>> <TextInput textKey="${myListAt:2}/>
>>>
>>> But I guess that you don't want to use a hard wired constant
>>> there (don't you?), rather something like:
>>>
>>> <TextInput textKey="${myListAt:otherList.selectedIndex}/>
>>>
>>> Dirk.
>>>
>>>
>>>
>>> Greg Brown <gkbrown@mac.com <ma...@mac.com>> wrote:
>>>
>>> It isn't currently supported, though it would be trivial to
>>> add. I'm curious about the use case, though. It seems a bit
>>> fragile to rely on a numeric index, but maybe there is a
>>> valid use for it.
>>> G
>>>
>>> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>>>
>>> Hi,
>>>
>>> Is it possible to have binding expressions that refer to
>>> list items using index accessor such as the following
>>> one (myList being of type java.util.List) ?
>>>
>>> ...
>>> <TextInput textKey="myObj.myList[2]" />
>>> ...
>>>
>>> thanks in advance
>>> AJ.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Dirk Möbius
>>>
>>> SCOOP GmbH
>>> Am Kielshof 29
>>> D-51105 Köln
>>> Fon +49 221 801916-0
>>> Fax +49 221 801916-17
>>> Mobil +49 170 7363035
>>> www.scoop-gmbh.de <http://www.scoop-gmbh.de/>
>>> Sitz der Gesellschaft: Köln
>>> Handelsregister: Köln
>>> Handelsregisternummer: HRB 36623
>>> Geschäftsführer:
>>> Dr. Oleg Balovnev
>>> Frank Heinen
>>> Dr. Wolfgang Reddig
>>> Roland Scheel
>>>
>>>
>>>
>
--
Olivier Dutrieux
Études et Projets Informatiques (Tél : 31 62)
Re: Data binding expression with list items
Posted by Greg Brown <gk...@mac.com>.
This feature has been implemented, so you should be able to use it. Let me know if you run into any issues.
On Aug 31, 2010, at 8:35 AM, Olivier Dutrieux wrote:
> Hello,
>
> Be carrefull I don't thinks this feature is properly support at this time on 2.0 . It's a proposal feature do by Greg Brown but implemented at this time.
>
> Duto
>
> Le 31/08/2010 14:20, A. J. a écrit :
>>
>> ok, looking forward to try this in 2.0
>>
>> thanks
>> AJ
>>
>> On Tue, Aug 31, 2010 at 12:21 PM, Dirk Möbius <dm...@scoop-gmbh.de> wrote:
>> I think in Pivot 2.0 it would be possible with a little script trick:
>>
>> <script>
>> function myListAt(index) {
>> return myObj.myList[index];
>> }
>> </script>
>>
>> <TextInput textKey="${myListAt:2}/>
>>
>> But I guess that you don't want to use a hard wired constant there (don't you?), rather something like:
>>
>> <TextInput textKey="${myListAt:otherList.selectedIndex}/>
>>
>> Dirk.
>>
>>
>>
>> Greg Brown <gk...@mac.com> wrote:
>>
>> It isn't currently supported, though it would be trivial to add. I'm curious about the use case, though. It seems a bit fragile to rely on a numeric index, but maybe there is a valid use for it.
>> G
>>
>> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>>
>> Hi,
>>
>> Is it possible to have binding expressions that refer to list items using index accessor such as the following one (myList being of type java.util.List) ?
>>
>> ...
>> <TextInput textKey="myObj.myList[2]" />
>> ...
>>
>> thanks in advance
>> AJ.
>>
>>
>>
>>
>>
>> --
>> Dirk Möbius
>>
>> SCOOP GmbH
>> Am Kielshof 29
>> D-51105 Köln
>> Fon +49 221 801916-0
>> Fax +49 221 801916-17
>> Mobil +49 170 7363035
>> www.scoop-gmbh.de
>> Sitz der Gesellschaft: Köln
>> Handelsregister: Köln
>> Handelsregisternummer: HRB 36623
>> Geschäftsführer:
>> Dr. Oleg Balovnev
>> Frank Heinen
>> Dr. Wolfgang Reddig
>> Roland Scheel
>>
>>
>>
Re: Data binding expression with list items
Posted by Olivier Dutrieux <ol...@pasteur.fr>.
Hello,
Be carrefull I don't thinks this feature is properly support at this
time on 2.0 . It's a proposal feature do by Greg Brown but implemented
at this time.
Duto
Le 31/08/2010 14:20, A. J. a écrit :
> ok, looking forward to try this in 2.0
>
> thanks
> AJ
>
> On Tue, Aug 31, 2010 at 12:21 PM, Dirk Möbius <dmoebius@scoop-gmbh.de
> <ma...@scoop-gmbh.de>> wrote:
>
> I think in Pivot 2.0 it would be possible with a little script trick:
>
> <script>
> function myListAt(index) {
> return myObj.myList[index];
> }
> </script>
>
> <TextInput textKey="${myListAt:2}/>
>
> But I guess that you don't want to use a hard wired constant there
> (don't you?), rather something like:
>
> <TextInput textKey="${myListAt:otherList.selectedIndex}/>
>
> Dirk.
>
>
>
> Greg Brown <gkbrown@mac.com <ma...@mac.com>> wrote:
>
> It isn't currently supported, though it would be trivial to
> add. I'm curious about the use case, though. It seems a bit
> fragile to rely on a numeric index, but maybe there is a valid
> use for it.
> G
>
> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>
> Hi,
>
> Is it possible to have binding expressions that refer to
> list items using index accessor such as the following one
> (myList being of type java.util.List) ?
>
> ...
> <TextInput textKey="myObj.myList[2]" />
> ...
>
> thanks in advance
> AJ.
>
>
>
>
>
>
> --
> Dirk Möbius
>
> SCOOP GmbH
> Am Kielshof 29
> D-51105 Köln
> Fon +49 221 801916-0
> Fax +49 221 801916-17
> Mobil +49 170 7363035
> www.scoop-gmbh.de <http://www.scoop-gmbh.de>
> Sitz der Gesellschaft: Köln
> Handelsregister: Köln
> Handelsregisternummer: HRB 36623
> Geschäftsführer:
> Dr. Oleg Balovnev
> Frank Heinen
> Dr. Wolfgang Reddig
> Roland Scheel
>
>
>
Re: Data binding expression with list items
Posted by "A. J." <oz...@gmail.com>.
ok, looking forward to try this in 2.0
thanks
AJ
On Tue, Aug 31, 2010 at 12:21 PM, Dirk Möbius <dm...@scoop-gmbh.de>wrote:
> I think in Pivot 2.0 it would be possible with a little script trick:
>
> <script>
> function myListAt(index) {
> return myObj.myList[index];
> }
> </script>
>
> <TextInput textKey="${myListAt:2}/>
>
> But I guess that you don't want to use a hard wired constant there (don't
> you?), rather something like:
>
> <TextInput textKey="${myListAt:otherList.selectedIndex}/>
>
> Dirk.
>
>
>
> Greg Brown <gk...@mac.com> wrote:
>
> It isn't currently supported, though it would be trivial to add. I'm
>> curious about the use case, though. It seems a bit fragile to rely on a
>> numeric index, but maybe there is a valid use for it.
>> G
>>
>> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>>
>> Hi,
>>>
>>> Is it possible to have binding expressions that refer to list items using
>>> index accessor such as the following one (myList being of type
>>> java.util.List) ?
>>>
>>> ...
>>> <TextInput textKey="myObj.myList[2]" />
>>> ...
>>>
>>> thanks in advance
>>> AJ.
>>>
>>
>>
>>
>
>
> --
> Dirk Möbius
>
> SCOOP GmbH
> Am Kielshof 29
> D-51105 Köln
> Fon +49 221 801916-0
> Fax +49 221 801916-17
> Mobil +49 170 7363035
> www.scoop-gmbh.de
> Sitz der Gesellschaft: Köln
> Handelsregister: Köln
> Handelsregisternummer: HRB 36623
> Geschäftsführer:
> Dr. Oleg Balovnev
> Frank Heinen
> Dr. Wolfgang Reddig
> Roland Scheel
>
>
>
Re: Data binding expression with list items
Posted by Dirk Möbius <dm...@scoop-gmbh.de>.
I think in Pivot 2.0 it would be possible with a little script trick:
<script>
function myListAt(index) {
return myObj.myList[index];
}
</script>
<TextInput textKey="${myListAt:2}/>
But I guess that you don't want to use a hard wired constant there
(don't you?), rather something like:
<TextInput textKey="${myListAt:otherList.selectedIndex}/>
Dirk.
Greg Brown <gk...@mac.com> wrote:
> It isn't currently supported, though it would be trivial to add. I'm
> curious about the use case, though. It seems a bit fragile to rely
> on a numeric index, but maybe there is a valid use for it.
> G
>
> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>
>> Hi,
>>
>> Is it possible to have binding expressions that refer to list items
>> using index accessor such as the following one (myList being of
>> type java.util.List) ?
>>
>> ...
>> <TextInput textKey="myObj.myList[2]" />
>> ...
>>
>> thanks in advance
>> AJ.
>
>
--
Dirk Möbius
SCOOP GmbH
Am Kielshof 29
D-51105 Köln
Fon +49 221 801916-0
Fax +49 221 801916-17
Mobil +49 170 7363035
www.scoop-gmbh.de
Sitz der Gesellschaft: Köln
Handelsregister: Köln
Handelsregisternummer: HRB 36623
Geschäftsführer:
Dr. Oleg Balovnev
Frank Heinen
Dr. Wolfgang Reddig
Roland Scheel
Re: Data binding expression with list items
Posted by "A. J." <oz...@gmail.com>.
Indeed relying on indices is always risky without appropriate tests but in
my case, it would be helpful. I am adding controls at runtime
(programmatically) based on list elements (where I know the list size) and
would like to implement data binding.
it works for my standard bean properties of course but for my list it does
not. So I had to implement a custom binding system for this case.
On Mon, Aug 30, 2010 at 11:53 PM, Greg Brown <gk...@mac.com> wrote:
> It isn't currently supported, though it would be trivial to add. I'm
> curious about the use case, though. It seems a bit fragile to rely on a
> numeric index, but maybe there is a valid use for it.
> G
>
> On Aug 30, 2010, at 3:33 PM, A. J. wrote:
>
> > Hi,
> >
> > Is it possible to have binding expressions that refer to list items using
> index accessor such as the following one (myList being of type
> java.util.List) ?
> >
> > ...
> > <TextInput textKey="myObj.myList[2]" />
> > ...
> >
> > thanks in advance
> > AJ.
>
>