But how would the framework know with what to populate it?

You either do it manually in the body of the action that you execute to
reach the view ,e.g.,

certificate = //logic to get the certificate

or you can implement the ModelDriven interface which has a method (prepare
I think) that gets called prior to executing the action

Antonios


On 27 June 2013 11:49, Fabian Richter <frich...@mtg.de> wrote:

> Am 27.06.2013 12:43, schrieb Antonios Gkogkakis:
>
>  I assume you are on Struts2.
>>
>
> Yes, I am, more precisely I am migrating an application from Webwork to
> Struts2.
>
>
>  I'm not familiar with the ${} expression, but you are right, there is an
>> OGNL null handler that will instantiate objects for you if they are null,
>> so the behaviour we see makes sense, which means that you don't have a
>> certificate in the value stack.
>>
>> How do you access your view ? Prior to getting your view, you should have
>> an action that gets executed in an Action class which has a certificate
>> field, which gets populated prior to returning to the view.
>>
>
> I definitely have an Action class with a certificate field, the action
> also gets called within that Action class, but how do I populate the
> certificate field? I thought that was done automatically as it is a field
> of the Action class.
>
> Best
> Fabian
>
>

Reply via email to