JSF DataTable Conditional check

Hi,
I have a dataTable in which I am displaying data from a list.
The problem is I need to apply CSS for few data based on the value which is being displayed.
I am having a column "Status" which displays values like "Success, Activated, Running'. If the value is "Success" then its font color should be green and if "Activated" then the font color should be blue.
Can you please explain how can i do this? I have pasted the code below.
<h:dataTable id="dt1" value="#{jobSearchResult.jobSearchResults}" var="jobs">                    <h:column>                                                  <f:facet name="header">                                        <h:outputText value="Status" />
</f:facet>
<h:outputText value="#{jobs.status}"/>
</h:column>
I tried to use <c:choose> conditions from JSTL but it is not working.

Hi Balu,
I used as shown below and was able to repeat the header for each row.
{color:#0000ff}<hx:columnEx id="ppnIdColHead">{color}
*<hx:jspPanel id="jspPanelPPN">*
*<table>*
<tr><td>*
<h:outputText id="ppnIdLbnlDup" styleClass="parkheadinglabel" value="PPN#"></h:outputText>
*</td></tr>*
*<tr><td nowrap="true">*
<h:outputText id="ppnId" styleClass="centersmallcontent9" value="#{bean.COLUMN_NAME}"></h:outputText>
*</td></tr>*
</table>*
*</hx:jspPanel>*
{color:#0000ff}</hx:columnEx>{color}
You were right JSTL inside JSF is not a good idea.
Thank you for your suggestion.

Similar Messages

  • JSF dataTables - Problem during retrieving data from bean

    Hi, Below is the Stack Trace got on displaying data using JSF datatables.
         This error occurs somtimes and is not very frequent.We are using jboss seam, jboss-4.0.5.GA server and Hibernate.
         Anyone knows about this problem and how it can be resolved?
         Thanks in advance
         javax.faces.el.EvaluationException: Cannot get value for expression '#{loc.companyName}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
              at org.apache.jsp.menu_jsp._jspx_meth_h_panelGrid_0(menu_jsp.java:225)
              at org.apache.jsp.menu_jsp._jspx_meth_f_subview_0(menu_jsp.java:118)
              at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:87)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
              at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_h_form_0(finish_005fregistration_jsp.java:263)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_f_view_0(finish_005fregistration_jsp.java:139)
              at org.apache.jsp.finish_005fregistration_jsp._jspService(finish_005fregistration_jsp.java:93)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at com.kmedia.filter.RequestFilter.doFilter(RequestFilter.java:184)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
         Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
              at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
              at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
              ... 70 more
         10:23:55 Servlet.service() for servlet jsp threw exception
         Also check the JSF page, Backing bean, and VO
         JSF page
         <h:dataTable value="#{finishedRegistrationBean.list}" var = "loc" >
                        <h:column>
         <f:facet name="header">
                        <h:outputText value="#{displaymessages.registrationDate}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText value="#{loc.registrDate}" /> </span>
                                                                                                   </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.companyName}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.companyName}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{displaymessages.Address}" />
                             </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.address}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.Action}" />
                        </f:facet>
                        <h:commandLink target="_blank"
                        action="#{finishedRegistrationBean.viewFinishedRegistrationPage(loc)}">
                        <h:graphicImage value="images/view_icon.gif"
                        alt="#{displaymessages.info_tooltip_view}"
                        width="17" height="17" style="border:0" />
                        </h:commandLink>
                        </h:column>
    </h:dataTable>
    Backing bean
                        @Name("finishedRegistrationBean")
                        public class FinishedRegistrationBean {
                             @In
                             private User user;
                             @In
                             private FacesMessages facesMessages;
                             private List<FinishedRegistrationVO> list;
                             public FinishedRegistrationBean() throws KMException {
                                  filterFinishedRegistration();
                             public void filterFinishedRegistration() throws KMException
                             list = new ArrayList<FinishedRegistrationVO>();
                             finished_list = userDAO.searchFinishedRegistrationDetails(country_code,uniqueID, companyName, user.getUserName());
                             public void setList(List<FinishedRegistrationVO> list) {
                                  this.list = list;
                             public List<FinishedRegistrationVO> getList() {
                             return list;
    FinishedRegistrationVO
         public class FinishedRegistrationVO {
              private String uniqId;
              private String companyName;
              private Date registrDate;
              private String address;
              public String getCompanyName() {
                   return companyName;
              public void setCompanyName(String companyName) {
                   this.companyName = companyName;
              public String getAddress() {
                   return address;
              public void setAddress(String address) {
                   this.address = address;
              public String getUniqId() {
                   return uniqId;
              public void setUniqId(String uniqId) {
                   this.uniqId = uniqId;
              public Date getRegistrDate() {
                   return registrDate;
              public void setRegistrDate(Date registrDate) {
                   this.registrDate = registrDate;
         }

    Could you please post your
    -HBM
    -faces-config.xml

  • Selecting multiple rows from jsf datatable

    Hi
    i am working on jsf,ejb3.0 .my requirement is to select the multiple rows usng checkboxes from jsf datatable. i am workng on this for last two days. early response is appreciated.please hel me.
    Thanks
    KRamu

    Hi!
    You could enhance your collection item with a boolean. On your interface you then insert a checkbox column that you bind to the boolean property. on any given action you can go thru your collection and check which item has been selected. In case of doubt go to [http://balusc.blogspot.com/] -i'm sure you'll find some samples/tuts there.

  • How i can make in the same action 2 condition (check the exemple down)

    how i can make in the same action 2 condition (check the exemple down)
    this is an example and I really thank you for helping me(any body plz)
    http://www.2shared.com/file/DPpdgC_a/Exemple_Edge.html

    1. make each rectangle a symbol  (Symbol_1 and Symbol_2) and uncheck autoplay()
    2. Delete your code on the click event and put the following code in compostion ready:
    var toggle=true;
    function btnPlay(){
              if (toggle){
                        toggle=false;
                        sym.getSymbol('Symbol_1').play();
              else{
                        toggle=true;
                        sym.getSymbol('Symbol_2').play();
    sym.$('Ellipse').click(function(){
              btnPlay();

  • I want to create new popup block screen in CO11N SCREEN for condition check

    in standard CO11N screen after completing filling the required field , when i click the save icon I NEED TO CREATE THE POBUP BLOCK SCREEN FOR CONDITION CHECKING WHICH CONSIST
    YES    NO    CANCEL
    IS THERE ANY FUNC MODULES TO DO THIS? OR IS IT POSSIBLE BY CODING?

    Don't rely on 'Preview'.
    Share/Export as .ibooks file and then drag that to iTunes and sync to your iPad.
    Still no joy, find a pre-processing recipe ( that includes export for iPad) that doesn't spoil the quality in the process.
    Just keep in mind that low quality in means low or lower quality out, in this example.

  • EL Expression in a JSF Datatable

    I have a JSF Datatable that returns a list of results. These results contain a short version of what I actually want to display. For example, "DOC" which stands for "Document". Is there a way that I can create an EL expression inside the Datatable to print out the full name instead of the shortened name?

    jmsjr wrote:
    gimbal2 wrote:
    IMO this requirement, if it is possible to implement, is only going to lead to a hard to maintain application. But I guess that's something you have to experience before you believe it.
    You can't use EL directly in a resource bundle out of the box, but it is possible to parametrize them anyway, did you know that? Perhaps that is already good enough for you.
    http://murygin.wordpress.com/2010/04/23/parameter-substitution-in-resource-bundles/
    http://stackoverflow.com/questions/5697189/pass-parameters-to-messages-from-resource-bundle-to-components-other-than-hou
    Yes, I am aware of parameterising the resource bundles. However, these require you to use f:param .. and the last time I tried, these parameters were not available / visible at the requiredMessage attribute. I'll try it again anyway.As I have re-discovered, you cannot parameterise the requiredMessage attribute.
    http://stackoverflow.com/questions/9280915/how-to-parameterize-requiredmessage-attribute-in-composite-component
    The other alternative I am looking at, for the cases where the requiredMessage needs to be parameterised, or needs to have dynamic content, is to call a backing method for the requiredMessage attribute, from which I can then do whatever I need, even use EL expressions. I was thinking of this as a last resort.
    On the other hand, when one uses the validator attribute, usually one ends up adding one or multiple FacesMessage in code within the method being called, where the string of the message already comes from a resource bundle. I was trying to have a delineation whereby:
    1) requiredMessage should only use resource bundles, no backing bean method called.
    2) FacesMessages added via the method called by the validator attribute is OK

  • JSF Datatable row data - Expand/Collapse

    Hi,
    I just started learning the JSF concepts. I read articles by BalusC which are very clear and easily understandable. Thanks to BalusC.
    I have a requirement to implement expand and collapse data using JSF datatable. The data comes from the backing bean is in the form of java.util.List which contains StudentInfo. I will have to display following data from the list.
    *{color:#0000ff}name {color}(this is to be displayed a link), firstname, lastname, dob*
    I am able to display the data in a nice formatted table using h:datatable. My main hurdle is to display an expanded info when the name link is clicked. The expanded info should be displayed below the row spanning all columns. The additional info being the comments, instructions whic are the part of the row data. Here is the code describing the StudentInfo.
    Appreciate if someone help me with suggestions. Very helpful if any sample code is avaialble.
    Regards,
    Smitha
    public class StudentInfo {
    //Following fields to be shown in row data
    private String name;
    private String firstname;
    private String lastname;
    private String dob;
    //Following fields to be shown in expanded form
    private String comments;
    private String instructions;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public String getFirstname() {
    return firstname;
    public void setFirstname(String firstname) {
    this.firstname = firstname;
    public String getLastname() {
    return lastname;
    public void setLastname(String lastname) {
    this.lastname = lastname;
    public String getDob() {
    return dob;
    public void setDob(String dob) {
    this.dob = dob;
    public String getComments() {
    return comments;
    public void setComments(String comments) {
    this.comments = comments;
    public String getInstructions() {
    return instructions;
    public void setInstructions(String instructions) {
    this.instructions = instructions;
    }

    That's not possible with plain h:dataTable.
    Consider Tomahawk t:dataList where in you can specify rows and colspans yourself using plain HTML. Show/hide rows should be easy with JavaScript.

  • Jsf datatable component + java.sql.SQLException

    I get the following error when implementing a JSF DataTable component using
    JDeveloper 10.1.3.1.
    javax.faces.FacesException: java.sql.SQLException: Io exception: Socket closed
    I am able to follow the article in this link:
    http://www.oracle.com/technology/oramag/oracle/06-jan/o16jsf.html
    I can get the table generated, but it occurred to me that the example in this article does not include logic to close the statement, resultset, and connection. Sure enough, I jumped out to the database and there were numerous inactive connections hanging around from my application.
    I added the following code before the return null statement from the article:
    finally {
    try {
    rs.close();
    stmt.close();
    c.close();
    catch (Exception e) {
    System.out.println("after close");
    So I need to know the proper procedure to closing the resultset, statement, and connection using a jsf datatable component.

    You need to make sure you're using the Oracle9i JDBC driver, or using the Oracle 8.1.7.2 JDBC driver as I mentioned above.
    If you are using JDeveloper9i release 9.0.2 or 9.0.3, the driver you need is in <jdevhome>\jdbc\lib
    Otherwise, you can also download the drivers from OTN.

  • Sorting a JSF dataTable

    Hi all,
    How can the contents of JSF dataTable component be sorted (any column). I need solution in JSF.
    can any one show an example or code snippet.
    I have this code of dataTable and I want to sort it by Date Created.
    How I can associate my code of sort with this column.
    <h:dataTable value="#{viewCampaignPageBean.allCampaigns}" var="campaign"
    border="1" width="60%" cellpadding = "4" styleClass= "sample" headerClass="th"
    >
    <h:column>
    <f:facet name="header">
    <f:verbatim>Title</f:verbatim>
    </f:facet>
    <h:outputText value="#{campaign.title}" styleClass="tLabel" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <f:verbatim>Type</f:verbatim>
    </f:facet>
    <h:outputText value="#{campaign.campaignType}" styleClass="tLabel" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <f:verbatim>Date Created</f:verbatim>
    </f:facet>
    <h:outputText value="#{campaign.createDate}" styleClass="tLabel" />
    </h:column>
    </h:dataTable>Thanks in advance

    Check <a href="http://balusc.xs4all.nl/srv/dev-jep-dat.html"></a> � <a href="http://balusc.xs4all.nl/srv/dev-jep-dat.html#SortingDatatable"></a>.

  • H:message inside a JSF Datatable

    Is it possible to put an < h:message> inside of a column of a JSF Datatable? I want to validate that the user is actually entering data into the text box residing in the column of the Datatable.

    Yes, you could, please download jsf1.1 RI and install the jsf-components smaple and then refer this page:
    http://localhost:8080/jsf-components/repeater.faces

  • Condition Checking

    Hi,
      Is there anyway i can ensure, let's say my "net income" is larger than 2 million before the user can submit the data? is there some sort of condition checking or locking mechanism that does this?
      any input on this?
    cheers

    You can have something like that for submission
    please check into help online the follow link
    http://name of your application server/osoft/help/admin/helpstart.htm#Setting_application_set_parameters.htm
    It is not exactly what you want but you can do something using this approach.
    You can change the work status settings for each application. Changing the work status settings involves identifying three to five 'work status dimensions,' and then defining specific members for the remaining non-work status dimensions used for validation purposes. You must determine which account you will use for validation of the data at the time the work status is changed. The validation account must be &rdquor;0u201D at the intersection of the 3-5 variable members and the members designated for the non-work status dimensions.  If the account is not &rdquor;0u201D then the owner/manager cannot set the work status.  This is an option feature.
    The dimensions you select as the work status dimensions are the variables in your business process. For example, the entity, category, and time might change based on who is submitting data, but the account, data source, reporting currency, etc., remains static. (Typically, Time is a work status dimension since data is usually segregated based on time.)
    For example, lets say that you set Entity, Category, and Timeas your work status dimensions for a given application. You then set your other current view members to the following:  Account: Validation; DataSrc: TotalAdj; Intco: All_Intco; and RptCurrency: LC. In addition to assigning work status dimensions, you also specify which dimension is the 'owner dimension.' The owner dimension includes the Owner property. The owner property determines who can edit a work status setting. The following figure shows this setup, where Entity is the Owner dimension.
    A user attempts to post data to the current view shown in the following table. The system checks the 'validation' account to make sure the intersection equals zero (0). If so, the data is posted, and a success message is displayed. The user can now set the work state to 'submitted' on that intersection. Subsequent submissions to that exact intersection will be rejected. Users can only send data to the same intersection if the Entity, Category, or Time member changes.
    Account
    <All>
    Category
    Actual
    DataSrc
    <All>
    Entity
    SalesNE
    Intco
    <All>
    RptCurrency
    <All>
    Time
    Feb.2007
    To change work status settings for applications
    From the Admin Console, expand the Application node.
    Expand the application for which you want to change the work status setting.
    Select Work Status Settings.
    In the Work State column, select Yes for each dimension you want to use to control the work status settings. Select Owner for the dimension that contains the Owner property.
    In the Member Validation column, select a member for each non-work status dimensions. (Use the browse button to open the Member Lookup.)
    From the action pane, select Save Work Status Settings.

  • How to dynamically create a JSF dataTable from a String[][] array

    Hi, I�m developing an application that uses columns, rows and data instead of any other attributes, so I got from a database Resultset a String[] array with the rows headers, other String[] array with the columns headers, and a String[][] array with the information between every row[] and column[] header al this String arrays depend on a method that receives the group title as a parameter so they are dynamically created, anyway I can display this information in a jsp page but I don�t know how to display this information in a JSF dataTable.
    Does anybody knows how I could do this? and which is the proper way to create a dynamically rows and columns dataTable?

    Hi, I�m developing an application that uses columns, rows and data instead of any other attributes, so I got from a database Resultset a String[] array with the rows headers, other String[] array with the columns headers, and a String[][] array with the information between every row[] and column[] header al this String arrays depend on a method that receives the group title as a parameter so they are dynamically created, anyway I can display this information in a jsp page but I don�t know how to display this information in a JSF dataTable.
    Does anybody knows how I could do this? and which is the proper way to create a dynamically rows and columns dataTable?

  • Question about jdbc and jsf datatable

    hello
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.
    or
    Is there any better way I can speed up retrieving data from databse ?
    regards

    orkun wrote:
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
    Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

  • Problem with jsf DataTable

    when data is fetch using user criteria:
    i have a problem with jsf DataTable. I use e request bean to populate the datatable and i insert a commandButton column. The data dispay successfully into the datatable, but when a push the button on the row...the page simply refresh and notinhg else
    when data is fetch using constants:
    The data dispay successfully into the datatable, when a push the button on the row...the action execute OK

    Hi,
    I don't think that with this description only anybody on this list is able to help you.
    I use e request bean to populate the datatable and i insert a commandButton column
    What is a command button column and what does it do ?
    but when a push the button on the row...the page simply refresh and notinhg else
    What did you do to debug the problem ?
    when data is fetch using constants
    What does this mean ?
    Frank

  • Condition Check problem

    Hi,
    I am new in jsf, I have got a problem...
    I have a bean named UserBean, It has a age property.
    I want check a condition on Age property, and using JSTL for that, The Code is like that...
    <c:if test ="${UserBean.age>17}">
      <h:outputText value=" You are Adult"/>
    </c:if>Can Any one help me?
    It will be better if any one send me code....
    Thanks
    Palash

    The 'rendered' attribute to be precise :) You can put any boolean expression in it. When this evaluates to true, then the component and it's children will be rendered, otherwise if false, then they will be hidden.
    Some basic examples:<h:someComponent rendered="#{myBean.booleanValue}" />
    <h:someComponent rendered="#{myBean.intValue > 10}" />
    <h:someComponent rendered="#{myBean.objectValue == null}" />
    <h:someComponent rendered="#{myBean.stringValue != 'someValue'}" />
    <h:someComponent rendered="#{!empty myBean.collectionValue}" />
    <h:someComponent rendered="#{!myBean.booleanValue && myBean.intValue != 0}" />
    <h:someComponent rendered="#{myBean.stringValue == 'oneValue' || myBean.stringValue == 'anotherValue'}" />

Maybe you are looking for

  • XFCE and KDE Menus on same machine

    I'm planning on installing both XFCE and KDE on a laptop and was wondering if there was any way to separate the KDE and XFCE programs in the menu.  For example on KDE when I go to Multimedia under the K Menu I would see K3B and under a subfolder call

  • Php form not sending

    i have been lately having trouble with a php form. it will not send the form out to me when they submit it. is there something wrong with the coding? it works for me.

  • Voicemail is messed up!

    i returned my last iphone and got a new one. i rerecorded my voicemail greeting and set it as my voicemail greeting thing. but everytime someone calls me and it goes to my voicemail it doesnt give them the option to leave a voicemail. please help.

  • Horizontal submenu bar?

    hi .. i'm pretty new to spry and was wondering if there's a way in order to create a horizontal with a submenu that's displayed horizontal too? in dreamweaver i see only the possibility to change the style of the main menu bar but not the submenu.

  • MSI H55M-E33 MB OC

    Hello everyone! I got an MSI H55M-E33 mother board paired with an i5-760 currently running at 3.6 ghz, unfortunately thats the maximum i ever managed to get it to, i was wondering if anyone has the mentioned motherboard and ever managed to get to 3.8