Re: select problem render queue
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 . 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 > : > >> On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . >> 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 :pstrange >>> >> >> 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-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Wait for the triggerEvent to finish
In my logs I could see that method that was triggered by the triggerEvent() was still running when onSuccess event was handled. So I got the impression that triggerEvent method is not blocking...but if it is then my problem is somewhere else I guess, right? On Sun, Jul 13, 2014 at 7:02 PM, Dmitry Gusev wrote: > Hi Boris, > > resources.triggerEvent() is a blocking operation, so all callbacks will be > invoked during this call. > > Hence it's not clear what you mean by saying "refresh is faster then > processing of the event". > > Can you tell us who is calling the triggerEvent method? > > And what are you trying to do by using the callback? > > > On Sat, Jul 12, 2014 at 2:20 PM, Boris Horvat > wrote: > > > Hi everyone, > > > > I have a component that triggers the event, once the event is triggered, > it > > will go to OnSuccess method that will try to refresh the zone as you can > > see below > > > > private CaptureResultCallback triggerEvent(Object value, > Object[] > > context) { > > CaptureResultCallback callback = new > > CaptureResultCallback(); > > List eventContext = new ArrayList(); > > if (context != null) { > > eventContext.addAll(Arrays.asList(context)); > > } > > eventContext.add(value); > > this.resources.triggerEvent(UPDATE_EVENT, eventContext.toArray(), > > callback); > > return callback; > > } > > > > Object onSuccess() {\ > > return request.isXHR() ? zoneFlowEdit.getBody() : null; > > } > > > > However it can happen that this refresh it faster then processing of the > > event on the other side, so when the zone tries to refresh itself it > doesnt > > have all of the information that it needs and it throws NPE. > > > > Is it possible to force the wait here so that I wait for the return of > the > > callback and then proceed to the onSuccess method? > > > > Thanks > > > > -- > > Sincerely > > *Boris Horvat* > > > > > > -- > Dmitry Gusev > > AnjLab Team > http://anjlab.com > -- Sincerely *Boris Horvat*
Re: Tapestry-csrf-protection with Tapestry-Spring-Security.
Thanks a lot Eugen ! Le 15/07/2014 22:12, Eugen a écrit : Yes, this is the "normal" way, another way is to make a tapestry form, f.e.: and in OnSuccess event something like: @inject AuthenticationManager authenticationManager; void onSuccess() { Authentication authentication = new UsernamePasswordAuthenticationToken(username, password); Authentication authResult = authenticationManager.authenticate(authentication); SecurityContextHolder.getContext().setAuthentication(authResult); } this code throws an AuthenticationException if authentication fails. Eugen 2014-07-15 19:09 GMT+02:00 TNO : Thanks, but This is a form with an action value This is not a tapestry form (t:form), I don't think I can use the onSuccess Thomas Le 15/07/2014 18:49, Eugen a écrit : Hi, You can login programatically in onSucces function of a tapestry form. Best regards Eugen Am 15.07.2014 16:16 schrieb "TNO" : Hello, Is there anybody who already use tapestry-csrf-protection with Tapestry-Spring-Security ? tapestry-csrf-protection works out of the box with t:form, but Tapestry-Spring-Security works with is a simple html form and uses the Spring HttpServletRequestFilter. I'm using in the login form but I can't check the token value in the filters... Thanks for any help Cheers, Thomas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-csrf-protection with Tapestry-Spring-Security.
Yes, this is the "normal" way, another way is to make a tapestry form, f.e.: and in OnSuccess event something like: @inject AuthenticationManager authenticationManager; void onSuccess() { Authentication authentication = new UsernamePasswordAuthenticationToken(username, password); Authentication authResult = authenticationManager.authenticate(authentication); SecurityContextHolder.getContext().setAuthentication(authResult); } this code throws an AuthenticationException if authentication fails. Eugen 2014-07-15 19:09 GMT+02:00 TNO : > Thanks, but > > This is a form with an action value > > class="line"> > > This is not a tapestry form (t:form), I don't think I can use the onSuccess > > Thomas > > Le 15/07/2014 18:49, Eugen a écrit : > > Hi, >> You can login programatically in onSucces function of a tapestry form. >> Best regards >> Eugen >> Am 15.07.2014 16:16 schrieb "TNO" : >> >> Hello, >>> >>> Is there anybody who already use tapestry-csrf-protection with >>> Tapestry-Spring-Security ? >>> >>> tapestry-csrf-protection works out of the box with t:form, but >>> Tapestry-Spring-Security works with is a simple html form and uses the >>> Spring HttpServletRequestFilter. >>> >>> I'm using in the login form but I can't >>> check the token value in the filters... >>> >>> Thanks for any help >>> >>> Cheers, Thomas >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Tapestry-csrf-protection with Tapestry-Spring-Security.
Thanks, but This is a form with an action value class="line"> This is not a tapestry form (t:form), I don't think I can use the onSuccess Thomas Le 15/07/2014 18:49, Eugen a écrit : Hi, You can login programatically in onSucces function of a tapestry form. Best regards Eugen Am 15.07.2014 16:16 schrieb "TNO" : Hello, Is there anybody who already use tapestry-csrf-protection with Tapestry-Spring-Security ? tapestry-csrf-protection works out of the box with t:form, but Tapestry-Spring-Security works with is a simple html form and uses the Spring HttpServletRequestFilter. I'm using in the login form but I can't check the token value in the filters... Thanks for any help Cheers, Thomas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-csrf-protection with Tapestry-Spring-Security.
Hi, You can login programatically in onSucces function of a tapestry form. Best regards Eugen Am 15.07.2014 16:16 schrieb "TNO" : > Hello, > > Is there anybody who already use tapestry-csrf-protection with > Tapestry-Spring-Security ? > > tapestry-csrf-protection works out of the box with t:form, but > Tapestry-Spring-Security works with is a simple html form and uses the > Spring HttpServletRequestFilter. > > I'm using in the login form but I can't > check the token value in the filters... > > Thanks for any help > > Cheers, Thomas > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: select problem render queue
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 : > On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . > 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 :pstrange >> > > 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-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: select problem render queue
On Tue, 15 Jul 2014 10:48:02 -0300, squallmat . 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 :pstrange 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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-csrf-protection with Tapestry-Spring-Security.
The trace : |java.lang.NullPointerException: Unable to delegate method invocation to property 'request' of , because the property is null. at $Request_1ce08361bf2a.readProperty(Unknown Source) at $Request_1ce08361bf2a.getSession(Unknown Source) at $Request_1ce08361bee0.getSession(Unknown Source) at org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.exists(SessionApplicationStatePersistenceStrategy.java:80) at $ApplicationStatePersistenceStrategy_1ce08361c07b.exists(Unknown Source) at org.apache.tapestry5.internal.services.ApplicationStateManagerImpl$ApplicationStateAdapter.exists(ApplicationStateManagerImpl.java:60) at org.apache.tapestry5.internal.services.ApplicationStateManagerImpl.getIfExists(ApplicationStateManagerImpl.java:140) at $ApplicationStateManager_1ce08361bf33.getIfExists(Unknown Source) at org.apache.tapestry5.csrfprotection.internal.SessionCsrfTokenRepository.loadToken(SessionCsrfTokenRepository.java:39) at $CsrfTokenRepository_1ce08361c079.loadToken(Unknown Source) at $CsrfTokenRepository_1ce08361beff.loadToken(Unknown Source) at org.atlog.mjweb.services.user.GemwebCsrfAuthenticationProcessingFilter.checkToken(GemwebCsrfAuthenticationProcessingFilter.java:40) at org.atlog.mjweb.services.user.GemwebCsrfAuthenticationProcessingFilter.attemptAuthentication(GemwebCsrfAuthenticationProcessingFilter.java:35) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:211) at nu.localhost.tapestry5.springsecurity.services.internal.HttpServletRequestFilterWrapper.service(HttpServletRequestFilterWrapper.java:52) ... | Le 15/07/2014 16:15, TNO a écrit : Hello, Is there anybody who already use tapestry-csrf-protection with Tapestry-Spring-Security ? tapestry-csrf-protection works out of the box with t:form, but Tapestry-Spring-Security works with is a simple html form and uses the Spring HttpServletRequestFilter. I'm using in the login form but I can't check the token value in the filters... Thanks for any help Cheers, Thomas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry-csrf-protection with Tapestry-Spring-Security.
Hello, Is there anybody who already use tapestry-csrf-protection with Tapestry-Spring-Security ? tapestry-csrf-protection works out of the box with t:form, but Tapestry-Spring-Security works with is a simple html form and uses the Spring HttpServletRequestFilter. I'm using in the login form but I can't check the token value in the filters... Thanks for any help Cheers, Thomas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading typeahead to the latest version.
So I just took a quick peak and I'm seeing where the bootstrap library was updated, but I'm not seeing where the typeahead.js has been updated. (perhaps I'm just overlooking it too) https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=ef7f9c43ec4f8a4a7e76383c1877215e17d972a9 I believe the typeahead library was split off from bootstrap in bootstrap3. So I believe we need to update this independently. Thanks Guys. On Tue, Jul 15, 2014 at 9:35 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Tue, 15 Jul 2014 10:03:36 -0300, George Christman < > gchrist...@cardaddy.com> wrote: > > Hi Howard, where are the recent commits located? >> > > https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=log > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: select problem render queue
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 :pstrange 2014-07-15 14:58 GMT+02:00 Thiago H de Paula Figueiredo : > On Tue, 15 Jul 2014 07:03:32 -0300, squallmat . > 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-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Upgrading typeahead to the latest version.
On Tue, 15 Jul 2014 10:03:36 -0300, George Christman wrote: Hi Howard, where are the recent commits located? https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=log -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading typeahead to the latest version.
Hi Howard, where are the recent commits located? Thanks llya, I'll have to keep your library in mind for our next project. On Mon, Jul 14, 2014 at 6:43 PM, Ilya Obshadko wrote: > You may use a replacement mixin from here: > https://github.com/xfyre/tapestry5-xtensions > It's more flexible, allows to work with list of beans and customize > suggestion templates. > > > On Tue, Jul 15, 2014 at 7:14 AM, George Christman > > wrote: > > > Hi guys, I'm wondering if there is a chance we could upgrade the > > typeahead.js to the latest version? It seems as if we are a little more > > than a year out of date. > > > > https://github.com/twitter/typeahead.js/blob/master/CHANGELOG.md > > > > Thanks, > > > > -- > > George Christman > > www.CarDaddy.com > > P.O. Box 735 > > Johnstown, New York > > > > > > -- > Ilya Obshadko > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: select problem render queue
On Tue, 15 Jul 2014 07:03:32 -0300, squallmat . 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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: select problem render queue
On Tue, 15 Jul 2014 06:28:46 -0300, Geoff Callender 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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: select problem render queue
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, ValueEncoderFactory { @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 create(Class 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.jumpst...@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 . 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 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 : > > > >> 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 . > 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 < > >> thiag...@gmail.com> > >>> : > >>> > On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . > 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-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > >> > >> -
Re: select problem render queue
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 . 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 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 : > >> 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 . 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 < >> thiag...@gmail.com> >>> : >>> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . 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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: select problem render queue
I tried to see what was in my selectmodel after the factory loading with this code : // initialize selectmodels selectType = selectModelFactory.create(typeClientList, "nomType"); List 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 : > 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 . 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 < > thiag...@gmail.com> > > : > > > >> On Thu, 10 Jul 2014 09:51:08 -0300, squallmat . > >> 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-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >