Entity selected from the rich:dataTable with paging issue

I tend to use rich:dataTable and retrieve entities clicked with this code.
     public final static Object selecionado(final String formulario,final String tabela) {
          try {
               final UIComponent comp = FacesContext.getCurrentInstance().getViewRoot().findComponent(formulario);
               final javax.faces.component.UIData data = (javax.faces.component.UIData) comp.findComponent(tabela);
               return data.getRowData();
          } catch (final Exception e) {
               throw new IllegalArgumentException("There was an error on select entity from table.\n" +
                         "Form = " +formulario+"\n" +"Tabela:" +tabela+"\n" +"Look up if the names are correct. <h:form id=\""
                         +formulario+"\"> e"+" <h:dataTable id=\""+tabela+">",e);
     }{code}
ps: I create a column of type h:commandlink and its call to action (which performs this method to see which entity was selected).
It works perfectly on the first page (rich:datascroller) but when I navigate to another page and click on the link (edit) the code is not even executed (I confirm this on debug mode too) and what happens is that the paging sends me back to page one.
Is there anything I can do?
Best regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

I'm assuming you have <h:messages/> on your page?
The action events are queued during the Apply Request Values phase of the request. Typically if an action is not queued it is because some state of the components is not same as it was during the Render Response of the previous request. For example, if the value of the rendered attribute somehow changed, a component will not queue an action if it thinks it was not rendered.
It your case the most likely thing to have changed seems to be the pagination state of the dataTable. The table thinks it is on the first page for some reason during the Apply Request Values phase and so iterates over the data in the first page and never discovers the request flag indicating that an event should be fired for data in the second page. So the action event is not queued, nothing happens in the Execute Action phase and the Render Response phase simply re-renders the existing view.

Similar Messages

  • How to get selected values from datatable with paging

    hi all
    here is my problem
    I have a datatable with paging size of 2 and first column as checkbox.
    now i have total record of 5 data,2 row on each page.
    Now i m selecting 1-1 row from each page.
    When i m clicking Command button to display all the selected row from different page ,i m only able to display values selected from last page.
    Through debug i can see that only last page value is set to TRUE OR FALSE and every other value is neither true nor false.
    any help???
    thanks

    <f:facet name="footer">
    <h:panelGroup binding="#{Page1.groupPanel1}" id="groupPanel1"
    style="display: block; text-align: center" styleClass="list-paging-footer">
    <h:commandButton action="#{Page1.dataTable1_firstPageAction}" binding="#{Page1.dataTable1FooterFirstButton}" id="dataTable1FooterFirstButton" image="resources/paging_first.gif" immediate="true"/>
    <h:commandButton action="# Page1.dataTable1_previousPageAction}" binding="#{Page1.dataTable1FooterPreviousButton}"
    id="dataTable1FooterPreviousButton" image="resources/paging_previous.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_nextPageAction}" binding="#{Page1.dataTable1FooterNextButton}"
    id="dataTable1FooterNextButton" image="resources/paging_next.gif" immediate="true"/>
    <h:commandButton action="#{Page1.dataTable1_lastPageAction}" binding="#{Page1.dataTable1FooterLastButton}"
    id="dataTable1FooterLastButton" image="resources/paging_last.gif" immediate="true"/>
    </h:panelGroup>
    </f:facet>
    Above is the code which i m using for paging which is command button
    Any problem with it.???
    thanks

  • I am trying to free up some room on my touch and am unable to delete any songs or books from the listing.  With iTumes open and my touch listed I open the touch.  I then select the items I want to delete from the touch and press the delete button.

    I am trying to free up some room on my touch and am unable to delete any songs or books from the listing.  With iTumes open and my touch listed I open the touch.  I then select the items I want to delete from the touch and press the delete button.  Nothing happens.  I have also tried to right click on the item, but a delete option is not listed.  What do I need to do to get rid of some books?

    Open itunes, connect ipod, go to each tab, select what you want to be on the ipod, sync

  • MacBook Pro won't stay asleep with external monitor attached.  When sleep is selected from the Apple menu the computer will go to sleep only to continually wake up...go back to sleep...wake up...etc. every few seconds.

    MacBook Pro won't stay asleep with external monitor attached.  When sleep is selected from the Apple menu the computer will go to sleep only to continually wake up...go back to sleep...wake up...etc. every few seconds.  This only happens when using the external monitor. Does anyone have any suggestions?

    Mine does that too. The worst thing is when it goes to sleep, then wakes up and keeps running while the lid is closed and it is wrapped up in a case. I am afraid when the hot weather comes it is going to burn up. I am hoping Apple fixes it in the software or they may have a melted MBP to replace.
    Then when I open the lid it is crashed running at fill tilt, pumping out heat to beat the band. I am forced to hold the button down and reboot.
    I wiped my hard disk and reinstalled my OS, but it didn't help. I reversed my OS to 10.5.0 and it solved the DVI problem but still won't sleep. This post will probably be deleted by Apple, they did it a few days ago. I just don't know what to do, and I consider myself a real Apple expert. Just hoping you realize you are not the only one.

  • I just connected my Mac Mini running OS 10.6.8 to a IG 32' monitor. What resolution should I select from the menu?

    I just connected my wife's Mac Mini running OS 10.6.8 to an IG 32' monitor. What resolution should I select from the menu in order to provide maximum screen appearance? My wife has AMD and a visual acuity of 20/400 with central scotonata.

    In System Preferences:Displays you have an option to show
    Displays Prefs in the title bar above the screen - where she can
    iteratively adjust to her liking. Higher screen resolutions, ironically,
    result in smaller characters so adjust to suit. Below, Displays is
    4th from L.
    All best, Tom

  • How to rerieve records from the table starting with character 'D'

    Hi Folks,
    How to get the records from the table starting with character 'D'.
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    last record in the table starting with character 'D'
    How can i do that??
    Pl explain.
    Thanks,
    Matt

    Hi,
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    Select MAX (fld1)
       From  tab1
    into table itab
    where fld 2 = l_fld2
       and fld1 like 'D%'.

  • Views - SELECT from VIEW and SELECT from the query inside view definition returning different results

    Hi,
    I am facing this weird issue. Any help would be appriciated.
    I have view with the following definition:
    CREATE VIEW [marketing].[OpenedMails]
    AS
    SELECT
    ID_EmailAddress, 
    ID_Date_Opened, 
    ID_Contact, 
    ID_MailSendJobs,
    COUNT(ID_OpenedMails) AS OpenCount,
    CASE
    WHEN ROW_NUMBER() OVER (PARTITION BY CAST(ID_EmailAddress AS VARCHAR(10)) + ' ' + CAST(ID_MailSendJobs AS VARCHAR(10)) ORDER BY ID_Date_Opened) = 1 THEN 1 
    ELSE 0 
    END
    AS UniqueOpenCount
    FROM            
    dbo.Fact_OpenedMails
    where ID_Contact = 382340
    GROUP BY ID_EmailAddress, ID_Date_Opened, ID_Contact, ID_MailSendJobs;
    order by ID_MailSendJobs 
    When I run the the select statement in the view definition I get combination of both 1 and 0 for the 'UniqueOpenCount' column.
    But when I run the select from the view itself using the following query:
    SELECT [ID_EmailAddress]
          ,[ID_Date_Opened]
          ,[ID_Contact]
          ,[ID_MailSendJobs]
          ,[OpenCount]
          ,[UniqueOpenCount]
      FROM [marketing].[OpenedMails]
    I get equal amount of rows but only 0 values for the 'UniqueOpenCount' column which seems to be very weird to me. Why is this happening ? Can anyone help regarding how to solve this ??
    Result from the select inside view definition:
    Result from the select query directly from the view:
    Thanks in advance.
    Vivek Kamath

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed. Temporal
    data should use ISO-8601 formats – you failed again. Code should be in Standard SQL AS much AS possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    Things like “ID_Date_Opened” are wrong. The affixes “id” and “date” are called attribute properties in ISO-11179 and data modeling. Since a date is a unit of measurement on a temporal scale, it cannot be an identifier by definition. My guess is this would be
    “open_date” if it were done right. And the only display format in ANSI/ISO Standard SQL is ISO-8601 (yyyy-mm-dd)
    An email address of -1?? Email addresses are VARCHAR(256), not numeric. There is no reason to cast them AS string!
    Your vague “mail_send_jobs” is plural, but columns hold scalars and cannot be plural by definition. The partition cause can hold a list of columns: 
    WHEN ROW_NUMBER() 
         OVER (PARTITION BY email_address, mail_send_job 
                   ORDER BY open_date)
         = 1 
    THEN 1 ELSE 0 END 
    This still makes no sense, but the syntax is better. You do not understand how ROW_NUMBER() works. 
    Would you like to try again with proper Netiquette? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • ProjectUID selected from the reporting database from Project Server OnPublished event is taking some delay

    Hi all,
    I'm invoking a stored procedure from the reporting database from the project server onPublished event.  I'm having some issues in getting the details of that particular project from the published event handler.  This i noticed that there is some
    delay is taking place in moving the data(project uid )  from the published to the reporting database .
    My stored procedure select statement is as follows:
    SELECT ProjectUID, ProjectName FROM MSP_EpmProject_UserView
     WHERE ProjectUID=value
    This stored procedure is invoked from the onPublished event of the project server event handler where that particular projectuid is passed in that stored procedure.I have noticed that some delay is taking palce to move  the data into the reporting database. 
    My stored procedure got invoked from the onPublished event of the project server event handler before the delay is complete.  So the row selected from the stored procedure is alwys zero (0).  Is there any other method to wait for repoting database
    to get refreshed. Please help me .

    Hi sabithad,
    The issue you are facing is because of the conflict of permissions, event handlers always works through administrative user credentials whereas the project is open in edit mode by the logged-in user. And you are tyring to update custom field at the back
    end with Administrative credentials, while project queue is in process by logged-in users credentials. Its not gonna work this way :) 
    The best option is to use Javascript on your PDP using CEWP, you can either build your complete logic in JavaScript and place that code on your PDP. OR you can use the combination of JavaScript and PSI and create a webpart to be placed on PDP.
    below blog link willgive you directions to go ahead with, but for sure the solution to your query is
    JavaScript :)
    http://epmxperts.wordpress.com/2012/05/21/generate-unique-id-for-project-using-a-webpart/
    hope this helps.
    Khurram Jamshed - MBA, PMP, MCTS, MCITP (
    Blog, Twitter, Linkedin )
    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from the Mail application, with an alert button that indicates unread messages

    I would like to have an email account that is password-protected that I can access on my Mac, Iphone and Ipad, separate from the Mail application, with an alert button that indicates unread messages

    Try a search... I'm sure if you put forth a little effort you can find a solution that will work for you.

  • I can't be the only one with this issue. MacBook Pro Retina Late-2013 WiFi disconnects after waking up from sleep.

    Did anyone buy a MacBook Pro Retina 13" from Best Buy this Black Friday?
    I'm having an issue where the WiFi disconnects after the MacBook wakes from sleep but only after a couple of minutes.
    Once the WiFi disconnects, I can't reconnect to the same network and sometimes it won't find nearby networks.
    I have to turn off the WiFi and wait for at least 5 seconds before turning it back on for it to auto-reconnect to my home network.
    If I wait less than 5 seconds, it will continue to attempt connection to the home network but won't connect.
    I've tried reformatting and deleting my network configurations as well as resetting my modem, power cycling it, etc.
    I am using 2Wire Gateway modem/router from AT&T on b/g network.
    I've tried connecting to a friend's network under Time Warner Cable and the same issue occurs.
    I exchanged the MacBook at a Best Buy for a brand unopened one (I hope) and the same exact thing happens with this new one.
    Really, I can't be the only one with this issue. Unless in a 0.00001% chance I received two defective units in a row?
    Please.. does anyone have a clue why this is happening?

    You're definitely not the only one.  I have the same issue.  I spent 6 hours over multiple days on the phone with Apple support trying a variety of things (some of which are mentioned above), and none of them worked.  They finally sent me a replacement laptop.  I made sure to try it periodicaly as I was moving files and installing applications to see if I ran into it again and things seemed okay at first but now I am running into the same issue and it is terribly annoying.  I've got 5 other devices that connect to the same router and I've never had this issue with any of them.
    My router is a Linksys E2000.  I haven't tried changing the router channel but I have tried to cnnecting to other networks in the building I live in and I have run into the same issue there.

  • HT4623 I bought an iPhone 5 from the Apple store with a new Sprint contract in Sept. 2012.  I would like to know if I port my number to T-mobile and pay off my Early Termination fee with Sprint, will my iPhone 5 will be unlocked to use with T-mobile netwo

    I bought an iPhone 5 from the Apple store with a new Sprint contract in Sept. 2012.  I would like to know if I port my number to T-mobile and pay off my Early Termination fee with Sprint, will my iPhone 5 will be unlocked to use with T-mobile network?

    As Ethmoid says, it is still a CDMA phone as I told you earlier, and it will not work with t-mobile. Even if Sprint unlocked the phone, it would only unlock the GSM side for international use. They will not unlock the GSM side for domestic use in the US.

  • Switching iTunes (older version) from an old latptop with mechanical issues to iTunes on a new computer.  The hard drive, issue free, was placed in external drive enclosure.  How do I recover iTunes?

    I'm trying to moves iTunes (older version) from an old latptop with mechanical issues (non working screen, keyboard, and battery) to iTunes on a new computer.  The hard drive, issue free, was placed in external drive enclosure.  This was a cost effective way instead of dumping lots of money in an outdated old laptop while I can invest it into a new laptop.  How do I recover iTunes?
    I'm switching from a 3G phone to a blank 4GS in the process.  I would like to have everything that was on my 3G phone and iTunes on my new phone and computer.
    Thanks

    iTunes: How to move [or copy] your music [library] to a new computer [or another drive] - http://support.apple.com/kb/HT4527
    Quick answer if you use iTunes' default preferences settings:  Copy the entire iTunes folder (and in doing so all its subfolders and files) intact to the other drive.  Open iTunes and immediately hold down the Option (alt) key (shift on Windows), then guide it to the new location of the library.
    Windows users see tip at: https://discussions.apple.com/message/18879381

  • How do i create a drop down menu for selecting from the drop down arrow

    how can i create a drop down menu so that when i click on the arrow in the cell i can select from the menu that appears

    katiesandell wrote:
    how can i create a drop down menu so that when i click on the arrow in the cell i can select from the menu that appears
    Hi Katie,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Numbers vocabulary for this feature is a "Pop-up Menu". It's available as a Cell Format, and is set and edited in the Cell Format Inspector.
    See "Using a Checkbox, Slider, Stepper, or Pop-Up Menu in Table Cells" starting on page 96 of the Numbers '09 User Guide.
    This guide, and the equally useful iWork Formulas and Functions User Guide are available for download through the Help menu in Numbers.
    Regards,
    Barry

  • Getting host, port from the tnsnames.ora with the service name

    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.

    caesarkim wrote:
    Hi.
    I think that I asked a similar question yesterday. I want to ask if there is a way to get host and port from the tnsnames.org with a given service name. Somebody answered it for getting SID in the sqlplus. so I tried it in a similar way, but it didn't work.
    I have a service name, but I don't know how to get host and port. I know that I can parse the tnsnames.ora file to get it, but if possible, I want to use the more official and safe way.
    I'd appreciated if somebody knows it.Oracle RDBMS does not require SQL*Net to operate.
    Oracle RDBMS does NOT now or care about content of any tnsnames.ora file.
    Realize that each (remote) user can have their own personalized copy of tnsnames.ora
    The content of tnsnames not NOT have to reflect any reality.
    I could post the content of my tnsnames.ora & it would be useless to everyone reading.

Maybe you are looking for

  • Can't import P2 Footage after 5.1.2 update

    This one has me stumped. After updating to 5.1.2 I can not import P2 footage. When I click on the import Panasonic P2 tab under the import menu, nothing happens. Then, I click on it one more time and the import window loads but there is nothing there

  • How to make the text in sub-division

    Hi, I am usign text  module in my adobe forms. Text in text module contains sub-divisions as a), b) and c). Each sub-division are in a separate line. While in pdf, all the sub-division combines and comes a single paragraph. What  would be the problem

  • How can I make the current date/time be sent when emailing as XML?

    I'm creating a form for a customer to use for submitting print jobs. This customer will be emailing the XML form data, which will in turn be converted into a production order. I'd like to make the PDF form capture my customer's system time, so that I

  • Logiacal path deactivate in IDOC

    Dear Sir, We are doing the hardware migration project. hence we have  installed new SAP system in new H/W and completed the data migration from  production system. Now we are in the testing phase, so we would like to disable the entry temporarily in

  • Retired Asset Depreciation Issue

    Hi Good day to you. We have a peculiar issue. One of our Company Codes retired an asset with Asset Value date of 31.12.2007. But apparently they did not repeat the Depreciation run for December 2007. When we try to do the Fiscal Year change to 2009,