JSF problem with h:selectOneMenu

Hi Friends,
First of all i would like to thank u all for ur previous valuable suggestions. I got stucked up with a problem.
I have a dropdown list in which i have only 2 values 'Remodeling' and 'New'. When the user selects the option 'Remodeling' , i need to render a group of checkboxes.I tried lot many ways but didn't work.
Could anyone plz help me out on this. Below is my sample code:
Code to display drop down list
<h:selectOneMenu value="#{gfmCoverageABean.constructionType}" valueChangeListener="#gfmCoverageABean.onConstructionTypeChange}">
<f:selectItems id="typeOfConstructionProject" value="#{gfmCoverageABean.typeOfConstructionProjectList}" />
</h:selectOneMenu>
Code to render checkbox when drop down option selected is 'Remodeling'
<h:outputLabel id="foundationLbl" for="foundation" value="#{PolicyLabels['GfmCoverageADetails.Foundation']}"
rendered="#{gfmCoverageABean.constructionType eq 'Remodeling'}"/>
<ig:checkBox id="foundation" value="#{gfmCoverageABean.gfmCoverageView.foundation}"
rendered="#{gfmCoverageABean.constructionType eq 'Remodeling'}"/>
Problem here is my checkbox is not getting displayed on any case.
Thanks
vijay

Hello Vijay
Displaying group of Checkboxes
Use Value Change Listener and Create and panel Grid and render it to false
in SelectOneMenu when the value is change it calls valueChangeListener
there u check the event value if it is ur choice render panel grid to true simple.
<h:selectOneMenu value="#{Bean.selectedCategories}"
          valueChangeListener="#{Bean.processValueChange}" onchange="this.form.submit();">
               <f:attribute name="optionClasses" value="option1, option2" />
               <f:selectItem itemLabel="Please select Industry" />
               <f:selectItems value="#{Bean.selectCategories}" />
          </h:selectOneMenu>
<h:panelGrid id="chkBox" binding="#{Bean.panel}" rendered="false">
private HtmlPanelGrid panel = new HtmlPanelGrid();
///generate setter and getter
public void processValueChange(ValueChangeEvent ae) throws Exception
          if(ae.getNewValue().equals("URChoice")){          
getPanel().setRendered(true);
This will solve the problem

Similar Messages

  • Browser compatibility problem with t:selectOneMenu and JavaScript calendar

    I'm having problem with <t:selectOneMenu> and JavaScript calendar on IE. It works fine on Firefox but doesn't work on IE.
    The JSF code is as follows:
    <tr>
                                       <td align="right">
                                            Archive Date
                                       </td>
                                       <td align="left" colspan="3">
                                       <table cellpadding="0" cellspacing="0" border="0">
                                       <tr>
                                       <td>
                                       <span class="tuny_text">After&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateAfter" value="Archive Date After" rendered="false"/>
                                            <br/>
                                            <t:inputText required="false" value="#{nonItemImageSearchPage.stringArchiveDateAfter}" name="txtArchiveDateAfter" id="txtArchiveDateAfter" forceId="true"  styleClass="inp" style="width: 128px">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateAfter" name="dtpArchiveDateAfter" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateAfter" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       <td>
                                       <span class="tuny_text">Before&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateBefore" value="Archive Date Before" rendered="false"/>
                                            <br/>
                                            <t:inputText value="#{nonItemImageSearchPage.stringArchiveDateBefore}" name="txtArchiveDateBefore" id="txtArchiveDateBefore" forceId="true" style="width:128px" styleClass="inp">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateBefore" name="dtpArchiveDateBefore" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateBefore" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       </tr>
                                       </table>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpBackground" value="Background"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpBackground" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.backgroundId}" styleClass="inp" style="width: 150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                            <s:selectItems value="#{nonItemImageSearchPage.backgroundPrefsList}"
                                                      var="backgroundPrefs" itemValue="#{backgroundPrefs.id}" itemLabel="#{backgroundPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td  align="right" class="left_separator">
                                            <h:outputLabel for="drpTheme" value="Theme"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpTheme" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.themeId}" styleClass="inp WCHhider" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.themePrefsList}"
                                                      var="themePrefs" itemValue="#{themePrefs.id}" itemLabel="#{themePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpSeason" value="Season"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpSeason" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.seasonId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.seasonPrefsList}"
                                                      var="seasonPrefs" itemValue="#{seasonPrefs.id}" itemLabel="#{seasonPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpClothing" value="Clothing"/>
                                       </td>
                                       <td align="left"  >
                                            <t:selectOneMenu id="drpClothing" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.clothingId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.clothingPrefsList}"
                                                      var="clothingPrefs" itemValue="#{clothingPrefs.id}" itemLabel="#{clothingPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpToy" value="Toy"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpToy" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.toyId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.toyPrefsList}"
                                                      var="toyPrefs" itemValue="#{toyPrefs.id}" itemLabel="#{toyPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpJuvenile" value="Juvenile"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpJuvenile" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.juvenileId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.juvenilePrefsList}"
                                                      var="juvenilePrefs" itemValue="#{juvenilePrefs.id}" itemLabel="#{juvenilePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right">
                                            <h:outputLabel for="drpGroup" value="Grouping"/>
                                       </td>
                                       <td align="left"  class="right_separator">
                                            <t:selectOneMenu id="drpGroup" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.modelGroupingId}" styleClass="inp" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.groupPrefsList}"
                                                      var="groupPrefs" itemValue="#{groupPrefs.id}" itemLabel="#{groupPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td class="left_separator">&#160;</td>
                                       <td>&#160;</td>
                                  </tr>
    The JavaScript code is as follows:
    <script type="text/javascript" language="javascript">
         var dtpArchiveDateBefore = new MooCal("txtArchiveDateBefore");
         var dtpArchiveDateAfter = new MooCal("txtArchiveDateAfter");
         window.addEvent("domready", function(){
           $("dtpArchiveDateBefore").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
         /*$("txtArchiveDateBefore").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
        $("dtpArchiveDateAfter").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
       /* $("txtArchiveDateAfter").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
         </script>When the calendar is above t:selectOneMenu, it doesn't show up on t:selectOneMenu area. Could anyone help me solve the issue?
    Thanks
    Rashed

    There are dozens of CSS attributes that can (and have to) be handwritten. Trouble with them is that, like text shadows, they don't appear in all browsers. I have nine different browsers installed and test pages in ALL of them before I "finish" building site or page for a template.
    I try to build for Firefox, out of personal preference for it, but I have to do things that work with IE because it still holds the market share (46%IE to 42%FF), and I will only go with designs that work in IE, FF, NS, Opera, Safari, and Chrome.
    As to your questions.
    1. The compatibility check is most likely current with the time of the build. I don't know if that component updates as browsers do, but I'd tend to think it doesn't. I'm using CS4  and there haven't been any updates for it in nearly a year. Firefox has released 4.0, Opera released 11, and Safari released 5 since then. The updater would have found and downloaded something if it was available.
    2. I could only guess. Text shadows DON'T show up in design view (or in IE) but they do in browser preview. It's just a UI quirk, and it means "trial and error" is the onyl way to get what you want.
    3. The quick-selects which are in DW dropdowns or popouts are the ones most  common to CSS designs and have been proven to work with all browsers at the time of release of your particular build of DW.
    Hope that helps..

  • JSF problems with Javascript

    Hi everyone!!
    The situation is this: I have a datable with one of its columns make an h:commanLink, which has two f:params, its actionListener is a function of a ManagedBean. This is JSF, not MyFaces. In IE, When the link is pressed, it shows a javascript error: " 'elements.idVar' is null or it's not an object ", however in Firefox, it works perfectly. I have been looking for the problem and it have to do with this:
    </form><a href="# onclick="clearFormHiddenParams_formResultado('formResultado');document.forms['formResultado'['formResultado:_idcl'].value='formResultado:dtTablaResultados:0:_id10';document.forms['formResultado']['idVar'].value='37';document.forms['formResultado']['idMun'].value='168'; document.forms['formResultado'].submit(); return false;"><span id="formResultado:dtTablaResultados:0:itColumna3" title="AREA COSECHADA EN CULTIVOS PERMANENTES">1,230</span></a></td>
    </tr>
    <tr class="standardTable_Row2">
    <td><span id="formResultado:dtTablaResultados:1:itColumna1" style="text-align:center;" title="C&oacute;digo Municipio">718</span></td>
    <td><a href="javascript:void(0)" onclick="javascript:window.opener.opener.showLink('SASAIMA')"><span id="formResultado:dtTablaResultados:1:itColumna2_l" title="Municipio">SASAIMA</span></a></td>
    <td><form id="formResultado:dtTablaResultados:1:_id9" method="post" action="/ConsultaEstadisticasGeo/resultadoConsulta.jsf" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id39:_id41" /><input type="hidden" name="formResultado:dtTablaResultados:1:_id9" value="formResultado:dtTablaResultados:1:_id9" /><input type="hidden" name="idVar" /><input type="hidden" name="idMun" /><input type="hidden" name="formResultado:_idcl" />
    <script type="text/javascript">
    <!--
    function clearFormHiddenParams_formResultado_dtTablaResultados_1__id9(curFormName) {
    var curForm = document.forms[curFormName];
    curForm.elements['idVar'].value = null;
    curForm.elements['idMun'].value = null;
    curForm.elements['formResultado:_idcl'].value = null;
    //-->
    </script>
    the way JSF manage the params. The error, acdording to the message shonw by IE is in this line: curForm.elements['idVar'].value = null;
    The code of the JSP is this:
    <h:commandLink     actionListener="#{consultaEstadisticasMB.detalleEstadistica}">
         <f:param name="idVar" value="#{consultaEstadisticasMB.idColumna3}" id="idVar" />
         <f:param name="idMun" value="#{registro[0]}" id="idMun" />
         <h:outputText title="#{consultaEstadisticasMB.columna3}" id="itColumna3" value="#{registro[2]}" />
    </h:commandLink>
    Waht can i do? (Not using MyFaces, because I can�t do that)
    Thanks for your answers!!

    I have run into this same problem with javascript and the colon. I am not sure if the colon is a valid character for a javascript identifier (one would think the RI developers would have checked it out though!?!).
    Anyway, my workaround is to search through the Javascript DOM for the widget you want to obtain a reference to, using part of its id. After all, you know its id, you just can't use it as a javascript reference. In your Javascript code, do something like:
        var inputWidgets = document.getElementsByTagName("input");
        var targetInput;
        for(var i = 0; i < inputWidgets.length; i++)
           var inputId = inputWidgets.id;
    if(inputId.indexOf("yourInputId") != -1)
    targetInput = inputWidgets[i];
    break;
    It's a lot of effort to just get a reference to a form widget....but it works (I pasted in the code and changed it a bit, so it might not work as is, but at least it demonstrates the idea).

  • Problem with multiple 'selectOneMenu' fields

    I have a JSF web page with 2 selectOneMenu fields. The first field is populated as the page loads,
    the second field is populated from the value selected in the first field. The second field value is
    associated to a variable in the backing bean which is used for further processing when the
    command button is pressed.
    on pressing the command button the following error message appears :
    jsf E com.sun.faces.context.FacesContextImpl addMessage Adding Message[sourceId=form1:menu2,summary=Validation Error: Value is not valid)
    Below is my JSF page and backing bean. Any help would be appreciated
    <h:form styleClass="form" id="form1">
         <BR>
         <h:selectOneMenu styleClass="selectOneMenu" id="menu1" valueChangeListener="#{empDetailsBackingBean.EmpSelectDetails}" onchange="submit()">
         <f:selectItems value="#{empDetailsBackingBean.selectItems}"/>
         </h:selectOneMenu>
         <BR>
         <h:selectOneMenu styleClass="selectOneMenu" id="menu2" value="#{empDetailsBackingBean.keyDetails}">
         <f:selectItems value="#{empDetailsBackingBean.selectItems1}"/>
         </h:selectOneMenu>
         <BR>
         <hx:commandExButton type="submit" value="Submit" styleClass="commandExButton" id="button1" action="#{empDetailsBackingBean.EmpDetails}">
         </hx:commandExButton>
    </h:form>
    public class EmpDetailsBackingBean
         private String c12 = "";
         private String c4 = "";
         private String empNo = "";
         private String title = "";
         private String name = "";
         private String add1 = "";
         private String add2 = "";
         private String add3 = "";
         private String postCode = "";
         private String keyDetails = "";
         private List selectItems;
         private List selectItems1;
         private HoldDetails details;
         public EmpDetailsBackingBean()
              C4Utility util = new C4Utility();
              selectItems = util.getDetails();
              EmployeeUtility util1 = new EmployeeUtility();
              selectItems1 = util1.getDetails("", "Y");
         public void EmpSelectDetails(ValueChangeEvent vce)
              c4 = (String) vce.getNewValue();
              EmployeeUtility util = new EmployeeUtility();
              selectItems1 = util.getDetails(c4, "Y");
         public String EmpDetails()
              c12 = keyDetails.substring(0,6);
              empNo = keyDetails.substring(6,12);
              EmpDetails util = new EmpDetails();
              details = util.getEmpVals(c12, empNo);
              c12= details.getC12();
              empNo = details.getEmpNo();
              title = details.getTitle();
              name = details.getName();
              add1 = details.getAdd1();
              add2 = details.getAdd2();
              add3 = details.getAdd3();
              postCode = details.getPostCode();
              return"";
         public String getAdd1()
              return add1;
         public void setAdd1(String add1)
              this.add1 = add1;
         public String getAdd2()
              return add2;
         public void setAdd2(String add2)
              this.add2 = add2;
         public String getAdd3() {
              return add3;
         public void setAdd3(String add3)
              this.add3 = add3;
         public String getC12()
              return c12;
         public void setC12(String c12)
              this.c12 = c12;
         public String getEmpNo()
              return empNo;
         public void setEmpNo(String empNo)
              this.empNo = empNo;
         public String getName()
              return name;
         public void setName(String name)
              this.name = name;
         public String getPostCode()
              return postCode;
         public void setPostCode(String postCode)
              this.postCode = postCode;
         public String getTitle()
              return title;
         public void setTitle(String title)
              this.title = title;
         public HoldDetails getDetails() {
              return details;
         public void setDetails(HoldDetails details) {
              this.details = details;
         public String getKeyDetails() {
              return keyDetails;
         public void setKeyDetails(String keyDetails) {
              this.keyDetails = keyDetails;
         public List getSelectItems() {
              return selectItems;
         public void setSelectItems(List selectItems) {
              this.selectItems = selectItems;
         public List getSelectItems1() {
              return selectItems1;
         public void setSelectItems1(List selectItems1) {
              this.selectItems1 = selectItems1;
         public String getC4() {
              return c4;
         public void setC4(String c4) {
              this.c4 = c4;
    }

    I haven't taken the time to read your code, but the error message "Value is not valid" mostly means that the value of f:selectItems is dirty.
    If you understand generics, this one clearly explains the usage of h:selectOneMenu:
    JSF<h:selectOneMenu value="#{myBean.selectedItem}">
        <f:selectItems value="#{myBean.selectItems}" />
    </h:selectOneMenu>MyBeanprivate T selectedItem;
    private List < SelectItem < T, String > > selectItems;
    // + getters + setters
    // T is the Object you want to select. String is the label for the menu.
    // think away the spaces surrounding < and >, the parser of this forum is a bit crappy ;)

  • JSF Problem with events

    4 comboboxes need to be used in several JSF pages.
    This cbo are stored in the jspf file :
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <f:subview id="cboSearch">
        <p>
            <h:selectOneMenu id="cboSites" value="#{searchFormMB.siteChoisi}"
                              onchange="submit()" valueChangeListener="#{searchFormMB.eventCboSitesChanged}">
                <f:selectItems id="siteItem" value="#{searchFormMB.siteItems}"/>
            </h:selectOneMenu>
        </p>
        <p>
            <h:selectOneMenu id="cboPeriodes" value="#{searchFormMB.periodeChoisie}"
                             onchange="submit()" valueChangeListener="#{searchFormMB.eventCboPeriodesChanged}">
                <f:selectItems id="periodeItem" value="#{searchFormMB.periodeItems}"/>
            </h:selectOneMenu>
        </p>
        <p>
            <h:selectOneMenu id="cboPersonnels" value="#{searchFormMB.auteurChoisi}"
                             onchange="submit()" valueChangeListener="#{searchFormMB.eventCboPersonnelsChanged}">
                <f:selectItems id="personnelItem" value="#{searchFormMB.personnelItems}"/>
            </h:selectOneMenu>
        </p>
        <p>
            <h:selectOneMenu id="cboEssais" value="#{searchFormMB.essaiChoisi}" binding="#{searchFormMB.cboEssai}"
                             onchange="submit()" valueChangeListener="#{searchFormMB.eventCboEssaiChanged}">
                <f:selectItems id="essaiItem" value="#{searchFormMB.essaiItems}"/>
            </h:selectOneMenu>
        </p>
    </f:subview>The problem is with the last cbo (id="cboEssais") since "#{searchFormMB.eventCboEssaiChanged}" is called for the active page and for all previous pages. That means it is called once for the first page visited, twice for the second page visited, three time for the third page visited, ...
    Any idea about this problem ? Thanks

    When i change page valueChangeListener fired at stage RENDER_RESPONSE 6 and when cbo is change valueChangeListener fired at stage PROCESS_VALIDATIONS 3.
    In both cases the number of successive fires (call of valueChangeListener) is equal to the number of (re)visited pages since beginning of the session.

  • JSF PROBLEM With Weblogic

    hello All,
    If I Put this Code in Our JSF File then Weblogic Server Will Go Down.i don't know what the problem in this Code .
    if Any one know please reply me.
    thanks
    reetesh
    <h:panelGroup style="width:30%">
                                  <t:div styleClass="recommendationListDiv">
                                       <h:outputLink styleClass="listicon-book" value="#">
                                            <f:verbatim>Business Plans Made Simple</f:verbatim>
                                       </h:outputLink>
                                       <t:htmlTag value="br"></t:htmlTag>
                                       <h:outputLabel value="#{appMsg.author}" styleClass="subheader"
                                            rendered="true"></h:outputLabel>
                                       <h:outputLabel value="reetesh1 yadav">
                                       </h:outputLabel>
                                       <t:htmlTag value="br"></t:htmlTag>     
                                       <jsp:include page="help.jsp"></jsp:include>
                                       <h:outputLabel value="#{appMsg.publisher}" styleClass="subheader"
                                            rendered="true"></h:outputLabel>
                                       <h:outputLabel value="reetesh1 yadav">
                                       </h:outputLabel>
                                       <h:outputLabel value="#{appMsg.publisher}" styleClass="subheader"
                                            rendered="true">
                                       </h:outputLabel>
                                       <h:outputLabel value="reetesh1 yadav">
                                       </h:outputLabel>
                                  </t:div>
                             </h:panelGroup>

    Logs?

  • JSF Problem with portlet

    Hello. I am using jsf 1.2 with struts 2 (for portlet support) in weblogic. Jsf is used trough struts 2 jsf-plugin. In weblogic i am getting this error :
    >
    javax.portlet.PortletException
    at com.bea.portlet.container.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:143)
    at org.apache.struts2.portlet.result.PortletResult.executeRenderResult(PortletResult.java:200)
    at org.apache.struts2.portlet.result.PortletResult.doExecute(PortletResult.java:91)
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:185)
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:355)
    Truncated. see log file for complete stacktrace
    javax.servlet.ServletException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/jsp/view/index.jsp
    index.jsp:16:26: No property editor found for the bean "javax.el.ValueExpression".
    <h:panelGrid columns="3">
    ^-^
    index.jsp:17:29: No property editor found for the bean "javax.el.ValueExpression".
    <h:outputText value="Employee Id:" />
    ^------------^
    index.jsp:22:26: No property editor found for the bean "javax.el.ValueExpression".
    <h:outputText value="Back" />
    ^----^
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:247)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    Truncated. see log file for complete stacktrace
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/jsp/view/index.jsp
    index.jsp:16:26: No property editor found for the bean "javax.el.ValueExpression".
    <h:panelGrid columns="3">
    ^-^
    index.jsp:17:29: No property editor found for the bean "javax.el.ValueExpression".
    <h:outputText value="Employee Id:" />
    ^------------^
    index.jsp:22:26: No property editor found for the bean "javax.el.ValueExpression".
    <h:outputText value="Back" />
    ^----^
    at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:296)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:200)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:164)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
    Truncated. see log file for complete stacktrace
    >
    My JSP file :
    >
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <f:view>
    <html>
    <!-- todo: make header variable -->
    <head>
    <title>JSF Integration Examples</title>
    </head>
    <body>
         <h1>Modify Employee</h1>
         <h:form>
              <h:panelGrid columns="3">
              <h:outputText value="Employee Id:" />
              </h:panelGrid>
              <h:outputLink>
                   <h:outputText value="Back" />
              </h:outputLink>
         </h:form>
    </body>
    </html>
    </f:view>
    I don't have any faces-config and my web.xml looks like :
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="bookmark-portlet">
    <!-- JavaServer Faces Servlet Configuration, not used directly -->
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>JspSupportServlet</servlet-name>
    <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- JavaServer Faces Servlet Mapping, not called directly -->
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.action</url-pattern>
    </servlet-mapping>
    </web-app>
    Does someone know why i get this error?

    Someone with any solution?

  • JDeveloper 9i & JSF(Problem with FormTag class) ???

    I experiment with JSF Tehnology in JDeveloper 9i, and form my simple jsp page which looks like this:
    <HTML>
    <HEAD> <title>Hello</title> </HEAD>
    <%@ taglib uri="html_basic.tld" prefix="h" %>
    <%@ taglib uri="jsf_core.tld" prefix="f" %>
    <body bgcolor="white">
    <h:form id="testForm" formName="MyTestForm">
    </h:form>
    </body>
    </HTML>
    I got this compile error: " Error(8): formName is not a property
    of com.sun.faces.taglib.html_basic.FormTag "
    I looked in html_basic.tld and tag "formName" is regular declared, but class FormTag realy have no property "formName"... I am new in this tehnology and I need help! Anybody can help me?

    Just remove the formName attribute.
    erik

  • JasperReports + ADF JSF: Problems with report on Lifecycle.PREPARE_MODEL_ID

    Hi people!
    I have created a report using Jasper and iReports. Then i have coded the call to this report in two different places: In the Application Module, i obtain the JasperPrint and fill it with data. Then in my backing bean, i created a method that calls it through OperationBinding.execute() , and exports it using JRPdfExporter, using as output: FacesContext.getCurrentInstance().getExternalContext().getResponse().getOutputStream(). In other words, i am exporting the print to a PDF Stream and flushing it to the HttpServletResponse under the current Faces Context.
    This works just fine when i call the method with a command button, it runs the code and displays the PDF on the page. Yet, i need a different approach: When i click the button, i want to launch a Dialog Window which will show the actual report. So i did some modifications to my code: I created a new page and the navigation case to redirect to it (dialog:showReport). Then i created a managed bean implementing the PagePhaseListener interface, and coded the beforePhase method to run the report creation when it enters the Prepare Model Phase.
    Now, when i run the application, the dialog is displayed, and it goes through the whole method (i saw it by debugging). It even shows the Adobe logo while starting Acrobat Reader. But the dialog page never shows anything... it stays blank forever, and does not allow me to right-click it and display the HTML Source Code (the context menu is blocked).
    Do you know why the report is not displayed on the Prepare Model phase? I have tried the Prepare Render also, but to no avail. Also, after calling the ExportReport method for the response, i have changed the outputStream to a file and exported right after. To my surprise, the PDF is correctly generated on the file! How can i display the report in a pop-up window? Has anyone developed a similar solution?
    I'd appreciate any response whatsoever.
    Thanks in advance for your time!
    Thiago Souza

    Hello Frank,
    Although I do not have code as in Rade's code, I still have the same problem.
    Following is the scenario where this exception occurs:
    We have 2 web-apps in single application. The home page is not a secure jsp. Home page has links to web-app 1 and web-app 2.
    1. From home page access web app 1. This prompts login page (SSO login page). User logs in.
    A new session is created in web-app 1.
    2. Come back to home page and access web app 2 (this creates new session in web-app2).
    3. Come back to home page and Access web app 1. Hit logout from within web-app 1. (SSO logout code kicks in See below).
    This shows SSO logout page, with "Return" button. Clicking on this button takes the user back to home page.
    NOTE that this SSO logout code only invalidates the session in web app 1. The session created in web-app 2 is still there.
    4. Now click on web-app 2. This throws the exception.
    HttpSession session = request.getSession(false);
    session.invalidate(); // THIS INVALIDATES ONLY SESSION FROM WEB_APP 1 try {
    String return_url = "/webapp1/index.jsp";
    response.setHeader( "Osso-Return-Url", return_url);
    response.sendError( 470, "Oracle SSO" );
    } catch(Exception e) {
    log.error("exception = " + e.getMessage());
    This exception will not occur if you access web-app1 then logout. Then access web-app2 then logout. You can do these operations any number of times.
    Message was edited by:
    avpavan

  • JSF: Problem with checkboxes using Tomcat

    Hello,
    I m using Java Sun Creator and I�ve noticed a very strange behavior of checkboxes while running my project with Tomcat (I tried 5.5 and 6.0).
    On my JSP I have a tabSet component with 3 tabs. the second tab (the first tab in order is selected per default ) displays some boolean values using checkboxes. I set these values using SessionBean properties in an action method that navigates me to the page with the tabSet component. When deploying the application with JSC the values are correct after loading the page and when I select the second tab after that.
    When I start the application with Tomcat, the values are correct after loading the page (I�ve checked it displaying the values in a messageGroup), but when I select the second tab, which should show me these selected checkboxes, all of them and even the session bean properties have the value "false" (I see the result in the messageGroup too)?! I had to include my code to the prerender method of the tabSet-page to get the correct values but that has another bad side-effects!
    Does anybody have an explanation for this issue?

    More info,
    we add all drivers we use for the different databases we support, in this case we use classes12.jar and postgresql-8.2-504.jdbc3.jar
    I just let u know that becouse maybe exists conflicts between these two libraries. Could it be?
    thanks

  • How to solve problem with JSF table's border (style) ??

    Hi, I would like to create table in JSF like this
                   <table  align="center"
                             width="250"
                             style="border-collapse: collapse; border: 1px black solid;" >
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;">
                             Header A
                        </td>               
                   </tr>
                   <tr>
                        <td> a1 </td>
                        <td> a2 </td>
                   </tr>
                   <tr>
                        <td> b1 </td>
                        <td> b2 </td>
                   </tr>
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;" >                          
                             <BUTTON value="12" > button1 </BUTTON>
                             <BUTTON value="12">  button2 </BUTTON>
                        </td>
                   </tr>
                   </table>I don't know how to create borders like this with JSF's components.
    I know how to create table and collspan, but I have a problem with
    border and style.
    below is example that I creat it, but borders are not OK
    IF ANYONE FIND SOLUTION I WILL BE TANKFUL
    JSF:
    <hx:panelBox id="box1"
               layout="pageDirection"
               bgcolor="silver"
               align="center"
               style="border: 1px red solid;"
               border="0">
              <hx:panelBox id="box2" layout="pageDirection" width="100%" bgcolor="#aec74e" height="100%" align="center" style="border: 1px black solid;">
                   <center>
                        <h:outputText styleClass="outputText" id="text9" value="Prazniki"></h:outputText>
                   </center>                         
              </hx:panelBox>
              <h:panelGrid styleClass="panelGrid" id="grid1" columns="3">
                   <h:outputText styleClass="outputText" id="text4" value="#{msgs.planDan}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text3" value="#{pc_Koledar.praznikBean.dan}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text5" value="#{msgs.planMesec}">
                   </h:outputText>
                   <h:selectOneMenu styleClass="selectOneMenu" id="menu1" value="#{pc_Koledar.praznikBean.selectedMesec}">          
                    <f:selectItems value="#{pc_Koledar.praznikBean.meseci}" />          
                   </h:selectOneMenu>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text6" value="#{msgs.planLeto}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text2" value="#{pc_Koledar.praznikBean.leto}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text7" value="#{msgs.nazivPraznika}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text1" value="#{pc_Koledar.praznikBean.nazivPraznika}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
              </h:panelGrid>
              <hx:panelBox id="box3"           
                         align="center"
                         layout="lineDirection"
                         width="100%"
                         style="border: 1px black solid;" bgcolor="#aec74e">
                        <center>
                          <hx:commandExButton type="submit" value="Dodaj" id="button1" action="#{pc_Koledar.doButton1Action}" lang="CP1250">
                          </hx:commandExButton>
                           <hx:commandExButton type="submit" id="button3" action="#{pc_Koledar.doButton3Action}" value="Prika�">
                          </hx:commandExButton>
                        </center>
              </hx:panelBox>
    </hx:panelBox>

    Couldn't you use styleClass or id for CSS?

  • Problem with JSF

    Hello,
    I have a problem with finishing my project which is based on JSF, Hibernate and EJB technologies. The matter is that I�ve built the application which manages a group of reports and assign sections and reports to the single user. I have two types of users, simple users and administrators. Simple user log in to the system and is able to generate reports which were assigned to him by admin. In the system can be more than just a one administrator. The problem is when one administrator is on-line and another log in to the system. Then both of them are working on the same instances of classes. In JSF files I�m working on created session beans which are defined in faces-config file. I�m new in JSF so maybe my attitude to this technology is not correct. If anyone know how to solve my problem please help me �
    Regards
    krabu

    Akash_Ganga wrote:
    The same instance of LoginBean.class is used by both of administrators and this is the problem ...The above statement is wrong. There are two different sessions for the two users. You are probably seeing data because its persisted in the database by one user and when the next user logs in, the application fetches data from the DB and displays it. Its more of a design problem if you do not want the second user to see the data which the first user has entered.Akash,
    I think we do not understand each other. My application is really simple. Simple user is able to see some links to reports when log in to the system or not. It depends on administrator which is able, in the form I've mentioned before, to assign the right to see a report by a user or not. I don't know what do you mean by saying "There are two different sessions for the two users".
    To explain you what the problem is try to follow such a situation. Let say we have two classes : LoginBean.class and EditForm.class. Based on that classes we create two session beans : loginBean and editForm in faces-config file as follows:
            <managed-bean>
              <managed-bean-name>
              loginBean</managed-bean-name>
              <managed-bean-class>
              log.LoginBean</managed-bean-class>
              <managed-bean-scope>
              session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>
              editForm</managed-bean-name>
              <managed-bean-class>
              log.EditForm</managed-bean-class>
              <managed-bean-scope>
              session</managed-bean-scope>
         </managed-bean> We have also created two JSF files, one login.jsf which include authorization component based on loginBean and second: editForm.jsf which include a SelectOneMenu component to choose a user and a form to assign selected user a report based on editForm bean.
    We log in to the system as a administration. We are after authorization and enter the editForm.jsf file. We choose a user from SelectOneMenu component and make some changes in the form. But we do not submit anything and do NOT send it to the database. In this moment another administrator log-in, go to the editForm.jsf file and after that he sees that in his selectOneMenu component a user is chosen and the form is filled with data entered by prevoius administrator.
    I'm new in JSF but I've thought that when I create a session bean a new instance of bean ( new instance of class ) is created for all users which try to use it, or maybe I'm doing something wrong or should write some additional code to achieve such a function ...

  • Problem with selectOneMenu in Datatable

    Hi
    I have the following datatable that binds correctly to a set of Game objects.
    I need to have a dropdown with the numbers 1 to 10 as items which is bound to each dataItem's newRating field.
    However there is some problem with the dropdown that i can't figure out. The datatable stops rendering when it hits the first dropdown.
    At the moment,
    The new rating field in the Game class is of type SelectItem with the appropriate get and set methods.
    Could anyone please point out what I'm doing wrong
    Thanks.
    Here is the relevant part in Home.jsp:
                                              <h:dataTable binding="#{Home.newGamesTable}" id="newGamesTable" value="#{Home.newGames}" var="dataItem">
                                                                <h:column>
                                                                    <f:facet name="header">
                                                                        <h:outputText value=""/>
                                                                    </f:facet>
                                                                    <h:panelGroup layout="block" styleClass="new_game_main">
                                                                        <h:outputText styleClass="new_game_title" value="#{dataItem.title}"/>
                                                                        <h:outputText escape="false" styleClass="new_game_label" value="Date added: "/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.dateString}"/>
                                                                        <h:outputText escape="false" styleClass="new_game_label" value="Average Rating:"/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.rating}"/>
                                                                        <h:outputText styleClass="new_game_label" value="Uploaded by:"/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.userName}"/>
                                                                        <h:commandLink styleClass="new_game_label" value="Play Now!"/>
                                                                        <h:selectOneMenu styleClass="new_game_rating" value="#{dataItem.newRating}">
                                                                            <f:selectItems value="#{ratingItems}" />
                                                                        </h:selectOneMenu>
                                                                        <h:commandLink action="#{Home.rateNewGame}" styleClass="message_link" value="Rate"/>
                                                                    </h:panelGroup>
                                                                </h:column>
                                                            </h:dataTable>and Home.java
    private List<SelectItem> ratingItems = null;
         public List<SelectItem> getRatingItems()
             if (ratingItems == null)
                 ratingItems = new ArrayList<SelectItem>();
                 for (int i = 1; i <= 10; i++)
                     SelectItem item = new SelectItem();
                     item.setValue(Integer.valueOf(i));                        
                     ratingItems.add(item);
             return ratingItems;
         public void setRatingItems(List<SelectItem> items)
             ratingItems = items;        
        private List<Game> newGames = null;
        private boolean hasNewGames;
        public List<Game> getNewGames()
            if (newGames ==null)
                newGames = DataFactory.getNewGames();           
            hasNewGames = !newGames.isEmpty();
            return newGames;
        }

    What do you mean by stops rendering? Can you paste the relevant portion of the output (from view source in the browser).

  • Problem with forwarding to new page in jsf

    Hi
    I am facing a problem. I have a checkbox in my jsp page and 3 submit button. The two button works w r t check box and its woking fine. I am getting problem with the 3rd button. I want to fwd to next page once the button is clicked.
    For the check box i am using the method
    public String handleCheckbox2ValueChange(ValueChangeEvent valueChangedEvent)
    Can anyone help me in this regard. I need to fwd to the next page.
    Regards
    Rupesh

    This sounds like a simple JSF navigation that has nothing to do with the checkbox. Read the documentation and tutorials on navigation.

  • Problem with adding Sun JSF RI v1.2 as a new library in JDeveloper 10.1.3.1

    Hi,
    I have a problem with adding a latest JSF 1.2 RI from Sun (https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip) to JDeveloper as a new library.
    I created a new User library and added into it jsf-impl.jar and jsf-api.jar from JSF 1.2 RI.
    Then I try to create two new JSP Tag libraries based from .tld files.
    When a .tld file is placed in "TLD File:" field there is no information below about Library Version and Required JSP Version. If I check "Execute Tags in JSP Visual Editor" and click "Customize" button - list of tags in "Customize Tag Library" window is empty.
    I have errors when I try to use JSF Tags from this new library in JSP page like :
    "Can't create tag instance: f:view (class: null). Make sure, that the tag class or a library contained this class is available in this application"
    (free translation to English)
    Is this possible to add JSF RI v1.2 as another library in Jdeveloper 10.1.3.1 ?
    thanks for help
    koli

    Hi,
    This solution is not exactly for Jdeveloper 10.1.3.x I think.
    - "Create a JSF system library." section, point 2. - there is not possible to add library in folder other than User I see, so I added it in User folder.
    - "Register the JSF JSP tag libraries." section, point 5. - in JD 10.1.3 there is no dialog box, I checked checkbox "Show Tag Library in Palette". A new library was added to User folder but there is no new libraries in component Palette.
    Even as I use "Edit tag libraries .." from Component Palette context menu and add manually new tag libraries to selected, there is no libraries in Component Palette after it.
    I feel so problem is with different .tld files format, not with adding libraries method.
    Sun RI tld file (from version 1.2_03) fragment:
    <taglib xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
    version="2.1">
    <!-- ========== Tag Library Description Elements ========================= -->
    <description>
    The core JavaServer Faces custom actions that are independent of
    any particular RenderKit.
    </description>
    <tlib-version>1.2</tlib-version>
    <short-name>f</short-name>
    <uri>http://java.sun.com/jsf/core</uri>
    tld included in JD:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <!-- ========== Tag Library Description Elements ========================= -->
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>f</short-name>
    <uri>http://java.sun.com/jsf/core</uri>
    <description>
    The core JavaServer Faces custom actions that are independent of
    any particular RenderKit.
    </description>
    Did JDeveloper 10.1.3.x maintain with taglib version 1.2 ?
    Regards
    koli

Maybe you are looking for

  • String Comparision ---please do help me

    Hai all, I have a problem , 1. i have an ArrayList which contains a list of all properties in the app, and an HashMap which contains the name of the file as the key and the string representation of the file as the value. i need to search the key of t

  • Spontaneous or unintentional creation of Groups, which cannot be deleted

    In Address Book in the Group column there suddenly appeared about 20-25 icons of new Groups without (so far as I know) any action on my part. These Groups cannot be deleted, whether I assign a name to them, or not. When I go to "Edit/Delete Group" an

  • Gathering data at high speed and then proccessing it

    Using LV 8.0 I have to read two channels 16000 times at 10Khz. I used an express vi that feeds directly to a write to spreadsheet vi and it works nicely. However I would like to use a polynomial that converts the voltage of one of the channels to a t

  • Can I upgrade directly from elements 3 to the latest version?

    Can I upgrade directly from Elements 3  to the latest version?

  • Facy progress bar

    Hi, I am trying to come up with a fancy and efficient way of displaying the progress of film deposition. I would like to display the progress in an upward "fill," with each sequential layer showing up as it is completed. The best way I have come up w