On 11/05/2003 09:14 AM Sunny wrote:
HI Friends,
I am developing an application which needs to port attribute of one tile to other.


Heres my defintion of tiles:
<definition name = "AMBody" page = "/activity/common/amTiles/layout/AMLayoutBody.jsp" >
<put name = "title" value = "Page Title" type = "string" />
<put name = "pageName" value = "Current Page" type = "string" />
<put name = "message" value = "/activity/common/messages.jsp" />
<put name = "topNav" value = "/activity/common/topNav.jsp" />
<put name = "body" value = "pageContent" type = "page" />
</definition>


        <definition name = "ExportResourcePool" extends = "AMBody" >
                <put name = "title" value = "Export Resource Pool" />
                <put name = "pageName" value = "ExportResourcePool"/>
                <put name = "body" value = "/activity/plan/exportResourcePool.jsp" />
        </definition>

My Action in Struts-config.xml
        <action path = "/activity/exportResourcePool"
                name = "emptyForm"
                type = "net.collab.sourcecast.igrid.web.action.AMPlanAction"
                input = "ExportResourcePool"
                scope = "request" >
                <forward name = "success" path = "ExportResourcePool" />
        </action>

In my /activity/plan/exportResourcePool.jsp which is a part of ExportResourcePool Definition.

i've coded <tiles:useAttribute id = "currentPage" name = "pageName" type = "java.lang.String" scope = "request" />

and when i try to access this attribute using

<bean:write name = "currentPage" />

I am getting an exception saying
<strong>currentPage</strong> is not found in any scope.

Hi Sunny, in your AMLayoutBody.jsp, you do the following:

<tiles:insert attribute="body">
  <tiles:put name="pageName" beanName="pageName"/>
</tiles:insert>

so that the pageName is passed into the child Tile.

HTH
Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9

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



Reply via email to