Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b:navLink inside ui:repeat rendered with span instead of li #443

Closed
kirys opened this issue Jun 28, 2016 · 6 comments
Closed

b:navLink inside ui:repeat rendered with span instead of li #443

kirys opened this issue Jun 28, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@kirys
Copy link

kirys commented Jun 28, 2016

When navlink is used inside a ui:repeat it render with span.
example in this case:

    <b:listLinks>
        <b:navLink header="Statistiche" />
        <b:navLink href="#{request.contextPath}/a/s/stats/index.xhtml" value="Sommario" />
        <b:navLink href="#{request.contextPath}/a/s/stats/anni.xhtml" value="Andamenti annuali" />
        <b:navLink></b:navLink>
        <b:navLink header="Dettaglio annuo"/>       
        <ui:repeat value="#{mercurialSession.years}" var="anno">
            <b:navLink href="#{request.contextPath}/a/s/stats/anno.xhtml?y=#{anno}" value="#{anno}" />
        </ui:repeat>        

        <b:navLink></b:navLink>
    </b:listLinks>
@stephanrauh stephanrauh self-assigned this Jun 28, 2016
@stephanrauh
Copy link
Collaborator

Oops - you're right, I missed that when I allows the navLink to be a solitary link.

@stephanrauh stephanrauh added this to the v0.9.0 milestone Jun 28, 2016
@MitchTalmadge
Copy link
Contributor

I noticed this bug as well but forgot to report it -- oops :P Glad someone else caught it. I used a c:forEach tag to get around the bug. It works just as well.

@kirys
Copy link
Author

kirys commented Jun 29, 2016

glad to be of help ^_^

@stephanrauh
Copy link
Collaborator

There are subtle differences between ui:repeat and c:each. The (older) c:each component is resolved earlier, which may cause problems under certain circumstances.

@zhedar
Copy link
Collaborator

zhedar commented Jun 29, 2016

@stephanrauh In this case, c:forEach should be a valid use though. As long as you don't bind any ui:repeats to the var of the iterating JSTL tag, you should be fine. The reason why this works is, that c:forEach won't be a component itself unlike ui:repeat.

stephanrauh added a commit that referenced this issue Jun 29, 2016
…eviously rendered as solitary links even if they were not intended to be)
@stephanrauh
Copy link
Collaborator

I've fixed this issue both for Mojarra and MyFaces. It should even work with the p:repeat component of PrimeFaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants