Я использую стойки 1.1 с плитками.
У меня есть плитки с определениями вроде
<definition name="cnmp.body.index" extends="cnmp.mainLayout" >
<put name="title" value="CNM Portal" />
<put name="bodytitle" value="Home" />
<put name="body" value="/00-CNM_Landing.jsp" />
</definition>
Я хочу иметь возможность установить значение параметра body в моем классе действий Java.
Что я получу от ActionMapping или ActionForm, чтобы сделать это?
public class TileForwardAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm arg1,
HttpServletRequest arg2, HttpServletResponse arg3) throws Exception
{
return mapping.findForward("theTile");
}
}
файл конфигурации стойки выглядит как
<action-mappings>
<action path = "/index"
type = "com.bellsouth.snt.cnmp.ui.action.TileForwardAction"
scope = "request"
input = "cnmp.body.index"
parameter= "theTile"
>
<forward name="theTile" path="cnmp.body.index"/>
</action>
Спасибо
Вдохновленный принятым ответом, я нашел следующее решение
На странице, определенной в тайл, у меня есть следующее
<% String destAttr=(String)request.getAttribute("dest"); %>
<jsp:include page="<%=destAttr%>" flush="true" />
В классе действий (потому что я ленивый) у меня есть следующее
request.setAttribute("dest", "landingB.jsp");
И это сработало.