Button in Struts 2
------------------

                 Key: WW-2777
                 URL: https://issues.apache.org/struts/browse/WW-2777
             Project: Struts 2
          Issue Type: Bug
         Environment: Microsoft Windows 2002
            Reporter: Dilip Parihar


There is no separate tag for Button in struts 2 and it is created by struts-tag 
using <s:submit type="button" value="%{getText('myapp.myvalue')}" 
onclick="do_something();" />. This results in generating a <button 
type="submit" ..../> in HTML. This button is always associated with <s:form 
action="myaction.action" />.
When such button is clicked it submit the form calling 
action="myaction.action", although I don't want action to be called on clicking 
the button.
The Bug in Struts 2 with button is that <s:submit type="button" .../> is link 
with <s:form ..../>, and If i do not use struts-tags and simply use <input 
type="button" ....> then I can't use value="%{getText('myapp.myvalue')}", 
because <input type="button" ..> do not work for i18n.
I need a simple button which just calls 'do_something() on clicking it and in 
no way should call 'action', I do not need a button which is of 'type=submit' 
in HTML. I need a simple button something like <s:button value="i18n value" />

thanks,
Dilip Parihar


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to