Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7075

Communication from JSP (scriptlet) to managed bean is not working

XMLWordPrintable

      I am trying to set few parameters from JSP scriptlet. Here is the snippet.HeaderBean is a managed bean with dispalyTitle as setters and getters.
      here its printing auditlog,auditlog,auditlog with command link instead of dashboard,transaction,auditlog command link.

      HeaderBean scope is request.

      Please suggest me on this.

      <h:form>
      <%
      ArrayList<String> names = new ArrayList<String>();
      names.add("dashboard");
      names.add("transaction");
      names.add("auditlog");
      %>

      <%

      HttpServletRequest facesRequest = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
      for (String name: names){
      HeaderBean header = new HeaderBean();
      header.setDispalyTitle(name);
      facesRequest.setAttribute("HeaderBean", header);
      %>
      <h:commandLink title="#

      {HeaderBean.dispalyTitle}" value= "#{HeaderBean.dispalyTitle}

      "> </h:commandLink> <br>
      <%}%>

              Unassigned Unassigned
              anil3379 anil kumar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: