Your explanation is unclear. This way you never get an answer. Please be
more precise and post more of your code.

On Mon, Jan 4, 2010 at 11:07 AM, lebenski <be...@gamesys.co.uk> wrote:

>
> I have a layout component that contains a login form:
>
> <t:form t:id="loginForm">
>        <t:textfield t:id="loginUsernameField" t:value="memberName"
> height="30"/>
>        <t:passwordfield t:id="loginPasswordField" t:value="password" />
>        <t:submit id="loginSubmit" value="message:login"/>
> </t:form>
>
> Page Class:
>
> Object onSuccessFromLoginForm() {
>        try{
>            loggedInMember = loginManager.logUserIn(new Login(memberName,
> password));
>        } catch(LoginException e) {
>            //Login Error Processing
>        }
>
>        return Index.class;
> }
>
> I also have a generic confirmation page which I use for page flows where I
> need to present some message to the user.  For example "Thanks for
> submitting a question"
>
> SubmitQuestion.java
>
> @InjectPage
> private Confirmation confirmation;
>
> Object onSuccessFromQuestionForm() {
>        //processing
>        confirmation.setType(ConfirmationType.SUCCESS);
>        confirmation.setMessage(Messages.get("question-submit"));
>
>        return confirmation;
> }
>
> The confirmation template itself is inside the layout:
>
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>        ${type}<br/>
>        ${message}
> </t:layout>
>
> However, for some reason I don't seem to have access to the layout from
> this
> confirmation page.  If I try to use the login form, the Index page is
> loaded
> but the user is not logged in.  In fact as far as I can see (through
> debugging), the onSuccessFromLoginForm() method in the Layout is never
> called.
>
> I'm at a bit of a loss as to why this is happening, as this is working on
> all other pages in my application.  Is there some specific nuance of using
> @InjectPage that could be causing this issue?
> --
> View this message in context:
> http://old.nabble.com/-T5.0.18--%40InjectedPage-does-not-have-access-to-it%27s-own-layout-tp27010913p27010913.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de/blog

Reply via email to