struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Juaristi (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4634) Centre alignment doesn't seem to work in Velocity tags
Date Wed, 18 May 2016 08:12:12 GMT

    [ https://issues.apache.org/jira/browse/WW-4634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15286401#comment-15286401
] 

Jon Juaristi edited comment on WW-4634 at 5/18/16 8:12 AM:
-----------------------------------------------------------

An excerpt:

Velocity code:
{code}#stextfield ("align=center" "name=filter" "label=Filter"){code}

Generated HTML:

Struts 2.3

{code}<tr>
    <td class="tdLabel"><label for="do_filter" class="label">Filter:</label></td>
    <td align="center"><input type="text" name="filter" value="" id="do_filter" align="center"></td>
</tr>{code}

Struts 2.5

{code}<tr>
    <td class="tdLabel"><label for="do_filter" class="label">Filter:</label></td>
    <td><input type="text" name="filter" value="" id="do_filter" align="center"></td>
</tr>{code}



was (Author: jontxu):
An excerpt:

Velocity code:
#stextfield ("align=center" "name=filter" "label=Filter")

Generated HTML:

Struts 2.3

<tr>
<td class="tdLabel"><label for="do_filter" class="label">Filter:</label></td>
<td align="center"><input type="text" name="filter" value="" id="do_filter" align="center"></td>
</tr>

Struts 2.5
<tr>
<td class="tdLabel"><label for="do_filter" class="label">Filter:</label></td>
<td><input type="text" name="filter" value="" id="do_filter" align="center"></td>
</tr>


> Centre alignment doesn't seem to work in Velocity tags
> ------------------------------------------------------
>
>                 Key: WW-4634
>                 URL: https://issues.apache.org/jira/browse/WW-4634
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.5
>            Reporter: Jon Juaristi
>            Priority: Minor
>             Fix For: 2.5.1
>
>
> When using a tag in a Velocity template, for instance {{#stextfield("label=Foo" "align=center")}}
with the default xhtml theme, inputs are prepended with just <td> instead of <td
align="center"> (as it happens in 2.3.x) in the generated HTML. A form where you want to
centre some of the inputs simply doesn't render as intended.
> I'm using Velocity 1.7 and Velocity Tools 2.0, if that helps.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message