CommandLink in Data Table

I am having a problem with the command links in the data table. I have to click them twice in order for them to work. The way my app works currently is if the user clicks a link it updates the field in the drop down to reflect that value. It seems to work fine after the first initial click unless you click the reset button and then you have to click the link twice again to get it working.
But recently, I discovered if I add immediate = true the links work on the first click however it no longer updates the selectonelistbox with the selected value.
Any ideas?
Thanks

Which JSF implementation/version exactly then?
Regarding to your problem: there might be a validation or conversion error been thrown. Add <h:messages /> to the code to take note all of them. Or if you're using JSF 1.2 or newer, read the application server logs for missing (not been displayed) errors.

Similar Messages

  • A data table in one column of a dynamic data table

    Hi , I have to design a dynamic data table(with dynamic columns and data) which looks as the following
    DETAILS      NAME      ROLE NUMBER     CLASS     SECTION
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH     
    15     MATHS     SURESH     15     10     A
    20     SCIENCE                    
    25     ENGLISH          
    The data in the column 'DETAILS' should have inner table. The data in this inner table should have hyper links. If there is no inner table infor mation there shold be an image with hyperlink. This data table should also have pagination and sorting features. Please send me some example code for this. Please help me out as i have client demo on monday

    You may find this example useful: [http://balusc.blogspot.com/2006/06/using-datatables.html#NestingDatatables].
    To toggle between a nested datatable and a hyperlink with image just use the rendered attribute. E.g.
        <h:column>
            <h:dataTable rendered="#{!empty dataItem.innerList}">
            </h:dataTable>
            <h:commandLink rendered="#{empty dataItem.innerList}">
            </h:commandLink>
        </h:column>
    ...

  • JSF-Data Table displaying all data in a single row

    Hi Guys,
    Im new to JSF, im trying to display the details from a List in a data table, but all the details are getting displayed in a single cell instead of displaying as rows, can someone help me with this problem?

    You need post your code so that we can view it.
    This is an example of dataTable
    <h:dataTable border="1" id="qresults" cellpadding="4" styleClass="subjectQRTbl" cellspacing="4" value="#{wormingList.worming}" var="bbr" first="#{wormingList.firstRowIndex}" rows="#{wormingList.noOfRows}" rowClasses="evenRow,oddRow">
    <h:column>
    <f:facet name="header">
         <h:outputText escape="false" value="Vaccination Date" />
    </f:facet>
    <h:commandLink id="locnum" action="#{appAction.getWormingRecord}" title="Update Worming History Record">
    <h:outputText value="#{bbr.dateWormed}">
    <f:convertDateTime pattern="MM/dd/yyyy"/>
    </h:outputText>
    <f:param name = "recordId" value ="#{bbr.id}" />
    </h:commandLink>
    </h:column>
    <h:column>
    <f:facet name="header" >
    <h:outputText escape="false" value="Vaccination Type" />
    </f:facet>
    <h:outputText value="#{bbr.type}" styleClass="readOnly" />
    </h:column>
    <h:column>
    <f:facet name="header" >
    <h:outputText value="Vaccination Dosage" />
    </f:facet>
    <h:outputText value="#{bbr.dosage}"styleClass="readOnly"/>
    </h:column>
    </h:dataTable>
    Hope this helps

  • Data table header facet with multiple components?

    Hi,
    I have a data table to which I wish to add buttons to change the sort order of the items displayed. However when I add the 'buttons' to the 'header' facet I get strange results - some components are shown, some are not, and the order they appear seems almost random.
    Is the header / footer facet designed only for one component - or can I combine them somehow?
    Code snippet is
    <h:dataTable id="table" rowClasses="oddRow,evenRow" width="80%"
    value="#{ControllerBean.orderedResults}" var="meet">
    <h:column>
    <f:facet name="header">
    <h:commandLink action="#{ControllerBean.setOrder}">
    <h:graphicImage value="/img/up.gif" style="border: 0px" />
    <f:param name="order" value="up-title" />
    </h:commandLink>
    <h:outputText value="#{msgs.title}" />
    <h:commandLink action="#{ControllerBean.setOrder}">
    <h:graphicImage value="/img/down.gif" style="border: 0px" />
    <f:param name="order" value="down-title" />
    </h:commandLink>
    </f:facet>
    <h:outputText id="meetTitle"
    value="#{meet.title}" />
    </h:column>
    etc..
    So to be clear - I want a header that contains two graphic buttons separated by the text. When I run this code as is here, I get just the 'down' button, but by changing the order I can sometimes get the down button and the text......
    Cheers
    Reeling

    Yes, you can place it in a panelGrid or panelGroup component.
    The following is an excerpt from a book:
    TIP: To place multiple components in a table header or footer, you must
    group them in an h:panelGroup tag, or place them in a container component
    with h:panelGrid or h:dataTable. If you place multiple components in a facet, only the
    first component will be displayed.
    Thus you could have something like:
                   <f:facet name="header">
                        <h:panelGrid columns="1">
                             <h:outputText value="#{fields.recordings}" style="font-weight: bolder" />
                             <h:panelGroup>
                                  <h:outputText value="#{fields.type}" style="font-weight: bolder"/>
                                  <h:outputText value="#{fields.date}" style="font-weight: bolder"/>
                                  <h:outputText value="#{fields.time}" style="font-weight: bolder"/>
                             </h:panelGroup>
                        </h:panelGrid>
                   </f:facet>

  • Ajax4JSF and Tomahawk data table, strange behaviour

    Hi,
    I use the tomahawk data table to display a list of objects in my page with the following code snippet
    <t:dataList value="#{userGallery.images}" var="image" layout="simple">
      <a4j:region>
        <t:htmlTag value="div" styleClass="imageEntry">
          <!-- This is the interesting part -->
          <h:outputLink value="gallery.faces">
            <f:param name="imageId" value="#{image.id}" />
            <t:div styleClass="imageWrapper image_#{image.id} #{image.inCart ? 'inCart' : ''}">
              <h:graphicImage value="#{ftp.apacheThumbnails}#{image.imageName}" alt="#{image.imageName}"/>
            </t:div>
          </h:outputLink>
          <!-- End of the interesting part -->
          <t:htmlTag value="div" styleClass="textWrapper">
            <t:htmlTag value="div" styleClass="actions">
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="addToCart" value="+#{msg.detailCart}" action="#{shoppingCart.addImageToCart}" rendered="#{!image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="removeFromCart" value="-#{msg.detailCart}" action="#{shoppingCart.removeImageFromCart}" rendered="#{image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>     
            </t:htmlTag>
         </t:htmlTag>
       </t:htmlTag>
      </a4j:region>
    </t:dataList>I have marked the interesting part of the text.
    When i first access the page then everything is rendered as it should be.
    When i now klick on the a4j:commandLink then i got the following result: (only the interesting snippet)
    <div class="imageEntry">
      <a href="gallery.faces?imageId=2"/>
      <div class="imageWrapper image_2 inCart">
         ..... (output as it should be)
      </div>
      <div  class="textWrapper">
         .... (output as it should be)
      </div>
    </div>So you see the link tag is closed to early, it should wrapp the complete <div class="imageWrapper> object.
    Anybody know how to solve this?
    Edited by: heissm on 19.05.2008 16:26 - shifting of the html tags

    Hi,
    I use the tomahawk data table to display a list of objects in my page with the following code snippet
    <t:dataList value="#{userGallery.images}" var="image" layout="simple">
      <a4j:region>
        <t:htmlTag value="div" styleClass="imageEntry">
          <!-- This is the interesting part -->
          <h:outputLink value="gallery.faces">
            <f:param name="imageId" value="#{image.id}" />
            <t:div styleClass="imageWrapper image_#{image.id} #{image.inCart ? 'inCart' : ''}">
              <h:graphicImage value="#{ftp.apacheThumbnails}#{image.imageName}" alt="#{image.imageName}"/>
            </t:div>
          </h:outputLink>
          <!-- End of the interesting part -->
          <t:htmlTag value="div" styleClass="textWrapper">
            <t:htmlTag value="div" styleClass="actions">
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="addToCart" value="+#{msg.detailCart}" action="#{shoppingCart.addImageToCart}" rendered="#{!image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>
              <a4j:commandLink reRender="imageList,shoppingChart" styleClass="removeFromCart" value="-#{msg.detailCart}" action="#{shoppingCart.removeImageFromCart}" rendered="#{image.inCart}">
                <f:setPropertyActionListener target="#{shoppingCart.chosenImageId}" value="#{image.id}" />                                     
              </a4j:commandLink>     
            </t:htmlTag>
         </t:htmlTag>
       </t:htmlTag>
      </a4j:region>
    </t:dataList>I have marked the interesting part of the text.
    When i first access the page then everything is rendered as it should be.
    When i now klick on the a4j:commandLink then i got the following result: (only the interesting snippet)
    <div class="imageEntry">
      <a href="gallery.faces?imageId=2"/>
      <div class="imageWrapper image_2 inCart">
         ..... (output as it should be)
      </div>
      <div  class="textWrapper">
         .... (output as it should be)
      </div>
    </div>So you see the link tag is closed to early, it should wrapp the complete <div class="imageWrapper> object.
    Anybody know how to solve this?
    Edited by: heissm on 19.05.2008 16:26 - shifting of the html tags

  • Self re-rendering of a data table

    hello !
    i am using tomahawk data table which contain a <a4j:commandLink in one of its coloumn .
    now this link's action listener delete data from the list that is used for this datatable
    the problem is
    this data table is not re-rendered even i have specified id of datatable in the reRender attrbute of <a4j:commandLink
    note that
    i have also specified other ids in the reRender attrbute of <a4j:commandLink And others work fine but the DATATABLE dont .
    regards
    Shakeel Abbas

    sorry to disturb its working now
    i have not written parantheses while calling the jsFunction
    Although no one replied but thanks

  • Why in SE16 we can not  see New Data Table for standard DSO

    Hi,
    We says that there is three tables (New Data Table, Active Data Table and Change Log Table) of Standard DSO, Then Why in SE16 we can not  see New Data Table of Standard DSO.
    Regards,
    Sushant

    Hi Sushant,
    It is possible to see the 3 DSO tables data in through SE16. May be you do not have authorization to see data through SE16.
    Sankar Kumar

  • How to find the number of entries in a master data table

    Hi Experts,
    I am trying to find the entries in 0CUSTOMER master data.
    BW>LISTCUBE>Data target: 0CUSTOMER and selected the fields that I need.
    I would like to know how to find the "number of entrees". I tried to run the SUM for a count field, but it is taking forever as there are huge number of records .

    Hi Dev,
    Go to the change/display mode of the info object (0CUSTOMER) in your case. Go to the Master data/Text tab. Here you will find the master data tables according to your settings (P orQ or X or Y). Double click on the table name and it will take you to the SE11 display. From there, you can check the number of records as you do in any transparent table.
    Hope this helps.
    Thanks and Regards
    Subray Hegde

  • DSO upload and no data in Active data table

    Hi Experts,
    I have a strange problem.I have loaded data to DSO from DS in BI7. It has the further uplaod to cube.I have activated the DSO and it went sucessfull and had Request ID generated. It has added and transfer records available like 150000 records as I have done full upload. strangly I cannot see any data in Active data table.
    Pls advise how can I check the data I am doing some mistake.I have data mart status for this DSO. the deletion of the DSO and reloading could that create the data not visible in DSO even after activation
    Pls advise.
    Tati

    Hi,
    I believe this got something to do with the display setting.. After displaying the data, get into the settings menu and look for Layout option --> display --> see if there is any default setting applied.. change this setting to something else.. create a setting with all the columns dragged & dropped.. These are the options you can try..
    If this did not resolve.. please try displaying the data from SE16 transaction and post us the results..
    Thanks,
    Naren

  • DSO activation: Data in new data table but missing in active data table?

    we use an end routine in transformation to populate a data field in DSO.
    it works as we can see the value populated in new data table.
    when we activate (activation) DSO, we see the value is deleted from this data field.
    why?
    this data field is set as an characteristic info obj in the data field portion of the DSO.
    we are using 2004s, I forget to check the SP level.
    George

    good job ,thanks for the update and good luck.
    I saw it late on this, else i never miss OSS notes
    Chetan
    @CP..

  • How to get list data and bind to data table or Grid view in share point 2010 using j query

    hi,
    How to bind list data in to data table or  grid view  using Sp Services.
    How to use sp services in share point 2010 lists and document library 

    Hi, You can use List service, SPServices and JQuery to get your requiement done-
    See here for an sample implementation -
    http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/
    http://www.codeproject.com/Articles/343934/jqGrid-Implementation-using-SpServices-in-SharePoi
    Mark (creator of SPServices) has some good documentation on how to use SPServices-
    http://spservices.codeplex.com/wikipage?title=%24().SPServices
    SPServices Stories #7 – Example Uses of SPServices, JavaScript and SharePoint
    http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Data not going from active data table to new data table -DSO activation iss

    Hi Experts,
    Data is going from DSO1 to DSO2. I see some of the records are getting missed in DSO 2 which are supposed to come.
    There is start routine from DSO1 TO DSO2 and as per the start routine some records should come but they are getting missed.
    Apart from that..to  DSO 2 there are 4 other DSO sending data.
    I tried to send single record and saw that data is going

    Hi Experts,
    Data is going from DSO1 to DSO2. I see some of the records are getting missed in DSO 2 which are supposed to come.
    There is start routine from DSO1 TO DSO2 and as per the start routine some records should come but they are getting missed.
    Apart from that..to  DSO 2 there are 4 other DSO sending data.
    I tried to send single record and saw that data is going to New data table and upon activation it does not go to Active data table.
    Please suggest.
    Regards
    Sudha

  • Abap code not working  - deleting based on master data table information

    Hi,
    I wrote a piece of code earlier which is working and during test we found out that it will be hard for the support guys to maintain because it was hard coded and there is possibility that users will include more code nums in the future
    sample code
    DELETE it_source WHERE /M/SOURCE EQ 'USA' AND
    /M/CODENUM NE '0999' AND
    /MCODENUM NE '0888' AND.
    Now I created a new InfoObject master data so that the support people can maintain the source and code number manually.
    master data table - the codenum is the key.
    XCODENUM    XSOURCE
    0999               IND01
    0888               IND01
    now I wrote this routine all the data gets deleted.
    tables /M/PGICTABLE.
    Data tab like /M/PGICTABLE occurs 0 with header line.
    Select * from /M/PGICTABLE into table tab where objvers = 'A'.
    if sy-subrc = 0.
    LOOP at tab.
    DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM NE tab-XCODENUM.
    ENDLOOP.
    Endif.
    But when I chage the sign to EQ, I get opposite values , Not what I require.
    DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM EQ tab-XCODENUM.
    Cube table that I want to extract from
    /M/SOURCE                             /M/CODENUM
    IND01                                       0999
    IND01                                       0888
    IND01                                       0555
    IND01                                       0444
    FRF01                                      0111
    I want to only the rows where the /M/CODENUM = 0999 and 0888 and i would also need FRF101
    and the rows in bold  should be deleted.
    thanks
    Edited by: Bhat Vaidya on Jun 17, 2010 12:38 PM

    It's obvious why it deletes all the records. Debug & get your answer i wont spoon feed
    Anyways on to achieve your requirement try this code:
    DATA:
          r_srce TYPE RANGE OF char5, "Range Table for Source
          s_srce LIKE LINE OF r_srce,
          r_code TYPE RANGE OF numc04,"Range table for Code
          s_code LIKE LINE OF r_code.
    s_srce-sign = s_code-sign = 'I'.
    s_srce-option = s_code-option = 'EQ'.
    * Populate the range tables using /M/PGICTABLE
    LOOP AT itab INTO wa.
      s_code-low = wa1-code.
      s_srce-low = wa1-srce.
      APPEND: s_code TO r_code,
              s_srce TO r_srce.
    ENDLOOP.
    DELETE ADJACENT DUPLICATES FROM:
    r_code COMPARING ALL FIELDS,
    r_srce COMPARING ALL FIELDS.
    * Delete from Cube
    DELETE it_source WHERE srce IN r_srce AND code IN r_code.

  • Getting selected values from a data table

    My data table gets values directly from a result set.
    I went through http://balusc.blogspot.com/2006/06/using-datatables.html#top ,
    however, the data table shown in this example takes values from a simple list. I have trouble in getting selected values.
    Can anyone suggest how to select multiple values. here is a small code sample of what I have
    SessionBean
    ResultSet rs= db.retrieve_draft();
    datamodel = new ResultSetDataModel();
    datamodel.setWrappedData(rs);This is the JSF
    <h:dataTable binding="#{Engineer.dataTable1}" headerClass="list-header" id="dataTable1"
    rowClasses="list-row-even,list-row-odd" style="left: 144px; top: 192px; position: absolute"
    value="#{SessionBean1.datamodel}" var="currentRow">
    <h:column id="column1">
    <h:outputText id="outputText77" value="#{currentRow['report_number']}"/>
    <f:facet name="header">
    <h:outputText id="outputText78" value="Report Number"/>
    </f:facet>
    </h:column>Edited by: ktip on Jul 29, 2008 11:04 AM

    Here is what I was doing :
    This is my Session Bean (viz. SessionBean1)
    private CachedRowSetDataProvider draft_infoDataProvider;
        private CachedRowSetXImpl draft_RowSet;
        public CachedRowSetDataProvider getDraft_info() {
            return draft_infoDataProvider;
        public void setDraft_info(CachedRowSetDataProvider draft_info) {
            this.draft_info = draft_infoDataProvider;
        public CachedRowSetXImpl getDraft_RowSet() {
            return draft_RowSet;
        public void setDraft_row(CachedRowSetXImpl draft_row) {
            this.draft_row = draft_RowSet;
    public void get_drafts()
                Class.forName("com.mysql.jdbc.Driver");
                String url = "jdbc:mysql://localhost:3308/test";
                String dbUser = "root";
                String dbPassword = "adminadmin";
                con = DriverManager.getConnection(url, dbUser, dbPassword);
            String  sql="SELECT report_id from reports WHERE status='Draft' ";
            ResultSet rs=null;
            try
                Statement stmt1=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                rs=stmt1.executeQuery(sql);
                draft_RowSet=new CachedRowSetXImpl();
                draft_RowSet.populate(rs);
                draft_infoDataProvider=new CachedRowSetDataProvider(draft_RowSet);
                result="ok";
            catch(SQLException e)
              System.out.println(e); 
              result="fail";
    Here is my jsp page (developed in Netbeans 6.1) showing the data table
    <webuijsf:table augmentTitle="false" binding="#{Engineer.table1}" clearSortButton="true" deselectMultipleButton="true"
                                            id="table1" selectMultipleButton="true" sortPanelToggleButton="true"
                                            style="left: 48px; top: 144px; position: absolute; width: 450px" title="Table" width="0">
             <webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{SessionBean1.draft_infoDataProvider}" sourceVar="currentRow">
                      <webuijsf:tableColumn headerText="report_number" id="tableColumn1" sort="test_report.report_number">
                                            <webuijsf:staticText id="staticText1" text="#{currentRow.value['reports.report_id]}"/>
                        </webuijsf:tableColumn>
             </webuijsf:tableRowGroup>
       </webuijsf:table>Doing all this just resulted in a javax.Naming.Exception : Data Source is null
    I tested this piece of code to give me the number of rows in the underlying rowset and it worked well. But somehow I could not get to display the data. Am I missing something?
    Edited by: ktip on Jul 31, 2008 1:21 PM

  • Problem with Exception Worksheet using Data from Supply Plan Data Table

    I added a series for a flag that indicates whether product is sourced from multiple manufacturing sites for a given customer and item. The flag is on the supply plan data table because it depends on the scenario. I created an exception worksheet for when the flag is set but all combinations are being displayed. If the flag is not set for a given combo then "Selected Page Item has No Data" is displayed in place of the table. I want only the combinations that meet the exception to be shown. I tried setting up an exception worksheet for customer shipments which is also on the supply plan data table but saw the same issue with all combinations being displayed whether or not the condition is met. Does anyone know of any issues with using exception worksheets with the supply plan data table? I searched the documentation and saw that exceptions behave differently with promotion series but this isn't a promotion.
    I'm using Demantra version 7.2. Thanks for any help!
    Edited by: user9253208 on Mar 30, 2010 6:40 AM

    Thanks. We have come up with a workaround. While the combinations on the left are not affected by the exception, the data in the main table is so we moved as many levels as possible into the table. The performance is slow but the data is more useful, especially when exported into Excel. I was hoping for a better solution but I guess we'll just have to stick with what we've come up with.

Maybe you are looking for

  • Mac doesn't recognize iphone

    I went to update some music on my iPhone 3G on my Mac Book Pro and absolutely nothing happened. It didn't even recognize that the phone was connected to charge it. Suggestions? Thanks in advance.

  • If I'm using a Canon S110 what sequence preset should I use to get the best high def results?

    Also if I'm uploading these videos to YouTube, should I use the YouTube preset in exporting the video? Will that make my video look high def as well?

  • Nexus7009 Howto Install NON NPE NX-OS on NPE installed system

    I bought 2 SUP2Es; they are factory installed with Software   BIOS:      version 2.11.0   kickstart: version 6.2(2)   system:    version 6.2(2)   BIOS compile time:       01/09/2013   kickstart image file is: bootflash:///n7000-s2-kickstart-npe.6.2.2

  • ORA-12500 TNSLISTENER failed to start a dedicated server process

    Environment W2000 Pro SP4 latest fixes I just installed database 10g (10.1.0) in order to have a 10g (10.1) database (ORCL1) as required by Oracle Warehouse builder and other business intelligrence products like disoverer (from discoverer suite) and

  • DELETED TEXT MESSAGES

    I really hope someone has answers for me because I am ready to give up on my blackberry.  This has happened several times to both myself and my friends. Scenario: You wake up one morning and all your text messages in your inbox are erased!?!? THis ha