myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Schofield <sean.schofi...@gmail.com>
Subject Re: s:inputSuggest problem
Date Fri, 12 Aug 2005 12:04:26 GMT
> Hi, 
> I'm trying to use the s:inputSuggest sandbox component but with no result. 
> Here is the very simple example I wrote : 
> <s:inputSuggest id="libarticle">
>      <f:selectItem itemValue="Art1" itemLabel="Article 1"/>
>      <f:selectItem itemValue="Art11" itemLabel="Article 11"/>
>      <f:selectItem itemValue="Art12" itemLabel="Article 12"/>
>      <f:selectItem itemValue="Art2" itemLabel="Article 2"/>
>      <f:selectItem itemValue="Art21" itemLabel="Article 21"/>
>      <f:selectItem itemValue="Art22" itemLabel="Article 22"/>
> </s:inputSuggest> 
>   
> According to the sandbox examples, the s:inputSuggest must be filled with
> f:selectItem components (or a f:selectItems). So I'll try it that way,
> without any value or attribute binding. However it doesn't work well, here
> is the error stack I get : 
> 09:49:20,627 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
> java.lang.NullPointerException
>  at
> org.apache.myfaces.custom.suggest.InputSuggestRenderer.encodeSuggestions(InputSuggestRenderer.java:147)
>  at
> org.apache.myfaces.custom.suggest.InputSuggestRenderer.encodeBegin(InputSuggestRenderer.java:112)
>  at
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:303)
>  at
> javax.faces.component.UIInput.encodeBegin(UIInput.java:198)

 
> Moreover, according to the javadoc, it looks like it is impossible to bind
> this component to a bean attribute as there isn't any component class (just
> the tag and the renderer). 

Its been a while since I've looked at this one.  I'm on vacation for a
few days but I will look into it when I get back.  Perhaps Matt can
help you out if he's around.
   
> By the way, is there somewhere we could have the java source code of the
> tomahawk and sandbox examples (there was a myfaces-examples-src.jar for the
> 1.0.9 release) ? 

Apparently this was missing after the svn reorg.  Thanks for the heads
up - I've added a JIRA issue on this
(http://issues.apache.org/jira/browse/MYFACES-411).

In the meantime, you can always use subversion checkout ;-)
   
> Another question : how to know the datatype of the value or the binding, a
> component is waiting for ? In javadoc ? where ? 

Again I will look into this when I get back.
   
> Thank you all 
> Clément. 

sean

Mime
View raw message