Component Save State

I am having an issue with a custom component I am writing and the saveState method. Our architecture uses ValueObjects to pass data from the core to the web layer. When I try to save a VO in the saveState() call, somehow JSF stops calling decode() when the command button is clicked.
When the line "values[2] = fvo" is commented out the flow is:
UIEditLetter.restoreState()
UIEditLetter.decode()
editLetter.submit // backing bean method bound to command button
UIEditLetter.encodeBegin()
UIEditLetter.saveState()
But when that line is active I get:
UIEditLetter.encodeBegin()
UIEditLetter.saveState()
Using:
JSF1.2
MyFaces
Facelets
Tomcat5.0
Code:
public class UIEditLetter
extends UIComponentBase
private LetterFormatVO fvo = null;
@Override
public void restoreState(FacesContext context, Object state)
System.out.println("UIEditLetter.restoreState()");
Object values[] = (Object[]) state;
super.restoreState(context, values[0]);
ids = (List<String>) values[1];
fvo = (LetterFormatVO) values[2];
@Override
public Object saveState(FacesContext context)
System.out.println("UIEditLetter.saveState()");
Object values[] = new Object[3];
values[0] = super.saveState(context);
values[1] = ids;
values[2] = fvo;
return values;
@Override
public void decode(FacesContext context)
System.out.println("UIEditLetter.decode()");
}

good article on all aspects of trees including your issue.
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/

Similar Messages

  • Force to not save state

    If I'm using standard JSF component how can I force it to not save state between requests and read his value from my bean ???
    Thanks

    What exactly are you talking about?
    Sounds like that you've set the managed bean in the session scope instead of request scope.

  • Javascript not working with 'Display as Text (does not saves state)'

    Hi,
    We have these following items in P3 of our application,
    P3_EDIT_ACCOUNT Display as Text (saves state)
    P3_USEFUL_LINKS Display as Text (saves state)
    P3_LAST_APPROVED Display as Text (saves state)
    P3_ARCHIVES Display as Text (saves state)
    And we are initializing these items in a pl/sql process under 'Page Rendering'
    For example,
    :P3_ARCHIVES := '<font face="Arial, Helvetica, sans-serif" size="-1">Archives</font></a><td> ';
    When our environment was upgraded from HTMLDB1.5 to HTMLDB2.0,
    instead of displaying the proper value of :P3_ARCHIVES,
    it was displaying the tags,
    i.e. instead of displaying 'Archives', it was displaying the whole
    '<font face="Arial, Helvetica, sans-serif" size="-1">Archives</font></a><td> '
    So, when we changed all items to 'Display as Text (does not saves state)' and it was working.
    But then we have another problem,
    We render the rest of the same page with another pl/sql block,
    Here is a portion from that pl/sql for your reference,
    htp.p('
    <script>
    //Script to check the status change.
    //The script source is rendered through PL/SQL.
    function checkStatus()
    var promptStr = someString;
    if(ans.toUpperCase() == "AMBER" || ans.toUpperCase() == "RED")
              var cnfm = confirm(promptStr);
              if(cnfm)
              do something....
    </script>
    htp.print('
    <td width="5%" bgcolor="#ebebc5" height="19" align="middle" >
    <input TYPE="radio" name="'||l_g_fnumber||'" value="GREEN"');
    IF l_allow_update THEN
         htp.print(' onClick="checkStatus()"');
    ELSE
    htp.print(' disabled onmousedown="return false;"');
                        do something....
    Now the issue is , when we changed all items to 'Display as Text (does not saves state)', the checkStatus() function is not getting called in the onClick
    event of the radio button and hence the confirm window for the call to
    confirm(promptStr) is not coming up.
    But if we revert back the items to 'Display as Text (saves state)',
    the checkStatus() javascript function is getting called properly but html tags are displayed against the items instead of the proper value (as mentioned in ********)
    Please do let us know a possible solution to this issue.
    Thanks & Regards-
    Rupak

    Thanks Varad for your response.
    This is the error i am getting.
    1 error has occurred
    PLSQL anonymous block source type can be used ONLY with Display Text (based on PLSQL) item type.
    yes i am using in the source..
    I also tried with the PL/SQL Expression of FUNCTION in this case it is executing the query but once i run the page ora- 06550 error occured.
    Thanks
    AT
    Edited by: ranu on Jan 8, 2009 2:51 PM

  • Two forms on same page..save state of one form while submitting other.

    Hi....
    I have 2 form on same page....
    first is form on table....
    nd another is tabular form.....
    now if I make an entry in both table ,,,,and after entering data in tabular form if click on submit button of tabular for the data of tabular form get submitted,,but the data I have been enter in first form get erased.....
    now my question is how can I save state of my first form even after clicking on submit button...........
    pls,help.

    Hi Shirish,
    in your scenario you can write manual process for one form in your both forms, using this way you can achieve you functionality.
    do the above and for that manual process keep the button name as your second form button means, for two forms saving with only one button.
    i am not sure in this, but you can try something.
    Thanks
    Chandran
    Edited by: Chandran on Nov 28, 2011 2:21 AM

  • Display As Text (Does Not Save State) Render Behaviour

    I suppose this is directed more at the Oracle team members (as most of my posts are...) than anyone else, but others might find this interesting.
    It would seem when an item has a type of "Display As Text (Does Not Save State)" the item's value is output as pure text which shows up as text nodes under the TD cell. However if there is anything in the "HTML Form Element Attribute" text field on the "Edit Page Item" page, the APEX rendering engine will output a span tag with those attributes around the value of the item. If the attribute is left null, no span tag is output.
    Further more, the span tag does not have an ID attribute. One can also not set the "HTML Form Element" text box to contain the text 'id="" ' as APEX will throw an error stating that you can not specify the id attribute. So if someone would happen to want to access/change the value via JavaScript (say after an Ajax request of a hidden id change), it requires a hack (setting the TD cell's ID to the page item's name), DOM inspecting/sniffing, outputting an ugly disabled text element, altering the flows user's tables, or altering the render cache.
    Is there any reason, why this span tag is not always output with the ID attribute set?

    Hello Andrew,
    You are, of course, correct. The APEX engine does not use the item ID for the "Display as Text (does not save state)". However, if you need to manipulate the item, using JS, you can use the "Display as Text (save state)", which does use the item ID. The on-screen effect is the same, but the JS use is easier.
    Your original question though, remains open.
    Regards,
    Arie.

  • DISPLAY AS TEXT (DOES NOT SAVE STATE)

    can i use the pl/sql anonymous block or pl/sql function body for item which is DISPLAY AS TEXT (DOES NOT SAVE STATE). I am using this query and getting an error in case of pl/sql anonymous block can be used only for save state item. my apex version is 2.2.1.00.04.
    my query is
    declare
    vCNT number;
    v_exception_detail varchar2(200);
    BEGIN
    SELECT COUNT(*)
    INTO vCNT
    FROM table a
    WHERE a.col1 IN
    (SELECT DISTINCT x.col1
    FROM table1 x)
    AND a.col2 = TRIM(:P21_col2);
    IF vCNT > 1 THEN
    IF NVL(&P21_col2, -1) <> -1 THEN
    SELECT DISTINCT SR.col3
    INTO v_exception_detail
    FROM table1 SR
    WHERE SR.col1 IN
    (SELECT col1
    FROM table
    WHERE col2 = TRIM(:P21_col2)
    AND col4 = :P21_col4);
    ELSE
    v_exception_detail := NULL;
    END IF;
    ELSE
    SELECT DISTINCT SR.col3
    INTO v_exception_detail
    FROM table1 SR
    WHERE SR.col1 IN
    (SELECT col1
    FROM table
    WHERE col2 = TRIM(:P21_col2));
    END IF;
    --DBMS_OUTPUT.PUT_LINE(v_exception_detail);
    RETURN v_exception_detail;
    END;
    Could any one suggest how i can execute this code in case of item of DISPLAY AS TEXT (DOES NOT SAVE STATE).
    Thanks,
    AT

    Thanks Varad for your response.
    This is the error i am getting.
    1 error has occurred
    PLSQL anonymous block source type can be used ONLY with Display Text (based on PLSQL) item type.
    yes i am using in the source..
    I also tried with the PL/SQL Expression of FUNCTION in this case it is executing the query but once i run the page ora- 06550 error occured.
    Thanks
    AT
    Edited by: ranu on Jan 8, 2009 2:51 PM

  • Display As Text (Saves State) as a Link in an updateable report

    I'm running into an odd problem when attempting to use display as text(saves state) in a report as a link.
    I have an updateable SQL report with the following columns in this order
    1) A checkbox column
    2) A column as a link using the Link Text attributes
    3) A hidden column storing a key for use in the form
    As I expected the checkbox is given a form name of f01 and the hidden column is f02
    However, when I decide to switch the second column to be Display As Text (saves state) which also has the Link Text attributes set, so I can submit the value of that column in my form, something odd happens.
    The checkbox is still submitted as f01. The hidden column becomes f03, however the Display As Text (saves state) value appears nowhere in the form. Neither does the text name="f02". It just stays as a link like it was before.
    I'd really like to be able to submit the value without duplicating the column in the query(and making it a hidden value). Does anybody have any ideas about how I could do this?
    Am I doing something horribly wrong? Has anybody else experienced this behavior?
    Thanks,
    Joe
    Message was edited by:
    joe.bauser

    Just to flush out my examples, and as a test for myself, I copied the "broken" example to a fourth page.
    After copying the example page, I left the "display as" in "tabular form element" as 'Display As Text (saves state)' and deleted everything that was in the "Column Link" section (removing the link)
    Once the link was removed, the Display As Text (saves state) behaved exactly as I would expect it to.
    Example here<br>
    Link stuff removed

  • Enhancement request for Navigation Bar - save state before branching

    Hello,
    I believe it would be nice and helpful to add the save state before branching option also to the Target section of a Navigation Bar Entry.
    Thanks,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

    -Max- wrote:
    Has it been moved or removed ?The feature was removed in an (originally) unannounced, undocumented and disproportionate fait accompli by Oracle: +{thread:id=2285521}+
    This was subsequently documented in the Release Notes.
    There is no forum traffic to substantiate the reasons given for its removal. I certainly never encountered them. I don't see how it couldn't have been retained with documented restrictions.

  • Unable to retrieve topology component health states

    Hi,
    SharePoint 2013 SP1 + Sep 2014 CU and SQL Server 2012 SP1
    i have created search service application using power shell and also using central administration but both times i am getting following error message when access search service application.
    Unable to retrieve topology component health states. This may be because the admin component is not up and running
    Pls guide how to fix it
    thx
    iffi

    Hi Imughal,
    This issue can be caused by many reasons, please check ULS log for detailed error message.
    If the issue is caused by Event ID: 6482 error “A call to SSPI failed, see inner exception”, then
    it can be caused by the following reasons:
    The timer service account is trying to communicate with HostController service  and generates 'SSPI  Connect' call demanding SPN to be created for target services Identity, if no SPN is found.
    The Hostcontroller service's NodeRunner process is limited to use restricted amount of RAM.
    Then please follow the steps in the link below for solving this issue:
    http://blogs.msdn.com/b/bkr_sharepoint/archive/2014/06/09/sharepoint-2013-search-topology-activation-error-quot-unable-to-retrieve-topology-component-health-states-this-may-be-because-of-the-admin-component-is-not-up-and-running-quot.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Could not passivate; failed to save state

    Hi guys
    I'm using ejb with a web application on jboss 4.0.5 with jdk 1.5 and i'm getting this exception:
    11:53:50,390 WARN  [AbstractInstanceCache] failed to passivate, id=f373o8gy-s
    javax.ejb.EJBException: Could not passivate; failed to save state
            at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:423)
            at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:107)
            at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:209)
            at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:162)
            at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:450)
            at java.util.TimerThread.mainLoop(Timer.java:512)
            at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.io.NotSerializableException: java.lang.ThreadLocal
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
            at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:414)
            ... 6 moreMy code (Session bean statefull):
    protected transient Log log;
    private transient IdentitySession identitySession;
    public void ejbPassivate() throws EJBException, RemoteException {
            log.debug("bean passivating... ");
            log = null;
            identitySession.close();
            identitySession = null;
        }the attributes are transient because i had read somewhere that like that i could avoid serialization problems. but they remain, i've tried with and without them and the output is the same.
    IdentitySession is a non-serializable object and Log is a interface from commons logging also non-serializable.
    can anyone help?
    Message was edited by:
    RicardoM

    So those are the ONLY fields in your bean? Does the class declare a ThreadLocal field or is a
    super-class that declares a ThreadLocal field? If not, it could be a JBoss bug. I'd recommend
    posting on the JBoss forum.

  • Unable to retrieve topology component health states. This may be because the admin component is not up and running.

    Unable to retrieve topology component health states. This may be because the admin component is not up and running.
    I have deleted Search Service App and created again.
    But still same error can anyone give me check list.. I need it very urgently.
    Please reply
    Thanks
    Raj

    Hi Raj,
    This issue can be caused by many reasons, so please check the ULS log for detailed error message.
    For SharePoint 2013, by default, ULS log is at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.
    Here are some similar issues and the corresponding solutions for you take a look:
    http://blogs.msdn.com/b/bkr_sharepoint/archive/2014/06/09/sharepoint-2013-search-topology-activation-error-quot-unable-to-retrieve-topology-component-health-states-this-may-be-because-of-the-admin-component-is-not-up-and-running-quot.aspx
    http://blogs.msdn.com/b/sambetts/archive/2013/08/28/sp2013-win2012-unable-to-retrieve-topology-component-health-states-this-may-be-because-the-admin-component-is-not-up-and-running.aspx
    http://techtrainingnotes.blogspot.com/2013/09/unable-to-retrieve-topology-component.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Will updated version to the Store remove old save state on device when installing to new version?

    So let's say I have installed an app from the app store and it's version 1.0 and it used save states to save my personal best score, will that save state and score be removed when I install an updated version (1.1)?
    I'm asking becuase I'm about to start using save states and need to know what way to save to keep the original save state through the different versions that might come, so it's not erased every time.

    Ok, thanks

  • Where is "Display as Text (based on LOV, saves state)"

    I am developing an application using the version of HTMLDB that comes with OracleXE.
    I have a tabular form, in which the default column for a particular item is sourced from a previously entered item on another page. This is a lookup item and needs to be non-changeable by the user. So I want to use the "Display As" option "Display as Text (based on LOV, saves state)". However, this option is not available in the pull-down for "Display As". The option "Display as Text (based on LOV, does not save state)" is available, but using this option means that the item is not saved to the database.
    Does anyone know why the stateful display as option is not available.
    Thanks in advance,
    Rob

    Scott, thanks for the feedback. The problem is that although the value is displayed correctly, it is NOT saved to the database. Effectively, header information is entered in a previous screen, and one of the entered fields is written to each of the detail lines associated with the header. We are re-platforming an existing application (written in an obscure form of basic), and at this stage changing the schema is not an option. So this header item (which is a foreign key to a "store" table), is meant to be written down to each line, on the screen displayed as the store name, and written to the inserted lines as the lookup id. If I use the dispaly as text save state option teh database is updated correctly, but displays the id rather than name on the screen. The only display as lov option i can see is the one that does not save state. If I use this option the screen displays as I want but the database is not updated. I need to use the display as lov saves state option. but i do not see it.
    Any ideas?
    Thanks for your time.
    Rob

  • Annoying [ ] with "Display as Text (based on LOV, saves state)"

    Hi all,
    I've got a form where some items are shown as “Display as Text”. These values are displayed normally.
    But I also have some items which are shown as “Display as Text (based on LOV, saves state)”. When I run the page and these items don't return a value (because it isn't filled in in another page), we get the annoying []-sings.
    Is there anyone who knows how to fix this, I just want to display nothing when there is no value.

    I've tried this one already.
    I tried to leave it blank, & nbsp ; , text,... but the problem is that our lov is build by a function and it always returns a query, so the LOV is never null.
    I figured something out: made a process after header that has some cursors to get the values from the database and changed the item to a simple display as text-field. There were only 4 that were wrong, so it wasn't to much work.

  • Cannot see Display as Text (based on lov, saves state)

    I have raised this question on the HTMLDB forum (Where is "Display as Text (based on LOV, saves state)" but in case its XE specific I am posting here too.
    I have a tabular form in the XE version of HTMLDB, and wish to use the "Display as Text (based on LOV, saves state)" option. However, this option does is not available to me - are there some conditions necessary for this option to be displayed?
    Thanks, Rob

    Rob,
    I doubt it's an XE specific issue. I've asked for more information in the original thread.
    Sergio

Maybe you are looking for

  • Java.security.InvalidKeyException: Unsupported key type: SunPKCS11-MyPKCS11

    I am having a very strange issue with my CAC card. I wrote a small Java program to login into ProjectForge.mil webservice ICollabNetSoap m_sfSoap = (ICollabNetSoap) ClientSoapStubFactory.getSoapStub(ICollabNetSoap.class, "https://project.forge.mil/")

  • Connection ipad/iphone to macbook pro takes 30min (at least)!

    my ipad air and iphone 5c (latest updated) do not connect to my macbook pro (os x 10.9.4 mavericks). if i really really want to connect them i have to wait at least 30min! Normal? Thanks for helping me =)

  • Debatching of Compex Schema using XMLDisassembler

    Hi, I am having a complex schema that I need to debatch based on the no. of blocks in the message. This is the message I am receiving: <?xml version="1.0" encoding="UTF-8" ?> <response status="1" xmlns="Namespace"> <dam-schedule calculation="Wed May

  • Finding Administrator User Name

    I know the Administrator Password but can't remember the User Name. Is there a way to determine what the user name is for the Administrator? Thanks

  • FMS in CREDIT NOTE

    Hello Is there any way to trigger a FMS automaticaly when i copy from an invoice to a credit note??. I have tried with diferent fields but i had no success. Thanks Jacobo