Hi All,
I have a custom component which only has one HtmlPanelNavigationMenu
component which is the component class for <t:panelNavigation2>
If I hard code the panelNavigation2 in the JSF page like:
<t:panelNavigation2 id="nav1" width="170px" layout="list"
itemClass="navNormal" activeItemClass="navSelected"
openItemClass="navOpen" >
Then the CSS classes are picked up properly.
However if I create the component programmatically like:
FacesContext context = FacesContext.getCurrentInstance();
Application app = context.getApplication();
HtmlPanelNavigationMenu panelNavigationComponent =
(HtmlPanelNavigationMenu)app.createComponent(HtmlPanelNavigationMenu.COM
PONENT_TYPE);
panelNavigationComponent.setId("leftNav");
panelNavigationComponent.setLayout("list");
// Set the CSS classes
panelNavigationComponent.setActiveItemClass("navSelected");
panelNavigationComponent.setOpenItemClass("navOpen");
panelNavigationComponent.setItemClass("navNormal");
panelNavigationComponent.setStyleClass("leftMenuStyle");
Now when the component is rendered then everything works except the CSS
classes. The HTML code generated has the classes defined properly but
then it is just not working the way it should. On selection of a menu
item the selectedClass is not getting rendered the way it should be.
This is strange!!!
One more issue:
If the last <t:commandNavigation2> item contains child command
navigation items then on clicking the parent it does not expand. However
if I place another parent without any child commandNavigationItem after
this one then it expands properly. Strange behavior indeed.
Any help will be appreciated!!
Rgds,
Madhav
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are
not to copy, disclose, or distribute this e-mail or its contents to any other
person and any such actions are unlawful. This e-mail may contain viruses.
Infosys has taken every reasonable precaution to minimize this risk, but is not
liable for any damage you may sustain as a result of any virus in this e-mail.
You should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from this
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***