struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Park <>
Subject wierd problem
Date Mon, 01 Oct 2007 23:28:15 GMT

I am having a wierd problem where my action calls are not forwarding to the correct page.
 Actually it works one time, but when I try to run the same action again (this time on the
same page) it attempts to go to a different action (i.e. INPUT). Here is how I have it set
<action name="ItemList" class="action.ItemAction" method="list">
<result name="success">/jsp/items.jsp</result>
<action name="Item" class="action.ItemAction" method="view">
<result name="input">/jsp/itemEdit.jsp</result>
<result name="success">/jsp/itemView.jsp</result> 
<s:form method="post" theme="simple" name="theForm">
<s:iterator value="resultList" status="status">
<a onClick=retrieveURL('<%= request.getContextPath() %>/Item!view.action?someBean.itemId=<s:property
value="item_id"/>', main_span, null, "POST");>
<s:property value="item_details"/><br>
<script language='javascript'>
function sort() {
  ... sorting code ...
  retrieveURL("<%= request.getContextPath() %>/Item!view.action", main_target, "POST");
function retrieveURL(url, target, postMethod) {
  try {
    var params = Form.serialize($('theForm'));
  } catch (e) {
    var params = "";
  new Ajax.Request(url, 
    onSuccess: function(transport) { 
      var response = transport.responseText;
      target.innerHTML = response; 
    onLoading: function() {

<s:form method="post" theme="simple" name="theForm">
<s:hidden name="someBean.itemId" value="%{someBean.itemId}" />
<s:hidden name="someBean.sortColumn" value="%{someBean.sortColumn}" />
<s:hidden name="someBean.sortDirection" value="%{someBean.sortDirection}" />
<s:property value="%{someBean.itemId}"/><br>
<s:property value="%{someBean.itemName}"/><br>
<s:property value="%{someBean.itemDescription}"/><br>
<input type='button' onClick='sort("actual");' value='Sort'/>
<s:iterator value="AssociatedItemList" status="status">
<s:property value="dateRange"/> - <s:property value="actual"/> - <s:property
So on 'items.jsp' I click on a line item and it successfully forwards to the 'success' page.
However, on the details screen when click on 'sort', it calls the same action but does not
return to the same page.
Connect to the next generation of MSN Messenger
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message