4 Replies Latest reply: Feb 3, 2009 12:08 AM by gopi b RSS

Panel Menu Item

gopi b Newbie

Hi

Page is getting displayed when a particular Panel Menu Item is selected by placing the cursor on the link but the page is not displayed when the cursor is placed any where near the link in the Panel Menu Item though the Panel Item is been highlighted and when clicked upon, page is getting refreshed, but the page is not displayed.

Script is below,

<tr class="#{component.current?'active':'unactive'}"
onmouseover="this.className='active'" onclick="this.className='change'"
onmouseout="this.className='#{component.current?'active':'unactive'}'">




Thanks in Adavance.

  • 1. Re: Panel Menu Item
    Ilya Shaikovsky Master

    show JSP or xhtml source code snippet where the component defined.

  • 2. Re: Panel Menu Item
    gopi b Newbie

    This is

    Components-group.xhtml
    --------------------------------------


    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:s="http://jboss.com/products/seam/taglib">



    <a4j:repeat var="component" value="#{components}">
    <!-- <tr class="unactive" onmouseover="this.className='active'" onmouseout="this.className='unactive'"> -->

    <tr class="#{component.current?'active':'unactive'}"
    onmouseover="this.className='active'"
    onmouseout="this.className='#{component.current?'active':'unactive'}'">

    <h:graphicImage value="#{component.iconImage}"
    width="16" height="16" alt="" border="0" />


    <s:link style="display:block;height:20px" view="#{component.contextRelativeDemoLocation}">

    #{component.name}

    <f:param value="#{component.id}" name="c"/>
    <f:param value="#{component.activeTab}" name="tab" />
    <f:param name="userName" value="#{identity.username}"/>
    <s:conversationPropagation type="none"/>
    <f:param value="yes" name="first"/>
    </s:link>



    </a4j:repeat>



    </ui:composition>
    ---------


  • 3. Re: Panel Menu Item
    Ilya Shaikovsky Master

    1) I can't see "Panel Menu Item" in your code.
    2) use [ code ] tags to paste snippets.
    3) include please info about browser

    B.t.w. feel free to send me whole sample directly if possible. Seems it will be more easy to explore on our end then.

  • 4. Re: Panel Menu Item
    gopi b Newbie

    This is my Panel Menu Item in my code,

    ---


    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <h:form>
    <rich:panel id="panelMenu" styleClass="panel_menu" style="padding: 0px;" bodyClass="rich-laguna-panel-no-header">

    <rich:panelMenu style="width: auto;" selectedChild="#{componentNavigator.currentComponent.group}"
    iconExpandedGroup="disc" iconCollapsedGroup="disc" iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
    iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right" expandSingle="true" >


    <rich:panelMenuGroup label="Customers" expanded="#{componentNavigator.visible2}" rendered="#{identity.loggedIn}">
    <rich:panelMenuItem id="customerManage1" rendered="#{s:hasRole('Create Customer')}">
    <a4j:keepAlive beanName="customerHome.instance"></a4j:keepAlive>
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.customerManage}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="customerManage2" rendered="#{s:hasRole('View Customer Profiles')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.customerList}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="customerManage3" rendered="#{s:hasRole('Search Customer')}" >
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.searchCustomer}" />
    </ui:include>
    </rich:panelMenuItem>

    <rich:panelMenuItem id="customerManage3a" rendered="#{s:hasRole('View Customer Queue')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.applicationList}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>

    <rich:panelMenuGroup label="Task" expanded="#{componentNavigator.visible3}"
    rendered="#{!s:hasRole('SuperAdmin') and s:hasRole('Check Profile')||s:hasRole('Review Request')||s:hasRole('Create Customer')||s:hasRole('Contact Customer')||s:hasRole('NTManager')||s:hasRole('Accountant') ||s:hasRole('NTEngineers') ||s:hasRole('AccoutsManager')}">
    <rich:panelMenuItem id="taskManagement" rendered="#{!s:hasRole('NTEngineers')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.pooledTask}" />
    </ui:include>
    </rich:panelMenuItem>

    <rich:panelMenuItem id="taskManagement1">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.pendingTask}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>

    <rich:panelMenuGroup label="Customer Care " expanded="#{componentNavigator.visible4}"
    rendered="#{s:hasRole('Create Call') || s:hasRole('Create Customer')|| s:hasRole('Contact Customer') ||s:hasRole('Search Calls')||s:hasRole('View Calls')}">
    <a4j:keepAlive beanName="newCallHome.instance"></a4j:keepAlive>
    <rich:panelMenuItem id="serviceManage" rendered="#{s:hasRole('Create Call')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.serviceManage}" />
    </ui:include>
    </rich:panelMenuItem>

    <rich:panelMenuItem id="serviceManage2" rendered="#{s:hasRole('View Calls')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.complaintStatus}" />
    </ui:include>
    </rich:panelMenuItem>

    <rich:panelMenuItem id="serviceManag3" rendered="#{s:hasRole('Search Calls')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.searchComplaints}" />
    </ui:include>
    </rich:panelMenuItem>


    </rich:panelMenuGroup>
    <rich:panelMenuGroup label="Accounts" expanded="#{componentNavigator.visible5}"
    rendered="#{s:hasRole('AccountsManagers')}">
    <rich:panelMenuItem id="adManage" >
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.collection}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="billing" >
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.billing}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>

    <rich:panelMenuGroup id="administration" label="Administration" expanded="#{componentNavigator.visible1}"
    rendered="#{s:hasRole('SuperAdmin') || s:hasRole('Create Plan') ||s:hasRole('Create UserGroups')
    ||s:hasRole('Create Agents') ||s:hasRole('Create Channels')||s:hasRole('Create Content')}">

    <rich:panelMenuItem id="auditTrial">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.auditTrial}" />
    </ui:include>
    </rich:panelMenuItem>


    <rich:panelMenuItem id="newPlan" rendered="#{s:hasRole('SuperAdmin') || s:hasRole('Create Plan')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.newPlan}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuGroup id="userGroupManage" label="Users &amp; Groups" expanded="#{componentNavigator.visible1a}"
    rendered="#{s:hasRole('SuperAdmin') || s:hasRole('Create UserGroups')}">
    <rich:panelMenuItem id="userRoleManage1" >
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.userRoleManage}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="userRoleManage2" rendered="#{s:hasRole('SuperAdmin') || s:hasRole('Create UserGroups')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.groupManage}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>
    <rich:panelMenuGroup id="agentChannel" label=" Agents &amp; Channels" expanded="#{componentNavigator.visible1b}"
    rendered="#{s:hasRole('Create Agents') ||s:hasRole('Create Channels') }">
    <rich:panelMenuItem id="collectMgmt1" rendred="#{s:hasRole('Create Agents')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.salesAgentManagement}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="collectMgmt2" rendred="#{s:hasRole('Create Channels')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.collectionChannelManagement}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>

    <rich:panelMenuGroup id="contentMgt" label="Content Management" expanded="#{componentNavigator.visible1c}" rendered="#{s:hasRole('Create Content')}">
    <rich:panelMenuItem id="contentMgmt" rendered="#{s:hasRole('Create Content')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.contentMgmt}" />
    </ui:include>
    </rich:panelMenuItem>

    <rich:panelMenuItem id="contentMgmt2" rendered="#{s:hasRole('Create Content')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.contentDisp}" />
    </ui:include>
    </rich:panelMenuItem>
    </rich:panelMenuGroup>

    </rich:panelMenuGroup>

    <rich:panelMenuGroup label="My Account" expanded="#{componentNavigator.visible6}">
    <rich:panelMenuItem id="changePass">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.changePassword}" />
    </ui:include>
    </rich:panelMenuItem>
    <rich:panelMenuItem id="updateProfile" rendered="#{s:hasRole('Update Profile')}">
    <ui:include src="/layout/components-group.xhtml" >
    <ui:param name="components" value="#{componentNavigator.updateProfile}" />
    </ui:include>
    </rich:panelMenuItem>

    </rich:panelMenuGroup>
    </rich:panelMenu>
    </rich:panel>
    </h:form>
    </ui:composition>


    -----------------------------


    componentnavigator.java
    ---------------------



    package com.manam.mewe.agile.fwk.ui;

    import java.io.IOException;
    import java.io.InputStream;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Properties;
    import java.util.Set;
    import java.util.StringTokenizer;

    import javax.faces.FacesException;
    import javax.faces.application.ViewHandler;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.servlet.http.HttpServletRequest;

    import org.jboss.seam.ScopeType;
    import org.jboss.seam.annotations.Name;
    import org.jboss.seam.annotations.Scope;
    import org.jboss.seam.international.LocaleSelector;

    @Name("componentNavigator")
    @Scope(ScopeType.SESSION)
    public class ComponentNavigator implements Serializable{
    /**
    *
    */
    private static final long serialVersionUID = 1L;

    private String lastCompId = null;

    private List components = null;

    private ComponentDescriptor currentComponent;

    private List componentGroups = null;

    private boolean visible1;
    private boolean visible1a;
    private boolean visible1b;
    private boolean visible1c;
    private boolean visible1d;
    private boolean visible2=true;
    private boolean visible2a;
    private boolean visible3;
    private boolean visible4;
    private boolean visible5;
    private boolean visible5a;
    private boolean visible6;
    private boolean visible6a;
    private boolean visible7;
    private boolean visible8;
    private boolean visible9;
    private boolean visible10;

    public boolean getHasCurrentComponent() {
    return currentComponent != null;
    }

    public ComponentDescriptor getCurrentComponent() {
    String id = getComponentParam("c");
    if (id != null) {
    setCurrentComponent(findComponentById(id));
    lastCompId = id;
    } else if (lastCompId != null) {
    setCurrentComponent(findComponentById(lastCompId));
    } else {
    String uri = getComponentUri();
    setCurrentComponent(findComponentByUri(uri));
    }

    // set active tab for current component if any
    if (null != currentComponent) {
    String tab = getComponentParam("tab");
    if (null != tab) {
    currentComponent.setActiveTab(tab);
    // System.out.println("Current Component.. ...... " +currentComponent.getGroup());
    setExpandable(currentComponent.getGroup());
    }
    }

    return currentComponent;
    }


    public String getLastCompId() {
    return lastCompId;
    }

    public void setLastCompId(String lastCompId) {
    this.lastCompId = lastCompId;
    }

    public boolean isVisible1() {
    return visible1;
    }

    public void setVisible1(boolean visible1) {
    this.visible1 = visible1;
    }

    public boolean isVisible2() {
    return visible2;
    }

    public void setVisible2(boolean visible2) {
    this.visible2 = visible2;
    }

    public boolean isVisible3() {
    return visible3;
    }

    public void setVisible3(boolean visible3) {
    this.visible3 = visible3;
    }

    public boolean isVisible4() {
    return visible4;
    }

    public void setVisible4(boolean visible4) {
    this.visible4 = visible4;
    }

    public boolean isVisible5() {
    return visible5;
    }

    public void setVisible5(boolean visible5) {
    this.visible5 = visible5;
    }

    public boolean isVisible6() {
    return visible6;
    }

    public void setVisible6(boolean visible6) {
    this.visible6 = visible6;
    }

    public boolean isVisible7() {
    return visible7;
    }

    public void setVisible7(boolean visible7) {
    this.visible7 = visible7;
    }

    private String getComponentUri() {
    FacesContext fc = FacesContext.getCurrentInstance();
    return ((HttpServletRequest) fc.getExternalContext().getRequest()).getRequestURI();
    }

    private String getComponentParam(String name) {
    FacesContext fc = FacesContext.getCurrentInstance();
    String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
    if (param != null && param.trim().length() > 0) {
    // System.out.println("Component Param ..... " +param);
    return param;
    } else {
    return null;
    }
    }

    private List components_() {
    if (components == null) {
    loadComponents();
    }
    return components;
    }

    public ComponentDescriptor findComponentByUri(String uri) {
    Iterator it = components_().iterator();
    while (it.hasNext()) {
    ComponentDescriptor component = (ComponentDescriptor) it.next();
    if (uri.endsWith(component.getDemoLocation())) {
    // System.out.println("Find By URI ....."+component.getName() + " ID " +component.getId());
    return component;
    }
    }
    return null;
    }

    public ComponentDescriptor findComponentById(String id) {
    Iterator it = components_().iterator();
    while (it.hasNext()) {
    ComponentDescriptor component = (ComponentDescriptor) it.next();
    if (component.getId().equals(id)) {
    // System.out.println("Find By ID Result ... "+component.getName() + " ID: " +component.getId());
    return component;
    }
    }
    return null;
    }

    public void setCurrentComponent(ComponentDescriptor currentComponent) {
    if (currentComponent == null) {
    this.currentComponent = (ComponentDescriptor) components_().get(0);
    }
    this.currentComponent = currentComponent;
    }

    public List getComponentGroups() {
    return componentGroups;
    }

    public void setComponentGroups(List componentGroups) {
    this.componentGroups = componentGroups;
    }

    private List getFilteredComponents(String group) {
    // System.out.println("getFilteredComponents method:");
    List ret = new ArrayList();
    Iterator it = getComponents().iterator();
    while (it.hasNext()) {
    ComponentDescriptor desc = (ComponentDescriptor) it.next();
    if (desc.getGroup().equals(group)) {
    ret.add(desc);
    }
    }
    return ret;
    }

    public List getGroupManage() {
    return getFilteredComponents("groupManage");
    }

    public List getUserRoleManage() {
    return getFilteredComponents("userRoleManage");
    }

    public List getAuditTrial() {
    return getFilteredComponents("auditTrial");
    }

    public List getNewPlan(){
    return getFilteredComponents("newPlan");
    }

    public List getCustomerManage() {
    return getFilteredComponents("customerManage");
    }

    public List getCustomerList() {
    return getFilteredComponents("customerList");
    }

    public List getAccountManage() {
    return getFilteredComponents("accountManage");
    }

    public List getSettings() {
    return getFilteredComponents("settings");
    }

    public List getContentMgmt() {
    return getFilteredComponents("contentMgmt");
    }
    public List getContentDisp(){
    return getFilteredComponents("contentDisp");
    }
    public List getSearchCustomer() {
    return getFilteredComponents("searchCustomer");
    }
    public List getServiceManage() {
    return getFilteredComponents("serviceManage");
    }


    public List getComplaintStatus(){
    return getFilteredComponents("complaintStatus");
    }

    public List getSearchComplaints(){
    return getFilteredComponents("searchComplaints");
    }


    public List getCollection(){
    return getFilteredComponents("collection");
    }

    public List getBilling(){
    return getFilteredComponents("billing");
    }

    public List getReports(){
    return getFilteredComponents("reports");
    }

    public List getApplicationList(){
    return getFilteredComponents("applicationList");
    }

    public List getIncompleteApp(){
    return getFilteredComponents("incompleteApp");
    }


    public List getPooledTask(){
    return getFilteredComponents("pooledTask");
    }


    public List getPendingTask(){
    return getFilteredComponents("pendingTask");
    }

    public List getChangePassword(){
    return getFilteredComponents("changePassword");
    }
    public List getUpdateProfile(){
    return getFilteredComponents("updateProfile");
    }


    public List getCollectionChannelManagement(){
    return getFilteredComponents("collectionChannelManagement");
    }

    public List getCollectionAgentManagement(){
    return getFilteredComponents("collectionAgentManagement");
    }

    public List getSalesChannelManagement(){
    return getFilteredComponents("salesChannelManagement");
    }

    public List getcollectionChannelManagement(){
    return getFilteredComponents("collectionChannelManagement");
    }

    public List getSalesAgentManagement(){
    return getFilteredComponents("salesAgentManagement");
    }
    public List getComponents() {
    // System.out.println("getComponents mthod:");
    Iterator it = components_().iterator();
    ComponentDescriptor cur = getCurrentComponent();
    while (it.hasNext()) {
    ComponentDescriptor desc = (ComponentDescriptor) it.next();
    if (desc.equals(cur)) {
    desc.setCurrent(true);
    } else {
    desc.setCurrent(false);
    }
    }
    return components;
    }

    public void setComponents(List components) {
    this.components = components;
    }

    private void loadComponents() {
    // System.out.println("load components method:");
    Properties props = new Properties();
    List temp = new ArrayList();
    try {
    String propFile = "menu-components_"+org.jboss.seam.core.Locale.instance().getLanguage()+".properties";
    InputStream is = this.getClass().getClassLoader().getResourceAsStream(propFile);
    props.load(is);
    } catch (Exception e) {
    throw new FacesException(e);
    }
    Set entries = props.entrySet();
    Iterator it = entries.iterator();
    while (it.hasNext()) {
    Map.Entry e = (Map.Entry) it.next();
    ComponentDescriptor desc = new ComponentDescriptor();
    desc.setId(e.getKey().toString().trim());
    StringTokenizer toc = new StringTokenizer(e.getValue().toString(), ",");
    desc.setGroup(toc.nextToken().trim());
    desc.setName(toc.nextToken().trim());
    desc.setIconImage(toc.nextToken().trim());
    desc.setCaptionImage(toc.nextToken().trim());
    desc.setDevGuideLocation(toc.nextToken().trim());
    desc.setTldDocLocation(toc.nextToken().trim());
    desc.setJavaDocLocation(toc.nextToken().trim());
    desc.setDemoLocation(toc.nextToken().trim());
    desc.setCurrent(true);
    temp.add(desc);

    }
    Collections.sort(temp, new Comparator() {
    public int compare(Object o1, Object o2) {
    ComponentDescriptor d1 = (ComponentDescriptor) o1;
    ComponentDescriptor d2 = (ComponentDescriptor) o2;
    return d1.getName().compareTo(d2.getName());
    }
    });
    setComponents(temp);
    setCurrentComponent((ComponentDescriptor) temp.get(0));
    }

    /**
    * Invoked when example tab panel switched
    *
    * @param event
    * a ValueChangeEvent object
    */
    public void tabPanelSwitched(ValueChangeEvent event) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
    String viewId = facesContext.getViewRoot().getViewId();
    String actionURL = viewHandler.getActionURL(facesContext, viewId);
    actionURL = patchURL(actionURL, "tab", getCurrentComponent().getActiveTab());
    try {
    facesContext.getExternalContext().redirect(actionURL);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }

    /**
    * Adds/replaces a query parameter in a given "GET request URL"-like string.
    *
    * @param param
    * name of query parameter
    * @param value
    * value of query parameter
    * @return string representing parched url
    */
    private String patchURL(String url, String param, String value) {
    String queryPair = param + "=" + value;
    url.replaceAll("[\\?]" + param + "=[\\w]*", "?" + queryPair);
    url.replaceAll("[&]" + param + "=[\\w]*", "&" + queryPair);

    if (!url.contains("?" + param + "=") && !url.contains("&" + param + "=")) {
    if (url.contains("?")) {
    url += "&";
    } else {
    url += "?";
    }
    url += queryPair;
    }

    return url;
    }

    public boolean isVisible8() {
    return visible8;
    }

    public void setVisible8(boolean visible8) {
    this.visible8 = visible8;
    }

    public boolean isVisible9() {
    return visible9;
    }

    public void setVisible9(boolean visible9) {
    this.visible9 = visible9;
    }

    public boolean isVisible10() {
    return visible10;
    }

    public void setVisible10(boolean visible10) {
    this.visible10 = visible10;
    }

    public boolean isVisible1a() {
    return visible1a;
    }

    public void setVisible1a(boolean visible1a) {
    this.visible1a = visible1a;
    }


    public void setExpandable(String componentName){
    // Administration
    // User & Group Management
    if(componentName.equalsIgnoreCase("userRoleManage") || componentName.equalsIgnoreCase("groupManage")){
    this.setVisible1(true);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(true);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }


    if(componentName.equalsIgnoreCase("auditTrial") || componentName.equalsIgnoreCase("settings")){
    this.setVisible1(true);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }

    if(componentName.equalsIgnoreCase("contentMgmt") || componentName.equalsIgnoreCase("contentDisp")){
    this.setVisible1(true);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(true);this.setVisible1d(false);
    }

    if(componentName.equalsIgnoreCase("newPlan") || componentName.equalsIgnoreCase("planList")){
    this.setVisible1(true);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(true);
    }
    //Sales & Collection Agent

    if(componentName.equalsIgnoreCase("collectionChannelManagement") || componentName.equalsIgnoreCase("salesChannelManagement")
    || componentName.equalsIgnoreCase("collectionAgentManagement") ||componentName.equalsIgnoreCase("salesAgentManagement")){
    this.setVisible1(true);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(true);this.setVisible1c(false);this.setVisible1d(false);
    }

    //Customer Menu ..


    if(componentName.equalsIgnoreCase("customerManage") || componentName.equalsIgnoreCase("customerList")
    || componentName.equalsIgnoreCase("searchCustomer")){
    this.setVisible1(false);this.setVisible2(true);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }
    if(componentName.equalsIgnoreCase("applicationList") || componentName.equalsIgnoreCase("customerList")){
    this.setVisible1(false);this.setVisible2(true);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(true);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }

    // Task Management
    if(componentName.equalsIgnoreCase("pooledTask") || componentName.equalsIgnoreCase("pendingTask")){
    this.setVisible1(false);this.setVisible2(false);this.setVisible3(true);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }

    //Customer Care Management
    if(componentName.equalsIgnoreCase("serviceManage") || componentName.equalsIgnoreCase("complaintStatus")
    || componentName.equalsIgnoreCase("searchComplaints")){
    this.setVisible1(false);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(true);this.setVisible5(false);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }

    //Accounts
    if(componentName.equalsIgnoreCase("collection") || componentName.equalsIgnoreCase("billing")
    || componentName.equalsIgnoreCase("reports")){
    this.setVisible1(false);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(true);this.setVisible6(false);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }

    if(componentName.equalsIgnoreCase("changePassword") || componentName.equalsIgnoreCase("updateProfile")){
    this.setVisible1(false);this.setVisible2(false);this.setVisible3(false);
    this.setVisible4(false);this.setVisible5(false);this.setVisible6(true);
    this.setVisible7(false);this.setVisible8(false);this.setVisible9(false);
    this.setVisible10(false);this.setVisible1a(false);this.setVisible2a(false);
    this.setVisible1b(false);this.setVisible1c(false);this.setVisible1d(false);
    }
    }

    public boolean isVisible2a() {
    return visible2a;
    }

    public void setVisible2a(boolean visible2a) {
    this.visible2a = visible2a;
    }

    public boolean isVisible5a() {
    return visible5a;
    }

    public void setVisible5a(boolean visible5a) {
    this.visible5a = visible5a;
    }

    public boolean isVisible6a() {
    return visible6a;
    }

    public void setVisible6a(boolean visible6a) {
    this.visible6a = visible6a;
    }

    public boolean isVisible1b() {
    return visible1b;
    }

    public void setVisible1b(boolean visible1b) {
    this.visible1b = visible1b;
    }

    public boolean isVisible1c() {
    return visible1c;
    }

    public void setVisible1c(boolean visible1c) {
    this.visible1c = visible1c;
    }

    public boolean isVisible1d() {
    return visible1d;
    }

    public void setVisible1d(boolean visible1d) {
    this.visible1d = visible1d;
    }
    }



    ------

    Browsing:
    -----------

    I am using Mozilla Firefox 3.0.5 version.