There is some JavaScript that runs "out of the box" that looks for a link in
the first column of a table and applies it to the entire row. I'm guessing
this is causing the problem you describe.
Look for the following in listGames.jsp and comment it out to see if this is
the problem:
highlightTableRows("games");
Hope that helps,
Nathan
----- Original Message -----
From: "Martin Ravell" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, June 4, 2007 6:09:50 AM (GMT-0800) America/Los_Angeles
Subject: [appfuse-user] Struts2
Sorry if this is a little off topic but I figure there are a few people
out there using the Struts2 version of appfuse and I'm needing some help.
In a pretty simple list page created by an appfuse:gen / appfuse:install
on a new pojo called Game. I have added an extra column to this
gameList.jsp in which I have put a hyperlink to a new page
(displayGame.html). Now, not understanding how this S2 stuff really works
I am getting a problme where when I click on this link I seem to be
getting redirected to the editGame.html page.
I've tried various things in stuts.xml. Currently the entry looks like:
<action name="displayGame" class="gameAction" method="display">
<result name="success" type="redirect">displayGame.html</result>
</action>
The URL reads correctly as displayGame.html but I end up on the
editGame.html.
I added a new method to GameAction as well:
public String display()
throws Exception
{
System.out.println("display method reached");
if (id != null) {
game = gameManager.get(id);
} else {
game = new Game();
}
return SUCCESS;
}
Which is pretty much the same as the code in the edit method.
Can anyone explain to me what I need to do to get this seamingly simple
extra page to work?
Regards
Marty
PS. Here is a bigger chunk of the struts.xml file
<!--GameAction-START-->
<action name="games" class="gameAction" method="list">
<result>/WEB-INF/pages/gameList.jsp</result>
</action>
<action name="displayGame" class="gameAction" method="display">
<result name="success" type="redirect">displayGame.html</result>
</action>
<action name="editGame" class="gameAction" method="edit">
<result>/WEB-INF/pages/gameForm.jsp</result>
<result name="error">/WEB-INF/pages/gameList.jsp</result>
</action>
<action name="saveGame" class="gameAction" method="save">
<result name="input">/WEB-INF/pages/gameForm.jsp</result>
<result name="cancel" type="redirect">games.html</result>
<result name="delete" type="redirect">games.html</result>
<result name="success" type="redirect">games.html</result>
</action>
<!--GameAction-END-->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]