You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "squallmat ." <sq...@gmail.com> on 2014/07/10 14:51:08 UTC

select problem render queue

I'm trying to do implement a select component on a page.

I have this :

*CreerClient.java:*
*.....*
// value encoders
@Property
private ApplicatifDtoEncoder applicatifDtoEncoder;

@Property
private TypeClientDtoEncoder typeClientDtoEncoder;

// select models for client types and applications
@Property
private SelectModel selectType;

@Property
private SelectModel selectApplications;

@Inject
SelectModelFactory selectModelFactory;
// data transfer pojos for data retrieving client types and applications
@Property
private List<TypeClientDto> typeClientList;

@Property
private List<ApplicatifDto> applicatifList;

// selected objects for each select and their ids for select value

@Property
private ApplicatifDto selectedApplication;

@Property
private TypeClientDto selectedClientType;
.....
// prepare rendering of the page
void setupRender() {
// retrieve client types and applications id
applicatifList = serviceApplicatif.findAllApplicatifDto();
typeClientList = serviceTypeClient.findAllTypeClientDto();

// initialize selectmodels
selectType = selectModelFactory.create(typeClientList, "nomType");
selectApplications = selectModelFactory.create(applicatifList, "nom");
}







*CreerClient.tml :*
....
<t:Label t:for="typeClientList" />
:
<t:Select value="selectedClientType" t:id="typeClientList"
model="selectType" encoder="typeClientDtoEncoder" />
.....
<t:Select value="selectedApplication" t:id="selectApplications"
model="selectApplications" encoder="applicatifDtoEncoder"
t:zone="applicationsZone" />
.......






*ApplicatifDtoEncoder:*

public class ApplicatifDtoEncoder implements ValueEncoder<ApplicatifDto>,
ValueEncoderFactory<ApplicatifDto> {

@Inject
private IServiceApplicatif serviceApplicatif;

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toClient(java.lang.Object)
 */
@Override
public String toClient(ApplicatifDto value) {
// return the given object's ID
return String.valueOf(value.getId());
}

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toValue(java.lang.String)
 */
@Override
public ApplicatifDto toValue(String clientValue) {
// find the ApplicatifDto object of the given ID in the database
return serviceApplicatif.findApplicatifDto(Long.parseLong(clientValue));
}

// let this ValueEncoder also serve as a ValueEncoderFactory
/*
 * (non-Javadoc)
 *
 * @see
 * org.apache.tapestry5.services.ValueEncoderFactory#create(java.lang.Class)
 */
@Override
public ValueEncoder<ApplicatifDto> create(Class<ApplicatifDto> type) {
return this;
}




*TypeClientDtoEncoder :*
public class TypeClientDtoEncoder implements ValueEncoder<TypeClientDto>,
ValueEncoderFactory<TypeClientDto> {

@Inject
private IServiceTypeClient serviceTypeClient;

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toClient(java.lang.Object)
 */
@Override
public String toClient(TypeClientDto value) {
// return the given object's ID
return String.valueOf(value.getId());
}

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toValue(java.lang.String)
 */
@Override
public TypeClientDto toValue(String clientValue) {
// find the typeclientdto object of the given ID in the database
return serviceTypeClient.findTypeClientDto(Long.parseLong(clientValue));
}

// let this ValueEncoder also serve as a ValueEncoderFactory
/*
 * (non-Javadoc)
 *
 * @see
 * org.apache.tapestry5.services.ValueEncoderFactory#create(java.lang.Class)
 */
@Override
public ValueEncoder<TypeClientDto> create(Class<TypeClientDto> type) {
return this;
}

}


But when I try to run this page I get :
Render queue error in BeforeRenderTemplate[CreerClient:typeclientlist]:
org.apache.tapestry5.ioc.internal.util.TapestryException

In the console :
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed
with uncaught exception: Render queue error in
BeforeRenderTemplate[CreerClient:typeclientlist]:
org.apache.tapestry5.ioc.internal.util.TapestryException
org.apache.tapestry5.internal.services.RenderQueueException: Render queue
error in BeforeRenderTemplate[CreerClient:typeclientlist]:
org.apache.tapestry5.ioc.internal.util.TapestryException [at
classpath:atos/smt/livraison/pages/CreerClient.tml, line 38]
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:81)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
at $PageRenderQueue_10e6509c00f1.render(Unknown Source)
at $PageRenderQueue_10e6509c00ea.render(Unknown Source)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at
org.got5.tapestry5.jquery.services.js.JSModule$1.renderMarkup(JSModule.java:40)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$31.renderMarkup(TapestryModule.java:1994)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1978)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1960)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1945)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1913)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1894)
at $MarkupRenderer_10e6509c00f5.renderMarkup(Unknown Source)
at $MarkupRenderer_10e6509c00f0.renderMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_10e6509c00ee.renderPageMarkup(Unknown Source)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
at $PageResponseRenderer_10e6509c0028.renderPageResponse(Unknown Source)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at
org.apache.tapestry5.services.TapestryModule$38.handle(TapestryModule.java:2222)
at $PageRenderRequestHandler_10e6509c002a.handle(Unknown Source)
at $PageRenderRequestHandler_10e6509c0024.handle(Unknown Source)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at $ComponentRequestHandler_10e6509c0025.handlePageRender(Unknown Source)
at $ComponentRequestHandler_10e6509bfff5.handlePageRender(Unknown Source)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
at $Dispatcher_10e6509bfff9.dispatch(Unknown Source)
at $Dispatcher_10e6509bfff2.dispatch(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_10e6509bfff3.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
at $RequestHandler_10e6509bfff3.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
at $RequestHandler_10e6509bfff3.service(Unknown Source)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_10e6509bfff3.service(Unknown Source)
at atos.smt.livraison.services.AppModule$1.service(AppModule.java:97)
at $RequestFilter_10e6509bffee.service(Unknown Source)
at $RequestHandler_10e6509bfff3.service(Unknown Source)
at $RequestHandler_10e6509bffe7.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_10e6509bffe9.service(Unknown Source)
at
org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27)
at $HttpServletRequestHandler_10e6509bffe9.service(Unknown Source)
at
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at $HttpServletRequestHandler_10e6509bffe9.service(Unknown Source)
at
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_10e6509bffe5.service(Unknown Source)
at $HttpServletRequestHandler_10e6509bffe9.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_10e6509bffe9.service(Unknown Source)
at $HttpServletRequestHandler_10e6509bffe2.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException [at
classpath:atos/smt/livraison/pages/CreerClient.tml, line 38]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:158)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeforeRenderTemplatePhase.render(ComponentPageElementImpl.java:264)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
... 86 more
Caused by: java.lang.NullPointerException
at
org.apache.tapestry5.internal.util.SelectModelRenderer.option(SelectModelRenderer.java:51)
at
org.apache.tapestry5.util.AbstractSelectModel.visitOptions(AbstractSelectModel.java:54)
at
org.apache.tapestry5.util.AbstractSelectModel.visit(AbstractSelectModel.java:46)
at org.apache.tapestry5.corelib.components.Select.options(Select.java:297)
at
org.apache.tapestry5.corelib.components.Select.beforeRenderTemplate(Select.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeforeRenderTemplatePhase.invokeComponent(ComponentPageElementImpl.java:257)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:148)
... 88 more
[INFO] AppModule.TimingFilter Request time: 205 ms


I am certainly doing something wrong in the definition of mly select, but I
don't see what.

Re: select problem render queue

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 15 Jul 2014 06:28:46 -0300, Geoff Callender  
<ge...@gmail.com> wrote:

> If I read Bob right, I think Bob said his problem was not due to nulls,  
> it was due to the selected value not being one of the values in the  
> OptionModel.

This can be caused by the lack of a good implementation of equals() and  
hashCode(), which almost every non-service class should have anyway,  
specially the ones which can appear inside collections (and SelectModel is  
a sort of collection of OptionModels).

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by Geoff Callender <ge...@gmail.com>.
Have you seen this example and the ones around it?

	http://jumpstart.doublenegative.com.au/jumpstart7/examples/select/easyobject

HTH,

Geoff

On 16 Jul 2014, at 1:56 am, squallmat . <sq...@gmail.com> wrote:

> But I was getting the problem at page loading. I haven't been able yet to
> do a form submission, so setupRender should have been enough for that,
> right ?
> I probably miss something on this. But it's now working :)
> And thanks for your time for helping me (I'm discovering this framework).
> 
> 
> 2014-07-15 17:32 GMT+02:00 Thiago H de Paula Figueiredo <th...@gmail.com>
> :
> 
>> On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . <sq...@gmail.com>
>> wrote:
>> 
>> Ok I resolved the problem,
>>> 
>>> I went from declaring the encoder with  :
>>> @Property
>>> private TypeClientDtoEncoder typeClientDtoEncoder;
>>> 
>>> to :
>>> public TypeClientDtoEncoder getTypeClientDtoEncoder() {
>>> return new TypeClientDtoEncoder();
>>> }
>>> 
>>> and now it works :p    strange
>>> 
>> 
>> Why is it strange? @Property just creates getter and setter. It doesn't
>> set field values. You were probably only setting the field in
>> setupRender(), which isn't called when a form submission is done. For that,
>> you could have used onPrepare() (triggered by Form) instead, as it's called
>> before the form is rendered and before the form submission is processed.
>> 
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by "squallmat ." <sq...@gmail.com>.
But I was getting the problem at page loading. I haven't been able yet to
do a form submission, so setupRender should have been enough for that,
right ?
I probably miss something on this. But it's now working :)
And thanks for your time for helping me (I'm discovering this framework).


2014-07-15 17:32 GMT+02:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . <sq...@gmail.com>
> wrote:
>
>  Ok I resolved the problem,
>>
>> I went from declaring the encoder with  :
>> @Property
>> private TypeClientDtoEncoder typeClientDtoEncoder;
>>
>> to :
>> public TypeClientDtoEncoder getTypeClientDtoEncoder() {
>> return new TypeClientDtoEncoder();
>> }
>>
>> and now it works :p    strange
>>
>
> Why is it strange? @Property just creates getter and setter. It doesn't
> set field values. You were probably only setting the field in
> setupRender(), which isn't called when a form submission is done. For that,
> you could have used onPrepare() (triggered by Form) instead, as it's called
> before the form is rendered and before the form submission is processed.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: select problem render queue

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . <sq...@gmail.com>  
wrote:

> Ok I resolved the problem,
>
> I went from declaring the encoder with  :
> @Property
> private TypeClientDtoEncoder typeClientDtoEncoder;
>
> to :
> public TypeClientDtoEncoder getTypeClientDtoEncoder() {
> return new TypeClientDtoEncoder();
> }
>
> and now it works :p    strange

Why is it strange? @Property just creates getter and setter. It doesn't  
set field values. You were probably only setting the field in  
setupRender(), which isn't called when a form submission is done. For  
that, you could have used onPrepare() (triggered by Form) instead, as it's  
called before the form is rendered and before the form submission is  
processed.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by "squallmat ." <sq...@gmail.com>.
Ok I resolved the problem,

I went from declaring the encoder with  :
@Property
private TypeClientDtoEncoder typeClientDtoEncoder;

to :
public TypeClientDtoEncoder getTypeClientDtoEncoder() {
return new TypeClientDtoEncoder();
}

and now it works :p    strange


2014-07-15 14:58 GMT+02:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Tue, 15 Jul 2014 07:03:32 -0300, squallmat . <sq...@gmail.com>
> wrote:
>
>  the null pointer exception comes from :
>> at org.apache.tapestry5.internal.util.SelectModelRenderer.
>> option(SelectModelRenderer.java:51)
>>
>>
>> which is, in the code of tapestry this :
>>  @SuppressWarnings("unchecked")
>>     public void option(OptionModel optionModel)
>>     {
>>         Object optionValue = optionModel.getValue();
>>
>>        * String clientValue = encoder.toClient(optionValue);   <--- line
>> 51*
>>
>
> Have you checked whether you're passing a null value to the Select's
> encoder parameter?
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: select problem render queue

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 15 Jul 2014 07:03:32 -0300, squallmat . <sq...@gmail.com>  
wrote:

> the null pointer exception comes from :
> at org.apache.tapestry5.internal.util.SelectModelRenderer.
> option(SelectModelRenderer.java:51)
>
>
> which is, in the code of tapestry this :
>  @SuppressWarnings("unchecked")
>     public void option(OptionModel optionModel)
>     {
>         Object optionValue = optionModel.getValue();
>
>        * String clientValue = encoder.toClient(optionValue);   <--- line  
> 51*

Have you checked whether you're passing a null value to the Select's  
encoder parameter?

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by "squallmat ." <sq...@gmail.com>.
the null pointer exception comes from :
at org.apache.tapestry5.internal.util.SelectModelRenderer.
option(SelectModelRenderer.java:51)


which is, in the code of tapestry this :
 @SuppressWarnings("unchecked")
    public void option(OptionModel optionModel)
    {
        Object optionValue = optionModel.getValue();

       * String clientValue = encoder.toClient(optionValue);   <--- line 51*

        writer.element("option", "value", clientValue);

        if (isOptionSelected(optionModel, clientValue))
writer.attributes("selected", "selected");

        writeDisabled(optionModel.isDisabled());
        writeAttributes(optionModel.getAttributes());

        writer.write(optionModel.getLabel());

        writer.end();
    }



So in this line it should execute the toClient method of my ValueEncoder so
I added some system.out.println in it just to see if it really does it :
public class TypeClientDtoEncoder implements ValueEncoder<TypeClientDto>,
ValueEncoderFactory<TypeClientDto> {

@Inject
private IServiceTypeClient serviceTypeClient;

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toClient(java.lang.Object)
 */
@Override
public String toClient(TypeClientDto value) {
// return the given object's ID
*System.out.println("abcdef");*
* System.out.println("encoder typeclient toclient");*
return String.valueOf(value.getId());
}

/*
 * (non-Javadoc)
 *
 * @see org.apache.tapestry5.ValueEncoder#toValue(java.lang.String)
 */
@Override
public TypeClientDto toValue(String clientValue) {
// find the typeclientdto object of the given ID in the database
System.out.println("abcdef");
System.out.println("encoder typeclient tovalue");
return serviceTypeClient.findTypeClientDto(Long.parseLong(clientValue));
}

// let this ValueEncoder also serve as a ValueEncoderFactory
/*
 * (non-Javadoc)
 *
 * @see
 * org.apache.tapestry5.services.ValueEncoderFactory#create(java.lang.Class)
 */
@Override
public ValueEncoder<TypeClientDto> create(Class<TypeClientDto> type) {
return this;
}

}



But nothing appears in the console, so the problem is here, why it doesn't
pass in the method toClient of my ValueEncoder ?


2014-07-15 11:28 GMT+02:00 Geoff Callender <
geoff.callender.jumpstart@gmail.com>:

> If I read Bob right, I think Bob said his problem was not due to nulls, it
> was due to the selected value not being one of the values in the
> OptionModel.
>
> It might also be worth trying secure="literal:false" on the Select.
>
> On 15 Jul 2014, at 5:59 pm, squallmat . <sq...@gmail.com> wrote:
>
> > I tried to see what was in my selectmodel after the factory loading with
> > this code :
> >
> > // initialize selectmodels
> > selectType = selectModelFactory.create(typeClientList, "nomType");
> >
> > List<OptionModel> optionModelList = selectType.getOptions();
> >
> > System.out.println("begin");
> > for (OptionModel optionModel : optionModelList) {
> > System.out.println(optionModel.getLabel());
> > System.out.println(optionModel.getValue());
> > }
> > System.out.println("end");
> >
> >
> > And in the console I see that I have exactly what I want and I don't see
> > any Null in my selectmodel.
> >
> >
> > @Bob : How do you resolved your problem ?
> >
> >
> > Anyone alse to help me on this ? I'm stuck on thsi problem :(
> >
> >
> > 2014-07-14 20:21 GMT+02:00 Bob Harner <bo...@gmail.com>:
> >
> >> I haven't read through this thread very carefully, but last week I got
> >> a nearly identical stack trace. It was from Palette, not Select, but
> >> those components have a lot of identical code. In my case the problem
> >> was that the SelectModel had all of the expected values *except* the
> >> selected value. Tapestry didn't do a good job with the error messages
> >> in that case.
> >>
> >> On Fri, Jul 11, 2014 at 5:36 AM, squallmat . <sq...@gmail.com>
> wrote:
> >>> When I do this :
> >>>
> >>> selectType = selectModelFactory.create(typeClientList, "nomType");
> >>> selectApplications = selectModelFactory.create(applicatifList, "nom");
> >>>
> >>> each lists (typeClientList and applicatifList) are not empty.
> >>>
> >>> And for the second parameter, I put the variable name of a String of an
> >>> object contained in the list, is this what have to be done ?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> 2014-07-10 16:57 GMT+02:00 Thiago H de Paula Figueiredo <
> >> thiagohp@gmail.com>
> >>> :
> >>>
> >>>> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>
> >>>> wrote:
> >>>>
> >>>> Caused by: java.lang.NullPointerException
> >>>>> at
> >>>>> org.apache.tapestry5.internal.util.SelectModelRenderer.
> >>>>> option(SelectModelRenderer.java:51)
> >>>>>
> >>>>
> >>>> Check whether you passed a null OptionModel to the SelectionModel.
> >>>>
> >>>> --
> >>>> Thiago H. de Paula Figueiredo
> >>>> Tapestry, Java and Hibernate consultant and developer
> >>>> http://machina.com.br
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: select problem render queue

Posted by Geoff Callender <ge...@gmail.com>.
If I read Bob right, I think Bob said his problem was not due to nulls, it was due to the selected value not being one of the values in the OptionModel.

It might also be worth trying secure="literal:false" on the Select.

On 15 Jul 2014, at 5:59 pm, squallmat . <sq...@gmail.com> wrote:

> I tried to see what was in my selectmodel after the factory loading with
> this code :
> 
> // initialize selectmodels
> selectType = selectModelFactory.create(typeClientList, "nomType");
> 
> List<OptionModel> optionModelList = selectType.getOptions();
> 
> System.out.println("begin");
> for (OptionModel optionModel : optionModelList) {
> System.out.println(optionModel.getLabel());
> System.out.println(optionModel.getValue());
> }
> System.out.println("end");
> 
> 
> And in the console I see that I have exactly what I want and I don't see
> any Null in my selectmodel.
> 
> 
> @Bob : How do you resolved your problem ?
> 
> 
> Anyone alse to help me on this ? I'm stuck on thsi problem :(
> 
> 
> 2014-07-14 20:21 GMT+02:00 Bob Harner <bo...@gmail.com>:
> 
>> I haven't read through this thread very carefully, but last week I got
>> a nearly identical stack trace. It was from Palette, not Select, but
>> those components have a lot of identical code. In my case the problem
>> was that the SelectModel had all of the expected values *except* the
>> selected value. Tapestry didn't do a good job with the error messages
>> in that case.
>> 
>> On Fri, Jul 11, 2014 at 5:36 AM, squallmat . <sq...@gmail.com> wrote:
>>> When I do this :
>>> 
>>> selectType = selectModelFactory.create(typeClientList, "nomType");
>>> selectApplications = selectModelFactory.create(applicatifList, "nom");
>>> 
>>> each lists (typeClientList and applicatifList) are not empty.
>>> 
>>> And for the second parameter, I put the variable name of a String of an
>>> object contained in the list, is this what have to be done ?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 2014-07-10 16:57 GMT+02:00 Thiago H de Paula Figueiredo <
>> thiagohp@gmail.com>
>>> :
>>> 
>>>> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>
>>>> wrote:
>>>> 
>>>> Caused by: java.lang.NullPointerException
>>>>> at
>>>>> org.apache.tapestry5.internal.util.SelectModelRenderer.
>>>>> option(SelectModelRenderer.java:51)
>>>>> 
>>>> 
>>>> Check whether you passed a null OptionModel to the SelectionModel.
>>>> 
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>> Tapestry, Java and Hibernate consultant and developer
>>>> http://machina.com.br
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>> 
>>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by "squallmat ." <sq...@gmail.com>.
I tried to see what was in my selectmodel after the factory loading with
this code :

// initialize selectmodels
selectType = selectModelFactory.create(typeClientList, "nomType");

List<OptionModel> optionModelList = selectType.getOptions();

System.out.println("begin");
for (OptionModel optionModel : optionModelList) {
System.out.println(optionModel.getLabel());
System.out.println(optionModel.getValue());
}
System.out.println("end");


And in the console I see that I have exactly what I want and I don't see
any Null in my selectmodel.


@Bob : How do you resolved your problem ?


Anyone alse to help me on this ? I'm stuck on thsi problem :(


2014-07-14 20:21 GMT+02:00 Bob Harner <bo...@gmail.com>:

> I haven't read through this thread very carefully, but last week I got
> a nearly identical stack trace. It was from Palette, not Select, but
> those components have a lot of identical code. In my case the problem
> was that the SelectModel had all of the expected values *except* the
> selected value. Tapestry didn't do a good job with the error messages
> in that case.
>
> On Fri, Jul 11, 2014 at 5:36 AM, squallmat . <sq...@gmail.com> wrote:
> > When I do this :
> >
> > selectType = selectModelFactory.create(typeClientList, "nomType");
> > selectApplications = selectModelFactory.create(applicatifList, "nom");
> >
> > each lists (typeClientList and applicatifList) are not empty.
> >
> > And for the second parameter, I put the variable name of a String of an
> > object contained in the list, is this what have to be done ?
> >
> >
> >
> >
> >
> > 2014-07-10 16:57 GMT+02:00 Thiago H de Paula Figueiredo <
> thiagohp@gmail.com>
> > :
> >
> >> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>
> >> wrote:
> >>
> >>  Caused by: java.lang.NullPointerException
> >>> at
> >>> org.apache.tapestry5.internal.util.SelectModelRenderer.
> >>> option(SelectModelRenderer.java:51)
> >>>
> >>
> >> Check whether you passed a null OptionModel to the SelectionModel.
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Tapestry, Java and Hibernate consultant and developer
> >> http://machina.com.br
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: select problem render queue

Posted by Bob Harner <bo...@gmail.com>.
I haven't read through this thread very carefully, but last week I got
a nearly identical stack trace. It was from Palette, not Select, but
those components have a lot of identical code. In my case the problem
was that the SelectModel had all of the expected values *except* the
selected value. Tapestry didn't do a good job with the error messages
in that case.

On Fri, Jul 11, 2014 at 5:36 AM, squallmat . <sq...@gmail.com> wrote:
> When I do this :
>
> selectType = selectModelFactory.create(typeClientList, "nomType");
> selectApplications = selectModelFactory.create(applicatifList, "nom");
>
> each lists (typeClientList and applicatifList) are not empty.
>
> And for the second parameter, I put the variable name of a String of an
> object contained in the list, is this what have to be done ?
>
>
>
>
>
> 2014-07-10 16:57 GMT+02:00 Thiago H de Paula Figueiredo <th...@gmail.com>
> :
>
>> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>
>> wrote:
>>
>>  Caused by: java.lang.NullPointerException
>>> at
>>> org.apache.tapestry5.internal.util.SelectModelRenderer.
>>> option(SelectModelRenderer.java:51)
>>>
>>
>> Check whether you passed a null OptionModel to the SelectionModel.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: select problem render queue

Posted by "squallmat ." <sq...@gmail.com>.
When I do this :

selectType = selectModelFactory.create(typeClientList, "nomType");
selectApplications = selectModelFactory.create(applicatifList, "nom");

each lists (typeClientList and applicatifList) are not empty.

And for the second parameter, I put the variable name of a String of an
object contained in the list, is this what have to be done ?





2014-07-10 16:57 GMT+02:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>
> wrote:
>
>  Caused by: java.lang.NullPointerException
>> at
>> org.apache.tapestry5.internal.util.SelectModelRenderer.
>> option(SelectModelRenderer.java:51)
>>
>
> Check whether you passed a null OptionModel to the SelectionModel.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: select problem render queue

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . <sq...@gmail.com>  
wrote:

> Caused by: java.lang.NullPointerException
> at
> org.apache.tapestry5.internal.util.SelectModelRenderer.option(SelectModelRenderer.java:51)

Check whether you passed a null OptionModel to the SelectionModel.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org