[S2] Complex submit button issue

View: New views
2 Messages — Rating Filter:   Alert me  

[S2] Complex submit button issue

by Eric Martin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using the css_xhtml theme and trying to create a submit button that outputs something like:

<button type="button" class="button positive save">
    Save Save
</button>

I would expect something like this to work:
<s:submit type="button"
  cssClass="button positive save"
  value="">
   Save Save    
</s:submit>

But it outputs (formatted):
<img src="/core/images/tick.png" alt="Save"/> Save    
<div align="right"    id="wwctrl_search_0">
    <button type="submit" id="search_0" value="" class="button positive save"></button>
</div>

I thought that maybe whatever was inside the s:submit tag would be used as the value, but no such luck. Is that value held somewhere? If it is, I could just edit the template to display it...

Is there a struts way to do this, or should I just use standard HTML?

Thanks,
Eric


Re: [S2] Complex submit button issue

by Eric Martin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like this is a previously reported issue that was "fixed":
https://issues.apache.org/struts/browse/WW-1677

However, I'm using 2.0.11 and it is still not working.

Thanks,
Eric

Eric Martin wrote:
I'm using the css_xhtml theme and trying to create a submit button that outputs something like:

<button type="button" class="button positive save">
    Save Save
</button>

I would expect something like this to work:
<s:submit type="button"
  cssClass="button positive save"
  value="">
   Save Save    
</s:submit>

But it outputs (formatted):
<img src="/core/images/tick.png" alt="Save"/> Save    
<div align="right"    id="wwctrl_search_0">
    <button type="submit" id="search_0" value="" class="button positive save"></button>
</div>

I thought that maybe whatever was inside the s:submit tag would be used as the value, but no such luck. Is that value held somewhere? If it is, I could just edit the template to display it...

Is there a struts way to do this, or should I just use standard HTML?

Thanks,
Eric
LightInTheBox - Buy quality products at wholesale price!