Datatable wackiness - JSF trying to read a non-existant field from a bean

I am having a very strange problem in JSF. I currently have one links page with four commandLinks in it, and one JSF page witha datatable in it, and an IBM <hx:pagerDeluxe> in it to page through the data. Each command link fires off a different action, as shown below:
     <h:commandLink action="UM02">
          <h:outputText value="UM02" />
     </h:commandLink>
     <h:commandLink action="UM03">
          <h:outputText value="UM03" />
     </h:commandLink>          ..........etc ........
My Navigation rules all point to one JSP file, but with a different param appended to the URL:
          <from-view-id>/index.jsp</from-view-id>
          <navigation-case>
               <from-outcome>UM02</from-outcome>
               <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM02</to-view-id>
          </navigation-case>
          <navigation-case>
               <from-outcome>UM03</from-outcome>
               <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM03</to-view-id>
          </navigation-case>     So as you can see, I have one JSF file to display a list from any given table name. I also dynamically populate the dataTable through my code, by reading through a list of columns for each table, and creating a "UIColumn":
          while( itr.hasNext() ){
               String fieldName = (String) itr.next();                                                  
               ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{var." + fieldName + "}");
               HtmlOutputText header = new HtmlOutputText();               
               header.setValue(fieldName);               
               UIColumn col = new UIColumn();
               UIOutput out = new UIOutput();
               out.setValueBinding("value", vb);
               col.setHeader( header );
               col.getChildren().add(out);               
               dataTable.getChildren().add(col);               
          }          And that dataTable is shown in the JSF page. So i can go back to the main links page, click on another table name, and it will populate the datatable with the correct columns, data, etc. The problem happens when I go to one table, say UM02, and hit ">" on the pager, to go to the next page, which works, THEN i go back to the links page, and hit "UM03" and the first page displays fine. When I try to go to the next page, I get an error saying that the backing bean UM03Bean does not have field "subProductCd". Basically, values from the old dataTable objects are being used for smoe reason when I page. Not sure why this is happening.
My datatable is defined like this:
     <h:form id="dataTableForm"><h:dataTable id="dataTable1" border="0" cellpadding="2"
          cellspacing="0" columnClasses="columnClass1"
          headerClass="headerClass" footerClass="footerClass"
          rowClasses="rowClass1, rowClass2, rowClass3"
          styleClass="dataTableEx" width="70%" rows="10"
          value="#{TestAction.list}" var="var"
          binding="#{TestAction.listDataTableUI}">
          <f:facet name="footer">
               <hx:panelBox styleClass="panelBox" id="pagerbox">
                    <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" for="dataTable1"/>                              
                    <h:commandLink action="home">
                         <h:outputText value="Back Home"></h:outputText>
                    </h:commandLink>
               </hx:panelBox>     
          </f:facet>
     </h:dataTable>
     </h:form>

BalusC wrote:
It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
BalusC wrote:
If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
Marcos

Similar Messages

  • Displaying a non existent column from a Table.

    Hi
    I have an SQL Query that returns back a count of all the
    entities
    select count(*)'COUNTER',
    id_entity 'ENTITY'
    from  claim 
    where id_status = 'O'
    group by id_status,id_entity 
    order by id_entity ASC
    Output
    COUNTER ENTITY
    169     AGL
    6       DBC
    28      DELI would like to put a non existent column called 'Type' with a counter
    of 0,so that the output looks like :
    COUNTER ENTITY
    0       TYP
    169     AGL
    6       DBC
    28      DELIs this possible ? What do I need to change in my select clause
    for this?
    Please help

    monalalwani, do you mean something like this?
    you have -
    1 select count(*) as counter, deptno
    2 from emp
    3* group by deptno
    UT1 > /
    COUNTER DEPTNO
    5 10
    5 20
    6 30
    -- but want counter = 0 for dept 0
    UT1 > select count(*) as counter, deptno
    2 from emp
    3 group by deptno
    4 union
    5 select 0, 00
    6 from dual
    7 /
    COUNTER DEPTNO
    0 0
    5 10
    5 20
    6 30
    HTH -- Mark D Powell --

  • Read contents of changing fields from internal table

    Hi Folks,
    Please help me in my query below:
    Consider there is a Z-table with two fields TABNAM and FIELD having values KNA1 and NAME1 respectively.
    In my report I have fetched entries for customers from KNA1. Now based on the field from Z-table I want to populate a variable suppose V_FREE_VAR with the value from KNA1 table.
    Here V_FREE_VAR is of CHAR200 so that it accomodate all types of values from KNA1.
    The value of Z-table FIELD can change daily i.e next day the value may be PSTLZ.
    So how can I read the particular field from internal table as the field to be read is dynamic.
    Note: using case is not feasible.
    Thanks in advance.
    Regards,
    Shardul

    @Hartmut P
    As Rob said i want to get the value of the field from internal table. the code is something like this.
    I_KNA1 contains records for customers.
    Suppose values of Z-table are in internal table I_TEMP_TABLE.
    Entries in I_TEMP_TABLE are as follows
    TABNAME      FIELDNAME
    KNA1                 NAME1
    The value of FIELNAME in Z-table can be changed
    Loop at I_TEMP_TABLE into WA_TEMP_TABLE.
    Read I_KNA1 into WA_KNA1 with key KUNNR = '0001002234'.
    IF SY-SUBRC EQ 0.
       CASE WA_TEMP_TABLE-FIELDNAME.
            WHEN 'NAME1'.
                 V_VAR = WA_KNA1-NAME1.
             WHEN 'PSTLZ'
                  V_VAR = WA_KNA1-PSTLZ.
    ENDIF.
    But using case is not appropriate as KNA1 contains 176 fields.

  • Problems reading non-english fields from database on Unix platform

    Hello!
    I am trying to get some data(not in English) from the database and write it to the file. I use ResultSet for that perpose. On PC the program runs all right, but when I run it on Unix, I get garbage instead of letters in my output file. I tried different combinations: such methods of ResultSet like getString, getAsciiStream, getBinaryStream, getCharacterStream and encodings like
    String str = new String(rs.getBytes(), "USO-8859-1"/"UTF-8").
    Nothing helps!
    There is either garbage or "?" instead of letters.

    Hi,
    I think that It comes from your unix system that don't support accentuated characters (and your code can't resolve it).
    You can search in this way...

  • -251723760 CIP Error when trying to read and array of sgl from and AB ControlLogix PLC

    I have the NI Ethernet/IP module to communicate with an Allen-Bradley ControlLogix PLC. I am doing both reading (only 13 values) and writing (over 200 values). I am using the basic ethernetip tag write.vi to  do the writing. These program are in an executable running on a 'run-time' machine. I have the list of tagnames I am reading and writing to and have confirmed with the person who created the AB load that the array I am writing to on the AB side has more than enough addresses (it is an array of length 300). However I am only able to write 118 values to it. When trying to write 119 or more I get the error:
    -251723760 CIP error - extended status may be available
    I have confirmed with NI OPC Servers with an OPC quick client (running on my development PC) connected to the AB ControlLogix that the values I am writing to up to element 118 are getting through correctly, i.e. if I write 123.456 to sample_array[13] then I in fact see this same value at that location in the OPC quick client.
    To be honest I am a little disappointed that the error message is so cryptic and gives no hints as to what troubleshooting paths are possible. I have tried various combinations of group/tag names with and w/o offsets, e.g. [3], but nothing has led me any further.

    Thanks for the quick response - here are screenshots of before (write OK - writing 118 values - all except last are 0) and after (error - when trying to write an array of length 119) as well as the simple test program I as using.
    Attachments:
    NI Ethernet_IP 3-20-2013 Troubleshooting.zip ‏90 KB

  • Read a non english word from text file

    While Reading thai charater from text file which was sent by QAD(a different application),
    We are reading 60 char using substr() function.
    If the data is English word it reads correctly with 60 char.
    But if it is in thai characters it returns more than 60 char.
    In oracle all NLS Char set has been already set.
    Can anyone help in this issue
    thanks in advance

    Maybe you should use SUBSTRC, SUBSTR2 or SUBSTR4 depending on the character set of your database. See http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions119a.htm#87068
    Message was edited by:
    Pierre Forstmann

  • When I open a new tap Firefox tries to open a non existant address how can I change this please

    When I try to open a new tab I get this:
    Server not found
    Firefox can't find the server at www.[r;;iåvÞyevq¾qîx»òki.com.
    Check the address for typing errors such as
    ww.example.com instead of
    www.example.com
    If you are unable to load any pages, check your computer's network
    connection.
    If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

    Hats off to Tylerdowner for sharing such an easy-to-follow solution for this weird issue. Yes, it works greatly. I got rid of that strange thing by following Tylerdowner's kind guidelines. Once again, thanks a million for this real time support. Cheers :)

  • "Phantom Remnant" - How to remove a non-existing server from Snow Leopard

    I have a very strange problem that I am sure has a very simple solution, but I cannot figure it out.
    Previously, my network was centered on my Time Capsule, which, due to router settings, was at 192.168.1.1. However, since moving, the address has changed, but my Mac Pro continues to look for it as a server or device.
    It presents itself any time there is a network or filesystem request of any sort. So anytime I click on Finder (or PathFinder), click on a folder, file, connect to a server, etc., I get a window that pops up saying:
    Connection failed
    The server "192.168.1.1" may not exist or it is unavailable at this time.
    I cannot figure out where the Mac stores it's list of servers that it has used in the past. I have looked through all of my apps that cause this to happen, in their preferences, and I've searched for hours on Google to no avail. It does not happen when I am using a web browser, so I don't think it's looking for the server as a DNS service, but I am thinking it is looking for the Time Capsule as a disk server or something similar.
    Does anyone have any ideas of where else to look? I am comfortable at any level of editing or command line usage. I have set up networking dozens of times on Linux/Windows boxes, but I've not touched the details on my Mac (never had to before ). Is there a way to "flush" the hosts SL thinks exist?
    PS: My new network setup is kind of screwy, and my router to the internet is at 192.168.1.1 internally (and in /etc/resolv.conf), but it does not have a disk of any sort inside (that is accessible at least), but I still have the TC on an internal network with 10.0.1.1 as it's new address.
    TIA
    Message was edited by: ramzy.darwish

    This may help go into the Utilities folder and lunch Keychain Access.
    Make sure you click on login and make sure the category is All Items. Delete all the references to your previous network that appears on the right hand side.

  • Displaying non existing vendors from lfa1 table..

    Hi All..
    I have a selection screen range for vendor number: LIFNR.
    I want to display all the vendor numbers that are not present in the LFA1 table.. ( If the user gives the vendor range on the selection screen)..
    Any idea or suggestions on how to approach would be great..
    Thanks a lot..

    OK then , pl try thye following piece of code...
    report  zlif                                    .
    data:  w_num type i.
    data: begin of itab occurs 0,
            lifnr type lifnr,
          end of itab.
    data itab2 like itab occurs 0 with header line.
    data w_lifnr type lifnr.
    select-options: s_lifnr for w_lifnr.
    ranges: r_lifnr for w_lifnr.
    select lifnr into table itab from lfa1.
    find the number of entries
    w_num = s_lifnr-high - s_lifnr-low.
    w_num = w_num + 1.
    do w_num times.
      if sy-index = 1.
        w_lifnr = s_lifnr-low.
      else.
        w_lifnr = w_lifnr + 1.
      endif.
      r_lifnr-sign = 'I'.
      r_lifnr-option = 'EQ'.
      r_lifnr-low = w_lifnr.
      append r_lifnr.
    enddo.
    loop at r_lifnr.
      read table itab with key lifnr = r_lifnr-low.
      if sy-subrc ne 0.
        write:/ r_lifnr-low.
      endif.
    endloop.
    Regards,
    Suresh Datti

  • Reading contents of a field from a screen

    Hi all,
         Is there a way to read the contents of a field in a particular screen. I want to read the data entered into  a particular field on a screen into the BADI and implement the logic based on the contents of the field.
    Thanks.
    Neha.

    Hi,
    You can use following code
    data: it_dynpfields type STANDARD TABLE OF DYNPREAD,
          wa_dynpfields type dynpread.
    wa_dynpfields-fieldname = 'CURR_PHASE'.
    append wa_dynpfields to it_dynpfields.
    CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        dyname                               = SAPLCRM_1O_MANAG_UI
        dynumb                               = "<screen number where field is defined>
    *   TRANSLATE_TO_UPPER                   = ' '
    *   REQUEST                              = ' '
    *   PERFORM_CONVERSION_EXITS             = ' '
    *   PERFORM_INPUT_CONVERSION             = ' '
    *   DETERMINE_LOOP_INDEX                 = ' '
    *   START_SEARCH_IN_CURRENT_SCREEN       = ' '
    *   START_SEARCH_IN_MAIN_SCREEN          = ' '
    *   START_SEARCH_IN_STACKED_SCREEN       = ' '
    *   START_SEARCH_ON_SCR_STACKPOS         = ' '
    *   SEARCH_OWN_SUBSCREENS_FIRST          = ' '
    *   SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
      tables
        dynpfields                           = it_dynpfields
    EXCEPTIONS
       INVALID_ABAPWORKAREA                 = 1
       INVALID_DYNPROFIELD                  = 2
       INVALID_DYNPRONAME                   = 3
       INVALID_DYNPRONUMMER                 = 4
       INVALID_REQUEST                      = 5
       NO_FIELDDESCRIPTION                  = 6
       INVALID_PARAMETER                    = 7
       UNDEFIND_ERROR                       = 8
       DOUBLE_CONVERSION                    = 9
       STEPL_NOT_FOUND                      = 10
       OTHERS                               = 11
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    hope it helps

  • How do you remove a non-existant folder from the sidebar?

    I am having trouble removing a file from 'places' in my sidebar. The file doesn't exist any more. I cannot drag it out nor can I highlight it to 'get info' to see if it has somehow become locked. I hope someone can help.

    You don't have to highlight it, simply Right or Control click the offending item and select "Remove from Sidebar."

  • Evolution Calendar displays old, non-existing events from Google Calen

    I attached a screen shot of evolution calendar for an easy explanation of the issue. Most of the events on that day are repeated events which ended very long ago (i.e.they are not in the Google calendar for that particular day). Does anybody know how to tell Evolution not to show those already-ended events?
    Thanks.

    Found the bug report, here it is in Gnome Bugzilla:
    https://bugzilla.gnome.org/show_bug.cgi?id=710683

  • How to read a non-oracle environment variable?

    I have been trying to read a non-oracle environment variable using TOOL_ENV.GETVAR, and have come to understand that it doesn't work. Is there another function that can do what I want? I don't want to hardcode the directory the forms and reports must reside in, but can't find anyway to make this value flexible.
    can anyone help ?
    thx
    adam

    I figured out a way. I put a String in the registry in the oracle home area, and can read it with TOOL_ENV.GETVAR now. It appears that it reads from the registry, not the environment variables. Except for unix apparently, where it reads environment variables.
    adam

  • Reading a non-english character

    Hi, I have a trouble with reading a non-english character from a html page.
    I'm taking the word from the html page, and compare it with itself,
    like this
    string.equals("B&#304;TT&#304;")
    but it returns false.
    is it possible to correct this?

    specify an encoding for your inputstream reader:
    BufferedReader in = new BufferedReader(
                new InputStreamReader(new FileInputStream("infilename"), "8859_1")); for example

  • InDesign CS6: preflight & non-existent overset text in my document.

    Hi,
    I’m using InDesign CS6. The preflight lists overset errors. When I click on the page icon and go to where the overset txt is supposed to be…there is none.
    I deleted EVERYTHING in the entire document, then did a SAVE-AS a new name; restarted InDesign; opened the empty document...and it still says I have overset text. I’ve had this issue before with other documents and just ignored the errors after hours of trying to fix the non-existent overset text - but other people have to use my documents. Having errors is an issue with shared documents. I started a chat with an adobe tech support person, but they had no idea what the problem is. Is this a bug? More importantly, is there a fix?
    any help much appreciated.
    regards,
    m

    I have a document with a similar issue. I just opened it just to check. When I click on the overset and click somewhere else, I get an empty text frame. I guess that's what happens to you as well. I turned on Show Hidden Characters and noticed that somehow I had at the bottom of the page a paragraph sign (probably I hit enter at the end without noticing it). I just deleted it and now is fine. Turn on the Show Hidden Characters and see if something shows up at the end of your document.

Maybe you are looking for

  • Can I get a refund on opened iPhone 4 within 14 days ?

    I bought a white iPhone 4 32GB yesterday from Apple retail store, but I am not happy with the phone and I've opened it already, can I get a refund for it ?

  • EzVPN issues with a Comcast cable connection

    I have a problem with a Comcast cable connection and an EzVPN. Simply put the connection drops within minutes of no activity. In other words, if I leave an RDP connection open from my datacenter to the remote site, the VPN connection will stay open a

  • Svt hompage play prima dosent whor in new firefox i must have internet explorer 8

    I cant play svt prima in firefox i must have internet explorer 8 fix the problem in firefox 4 please == This happened == Every time Firefox opened == svt prima

  • Geforce 780m graphics card

    I have a new imac 27" with GeForce 780m graphics card, it's apparently one of the cards that adobe accepts for GPU Acceleration but the option in After effects doesn't allow it? Can it be done or am I getting it all wrong, any help would be great.

  • CFwdALL changing without user intervention

    I have a weird problem where the CFwdALL field is being set on a shared line.  I have about 5 phones with DN 212500.  They called saying that their line was getting set to forwarded to 212100.  At first I thought it was just someone forwarding it man