ICEmobile
  1. ICEmobile
  2. MOBI-319

Re-using xhtml fragments in mobi:viewSelector results in duplicate IDs

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: 1.2 Beta
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces 3.1

      Description

      Users will want to reuse xhtml fragments in both small and large layout views but this currently results in a duplicate ID exception being thrown. For example, you can't have id="panel3" in both small and large xhtml:

      <mobi:viewSelector>
            <f:facet name="small">
                   <ui:include src="WEB-INF/views/small.xhtml" />
            </f:facet>
            <f:facet name="large">
                   <ui:include src="WEB-INF/views/large.xhtml" />
            </f:facet>
      </mobi:viewSelector>

      One possible solution would be to create a child component of the viewSelector that would be a NamingContainer and as such would avoid the duplicate id issue.

        Activity

        Hide
        Tyler Johnson added a comment -

        A temporary workaround is to add a subview:

        <mobi:viewSelector>
        <f:facet name="small">
        <f:subview id="small">

        Show
        Tyler Johnson added a comment - A temporary workaround is to add a subview: <mobi:viewSelector> <f:facet name="small"> <f:subview id="small">
        Hide
        Judy Guglielmin added a comment - - edited

        will leave the capability of the facets alone so to have backwards compatability,but am adding child component <mobi:view> which will have attribute "viewType" with same values as facets.
        In this way, the user can decide to use the child component if they want to reuse facelet view pages for each viewType without having to copy and redefine id's on these facelet pages.

        Show
        Judy Guglielmin added a comment - - edited will leave the capability of the facets alone so to have backwards compatability,but am adding child component <mobi:view> which will have attribute "viewType" with same values as facets. In this way, the user can decide to use the child component if they want to reuse facelet view pages for each viewType without having to copy and redefine id's on these facelet pages.
        Hide
        Judy Guglielmin added a comment - - edited

        resolved and tagHandler also added for removing unneccessary markup to server-side component tree

        Show
        Judy Guglielmin added a comment - - edited resolved and tagHandler also added for removing unneccessary markup to server-side component tree

          People

          • Assignee:
            Steve Maryka
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: