Hi Markus,
Is the BeanDisplay component inside a form? In that case,
@OnEvent("prepare")
void setupModel() { ... }
should be called whenever the form is preparing to be rendered or submitted.
Is there any reason you can't setup your model once and just reference
it from there? Just curious.
-Filip
On 2008-08-27 22:53, Markus Joschko wrote:
Hi,
I am currently struggling to find the best way to setup a model for a
beandisplay from within a component.
As I have an ajax call included, the method should not only be called
during the render phase, but also during the action phase.
I looked at the form component (which fires a prepare event at
render&action requests) and it fires the event during
beginRender() and
onAction(EventContext ctx).
I can mimic this behavior in my page but it feels somehow wrong to
have these both methods just to setup the model.
I tried
@BeginRender
@OnEvent(value="action")
void setupModel()
however this method is never called during the action phase. I also
tried to put the EventContext parameter in the signature but that
doesn't help.
Can't I put two annotations on the same method? Is there any
difference between the naming convention and the annotation?
But hopefully there is an easier way to do this which I haven't found so far.
Thanks,
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]