Thanks a lot, now it works.

It seams i get used to look closer to the code I write.

[Off Topic]
Nice articles in the JavaMagazin ...! ;)

-------- Original-Nachricht --------
Datum: Wed, 15 Aug 2007 14:01:48 +0200
Von: "Matthias Wessendorf" <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED]
Betreff: Re: [Trinidad] SelectManyShuttle NullPointerException and Understanding

> 
> [...]
> 
> ..............
> your shuttle isn't included in a
> form
> 
> <tr:form>
> <tr:selectManyShuttle leadingHeader="Not Selected"
> trailingHeader="Selected" value="#{detailsBean.selected}">
> <f:selectItems value="#{detailsBean.all}" />
> </tr:selectManyShuttle>
> </tr:form>
> 
> that's the NPE.
> 
> Yes, the usage is like that.
> <f:selectItems /> is for "the available items"
> and the value for the "selected" meaning, what goes to your bean.
> 
> That said,
> when the List already contains some of these available values, they
> show up on the right side, when rendering:
> 
> faces page:
> <tr:...Shuttle ... value="#{bean.manyInitialValues}">
> 
>  <tr:selectItem label="coffee" value="bean" shortDesc="Coffee from Kona"/>
>  <tr:selectItem label="tea" value="leaf" shortDesc="Tea from China"/>
>  <tr:selectItem label="orange juice" value="orange"/>
>  <tr:selectItem label="milk" value="moo"/>
> </...shuttle>
> 
> Java:
>  private List _manyInitialValues = new ArrayList();
>  //plus accessors
> 
> adding the already available values:
>    _manyInitialValues.add("bean");
>    _manyInitialValues.add("leaf");
>    _manyInitialValues.add("orange");
>    _manyInitialValues.add("moo");
> 
> 
> HTH,
> Matthias

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Reply via email to