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

@previous doesn't work if it's in a b:column #256

Closed
stephanrauh opened this issue Jan 16, 2016 · 1 comment · Fixed by #351
Closed

@previous doesn't work if it's in a b:column #256

stephanrauh opened this issue Jan 16, 2016 · 1 comment · Fixed by #351
Assignees
Labels
Milestone

Comments

@stephanrauh
Copy link
Collaborator

This code doesn't work. That's obvious, but it seems to result in a endless loop.

<b:column>
   <b:message for='@previous' />
</b:column>
@stephanrauh stephanrauh self-assigned this Jan 16, 2016
@stephanrauh stephanrauh modified the milestones: v0.8.1, v0.8.2 Jan 16, 2016
@zhedar
Copy link
Collaborator

zhedar commented Apr 21, 2016

This doesn't seem to be limited to columns. I suspect it's related to NamingContainers, because it also fails inside a b:panel, if there is no content before the b:message.
For example

<h:form id="form1">
    <b:panel title="test" look="primary" id="panel1" collapsible="false">
     <b:message for='@previous' />
     <b:inputText value="test"/>
    </b:panel>
 </h:form>

fails in exactly the same way.

When I read the purpose of @previous it seemed quite clear:

@previous finds the previous JSF element in the same level of the JSF tree.

If there is nothing in front of @previous, it will get sad and search forever :(. We may need to introduce a check for that OR let it use its parent component, if it is the first child component.

Edit: The actual problem was, that there was a i-- in a for loop which itself looped over i++, and there was no break in case of i being 0 at a time.

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

Successfully merging a pull request may close this issue.

2 participants