Phil Steitz wrote the following on 1/24/2005 7:25 PM:

<tiles:put name='title' type="string">
    <logic:equal name="bookForm" property="action"
            scope="request" value="Create">
        <bean:message key="book.title.create"/>
    </logic:equal>
    <logic:equal name="bookForm" property="action"
            scope="request" value="Update">
        <bean:message key="book.title.update"/>
    </logic:equal>
</tiles:put>

May not be the best, but keeps display stuff separate.

This would be way to combersome since the title will be displayed in a reusable header page. The result would be that you'd have to code one huge long logic construct to decide what to display for the title for every possible action.


I'm not totally opposed to using the request approach mentioned where I stuff a "title" attribute into the request in the Action and can then display it on the page...

<title>${title}</title>

however, I'm starting to lean towards adding redundant code in the tiles config. At least all the titles will be in one place. Unfortunately this also requires me to have unique action forward mappings so that the correct tiles definition will be called. So I can't just have the forward go to a default myForm.page for both edit and add. I have to use edit.form.page and add.form.page simply so that the tiles defintion can add the correct title even though I'm going to the same JSP.

I'm still torn on which approach to use:)


-- Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to