[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3339) Improve s:decorate to make rendering of enclosing div element optional
Wolfgang Schwendt (JIRA)
jira-events at lists.jboss.org
Thu Oct 23 10:21:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBSEAM-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wolfgang Schwendt updated JBSEAM-3339:
--------------------------------------
Attachment: JBSEAM-3339-patch-20081023.txt
Attached an updated version of the patch. If the patch is applied, the default behavior of s:decorate remains the same, so no existing Seam application is broken. However, two optional attributes are added to s:decorate:
1) attribute "encloseTemplate". This is a boolean attribute to specify whether the s:decorate template, when rendered, should be enclosed with an element. By default, the value of "encloseTemplate" is true.
2) attribute "encloseWith". It serves to specify the element the s:decorate template should be enclosed with during the rendering. By default, the value of "encloseWith" is div.
Examples:
<!-- disables the enclosing of the template by the div-element, very useful for rendering table rows -->
<s:decorate id="username" template="/layout/edit.xhtml" encloseTemplate="false">
<ui:define name="label">Username</ui:define>
<h:inputText id="usernameTextfield" value="#{loginAction.username}" required="true">
</s:decorate>
<!-- encloses the s:decorate template with a rendered span rather than div element -->
<s:decorate id="emailAdr" template="/layout/edit.xhtml" encloseWith="span">
...
</s:decorate>
> Improve s:decorate to make rendering of enclosing div element optional
> ----------------------------------------------------------------------
>
> Key: JBSEAM-3339
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3339
> Project: Seam
> Issue Type: Feature Request
> Environment: Seam 2.1.0 Rev. 8823
> Reporter: Wolfgang Schwendt
> Priority: Minor
> Attachments: JBSEAM-3339-patch-20081023.txt, JBSEAM-3339-patch.diff.txt
>
>
> The renderer for s:decorate encloses the template used to decorate an input field by a div element. However, this makes s:decorate useless for rendering table columns because the resulting html-code is invalid when a table row is enclosed by a div-element.
> Proposal: Add an (optional) attribute to s:decorate to disable the rendering of the enclosing div-element.
> In my patch attached above, the attribute is named "encloseTemplate". By default this attribute is true in order not to change the current behavior of s:decorate. If "encloseTemplate" is set to false, however, no enclosing div-element is rendered.
> Example:
> <s:decorate id="MyId" template="/layout/tableRow.xhtml" encloseTemplate="false">
> </s:decorate>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list