Ugly JSF Code

Hello,
I want to delete an entity that is referenced by a GET id attribute. I want to add a button/link in the web page to do this job.
I did it using the JSF expression language and the h:outputLink referencing to a Servlet:
<h:dataTable value="#{price_controller.allPrices}" var="current_price">
<h:column>
<f:facet name="header"><h:outputText value="Remove"/></f:facet>
<h:outputLink value="remove_price?price_id=#{current_price.id}&product_id=#{price_controller.productId}">
Remove
</h:outputLink>
</h:dataTable>
¿Is there any way to have the logic in a Managed Bean instead of a Servlet?
It seems that the only way to do that is using the h:commandLink/h:commandButton but I don't know how to send the "#{current_price.id}" information.
Thanks,
Pau
Edited by: Pau_carre on Jan 21, 2010 5:35 AM

Your JSF:
<t:dataTable value="#{myBean.records}" id="results"
  var="showRecos" binding="#{myBean.recordsTable}">               
  <t:column width="8%">
    <h:commandButton id="button" action="#{myBean.myAction}"
      image="/images/folder.gif"/>
    <h:outputText id="recordId" value="#{showRecos.recordId}"/>
  </t:column>
  <t:column>
      <h:outputText id="recordData" value="#{showRecos.someData}"/>
  </t:column>
</t:dataTable>In your Bean:
//Variables
private ArrayList<RecordBean> records;
private UIData recordsTable;
//Add getters and setters to the above variables
//Action
public String myAction(){
  try{
     RecordBean recordBean = (RecordBean) recordsTable.getRowData();
     System.out.println("****Selected Record****");
     System.out.println("Record Id:"+recordBean. recordId);
  }//Followed by catch, finally
}

Similar Messages

  • Include jsp/jsf code in a jsf page at runtime

    Hello,
    I have a problem. I must get data from a Firebird db. The data is posted in jsp/jsf
    code. I've tried to get them through a servlet. The problem is that when I include
    result in my jsf page, the code doesn't get compiled.
    If I include code with a <h:outputText> or a jsp action <jsp:include> or a <c:import
    url> the code doesn't get compiled. If I include code with directive <%include> it is
    translated correctly, but include directive accepts only physical files.
    Any suggestion?
    Thanks

    Hello,
    I have a problem. I must get data from a Firebird db. The data is posted in jsp/jsf
    code. I've tried to get them through a servlet. The problem is that when I include
    result in my jsf page, the code doesn't get compiled.
    If I include code with a <h:outputText> or a jsp action <jsp:include> or a <c:import
    url> the code doesn't get compiled. If I include code with directive <%include> it is
    translated correctly, but include directive accepts only physical files.
    Any suggestion?
    Thanks

  • DATE field problem in JSF code

    Hi,
    I am a newbie on JSF and working with a JSF application development. I have a problem with a data type: DATE. Here is what had happened; I tried to write a new record to a table, in my "write" paragraphs I have the following codes:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();
    The problem is when I was running the program to write a record, I got the following error:
    Cannot append new tableOne data: java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.
    At that point, I was trying to write a DATE value from a "calendar' component (joinDate1 field with MM/dd/yyyy format) into a field name: "joindate' (data type is DATE) in tableOne file.
    Any advice on resolving this problem? Please help me to get more knowledge on this. Thanks!

    Hi,
    You must use sql type. So instead of:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();try something like:
    java.util.Date date = joinDate1.getSelectedDate();
    java.sql.Date dateToInsert = new java.sql.Date(date.getTime());
    tabelOneDataProvider.setValue("joindate", rowKey, dateToInsert);
    tableOneDataProvider.commitChanges();best regards
    Grzegorz

  • JSF code acting strangely

    I am getting the folowwing exceptions when I am running my code on WAS 6.1. Can you pl suggest what the problem would be.
    19:29:24:333 EDT] 0000001f jsf E com.sun.faces.lifecycle.InvokeApplicationPhase execute java.lang.NullPointerException
    javax.faces.el.EvaluationException: java.lang.NullPointerException
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:131)
    at javax.faces.component.UICommand.broadcast(UICommand.java:305)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at com.aig.dbg.ccd.filters.URLRequestFilter.doFilter(URLRequestFilter.java:198)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:111)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:263)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:556)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:606)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Caused by: java.lang.NullPointerException

    Hungarian notations .. Yuck. Just use human readable variable names, prefix methods by verbs, like: get, set, is, do, lookup, change, remove, put, search, etc. This is Java, an OO language, and not some kind of a weak typed language like as PHP.
    Uppercase letters in URL's .. Yuck. URL's are casesensitive and it's an accepted "standard" that URL's are always written in lowercase. What if an user write/types down the URL all in lowercase and get an 404?
    Edit:
    This one is imo a good guidance: http://www.javaranch.com/style.jsp
    Message was edited by:
    BalusC

  • How to output some JSF codes depend on the value of a managed bean

    like this:
    <?
    if (managedbean.propertyA == "1"){
    ?>
    <h:commandButton action="#{managedbean.update}" value="update"/>
    <?
    }else {
    ?>
    <h:commandButton action="#{managedbean.delete}" value="delete"/>
    <?
    ?>
    I know how to get the instance of a managed bean from jsp,
    but i think It is not a good idea that writing scriptlets to get the instance, then writing code like above .
    Is there a simple/reasonable way to implement this?
    Thanks.
    David

    Try this:
    <h:commandButton action="#{managedbean.update}" value="update" rendered="#{managedbean.propertyA == \"1\"}"/>
    <h:commandButton action="#{managedbean.delete}" value="delete" rendered="#{managedbean.propertyA != \"1\"}"/>

  • Reading jsp request in jsf code

    I have a normal jsp page. On submitting the page a normal HttpRequest is generated.
    I need the jsf page t read this request, extract its attributes and display the desired results.
    the jsf page is using the backing beans to get the results.
    i would like to know if it is possible to read a plain jsp request if yes.....would like to know how.
    Thanks.

    thank you for the replies. There is a problem collecting parameters in the backing bean. Could u give me a url where i can find such a sample application done. I would like to see the page navigation and how it is managed. I mean is there a need for an interface like a servlet betwn the jsp page and the backing bean.
    Thanks and regards.

  • Dynamically generate JSF Source code in a JSP

    Hi,
    I have a JSP and instead of writing the JSF source Code like:
    <h:inputText
    styleClass="entryInput"
    id="textNumberOfServerMachinesInput"
    value="#{DataAccess.value}"
    valueChangeListener="#{InputValueChanged.processValueChange}">
    </h:inputText>
    manually in the jsp I want the JSF source code to be added dynamically to the jsp.
    So what I want is including a tag in the jsp and this tag generates JSF source code like seen above.
    This source code should then be treated just the way it would be if I had written it manually in the JSP. This means that the dynamically generated JSF code must be interpreted and all Listeners and Beans work just fine.
    How can I make this???

    Hi,
    I have a smiliar problem:
    JSP:
    <h:panelGrid binding="#{fileUploadGrid.panelGrid}">
       <%-- emty in jsp --%>
    </h:panelGrid>The panel should be populated with items the backing bean creates in source code:
    FileUploadGrid.java
    public void setUploadFieldNumber(int uploadFieldNumber) {
        this.uploadFieldNumber = uploadFieldNumber;
        this.refresh();
    private void refresh() {
        if (this.panelGrid == null)
          this.createPanelGrid();
        List children = this.panelGrid.getChildren();
        children.clear();
        for (int i = 0; i < this.uploadFieldNumber; i++) {
          HtmlOutputText out = new HtmlOutputText();
          out.setTitle("Image " + i);
          out.setRendered(true);
          HtmlInputText in = new HtmlInputText();
          children.add(out);
          children.add(in);   
    private void createPanelGrid() {
        this.panelGrid = new HtmlPanelGrid();
        this.panelGrid.setColumns(2);
        this.panelGrid.setCellpadding("1");
        this.panelGrid.setBorder(1);
        this.panelGrid.setWidth("50%");
        this.panelGrid.setRendered(this.isRendered());
    public void setPanelGrid(HtmlPanelGrid panelGrid) {
        this.panelGrid = panelGrid;
      public HtmlPanelGrid getPanelGrid() {
        return this.panelGrid;
    }The backing bean is initialized in faces-config.xml:
    <managed-bean>
      <managed-bean-name>fileUploadGrid</managed-bean-name>
      <managed-bean-class>org.smi.pte.isf.FileUploadGrid</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
        <property-name>rendered</property-name>
        <value>true</value>
      </managed-property>
      <managed-property>
         <property-name>uploadFieldNumber</property-name>
         <value>6</value>
      </managed-property>
    </managed-bean>The problem is: although the debug output of the faces framework (I use it along with Tomcat) shows that the in- and output fields are added correctly to the panel, the page remains empty at display.
    Thanks in advance for any help.
    F. Eckhardt

  • JSF-EL expansion inside of object using ADF in a JSP

    JSF-EF will not convert to text inside of <object><param>
    I have an existing JSP application that uses an Applet. There is a lot of <% %> code that is passed to the Applet using the <param> tag.
    My code goes as follows:
    <%@ page stuff%>
    <%@taglib stuff%>
    <f:loadBundle stuff/>
    <%
    a lot of ugly java code that I've already ported to a Managed Bean like
    String WORKS = "WORKS";
    %>
    <f:view>
    <afh:html><afh:body><f:view><afh:head>blah</afh:head>
    <afh:body><af:form><af:panelPage>
    a lot of <f:facets>
    <h:panelGrid columns="1">
    <f:column>
    <f:verbatim escape="false">
    <af:outputText value="#{MyBean.WorksFine}"/>
    </f:verbatim>
    </f:column>
    <f:column>
    <f:verbatim escape="false">
    <object classid="234" and more object stuff>
    <param name="WORKS" value="WORKS"/>
    <param name="<%=WORKS%>" value="<%=WORKS%>" />
    <param name="#{MyBean.FAILS}" value="#{MyBean.FAILS}" />
    </object>
    </f:verbatim>
    </f:column>
    </f:panelGrid>
    and so on to
    </f:view>
    To make a long story short my new implementation depends on being able to rid my JSP of all the <% %> stuff so that I can perform magic in my Managed Beans and then pass it to the third party applet.
    I've tried using the <applet> tag and the <jsp:plugin> tags instead of the <object> tag and have the same problem. I also tried removing the escape="false" property from the <f:verbatim> tag. When I look at the Source in the Browser I see the #{MyBean.FAILS} instead of the value it holds. I can successfully use the JSF-EL references inside of a <f:verbatim> tag as long as I refer to it outside of the <object> tag. Once inside the <object> tag the expression is not evaluating.
    My questions are:
    (1) Is there anyway to use a JSF-EL expression inside of an <object> or <param> tag?
    (2) Can you suggest another way that I might pass my Managed Bean properties to the Applet?
    (3) As a worst case, is there anyway that I can access my Managed Bean Properties from inside the <% %> code?
    Thanks. Mark

    Since object and param are not JSF tags, there is no way to access JSF-EL.
    As for accessing the managed beans, you should be able to do so as long as you know they've been instantiated at the point in the page where you make the reference and they are in a scope that you can access from JSP land (like session or application).
    Not the answer you wanted, but I hope it helps.

  • JSF Table StyleClass issue for a specific Field inside the Table

    Hi There,
    Am having an issue of dynamically setting the styleClass for a specific field inside a DataTable. Here is how the JSF code is ..
    <h:column>
    <h:panelGrid id="column4" columns="1" cellpadding="0" cellspacing="0">
    <h:inputText id="numberOfApps" value="#{row.submitNumber}" styleClass="#{row.customStyleClass}" maxlength="6" converter="MyNumberConverter" />
    </h:panelGrid>
    </h:column>
    This Table has a specific column which has a input Text Box where user enter's data. This data will be validated in the bean where in after the validation if its exceeding a limit we should throw an error message and also highlight the field with a specific styleClass.
    I am setting the StyleClass dynamically based on the User Input, so that I can display a highlited Error Field on the screen. Strangely enough, styleclass is getting set as expected for the first submit but doesnt show any styles for further submits. Even the existing style is getting removed from the second submit onwards. I am setting this "customStleClass" dynamic parameter as a Bean Property. Am sure these values are properly set coz to make sure I have put an h:output tag inside that table to display the customStyleClass values and they are getting set as expected but I see blank value for the class="" in the source of the Page.
    Any help would be appreciated.
    Thanks
    Edited by: Lalith on Jan 14, 2008 10:23 AM

    One option is you find the data element of that field GUID.
    Now go to SE11 transaction and in data type put that data element and press where used list. In that select tables.
    This will give you a list of tables where that field is used.
    But again if there are lots of them it will be difficult to find.
    The only option in that case is debug the extractor and find out.

  • I am geeting an error with jsf 1.2 please help

    i have used a datatable tag in JSF which just takes a ResultSet object and prints every row in it in a tabular form. I cheked i am recieving the resultset object with about 8 columns but when the jsf page is invoked it gives me following error.
    HTTP Status 500 -
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    javax.faces.el.EvaluationException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    org.apache.derby.client.am.SqlException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    note The full stack traces of the exception and its root causes are available in the GlassFish v3 logs.
    GlassFish v3
    Thanks
    Harish Ingle

    If possible please post your JSF code and the corresponding java code where in you are getting your resultset and preparing to display the same in your jsp page.

  • JSF 2.0 pages are not compiled.

    Eventually I managed to define a shared library of JSF 2.0 in Websphere 7.0.0.0 and make it loaded when my application starts. But I was that the JSF code has not been compiled to html so that it can be viewed on a browser. This the code on my page
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- jsf:pagecode language="java" location="/src/pagecode/Login.java" --><!-- /jsf:pagecode -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
         <title>login</title>
         <meta http-equiv="Content-Type"
              content="application/xhtml+xml; charset=UTF-8" />
         <link rel="stylesheet" type="text/css" title="Style"
              href="theme/stylesheet.css" />
    </h:head>
    <h:body>
         <h:form styleClass="form" id="form1">
              <h:outputText value="hello"/>
         </h:form>
    </h:body>
    </html>even though the response has to be like
    hello
    it shows the entire code of the page on the browser as
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- jsf:pagecode language="java" location="/src/pagecode/Login.java" --><!-- /jsf:pagecode -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
         <title>login</title>
         <meta http-equiv="Content-Type"
              content="application/xhtml+xml; charset=UTF-8" />
         <link rel="stylesheet" type="text/css" title="Style"
              href="theme/stylesheet.css" />
    </h:head>
    <h:body>
         <h:form styleClass="form" id="form1">
              <h:commandButton type="submit" value="Submit"
                   styleClass="commandButton" id="button1"/>
         </h:form>
    </h:body>
    </html>
    What can I do to shake this issue off. Unfortunately in our organization we have to use RAD 8 and WAS 7.0.0.0. If we used netbeans with Glassfish, we don't face these problems.

    If there is no way to map a schema uri to a physical resource in netbeans, then I'm not sure what can be done.
    We won't be posing the schema to the website until later in the spec development cycle.

  • PLZ Help: how to get value of a request scoped Bean/Attribute in JSF ?!!!

    hi,
    I noticed this part of code to retrieve session scoped beans/vars in an ActionListener or other jsf classes, but it does not work for request scoped beans/vars :( what's the problem then ? what shall i do ?
    Type var = (Type)Util.getValueBinding("myBeanInRequest")).getValue(context);
    I have also set that getPhaseId() returns UPDATE_MODEL_VALUES or APPLY_REQUEST_VALUES.
    Any comment or idea ?

    I have declared my Bean in my JSP page not in the
    faces-config.xml. Does this make any problem ? Also I
    have tried the way you told me as well, but still the
    returned attribute is null.
    P.S. My bean is declared in my JSP page this way:
    <jsp:useBean id="newSurveyVar" class="SurveyModel"
    scope="request" />
    This declaration causes the SurveyModel instance to be created in request scope when the page is rendered, but that doesn't help you when the form is submitted -- that is going to happen on the next request (so the request attribute created here goes away). Basically, <jsp:useBean> is not typically going to be useful for request scope attributes (it's ok for session or application scope, though).
    and further I have this jsf code:
    <h:command_button label="Create" commandName="create"
    action="create" >
    <f:action_listener
    r type="CreateNewSurveyActionListener"/>
    </h:command_button>
    and this is my
    CreateNewSurveyActionListener.processAction(ActionEvent
    e) {
    if (actionCommand.equals("create_the_survey")) {
    FacesContext context =
    t = FacesContext.getCurrentInstance();
    SurveyModel survey =
    y =
    (SurveyModel)(Util.getValueBinding("newSurveyVar")).get
    alue(context);
    if (survey==null) // returns true :(((
    And since I've declared my beans here there is nothing
    special declared in my faces-config.xml
    For me again it is really strange why it is not
    working !!!
    Any idea ? Because the event listener is fired in a separate request, so the one you created in the page is gone.
    This is why the managed bean creation facility was created. If your component contains a valueRef that points at the bean name (or you evaluate a ValueBinding as illustrated earlier in the responses to your question), then the bean will get instantiated during the processing of the form submit.
    Craig McClanahan

  • Jsf and javascript to disable a button

    Hi
    is there a way to get the following code to disable the button called next
    when the button "btn" is clicked i call the javascript function myFunc but it does not disable the button called "Next"
    <html>
         <head>
              <title>Personal Info</title>
         </head>
         <body>
         <script type="text/javascript">
         function myFunc()
              document.personalForm.Next.disabled=true;    
         </script>
              <f:view>
                   <h:form id="personalForm">
                   <h:commandButton id="Next" value="Next" action="doSomething" />
                   <h:commandButton id="btn" value="button" immediate="true" onclick="myFunc()"  />
                   </h:form>
              </f:view>
         </body>
    </html>

    You should write Javascript according to the HTML source, not to the JSF code.
    View the generated HTML source and base your JS on that.

  • Output problem in jsf

    hello, i'm new to jsf and eclipse...
    i managed to retrieve data from a database (i printed it to my jboss console so i'm sure i've got it right), and am trying to put it in my next jsf page..... with one item of data (numAdm, see blow) from the bean it works fine, with another (nomPat) impossible, why !!??
    in the console i get the error message : javax.faces.FacesException: Bean: com.loginMG.bean.PatientBean, property: nomPat
    here is my jsf code :
    <td>
    <h:outputText value="#{bundle.user_password_label}" />
    </td>
    <td>
    <h:outputText value="#{PatientBean.numAdm}" />
    </td>
    <td>
    <h:outputText value="#{PatientBean.nomPat}" />
    </td>
    the 2 first work fine, the 3rd gives the error message when i get to the page
    here is (part of ) my bean :
    package com.loginMG.bean;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    public class PatientBean
    private String numAdm = null;
    private String nomPat = null;
    public String getNumAdm()
    return numAdm;
    public String getNomPat(PatientObject pat)
    nomPat = pat.getNom();
    System.out.print(nomPat); /* this is correct */
    return nomPat;
    what's wrong/different between the 2 ?
    fyi i got numAdm from in input field in another jsf page, and nomPat from a database, but this shouldn't interfere ?
    thx for helping out,
    cybertoubib.

    the important thing is that it returns nomPat, no ?
    actually no :)
    JSF will take this expression
    <h:outputText value="#{PatientBean.nomPat}" />
    and evaluate to to
    patientBean.getNomPat()
    that is why managed beans must follow the Java Bean standard
    i.e zero arg constructor
    access varaibles through getXxx() and setXxx() methods

  • How can I include a jsf page?

    I need to include a jsp page that contains jsf code, I try with:
    <c:import url="faces/include.jsp" var="prova" />
    but the server response:
    javax.servlet.ServletException: Cannot find FacesContext
    There something that is wrong?
    Thank's
    Teo

    I read the document but is not my case.
    My java server faces works well until I put the tag
    <c:import url="./include.jsp" var="jsf" />
    from tag library, ans I don't know why
    Thank's
    Matteo

Maybe you are looking for