Render queue error in BeforeRenderTemplate when using a SelectModel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Render queue error in BeforeRenderTemplate when using a SelectModel

Pascal Robert
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Render queue error in BeforeRenderTemplate when using a SelectModel

JumpStart
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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Render queue error in BeforeRenderTemplate when using a SelectModel

Pascal Robert
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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Render queue error in BeforeRenderTemplate when using a SelectModel

Thiago H de Paula Figueiredo
In reply to this post by Pascal Robert
On Tue, Jul 25, 2017 at 3:42 PM, Pascal Robert <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Render queue error in BeforeRenderTemplate when using a SelectModel

Pascal Robert

> Le 26 juil. 2017 à 09:26, Thiago H. de Paula Figueiredo <[hidden email]> a écrit :
>
> On Tue, Jul 25, 2017 at 3:42 PM, Pascal Robert <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...