I'm using struts and dojo. My code works fine until I change the
struts namespace.
These are my actions:
<package name="expedient" extends="struts-default">
<action name="showExpedients">
<result>pages/expedient/Expedient.jsp</result>
</action>
<action name="listExpedients"
class="expedientController" method="execute">
<result>pages/expedient/ExpedientList.jsp</result>
</action>
<action name="showLines" class="expedientController"
method="getLines">
<result>pages/expedient/ExpedientLinesList.jsp</result>
</action>
</package>
I have the main page Expedient.jsp, a page for listing expedients
ExpedientsList.jsp and another one for listing the lines of the
expedients ExpedientLinesList. This works fine, if I publish an event
in ExpedientList.jsp it can be captured in Expedient.jsp.
But when I change the struts namespace:
<package name="expedient" extends="struts-default" namespace="/expedient">
<action name="showExpedients">
<result>/pages/expedient/Expedient.jsp</result>
</action>
<action name="listExpedients"
class="expedientController" method="execute">
<result>/pages/expedient/ExpedientList.jsp</result>
</action>
<action name="showLines" class="expedientController"
method="getLines">
<result>/pages/expedient/ExpedientLinesList.jsp</result>
</action>
</package>
the following notification inside ExpedientList.jsp doesn't call
the subscription in Expedient.jsp
notify code in ExpedientList.jsp:
<s:a href="%{viewLinesUrl}" theme="ajax"
targets="expedientLines" notifyTopics="/openLineList">View All
Messages</s:a>
subscrition code in Expedient.jsp:
dojo.event.topic.subscribe("/openLineList",
function(data, type, request){ my code...});
The only difference I see is that when the namespace is used in
struts I have to write the absolute path in the <result> tags. But I
don't fully understand how this affect the events in dojo and how to
solve it. I don't see the light.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]