[Of course as soon as I hit send....]
One thing that occurs to me is that you could set the mode on another
bean, and then read the mode value from the other bean as the first
managed property of your page bean. You'd have complete control over
the initialization that way. However, EL wouldn't instantiate the
bean at the time you set the mode property, but maybe you don't want
that anyway. It's possible there's some scoping issues you'd have to
work through as well.
On 12/22/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
There's no easy way to determine this.
I pass the mode in as part of the command-link:
<h:commandLink action="goto add or edit page">
<t:updateActionListener
property="#{page.displayOnlyMode}"
value="#{true}" />
</h:commandLink>
Not sure if the timing of this will work out for your spring-injected
values as I use the mode at renderResponse and action time, not at
initialization time.
On 12/22/06, support <[EMAIL PROTECTED]> wrote:
> Is there a way, in the backend bean constructor to find out which
> commandlink was pressed by the user to make the call?
>
> I am having difficulty with using the same page for both Insert and
> Update on information contained in the database. The command link does
> not hit the action listener if the wrong mode is set, but not sure how
> to detect what mode I am in before all the setters get executed (spring
> injected).
>
> Thanks
>
> Roger
>