5 Replies Latest reply on Dec 3, 2007 10:20 AM by msznapka

    s:link fragment

    heinzw

      Hello, I try to use s:link with a fragment identifier, but it dosent work.


      <s:link fragment="#{var.id}"/>

      Have you any idea?

        • 1. Re: s:link fragment
          pmuir

          the fragment attribute doesn't support EL bindings. If you need it to, please file a feature request in JIRA

          • 2. Re: s:link fragment
            heinzw

            How can I dynamically assign IDs?

            For example:

            <h:dataTable var="foo">
            <h:column>
            <a:outputPanel id="#{foo.id}"> ... </a:outputPanel>

            </h:column>
            </h:dataTable>

            • 3. Re: s:link fragment
              heinzw

               

              "heinzw" wrote:
              How can I dynamically assign IDs?

              For example:

              <h:dataTable var="foo">
              <h:column>
              <a:outputPanel id="#{foo.id}"> ... </a:outputPanel>

              </h:column>
              </h:dataTable>


              Is there for a another possible solution?

              thx

              • 4. Re: s:link fragment
                pmuir

                Normally this is not possible due to the JSF lifecycle.

                • 5. Re: s:link fragment
                  msznapka

                  What about to have fragment identifier in pages.xml, I can imagine something like smart help page which gives you the right chapter according to page where you are:

                  <page view-id="/*">
                   <rule if-outcome="help">
                   <redirect view-id="/help.xhtml"/>
                   </rule>
                  </page>
                  
                  <page view-id="/applicationOne/*">
                   <rule if-outcome="help">
                   <redirect view-id="/help.xhtml" fragment="chap_appOne"/>
                   </rule>
                  </page>
                  
                  <page view-id="/applicationTwo/*">
                   <rule if-outcome="help">
                   <redirect view-id="/help.xhtml" fragment="chap_appTwo"/>
                   </rule>
                  </page>
                  


                  it will be much easier than dynamically generate s:link's fragment attribute for each xhtml page