[seam-issues] [JBoss JIRA] Commented: (JBSEAM-4273) edit.xhtml.ftl template cause duplicate id changeParent and selectParent

adam tarshis (JIRA) jira-events at lists.jboss.org
Sun Jul 25 15:36:33 EDT 2010


    [ https://jira.jboss.org/browse/JBSEAM-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12540875#action_12540875 ] 

adam tarshis commented on JBSEAM-4273:
--------------------------------------

There is a minor typo in the replacement line above - there is a space before the closing single quote: 'changeParent${property.name?cap_first} '.
This causes an IllegalArgumentException.  Corrected string to use in the replacement is:

<s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent${property.name?cap_first}' : 'selectParent${property.name?cap_first}'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"

> edit.xhtml.ftl template cause duplicate id changeParent and selectParent
> ------------------------------------------------------------------------
>
>                 Key: JBSEAM-4273
>                 URL: https://jira.jboss.org/browse/JBSEAM-4273
>             Project: Seam
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 2.1.2.GA
>         Environment: SEAM_HOME/seam-gen/view/edit.xhtml.ftl
>            Reporter: Julien Kronegg
>
> When a MyEntityEdit.xhtml page with more than one foreign key is generated, the "Select" / "Change" button is generated with an id "changeParent" or "selectParent" for each foreign key.
> This causes "duplicate id" errors when displaying the page.
> The button id must be changed to be unique, e.g. by suffixing with the property name.
> The line 136:
>             <s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent' : 'selectParent'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
> must be replaced by:
>             <s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent${property.name?cap_first} ' : 'selectParent${property.name?cap_first}'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
> I did not find references to the button id elsewhere, so it seems that no side effect will appear.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list