Closed ricktap closed 9 years ago
I added a pull request (#17) that adds an active="true" / active="false" (false is default) attribute to the navLink tag. Still no styleClass implemented, will follow soon.
The pull request looks OK to me.
BTW, I'm curious: what's the problem with the "active" attribute? As far as I know the attribute is evaluated only by the IDE. You can use the attribute, there's just no autocompletion, and eager IDEs may add a squiggle to the attribute - but the code should run nonetheless. Does your system react differently?
Well yes, it would work. You are right my IDE would complain, which ends up beeing a bad user experience after a while. The other problem for me was the missing documentation of attributes (which I now generated myself), so I began with styleClass but that did not work at all. I stumbled over the active attribute while "fixing" the class related things (will follow in a bit).
Well anyways, thanks for the great library. I realy enjoy using it
Am Mittwoch, 19. November 2014 schrieb Stephan Rauh :
The pull request looks OK to me.
BTW, I'm curious: what's the problem with the "active" attribute? As far as I know the attribute is evaluated only by the IDE. You can use the attribute, there's just no autocompletion, and eager IDEs may add a squiggle to the attribute - but the code should run nonetheless. Does your system react differently?
— Reply to this email directly or view it on GitHub https://github.com/TheCoder4eu/BootsFaces-OSP/issues/16#issuecomment-63705475 .
If I remember well, trying to use manage a "class" attribute directly throws an error, one should use styleClass on JSF components.
On netbeans a squiggle won't prevent using an attribute, it's jaust annoying.
Well anyways, thanks for the great library. I realy enjoy using it
We are happy you enjoy working with it, and thanks for contribuiting to the project!
I note down we could add styleClass attribute to the components that need it.
I merged the PR.
I tried to add an "active" class to the navLink, so I can represent the current page, the user is on. Unfortunately the attribute 'class' gives me an unchanged result, styleClass (as I would have guessed, since it inherits h:link) is not even a valid attribute. So I looked at the code and found "getStyleClasses", but styleClasses does not work either.
For now I'm just not using the active state at all, but I'm sure others will depend on that feature.