You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pascal Robert <pr...@druide.com> on 2017/07/25 18:42:54 UTC
Render queue error in BeforeRenderTemplate when using a SelectModel
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Render queue error in BeforeRenderTemplate when using a
SelectModel
Posted by Pascal Robert <pr...@druide.com>.
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 <ge...@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 <pr...@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-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: Render queue error in BeforeRenderTemplate when using a
SelectModel
Posted by JumpStart <ge...@gmail.com>.
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 <pr...@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: Render queue error in BeforeRenderTemplate when using a
SelectModel
Posted by Pascal Robert <pr...@druide.com>.
> Le 26 juil. 2017 à 09:26, Thiago H. de Paula Figueiredo <th...@gmail.com> a écrit :
>
> On Tue, Jul 25, 2017 at 3:42 PM, Pascal Robert <pr...@druide.com> wrote:
>
>> Hi,
>>
>
> Hi!
>
>
>> Coming from the WebObject world here. I’m trying to build a select input,
>> but it’s not working. The error:
>>
>
> Interesting! As far as I remember, WebObjects was the initial inspiration
> for Howard Lewis Ship creating Tapestry.
That’s what I heard. So far, I do like some WebObjects magic is doing. Thanks for KVC, no need to build up encoders and the like. But well, we didn’t get any external releases of WO since 2008...
>
>
>>
>> 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
>>
>
> This looks like you have a null object inside the list you passed to
> SelectModelFactory.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Render queue error in BeforeRenderTemplate when using a SelectModel
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, Jul 25, 2017 at 3:42 PM, Pascal Robert <pr...@druide.com> wrote:
> Hi,
>
Hi!
> Coming from the WebObject world here. I’m trying to build a select input,
> but it’s not working. The error:
>
Interesting! As far as I remember, WebObjects was the initial inspiration
for Howard Lewis Ship creating Tapestry.
>
> 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
>
This looks like you have a null object inside the list you passed to
SelectModelFactory.