That one worked. I was trying to implement this instead: http://tapestry.apache.org/using-select-with-a-list.html
> Le 25 juil. 2017 à 20:17, JumpStart <geoff.callender.jumpst...@gmail.com> a > écrit : > > Sorry, I don’t have the time to recreate your problem, and there is some > stuff missing, such as the instantiation of the encoder, but this working > example may help: > > > http://jumpstart.doublenegative.com.au/jumpstart7/examples/select/easyobject > <http://jumpstart.doublenegative.com.au/jumpstart7/examples/select/easyobject> > > Also note that if your Form can be submitted then you should replace > setupRender with onPrepare, or perhaps 2 methods: onPrepareForRender and > onPrepareForSubmit. > > Geoff > >> On 26 Jul 2017, at 2:42 am, Pascal Robert <prob...@druide.com> wrote: >> >> Hi, >> >> Coming from the WebObject world here. I’m trying to build a select input, >> but it’s not working. The error: >> >> ERROR [2017-07-25 18:28:22,181] bootique-http-33 >> o.a.t.m.T.RequestExceptionHandler: Processing of request failed with >> uncaught exception: org.apache.tapestry5.ioc.internal.OperationException: >> Render queue error in BeforeRenderTemplate[PagePrincipale:gabarit]: >> org.apache.tapestry5.ioc.internal.util.TapestryException [at >> classpath:com/druide/tests/pages/PagePrincipale.tml, line 60] >> java.lang.NullPointerException: null >> at >> org.apache.tapestry5.internal.util.SelectModelRenderer.option(SelectModelRenderer.java:52) >> 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:462) >> Wrapped by: org.apache.tapestry5.ioc.internal.util.TapestryException: null >> Wrapped by: org.apache.tapestry5.ioc.internal.OperationException: Render >> queue error in BeforeRenderTemplate[PagePrincipale:gabarit]: >> org.apache.tapestry5.ioc.internal.util.TapestryException >> >> The call: >> >> @Property >> private SelectModel selectionMV; >> >> @Inject >> SelectModelFactory selectModelFactory; >> >> @Property >> private MachineVirtuelle selectionMachineVirtuelle; >> >> @Property >> private MachineVirtuelleEncoder encoder; >> >> void setupRender() { >> List<MachineVirtuelle> gabarits = getGabarits(); >> selectionMV = selectModelFactory.create(gabarits, "nom"); >> } >> >> <t:form> >> <t:select t:id="gabarit" value="selectionMachineVirtuelle" >> model="selectionMV" encoder="encoder" /> >> </t:form> >> >> I get the exception from the call to selectModelFactory.create, and the « >> gabarits » list is not empty. « nom » is an attribute of MachineVirtuelle. >> >> >> >> --------------------------------------------------------------------- >> 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