This is a continuation of the problem I posted about last week.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html>
  <head>
   </head>
  <body>
    
    <s:form action="process-template" method="post">
    <ul>
    <s:iterator value="templateDataList" status="status">
      <li>
    <s:submit type="button" label="Display"
method="display?templateId=%{#status.index}" /> 
    </li>
    </s:iterator>
    </ul>
    </s:form>
  </body>
</html>


This simple jsp should generate a submit button for each entry in the
templateDataList and pass
the index of the list element selected back to the action. The action
contains a display() method with getter & setter for templateId. When the
first  button in the list is pressed, Struts complains
"java.lang.NoSuchMethodException:
com.blackbox.actions.ProcessTemplate.display?templateId=0()". 
If I annotate the display method with @Action("display?templateId=0()") then
everything works (provided I select the button with the index value 0)

I can't believe that I've discovered a major flaw in the plugin, so it must
mean that I'm doing something stupid but I can't work out what. I've posted
a demo for a similair problem in JIRA WW-3276 if anyone would like to take a
look.

I'd appreciate some help as otherwise I'm going to have to convert my app
back to Struts "Classic"

Regards

  
-- 
View this message in context: 
http://www.nabble.com/More-Convention-Confusion.-tp25816249p25816249.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to