You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/01/12 09:10:45 UTC
[jira] [Closed] (TAP5-1545) Submit component should be able to
render as button type="submit"
[ https://issues.apache.org/jira/browse/TAP5-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Kemnade closed TAP5-1545.
--------------------------------
Resolution: Invalid
We assume this is no longer relevant and therefore close it.
If you still have this issue in a recent Tapestry version (such as 5.3.8 or the latest 5.4 preview release), feel free to provide the necessary information and reopen.
> Submit component should be able to render as button type="submit"
> -----------------------------------------------------------------
>
> Key: TAP5-1545
> URL: https://issues.apache.org/jira/browse/TAP5-1545
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.2
> Reporter: nillehammer
> Priority: Minor
> Labels: bulk-close-candidate
>
> The Submit component renders an <input type="submit">. Since Html 4.0 it is possible to markup the submit button as what it is, a button. The HTML markup is <button type="submit">. I prefer this approach, because it makes styling easier. One could use a general CSS-styling for input-Elements (e.g. common width, special fonts etc.). And the submit button won't be affected.
> To make this change backwards compatible, an optional parameter could be used in org.apache.tapestry5.corelib.components.Submit. The code:
> @Parameter(value="false", defaultPrefix = BindingConstants.LITERAL)
> private boolean renderAsButton;
> And in the method beginRende()r:
> if (renderAsButton) {
> writer.element("button",
> "type", "submit",
> "name", name,
> "id", clientId);
> if (image !=null) {
> writer.element("img", "src", image.toClientURL());
> writer.end();
> }
> }
> else {
> //... do the usual rentering of input type submit
> }
> Thanks in advance and cheers to the commiters,
> nillehammer
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)