0

I have a TreeTag like this :

<s:url var="treeDataUrl" action="treeData" />
<sjt:tree href="%{treeDataUrl}" jstreetheme="myTheme" checkbox="true" onClickTopics="treeClicked" />

On load, the treeData action is called and everything is displayed correctly.

I have added this submit button :

<sj:submit formIds="treeForm" targets="" button="true" />

And I would like to call a different action when submiting rather than treeData again.

How can I do this?

This is the struts.xml part that controls this code:

<action name="treeData" class="com.myProject.presentation.action.TreeData">
    <result name="success" type="json">
        <param name="root">nodes</param>
    </result>
</action>

Thank you all!

Edu Castrillon
  • 527
  • 1
  • 12
  • 28

1 Answers1

0

I just had to surround my tree with the good form:

<s:form id="treeForm" action="treeData" method="post">
    <s:url var="treeDataUrl" action="treeData" />
    <sjt:tree href="%{treeDataUrl}" jstreetheme="myTheme" checkbox="true" onClickTopics="treeClicked" />
    <sj:submit formIds="treeForm" targets="" button="true" />
</s:form>
Edu Castrillon
  • 527
  • 1
  • 12
  • 28