Is how UIInput handles local values a large framework bug?

UIInput in both 1.1 and 1.2 stores the local value in a member variable. This seems like a large bug to me. JSF seems to be designed after more of a flyweight pattern.
Take for example UIData. For each row in the data model, the componets are re-rendered. This means that each component represents as many values as there are rows. Therefore, only one value per component makes UIData bugged.
This bug is evident when submitting a UICommand as immediate on a page with a dataTable. All the UIInput componets lose their values when the page is re-rendered.
How this could work:
Instead of a local Object to hold the value, the member value should be a Map<String, Object>. The key of this Map would be the client ID of the component. The value, would obviously be the component's local value (submitted value).
The "corrected" code could look like:
private Map<String, Boolean> valid = new HashMap<String, Boolean>();
private Map<String, Object> localValues = new HashMap<String, Object>();
public boolean isValid() {
return valid.get(this.getClientId(FacesContext.getInstance()));
public void isValid(boolean valid) {
return valid.put(this.getClientId(FacesContext.getInstance()), valid);
... (repeat similar methods for the local value and if the local value is set)...If all components were built this way, then tree, table and other 'complex' controls would finally behave "correctly".
Without this, I can't see how UIData will ever be fully usable with validators and using the immediate flag.

you may try these:
1. Add one more logic (define as boolean variable), then OR this variable with the original Boolean switch you used in subvi, then main vi can change the new added variable which is defined as local or global variable.
2. Change the subvi while loop as state machine, or use other Synchronization techniques like notifier

Similar Messages

  • Model of how APEX handles data (values)?

    Reference {thread:id=2486655}
    I'm trying to get a model of how APEX handles data (values). There are several places(?) that data (values) can exist. Or so it seems. I'm trying to understand how these work -- to put all the pieces together.
    Question:
    A) Where data can be?
    1) In the database
    2) In the session
    3) Rendered -- and hence displayed on the screen, if a displayed value -- but not in the session
    4) In perhaps(?) some working memory pool(?) but different from the page rendered values I see on the screen?
    5) Other?
    Why do I think this is relevant?
    Question:
    B) If there are rendered values and session values different from the rendered values, then when code executes, which of these values (rendered or session) is it executing against?
    And maybe the answer is, "You don't understand what's going on." Yes, "Exactly!" Hence the question.
    Best wishes,
    Howard

    Howard (DBA in Training) wrote:
    I'm putting this together now. For example:
    I set the value of a Page Item (say, :P2_DATA) to "BEFORE" in a Before Region process and change it to "AFTER" in an After Region Process. 'BEFORE' was displayed on the screen but 'AFTER' was in the session state. So I see that PL/SQL changes these values in the session state. But it doesn't "go back" to change the HTML after the region has been rendered -- hence we see BEFORE shown on the screen. (I'll have to think about what a Dynamic Action does.)
    Also, if a page item has a default value, say 'DEFAULT' then that value doesn't get into the session state. At least, not with my current settings. Oh, that explains a lot of confusion!! I suppose there's a logical reason for this but who would expect default values to be differently from other PL/SQL operations on the item?
    Questions:
    1) So why does a default value not get put into the session state?Several reasons, among them:
    *1. When/why is the value required?* Region items (and thus their source and default values) are rendered in region/item sequence order. The item's source/default value would therefore not be available in session state until it's rendering point. This is frequently later in page show processing than the value is actually required, such as the common use case of including a data value in the page or region title. Setting the value in a Before Header/Regions computation or process makes it available as required before the item is actually rendered.
    *2. The rendered page might not be submitted.* Default values are typically set when a page will create a new row. Consider the situation where the user clicks a "Create" button and is presented with an order entry form containing several default values. They then decide they don't want to create a new order after all, and navigate away from the form page via some mechanism that uses a redirect rather than a submit (such as a default "Cancel" button). This means that no page submit processing is performed, and generally that no session state management is performed. If the default values were set in session state, the order entry page would contain the default values for the non-existent order despite the user never submitting it. This may have unwanted side-effects if these values are referenced elsewhere in the application, and therefore would require extra session state management to be built into the application.
    *3. A rendered item might not be submitted with the page.* Per the HTML specification, the values of disabled controls unchecked checkboxes are not POSTed on page submit. Consider a situation where a checkbox item is set with several default values, but the application requires that the checkboxes be cleared and disabled by a dynamic action if the user chooses certain options from a select list. In this case, on page submission no values are submitted into session state for the checkbox item. If the defaults had been set in session state, then the application would be in an inconsistent state, with the user-selected option indicating that none of the checkboxes were checked, but with session state holding values showing that they were. This would require additional processing to ensure that the application's state was consistent before saving it to the database.<sup>1</sup>
    2 & 3 are particularly significant in basic wizard-generated applications. Doing things in this way, the wizard-generated DML and navigation "just works", without the need for additional session state management.
    2) Is there a Page Item setting that causes the default value to be saved to the session state?No. Hopefully the explanations above provide sufficient reason to show why this is genearlly not desirable. On the rare occasions when it is required, set the session state value using a computation or process.
    <sup>1</sup> There are other reasons&mdash;mainly security related&mdash;that make it good practice to perform such checks in more complex and internet-facing applications anyway.

  • HOW TO HANDLE MULTIPLE VALUES IN BDC FOR A PARTICULAR FIELD.

    I THINK IT IS HANDLING OF TABLE CONTROLS IN BDC
    PLEASE LET KNOW WHETHER THESE TWO ARE SAME CONCEPT OR NOT
    HOW TO HANDLE TABLE CONTROLS IN BDC
    Moderator message - Please do not use all caps. Please do not ask interview questions -  post locked
    Edited by: Rob Burbank on Jun 26, 2009 10:02 AM

    Hi,
    To handle table control in BDC you will have to enter at least one record in the table control and there after use the index number to increment to the next line item.
    Say you run a recording for a transaction which has a table control (ME21), here after you have completed the recording, you'll see the code which will have sometjing like <fieldname>(01) and the entered value. that valeu has been entered as the first line item (01 being the index).
    You will have to replace the hard coded line item index with a variable and inside a loop increment the item index. Once you reach the maximum allowed line items on your screen juct press the pagedown button (or insert new row) and reset the index to 1.
    Following is a code snippet I used while uploading data for ME31K (vendor contract). It is not the complete code but does show how your code needs to be changed with using index for line items.
    Here we assumne that the maximun number of lines displayed at a time on the screen is 14.
    << Unformatable code removed >>
    Hope this helps.
    Regards,
    Sachin
    Edited by: Rob Burbank on Jun 26, 2009 10:03 AM

  • How to handle local bank charges while our customer payment in USD

    Hi All Expert,
    How we handle customer payment with local bank charges rm5 at incoming payment?
    Examples :
    Customer invoice in USD 1000, while payment USD1000 by bank transfer with local bank will charges rm5 for each transaction.
    May i know how does the B1 handle this bank charges in local currency?

    Hello Eric,
    I presume that the bank charge will not be paid by the customer. In this case, the actual Invoice of USD 1000 is considered fully paid.
    I think the only way to proceed is to create a manual journal entry to Debit the Bank Charges and Credit the Bank Account. Or you can take it up when you post other bank reconciliation items at month end.
    Hope this helps.
    Regards,
    Lorna

  • How HANA handle NULL values

    Hi frzz,
    Can any one explain me how exactly HANA handles NULL values??
    Best Regards,
    Krishna.

    Hi Krishna,
    You can use IFNULL for the SQL queries/script instead of ISNULL . Since ISNULL is binary function and will be mostly used for the CE Functions based Calc views.
    Try using the same queries with IFNULL instead of ISNULL, it should work
    Best Regards
    Rahul Jha

  • How to handle null values in RTF templates

    Hi - I have two groups in a report for different SQL and two formulas for each group, CF_ELE_CNT and CF_ELE_CNT1. In the template I use the below code to print or not print a section.
    <?if:number(CF_ELE_CNT +CF_ELE_CNT1) >0?>    
    The problem is when there is no data in the second group its not creating the XML tag for CF_ELE_CNT1, though CF_ELE_CNT has 13, it still does not print that partucular section. If I remove CF_ELE_CNT1 from the condition it works fine. I was wondering how to handle this.
    Any help would be appreciated!!
    Thanks,
    Rav

    Hey Rav,
    You can add a check to identify it the element/tag is present or not
    <?if:(CF_ELE_CNT1)?> will give true, if the element is present otherwise falsesince you are adding the two elements, you have to add a or condition.
    <?if:(CF_ELE_CNT and number(CF_ELE_CNT) >0 ) or ( CF_ELE_CNT1 and CF_ELE_CNT1 >0)?>

  • DB: How to handle the value results.GetString("NAME")

    Hello.
    I'm trying to handle the value of a field from my DataBase:
    PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    String Name = results.GetString("NAME");
    out.println(myName);
    I'm able to display the value of 'myName' (Tom), but if try:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Does anybody have any experience?
    Thank you.

    hey,
    String myName = results.getString("NAME");
    then u can use
    if(myName.equals('Tom'){
    }else
    The above condition will be true if myName has Tom in it.. it has to be T o m . even if it is TOM or tOm or some other case it will never match.. if u are not bothered about the case then
    use
    if(myName.equalsIgnoreCase('Tom'){
    }else
    which will ignore case .
    hope this will help u ....
    Hello.
    I'm trying to handle the value of a field from my
    DataBase:
    PreparedStatement sql = Conn.prepareStatement("SELECT
    NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    String Name = results.GetString("NAME");
    out.println(myName);
    I'm able to display the value of 'myName' (Tom), but
    if try:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Does anybody have any experience?
    Thank you.

  • SMP 3.0: how to handle header values in the SOAP WS using Integration Gateway

    Hi Experts,
    We have a requirement from our current customer where they are providing us a SOAP WS.For one of the method we are passing “username” & “password” as input parameters and getting one security key (some unique number) in the response. We are able to do OData modeling for the same method. So far, it is fine.
    For other method, we have to pass that ”security key” in header along with some other parameters in the body section. While doing the request mapping for this method, we don’t see any option for this key parameter apart from those parameters (in that body section).
    We found one publicly available WSDL to reproduce the same scenario:
    e.g http://api.geosvc.com/services/soap?wsdl . To access its one of the method/operation GetPlace,We have to pass APiKey and Cursor value in the header section.
    <wsdl:message name="GetPlaceRq_Headers">
    <wsdl:part name="ApiKey" element="tns:ApiKey"/>
    <wsdl:part name="Cursor" element="tns:Cursor"/>
    To get APiKey, we have to register first. http://www.geosvc.com/register , once its done, you will get one APiKey as below:
    The same API key has to pass to access “GetPlace” method. So we tried it in SOAP UI to understand how exactly it should work:
    As you can see below, for the method “GetPlace”, we are passing values as in:
    Header Value
    Cursor
    blank
    ApiKey
    df7f8cc90e3345b4980cf6631f33a32d
    Body
    Country
    US
    Place
    HOLLYWOOD,CA
    Also got the response.
    When we do modeling (more precisely request mapping as below) for the same method we don’t see any Header related parameters. We can see only parameters which are available in the BODY section.
    We thought if we can get APIKey parameter in the body sections only, then it would be easy to map with. Right?
    What do you suggest how we should handle this kind of scenarios?
    CC: Mustafa Saglam, Jeff Gebo, Bjoern Woppmann
    Regards,
    JK

    Unfortunately the public example is a slightly different use case.  You have to register to get a static API key that is used in all calls.  That is something you would hard code into the headers.
    I think you are asking about a dynamic key they changes on each login.  It would be great if we had a public one that upon login returned a unique session key to be used in subsequent calls so we could better test and model accordingly.
    If you were using Agentry the answer would be yes you can do this.
    --Bill

  • How to handle multi valued attributes

    Hi All,
    I am supposed to populate multivalued attributes for a field in oim resource profile. Lets assume the field is mailbox. The issue is that I am supposed to reconcile this field from the directory server during initial load. The mailboxes are fetched from the DS based on organization. For provisioning I have to get the mailboxes from the database and these mailboxes are based on the role a user has. At the time of provisioing, I am supposed to populate the mailbox field with values the user already has been provisioned with and also display the mailboxes that he can get access to. I have created the mailbox as a resource with id and name as two of its fields. Could someone please tell me how do I handle this?
    Thanks,
    Supreetha

    I am not sure if I could follow the same thing as mentioned in the link above. Here is my case, Role is a multi valued attribute which i need to handle in oim and is very different from the usual roles. For this purpose, I have created roles as a resource object with role_id as field in its process form.When an admin logs in to assign a new role_id, he should be able to see only those roles for assignment that the admin's org has. I have these org and role mappings in a custom table that I have created in the oim schema. How will I able to display only these available role_ids so that the admin can choose them and assign for the role resource.
    Could you please let me know how do I do the config in oim?
    Thanks,
    supreetha
    Edited by: Supreetha on Nov 13, 2010 2:54 AM

  • How to handle return values in AppleScript

    Warning: AppleScript newbie on the loose without adult supervision.
    I have an Omnis Studio app that calls an AppleScript that in turn invokes a couple of shell commands. As an aside, I don't believe Omnis Studio can invoke a shell script directly without other complications.
    What I would like to do is capture the return code and/or any stdout from the shell commands in the AppleScript, then pass that result out as a return value from the AppleScript.
    Q1. How does one hold the return values, exit code, stdout, etc. of a shell script in AppleScript?
    Q2. How do I tell AppleScript to pass the results back to the calling routine?
    Examples, links to documentation, etc, will be gratefully accepted.

    There is a whole forum for just Applescript here:
    http://discussions.apple.com/forum.jspa?forumID=724

  • How to handle Null value in Database Adapter

    I configured the DA Adapter, with operation type as "Perform an Operation on a Table - Select" and added few where clause parameters (StreetNo, StreetName city, country, state, zipcode)too.
    If we won't enter any value for any of the column in the table (S_ADDR_PER) is taking as NULL, so what happening is, if i give "%" or if i leave as "blank" to those columns(input for where clause parameter). The DB adapter not fetching any records. Any help to handle this situation.
    I need query like this...
    select * from S_ADDR_PER where city like '%' AND state is NULL AND addr_line_2 like '%';
    seems.... I can't use the pure SQL option since i don't know which column will be null. Some case the addr_line_2 column will be NULL in table, in some other case the state or city column will be null.

    Hi,
    you can handle null with date like this , If it doesn't wortk for you then please explain your problem.
    select NVL(to_char(sysdate,'DD-MON-YY'),'Not Recorded')
    from dual
    NVL(TO_CHAR(
    08-NOV-05
    select NVL(to_char(NULL,'DD-MON-YY'),'Not Recorded')
    from dual
    SQL> /
    NVL(TO_CHAR(
    Not Recorded
    Regards

  • Oracle Discoverer: How to handle null value

    In Oracle Discoverer, I pull data from a folder. When I hit Null value for a column, I want to replace it with data from another folders column. Something like the functionality of "nvl" of a SQL statement. How can I do the following query in Discoveror :
    example: select nvl(table1.column1,table2.column2) from table1, table2
    where table1.column7 = table2.column7.

    Hi,
    You first need to include any column from folder table2 into your report so that Discoverer will do the join. (This assumes the join between table1 and table2 is set up in your EUL). Then you can create a calculation containing nvl(table1.column1,table2.column2) . You can then remove the column from folder table2 and the join will stay in your workbook.
    Hope that helps,
    Rod West

  • Oracle Discoveror: How to handle null value

    In Oracle Discoveror, I pull data from a folder. When I hit Null value for a column, I want to replace it with data from another folders column. Something like the functionality of "nvl" of a SQL statement. How can I do the following query in Discoveror :
    example: select nvl(table1.column1,table2.column2) from table1, table2
    where table1.column7 = table2.column7.

    Hi,
    You first need to include any column from folder table2 into your report so that Discoverer will do the join. (This assumes the join between table1 and table2 is set up in your EUL). Then you can create a calculation containing nvl(table1.column1,table2.column2) . You can then remove the column from folder table2 and the join will stay in your workbook.
    Hope that helps,
    Rod West

  • How to handle empty value coming to PI

    Hi Experts,
    My scenario is ABAP proxy to File. ABAP program is sending data to PI with blank value. But in PI payload that field is not showing at all.
    Suppose customer number value is blank in ABAP internal table, in PI payload customer number xml tag is not showing at all in source structure.
    Have used one to one mapping and in content conversion we have used.
    .addHeaderLine      0
    .fieldSeparator     ;
    endSeparator     'nl'
    and also I need - if any value in the source structure is coming empty we need to replace it with semi colon.it is not for a specific field, it might be any field of source structure.
    please help on this.
    Thanks,
    Swapnashree

    Hi,
              Before you call the message mapping in interface mapping, u need a java mapping code. This code will check if the required tag is absent. In case the required XML tag is missing, the java mapping code will insert the tag under proper parent node. This is best accomplished using DOM parser. If you need any further guidance from forum members on how to achieve this, then you need to publish following information
    1. Version of PI you are working on.
    2. Source XML structure.
    3. Target XML structure.
    You may refer to various java mapping blogs in SDN for further information on the topic.
    Else try this mapping of the source field
    Source field--------Exists ------> if  ----------------- target field
    if the condition evaluates true    then  map  source field -------> target else  constant (";") ------->target.
    regards
    Anupam
    Edited by: anupamsap on Sep 20, 2011 2:42 PM

  • How to handle local user in SSO?

    Hi all,
    I'm setting up OAM 11g for SSO of web applications in our organization.   Some of the applications have single URL for both corporate users, guest, and administrators.  As the OAM is using corporate LDAP as authentication backend, guest and administrator can't be authenticated.  Is it possible to define policy so that a webgate protected URL can fallback to original login page?   I'm newbie to OAM and sorry for the newbie question.  Thanks.
    Regards,
    /ST Wong

    I think you misunderstood. The local users won't be added to the backend LDAP but in a local store on OVD. OVD then makes it appear that that user is in the backend LDAP if you want it to appear in the same tree structure, or you can place the users in a completely separate tree. This of course assumes that your user base search in OAM is set to the top level.

Maybe you are looking for

  • Scan to Email

    Product Name: officejet 6700 Operating System: Microsoft Windows 7 (32-bit) Naming separate scanned pages – for emails When I scan separate attachments docs to go the same email recipient I can't seem to be able to name them separately in detail.  Fo

  • Macbook 2010 to HDMI

    I can't seem to get my LED Samsung TV to recognize my white macbook. I had previously connected this macbook with a LCD LG tv without any problems. This is a new HDMI cable and adapter and when I plug them in nothing happens. On the tv, it says nothi

  • Can I use web.show_document with forms name parameter ?

    Hi All, I need to pass URL to web.show_document but with form name too. Is it possible? I'd like to do something like web.show_document('url?report=myReport','_blank') Thanks in advance Edited by: _blackjack on Dec 13, 2012 2:17 PM                   

  • VATRegisteration Number

    Hello, I am creating a sales order using BAPI_SALESORDER_CREATEFROMDAT2 which internally calls SD_SALESDOCUMENT_CREATE. The order is for a one time customer created in KNA1. The address lines are fed in to the BAPI while creating order and also VAT R

  • DDIF_FIELDINFO_GET--- Supporting for BUILT-IN Types

    Hi All, I am a newbie to SAP world. I want to get the Description of the Tables / Structure of the tables for a custom RFC which contains BUILT-IN TYPES and DOMAINS. Is it poossible to retrieve the same using FM DDIF_FIELDINFO_GET or is there any oth