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

f:selectItem on selectOneMenu ignores passthrough attributes #667

Closed
ggam opened this issue Mar 29, 2017 · 6 comments
Closed

f:selectItem on selectOneMenu ignores passthrough attributes #667

ggam opened this issue Mar 29, 2017 · 6 comments
Assignees
Milestone

Comments

@ggam
Copy link
Collaborator

ggam commented Mar 29, 2017

Passthrough elements on an f:selectItem element inside a b:selectOneMenu are ignored. This is a more feature request to enhance passthrough support than a bug report.

The following snippet shows the usecase.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
      xmlns:b="http://bootsfaces.net/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h:form>
            <h:selectOneMenu value="#{index.opcion}">
                <f:selectItem itemLabel="Select one" pt:selected="selected" pt:hidden="hidden" />
                <f:selectItems value="#{index.opciones}" />
            </h:selectOneMenu>

            <b:selectOneMenu value="#{index.option}">
                <f:selectItem itemLabel="Select one" pt:selected="selected" pt:hidden="hidden" />
                <f:selectItems value="#{index.options}" />
            </b:selectOneMenu>
        </h:form>
    </h:body>
</html>

Checking the generated HTML you can check the h: component includes the specified passthrough attributes, while the BootsFaces one completely ignores them.

@stephanrauh
Copy link
Collaborator

I'm starting to understand why this feature does not work. Looks like a messy fix. Currently I'm searching for an elegant (which is to say: sustainable and maintainable) solution.

stephanrauh added a commit that referenced this issue Apr 2, 2017
…tems.

The attributes are still not rendered for radiobuttons (because the surrounding b:radioButton might also have pass-through attributes).
@stephanrauh
Copy link
Collaborator

I've fixed the bug and uploaded a new developer snapshot of BootsFaces-1.1.0 to Maven Central. See #369 on how to get it.

@stephanrauh stephanrauh added this to the v1.1.0 milestone Apr 2, 2017
@ggam
Copy link
Collaborator Author

ggam commented Apr 2, 2017

@stephanrauh That's great! I'll test it ASAP. Any stimated date on when 1.1.0 will be available?

@stephanrauh
Copy link
Collaborator

stephanrauh commented Apr 2, 2017

I hope it'll be an Easter egg. But currently, our team is so busy that I can't say for sure. In any case, you can speed up the process by helping us to test the version. Interested? If you are, drop me an email at "webmaster1 at beyondjava dot de".

@stephanrauh
Copy link
Collaborator

Oops - there was a typo in my e-mail address, so just in case you're reading the e-mail notification, it's "webmaster1".

@ggam
Copy link
Collaborator Author

ggam commented Apr 2, 2017

Thanks for the info! I've sent you an email to the corrected email address.

Have you thought about releasing some kind of beta version? People may accept to use "unstable" versions, but relying on snapshots is more tricky as the artifact may change on each download

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

No branches or pull requests

2 participants