Reset dirty view state

Hi All,
By any chance anybody knows solution to this little problem:
I have ActionListener that is activated when user click on the breadcrumb and perform some clean up in the views.
private void rollBackChanges(String selectedIterator) {
FacesContext fc = getFacesContext();
ValueBinding vb = fc.getApplication().createValueBinding("#{bindings}");
DCBindingContainer bc = (DCBindingContainer) vb.getValue(fc);
DCIteratorBinding iterator = bc.findIteratorBinding(selectedIterator);
if (iterator != null) {
ViewObjectImpl vo = (ViewObjectImpl) iterator.getViewObject();
doCleanViewLinks(vo.getViewLinks());
doCleanCurrentRow(vo);
vo.clearCache();
//Commit here because on the UI alert for changes are coming up in spite of removing all changes
//vo.getDBTransaction().commit();
if(vo.getDBTransaction().isDirty()){
throw new RuntimeException("Transaction is Dirty");
private void doCleanViewLinks(ViewLink[] links) {
for (ViewLink vl: links) {
ViewObjectImpl vol = (ViewObjectImpl) vl.getDestination();
doCleanCurrentRow(vol);
vol.clearCache();
private void doCleanCurrentRow(ViewObjectImpl view) {
ViewRowImpl row = (ViewRowImpl) view.getCurrentRow();
if (row != null) {
row.refresh(Row.REFRESH_UNDO_CHANGES | Row.REFRESH_REMOVE_NEW_ROWS);
I do not have dirty transaction on the views but on the UI pop up message warns me about uncommitted changes, so how do I reset this view or synchronize it's state to views.
Thanks in advance,
Alex

Hi Frank,
I am on
ADF Business Components     10.1.3.40.66
Java™ Platform     1.5.0_06
Oracle IDE     10.1.3.40.66
Uncommitted data warning come from java script that check page for modification but transaction is not dirty.
Alex
Edited by: user10597392 on Jul 17, 2009 6:28 AM

Similar Messages

  • What is the best technique for resetting a view?

    I was wondering what is the best technique for resetting the initial state of a view?
    I am creating a form and want to provide a reset button for the user.  I could write an initialize() method that my action handler calls, but I am wondering if the framework already provides this functionality in a more elegant way.
    If I write an initialize method, then I have to manually populate my fields with my context mappings in my initialize() code to mimic what happens automatically by the framework the first time the view is called.  This seems prone to error since this is duplicating the mapping logic.
    Michael

    Hi,
    Even though it boils down to the same logic, for consistency sake it is good to have the initialization logic coded in the inbound plug method and then to call the outbound plug on reset.This make more sense when you have multiple navigation possible to the same view through multiple inbound plugs.
    Else, have an initialization method.
    PS: check whether the reset() method of IWDContext make sense. This is helpful when you have remove dynamically added nodes and attributes.
    Thanks and Regards,
    Sam Mathew

  • Default view state of portlets

    How can i specify the default view state of portlets. I want to set the portlet state as view everytime when page loads. Currenlty weblogic loads the last portlet state.
    Iam using weblogic 10.3 portal and also enabled Asynchronous desktop rendering feature.

    Hello,
    I'm not sure what you mean by "when page loads"-- if every time the page refreshes you reset the portlet state, you would never be able to use any portlet states other than "view". However, if you wanted to change the state every time the page very first time the page becomes "visible", the easiest way to do this would be to have the portlets listen for the onWindowActivation event, and reset their state to "view" when you receive this event.
    Kevin

  • It is not possible to reset to factory State

    Ciao
    My pc has this problem: "it is not possible to reset to factory State"
    Noteboock  HP Pavilion dv6-6c65el
    OS: Windows 7 Home Premium 64-bit SP1
    CPU Intel Core i5-2450M CPU @ 2.50\3.10GHz hd3000 integrata
    Graphics Radeon HD 7690M XT 2Gb GDDR5
    BIOS Brand Hewlett-Packard
    Version F.12 Date 10/26/2011
    Hard disk (C) OS+(D) Recovery+(E) HpTools. 
    After performing "reset factory state" (with HP Recovery Manager) I noticed the malfunction IE9 32bit.
    Moreover, the absence of other software preinstalled (missing: Hp Hp setup-documentation-IE9 64bit).
    When I tried a new reset, HP Recovery Manager to the voice system recovery (factory state) tells me:
    (disabled: to restore the system, use recovery media)
    Using Recovery DVD (in excellent condition),you  receive the following error message:
    "windows as encountered a problem comunicating with a device connected to your computer-This errorcan be cause by umpluggin a
    removable storage device such as an exsternal usb drive while the device is in use,or by faulty hardware such as hard drive or cd-rom drive
    that is failing make sure any removable storage is properly connected and then restart your pc" Status:0xc00000c9 Info: an unespected I\O error as occurred"
    The same happens with the F11 key during startup. Reset error.
    The System Restore Microsoft does not resolve.
    In Windows everything else seems to work and the hardware of the notebook has no problems.
    The original dvd player has been replaced with a compatible; reads all the disks supported.
    Only install MSE (I use only portable software).
    There are no viruses or other malaware.
    I performed procedures in hp support but nothing has changed.
    You can find a solution?
    Ciao e grazie
    Lecce2
    This question was solved.
    View Solution.

    I have no more 'answer because my computer had crashed complete.
    I apologize.
    Order the media why?
    If discs created the first time the PC will not work. I suppose that does not solve the problem discs hp (I also read about a problem like mine. This problem has not been resolved with the media bought by HP).
    I shot weeks the web and I finally found the appropriate procedure.
    I made several attempts to solve the problem. But now I have succeeded.
    1- Show Hidden Files \ protected
    2- Enter with a program (es: file commander) in recovery partition and copy the file or files base.wim. My is about 18 Gb, 1 file.
    3- We need a second PC and dvd
    4- Follow a procedure described by internauta 37.
    Search "Ripristinare portatile HP senza DVD e se l'HP Recovery Manager non funziona Internauta37"
    E 'was for me a little complicated but in the end I have my hp to the state of factory and everything works perfectly.
    Thank you all

  • C#/SharePoint -View State related issue while exporting data to excel

    We have web application based on SharePoint. We have a list view to display data based on Search Criteria. We have total of around 16000 data. When we try to export all data to excel it gives an error. The cause of the issue is:
    View State is used to save the state of page i.e. the previous state. When the export to excel link is clicked, the data present in the grid is actually saved in view state so that the overhead of again generating
    the data(as per the selection criteria) can be avoided. Now, this View state has a limitation of storage of these records. When we put in some selection criteria, the no. of records is less hence no problem in actually storing the view state. But when there
    is no selection criteria, 16306 records are too much to be stored in view state. Hence the error occurs.
    We tried to solve this issue by creating a compressor class and overriding two methods:
     LoadPageStateFromPersistenceMedium
    SavePageStateToPersistenceMedium
    This has resolved the issue with Export to Excel. However, there is now some issue in the paging of the list view. The list view has a column with hyperlink which opens related data in a form. While we click on the link in 2<sup>nd</sup>
    page of the list view, it displays data for the link in the 1<sup>st</sup> page at same row.
    Please suggest how to resolve this issue or any workaround for this

    We have web application based on SharePoint. We have a list view to display data based on Search Criteria. We have total of around 16000 data. When we try to export all data to excel it gives an error. The cause of the issue is:
    View State is used to save the state of page i.e. the previous state. When the export to excel link is clicked, the data present in the grid is actually saved in view state so that the overhead of again generating
    the data(as per the selection criteria) can be avoided. Now, this View state has a limitation of storage of these records. When we put in some selection criteria, the no. of records is less hence no problem in actually storing the view state. But when there
    is no selection criteria, 16306 records are too much to be stored in view state. Hence the error occurs.
    We tried to solve this issue by creating a compressor class and overriding two methods:
     LoadPageStateFromPersistenceMedium
    SavePageStateToPersistenceMedium
    This has resolved the issue with Export to Excel. However, there is now some issue in the paging of the list view. The list view has a column with hyperlink which opens related data in a form. While we click on the link in 2<sup>nd</sup>
    page of the list view, it displays data for the link in the 1<sup>st</sup> page at same row.
    Please suggest how to resolve this issue or any workaround for this

  • What is the best practice for changing view states?

    I have a component with two Pie Charts that display
    percentages at two specific dates (think start and end values).
    But, I have three views: Start Value only, End Value only, or show
    Both. I am using a ToggleButtonBar to control the display. What is
    the best practice for changing this kind of view state? Right now
    (since this code was inherited), the view states are changed in an
    ActionScript function which sets the visible and includeInLayout
    properties on each Pie Chart based on the selectedIndex of the
    ToggleButtonBar, but, this just doesn't seem like the best way to
    do this - not very dynamic. I'd like to be able to change the state
    based on the name of the selectedItem, in case the order of the
    ToggleButtons changes, and since I am storing the name of the
    selectedItem for future reference.
    Would using States be better? If so, what would be the best
    way to implement this?
    Thanks.

    I would stick with non-states, as I have always heard that
    states are more for smaller components that need to change under
    certain conditions, like a login screen that changes if the user
    needs to register.
    That said, if the UI of what you are dealing with is not
    overly complex, and if it will not become overly complex, maybe
    states is the way to go.
    Looking at your code, I don't think you'll save much in terms
    of lines of code.

  • Flex 3 :Help needed in implementing View States

    Hi 
    I am new to Flex , i am trying to understand View States , tried for one hour but got confused .
    (Basically by seeing the examples i understood the concept , but failed to implement ) 
    Please help .
    Assume my requirement is at the load of the page , i want to show an Login Button and a Chnage State Button (common button) only .and when the Change State button is clicked on ,i want to show the Register Button .
    So for this i made two Forms , and a common button .
           <mx:Form id="RegForm">
                <mx:Button label="RegFormButton" id="RegFormButton"/>
            </mx:Form>
            <mx:Form id="loginForm">
                        <mx:Button label="LoginButton" id="loginButton"/>
            </mx:Form>
    <!-- A common button for both the States-->
      <mx:Button label="Change State"
                  click=""/>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" currentState="Register">
    <mx:states>
    <mx:State name="Register">         
    <mx:SetProperty   target="RegForm"   value="Register"/>
    </mx:State>
    <mx:State name="loginForm">
    <mx:SetProperty   target="loginForm"   value="Login"/>
    </mx:State>
    </mx:states>
    ( I think some how i can write the Logic to chnage to the current state to loginForm when user clicks with some inline code , but please tell me At the start of the page please tell me why I am not able to show the Register.

    sorry for posting a dumb question .
    I realized my mistake .

  • Populate Flex Grids during view state?

    Hi, I am very new to Flex. I am working on a Flex project where I want to populate xml data in the two grids during viewstate. In my project, I have two grid which resides in the two discinct view state named as "Category" and "Topic". For these two view state, i have two disctinct grids.
    I am successfully able to populate one grid that is "Category" state grid but when i change the state on button click event another grid does not populate with the data.
    Can anyone help me with this?
    Please have a look on the code below for better idea:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="730" height="492" creationComplete="TopCategoryTopic()" currentState="HotCategory">
    <mx:states>
      <mx:State name="HotTopic">
          <mx:SetEventHandler target="{btnHotTopics}" name="click" handlerFunction="TopCategoryTopic">     
          </mx:SetEventHandler>
      <mx:SetProperty target="{btnHotTopics}" name="label" value="Top &quot;Hot&quot; Topic"/>
      <mx:RemoveChild target="{categoryGrid}"/>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:DataGrid id="topicGrid" x="10" y="27" width="601" height="263" color="#000000">   
        </mx:DataGrid>
      </mx:AddChild>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:Label x="10" y="10" text="Top &quot;Hot&quot; Topic" width="150" color="#000000" fontWeight="bold" fontFamily="Verdana" fontSize="11" id="label0"/>
      </mx:AddChild>
      </mx:State>
      <mx:State name="HotCategory">
        <mx:SetEventHandler target="{btnHotCategories}" name="click" handlerFunction="TopCategoryTopic">     
          </mx:SetEventHandler>
          <mx:SetProperty target="{btnHotCategories}" name="label" value="Top &quot;Hot&quot; Categories"/>
      <mx:RemoveChild target="{categoryGrid}"/>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:DataGrid id="categoryGrid"  x="10" y="27" width="601" height="263" color="#000000">   
        </mx:DataGrid>
      </mx:AddChild>
      <mx:AddChild relativeTo="{canvas1}" position="lastChild">
        <mx:Label x="10" y="10" text="Top &quot;Hot&quot; Category" width="159" color="#000000" fontWeight="bold" fontFamily="Verdana" fontSize="11" id="label2"/>
      </mx:AddChild>
      </mx:State>
    </mx:states>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
      width="730" height="492" headerHeight="20"
          showCloseButton="true" borderColor="#000000"
      layout="absolute" fontSize="12" verticalScrollPolicy="off"
      horizontalScrollPolicy="off" title="Customer Success &amp; Strategy - Q4 Hot Topics/Categories"
      themeColor="#0E4463" horizontalCenter="0"
      verticalCenter="0" id="CSSTopPresenter" cornerRadius="0" alpha="1.0"
      backgroundColor="#FFFFFF" borderThickness="0" close="CloseWindow()"
      color="#FFFFFF" borderThicknessLeft="3" borderThicknessRight="3" borderThicknessBottom="3">
        <mx:Script>
            <![CDATA[
                import mx.controls.dataGridClasses.DataGridColumn;
          import mx.collections.XMLListCollection;
            import mx.managers.PopUpManager;
                import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.http.HTTPService;
      import mx.events.FlexEvent;
      import mx.controls.Alert;
      import flash.events.MouseEvent;
                [Bindable]
                private var _xmlData:XMLList;
                private function TopCategoryTopic():void
                    var httpService:HTTPService = new HTTPService();
                httpService.url = "http://ri/co.UI/CtSS/Rsources/Hgory.aspx?Month=January&Year=2009";
                httpService.resultFormat = "e4x";
        httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
        httpService.send();
                //funtion to receive Http Service Response as XML Document         
              private function onResultHttpService(e:ResultEvent):void
        //var xmlData:XMLList = e.result.CategoryTopic;
        var category:XMLList = e.result.categories;
        var topic:XMLList= e.result.topics;
        if(currentState=="HotCategory")
            categoryGrid.dataProvider = category;
            for each (var node:XML in category[0].children())
                addDataGridColumn1(node.name());
        else if(currentState=="HotTopic")
          topicGrid.dataProvider = topic;
          for each (var node1:XML in topic[0].children())
            addDataGridColumn2(node1.name());
        //function to add Categories column dynamically
      private function addDataGridColumn1(dataField:String):void
        var dgc:DataGridColumn=new DataGridColumn(dataField);
        var cols:Array=categoryGrid.columns;
        cols.push(dgc);
        categoryGrid.columns=cols;
        categoryGrid.validateNow(); 
                //function to add Topic column dynamically
      private function addDataGridColumn2(dataField:String):void
        var dgc:DataGridColumn=new DataGridColumn(dataField);
        var cols:Array=topicGrid.columns;
        cols.push(dgc);
        topicGrid.columns=cols;
        topicGrid.validateNow(); 
          //funtion to remove grid window
      private function CloseWindow():void
        PopUpManager.removePopUp(this);
        ]]>
        </mx:Script>
        <mx:Button id="btnHotCategories" label="Top &quot;Hot&quot; Categories" width="173" height="37" borderColor="#2673A9" cornerRadius="6" labelPlacement="left" color="#000000" click="currentState='HotCategory'" x="45" y="23" fillAlphas="[1.0, 1.0]" fillColors="[#4D8F8D, #CCD3DE]"/>
        <mx:Button id="btnHotTopics" label="Top &quot;Hot&quot; Topic"  width="172" height="38" cornerRadius="6" borderColor="#000000"  color="#000000" click="currentState='HotTopic'"  x="46" y="78" fillAlphas="[1.0, 1.0]" fillColors="[#4D8F8D, #CCD3DE]"/>
        <mx:Canvas width="621" height="302" borderStyle="solid" borderColor="#0092F9" y="155" x="46" cornerRadius="9"  alpha="0.61" backgroundColor="#0092f9" id="canvas1">
        </mx:Canvas> 
        <mx:Image x="294" y="0" width="373" height="147" source="assets/CategoryTopic.gif"/>
    </mx:TitleWindow>
    </mx:Canvas>
    Thanks in advance.
    Vivek Jain
    Software Engineer

    I simplified the problem to it's essence and came up with this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
        creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                public var lProvider:ArrayCollection;
                private function init():void
                    var la:Array = [{label: "Conference", checked: true},
                                    {label: "Tickets", checked: false}];
                    lProvider = new ArrayCollection(la);
            ]]>
        </mx:Script>
        <mx:List id="cList" width="200" dataProvider="{lProvider}" itemClick="lProvider.refresh()">
            <mx:itemRenderer>
                <mx:Component>
                    <mx:HBox width="100%">
                        <mx:CheckBox selected="{data.checked}" click="data.checked = event.target.selected"/>
                        <mx:Label text="{data.label}"/>
                    </mx:HBox>
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>
        <mx:VBox width="600">
            <mx:Panel title="Conference component" width="100%" height="200"
                    visible="{lProvider.getItemAt(0).checked}"
                    includeInLayout="{lProvider.getItemAt(0).checked}"/>
            <mx:Panel title="Ticket component" width="100%" height="200"
                    visible="{lProvider.getItemAt(1).checked}"
                    includeInLayout="{lProvider.getItemAt(1).checked}"/>
        </mx:VBox>
    </mx:Application>
    Does this help?
    Dany

  • SSRS 2012 Problem understanding View State Validation steps

    Hi,
    ***** Note I have put my question on Bold to make it easier****
    I am trying to Implement this solution on our systems and need help on how to set it up ?
    Pasted from 
    http://technet.microsoft.com/en-us/library/cc281307.aspx?lc=1033
    How to Configure View State Validation
    To run a scale-out deployment on an NLB cluster, you must configure view state validation so that users can view interactive HTML reports. You must do this for the report server and for Report Manager.
    View state validation is controlled by the ASP.NET. By default, view state validation is enabled and uses the identity of the Web service to perform the validation. However, in an NLB cluster scenario, there are multiple service instances and web service
    identities that run on different computers. Because the service identity varies for each node, you cannot rely on a single process identity to perform the validation.
    To work around this issue, you can generate an arbitrary validation key to support view state validation, and then manually configure each report server node to use the same key. You can use any randomly generated hexadecimal sequence. The validation algorithm
    (such as SHA1) determines how long the hexadecimal sequence must be.
    1.
    Generate a validation key and decryption key by using the autogenerate functionality provided by the .NET Framework.(Well, how to generate Validation key using .Net Framework?)
    In the end, you must have a single <machineKey> entry that you can paste into the Web.config file for each Report Manager instance in the scale-out deployment. 
    The following example provides an illustration of the value you must obtain. Do not copy the example into your configuration files; the key values are not valid.
     Copy Code
    <machineKey validationKey="123455555" decryptionKey="678999999" validation="SHA1" decryption="AES"/>
    2.
    Open the Web.config file for Report Manager, and in the <system.web> section paste the <machineKey> element that you generated. By default, the Report Manager Web.config file is located in \Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting
    Services\ReportManager\Web.config.
    3.
    Save the file.
    4.
    Repeat the previous step for each report server in the scale-out deployment. 
    5.
    Verify that all Web.Config files in the \Reporting Services\Report Manager folders contain identical <machineKey> elements in the <system.web> 
    Does the key generate using above generates the key with same element ?
    Any help on this would be appreciated .
    Thank you !
    Thanks

    Hi SQL_Help:
    Per my understanding that you have some question with the steps descript about "How to Configure View State Validation", you don't know how to generate Validation key and also not clear if all the Web.Config files will add the same
    code, right?
    We have many method to generate the validation key,details information below for your reference:
    Generate either from the machineKey generator utility from
    http://aspnetresources.com/tools/keycreator.aspx or  your very own utility or from this link: http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx
    We can add some code to generate the key, details steps and sample code in article below for your reference:
    How to create keys by using Visual C# .NET for use in Forms authentication
    We should add the same code which include the generated key in all the web.config file in each server node. 
    More Details information you can reference to the rticle below:
    https://msdn.microsoft.com/en-us/library/ff649308.aspx
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Jdev 11.1.2 - Getting view state of the page has expired. Reload the page.

    Hi All,
         I am Using Studio Edition Version 11.1.2.0.0 (11g Release2).
         Whenever I do some changes to Jspx file and
         trying to perform some operations in the Form Session got Timeout.
         In the JDEV Log recorded the message as:
         Do we need to do any changes in settings?.
         [01:23:15 PM] Updated /C:/Users/arenuk/AppData/Roaming/JDeveloper/system11.1.2.0.38.60.17/o.j2ee/drs/TestSample/ViewControllerWebApp.war
         <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RESTORE_VIEW 1
         javax.faces.application.ViewExpiredException: viewId:/view/src/jspx/Countries.jspx - ADF_FACES-30107:The view state of the page has expired. Reload the page.
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:718)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:341)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         And in one of my earlier threads I got solution (fast-swap Option need to be selected)
         for Null Pointer exception after Recompilation of Java classes in Debug Mode.
         Durga.

    Hi Arun,
         The word Form misleads you i think so its not Form. Jspx only.
         I have created a small sample application using HR database.
         Created CountriesEO using countries table.
         Created Countries.jspx, in that created one filterable table using CountriesVO.
         Run the Countries.jspx page is rendered on the Browser.
         Now if I do any change say for Ex: Given editingMode="editAll" to the Table Save and
         now come to the page already Running on the Browser and applied Filter for
         Country Name column this Error comes.
         1. Are you running the App in Debug mode? -- In Both Run & Debug Modes it comes.
         2. Is there any backing bean for the jspx page? -- no backing Bean created.
         Durga.
    Edited by: Durga on Aug 26, 2011 3:22 AM

  • Change base view state from a custom component

    I'm pretty new to flex and I'm having a small issue in change the view state from a component.
    My Application have 2 custom components called userlogin and main menu. In the main application page I have userlogin component in one state and the main menu component in another. I'm trying to change the state if the login in successful from user login to main menu. I have the following function written inside the login component.
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    This code worked when I had all the controls in the main page. But then I created components and included them in to components and now when the login is success, its giving the following error.
    ArgumentError: Undefined state 'MainMenu'.
        at mx.core::UIComponent/getState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:9908]
        at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9928]
        at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9750]
        at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
        at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
        at components::UserLoginForm/__btnSubmit_click()[C:\Projects\WarrantyAutomation\src\componen ts\UserLoginForm.mxml:60]
    I'm sure this has something to do with accessing the states from a custom component, but I do not know how to change the state to the main menu. Please help me with this. Any help is greatly appriciated.

    Hi dasun1981,
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    If I am right the above function is in your userlogin component and the two components "userlogincomponent" and "maincomponent" are in main application file and the states were also defined in main application file.
    But in the function above the currentState refers to the state of the userlogin component and not the main application ...but the states are defined in main application file...that's the reason why the exception was thrown...
    Instead you replace the line in the above function with the below line:
    Application.application.currentState = "MainMenu";
    Please mark it as answer if it helped you.
    Thanks,
    Bhasker Chari

  • With As subquery block in create view statement or In pl/sql block

    Hi All,
    Can I use the With as subquery block in create view statement??
    or in pl/sql
    -Thanks
    Edited by: xwo0owx on Mar 31, 2011 11:23 AM
    Edited by: xwo0owx on Mar 31, 2011 11:23 AM

    Hi, Mike,
    Dird wrote:
    Then why do I get an error? :s create view mike_test_view as    
    with carriers as(
    SELECT DISTINCT T0.CARRIER_SHORT_NAME carrier_name,
    T1.COMP_ID            carrier_id
    FROM CS2_CARRIER T0, USER_FUNCTION_QUALIFIER T2, CS2_COMP_SERV_PROV_PROF T1
    WHERE (((T1.SERV_PROV_ID = T2.QUALIFIER_VALUE) AND
    ((T2.FUNCTION_CODE = 'DOC_CCM') AND
    (T2.QUALIFIER_CODE = 'CARRIER_LIST'))) AND
    (T1.SERV_PROV_ID = T0.SERV_PROV_ID))
    ORDER BY T0.CARRIER_SHORT_NAME)
    select *
    from carriers c;ORA-00942: table or view does not exist -- carriers
    If I run every line but the create (just execute the query) it runs fine. It also works fine in a PL/SQL procedure.SQL*Plus abhors a vacuum.
    The default in SQL*Plus is that you can not have a completely blank line (that is, a line containing only white space) in the middle of a SQL statement. (Blank lines are okay in PL/SQL, including SQL statements embedded in PL/SQL.)
    If you want some space between the end of the WITH clause and the beginning of the main query (or anywhere else, for that matter), you can put comments there. For example:
          ORDER BY T0.CARRIER_SHORT_NAME)
         select *
           from carriers c;Now that line isn't just whitespace; it has the comment sign, and that's enough for SQL*Plus.
    You can allow completely blank lines with the SQL*Plus command:
    SET   SQLBLANKLINES  ON

  • Reload data when chaning view state

    Hi all,
    I have a main application ("MTF.mxml") and two view states in
    the application (myChallenges) and (responses). In the view states,
    I have inserted two customized components.
    The MyChallenges-component is a list of challenges and when a
    challenge is selected, I switch from the myChallenges-view state to
    the responses-view state using a costum event dispatcher.
    So far so good,
    The problem is that when I change to the responses-view state
    and therefore to my responses-component, the data loading on the
    panel of the component is only the request that I get when I for
    the first time enter the responses-component. When I go forward in
    my application from the responses-view state to the
    myChallenges-viewstate to pick a new challenge, the responses-view
    state does not reload with the new challenge id - actually, no
    action script code in the responses-component is processed at all!
    I figure it has something to do with the component's loading
    events.
    I use the creationComplete-tag property in the component to
    activate an init()-function to handle my ActionScript code. But
    this seems to activate the function only when the component is
    created for the first time!
    How do I handle this? I tried using the enterState-property,
    but with no succes!
    Please help me, if anyone knows the answer!

    Thank you for the quick feedback.
    The enterState-property works fine, it seems that the Action
    Script code loads every time.
    Actually, what I really wish is that the component "reloads"
    every time. The problem is that my actionscript code adds elements
    to the scene, edits properties and so forth, everything depending
    on what challengeId there is given to the component. When the
    component has completed the code once, variable-values, elements
    and so forth are still kept until the state is entered again. Is it
    not possible to actually reload the component - not just making
    "show/hide" it, as I do now?

  • SSRS 2008 R2 Problem understanding View State Validation steps

    Hi,
    Sorry, but I have some problem understanding this steps. Please help me to understand this. 
    Pasted from
    http://technet.microsoft.com/en-us/library/cc281307.aspx?lc=1033
    How to Configure View State Validation
    To run a scale-out deployment on an NLB cluster, you must configure view state validation so that users can view interactive HTML reports. You must do this for the report server and for Report Manager.
    View state validation is controlled by the ASP.NET. By default, view state validation is enabled and uses the identity of the Web service to perform the validation. However, in an NLB cluster scenario, there are multiple service instances
    and web service identities that run on different computers. Because the service identity varies for each node, you cannot rely on a single process identity to perform the validation.
    To work around this issue, you can generate an arbitrary validation key to support view state validation, and then manually configure each report server node to use the same key. You can use any randomly generated hexadecimal sequence.
    The validation algorithm (such as SHA1) determines how long the hexadecimal sequence must be.
    Generate a validation key and decryption key by using the autogenerate functionality provided by the .NET Framework.
    (Well, how to generate Validation key using .Net Framework?) In the end, you must have a single <machineKey> entry that you can
    paste into the Web.config file for each Report Manager instance in the scale-out deployment.  
    The following example provides an illustration of the value you must obtain. Do not copy the example into your configuration files; the key values are not valid.
    Copy Code
    <machineKey validationKey="123455555" decryptionKey="678999999" validation="SHA1" decryption="AES"/>
    Open the Web.config file for Report Manager, and in the <system.web> section paste the <machineKey> element that you generated. By default, the Report Manager
    Web.config file is located in \Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\Web.config.
    Save the file.
    Repeat the previous step for each report server in the scale-out deployment. 
    (Do I need to repeat all 3 previous steps?)
    Verify that all Web.Config files in the \Reporting Services\Report Manager folders contain identical <machineKey> elements in the <system.web> section.
    Thanks

    Jerry,
    Thanks for the reply.
    From the above View State Validation Steps,
    For 1st step , how to generate validation key using .Net Framework?
    for 4th step, Do I need to repeate all 3 previous steps?
    Thanks
    Kp

  • Change View State Based On Screen Orientation?

    I'd like my app to change layouts based on the current screen orientation.  I believe this is done through view states.  I have three questions...
    1) How do I check the current orientation?
    2) Is there an event listener that will tell me when the orientation changes?
    3) How do I toggle between view states?
    Thank in advance!
    UPDATE: I figured out the answer to question 3...
    currentState = 'yourStateName';
    UPDATE II: I figured out the answer to question 1 as well.  I simply used the Capabilities object to determine the screens current width & height, then compare the two.  All of this is in a function that gets called when the app launches:
    public function checkOrientation():void
         var screenWidth:Number = Capabilities.screenResolutionX;
         var screenHeight:Number = Capabilities.screenResolutionY;
         if (screenWidth > screenHeight) {currentState='yourStateName1';}
         else if (screenWidth < screenHeight) {currentState='yourStateName2';}
    Now all I have to do is figure out how to call this function when there is an orientation change.  I tried the code below but get the included error:
    stage.addEventListener(Event.RESIZE, checkOrientation); // ERROR: Access of undefined property stage
    Why can't access the "stage" property???

    Hi,
    I work on platform using flash bulider 4, later i finsh the platform but i meeting one problem is resize project to work with diffrent size screen, but i can't solve the problem, i need platform work with diffrent Screen Orientation without problem could some help  please, this that what i done in code please help.
    Thanks,
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:rtc="http://ns.adobe.com/rtc" width="100%" height="100%" backgroundColor="#51575D">
           <fx:Style source="Client.css"/>
             <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import flash.events.FullScreenEvent;
                protected function txtUsername_enterHandler(event:FlexEvent):void
                    // TODO Auto-generated method stub
                    connectRoom.login();
                    labelUsername.visible = false;
                    txtUsername.visible = false;
                function fullScreenRedraw(event:FullScreenEvent):void
                    if (event.fullScreen)
                        width  = Capabilities.screenResolutionX;
                        height = Capabilities.screenResolutionY;
                    else
                        width = stage.stageWidth;
                        height = stage.stageHeight;
            ]]>
        </fx:Script>
           <fx:Declarations>
             <s:Move duration="500" id="moveEffect"/>
            <s:Resize duration="500" id="resizeEffect"/>
        </fx:Declarations>
                  <mx:Image x="0" y="0" width="100%"  height="100%" scaleContent="false" autoLoad="true" source="greenbackground.png"/>
                                     <rtc:ConnectSessionContainer horizontalScrollPolicy="off" verticalScrollPolicy="off" id="connectRoom" autoLogin="false"
                                           roomURL="https://collaboration.adobelivecycle.com/account/yourroom"
                                           y="20" width="95%" height="90%" backgroundColor="#212D4B" contentBackgroundColor="#F6F6F0" borderAlpha="1.0" cornerRadius="30" contentBackgroundAlpha="1.0" backgroundAlpha="0.4" x="33" dropShadowVisible="true" borderVisible="true">
                        <rtc:authenticator>
                                <rtc:AdobeHSAuthenticator userName="{txtUsername.text}"/>
                     </rtc:authenticator>
                          <rtc:SimpleChat width="293" height="258" x="2" y="165" chromeColor="#384D91"/>
                           <rtc:WebcamSubscriber y="4" displayUserBars="true"  width="292" height="158" x="2"/>
                     <rtc:AudioSubscriber id="audioSub" width="0" height="0"/>
                                         <rtc:FileShare height="135" width="290" x="5" y="425" chromeColor="#284C79"/>
                        <rtc:ScreenShareSubscriber id="scrShare" width="81%" height="99%" y="4" x="299"/>
        </rtc:ConnectSessionContainer>
        <s:Label id="labelUsername" y="230" text="   Enter a username and press Enter:&#xd;" color="#B5C40D" fontWeight="bold" horizontalCenter="0"/>
        <s:TextInput y="250" width="229" textAlign="center" id="txtUsername" enter="txtUsername_enterHandler(event)" color="#090909"
    horizontalCenter="0" height="27" fontWeight="bold" borderAlpha="0.99" contentBackgroundColor="#989A9C"/>
    </s:Application>

Maybe you are looking for

  • Epson R300 prints photos very dark and oversaturated

    My Epson R300 recently began printing photos much darker and heavily saturated relative to what I see on my monitor. It seems to print ok directly from a CompactFlash. Photos I printed in the past no longer print good. I tried different programs (iPh

  • No life from newly built PC

    So I've installed the mobo, CPU and fan, RAM, and PSU. I've made sure the connections are correct and then I turn it on but nothing at all happens. Not even a fan or any LEDs. I am using a H81M-E33 motherboard, Intel Core i5-4440 CPU, 8 gigs (1 modul

  • Remove default Price Unit from PO Condition type

    Hi, I'm an ABAPer. We have a requirement to remove the default(which is '1') Price Unit(PEINH) from 'Conditions' Tab in PO for a particular PO Type. Could you please suggest if there is any customizing for this? Thanks & Regards, Adithya M.

  • HT6170 what if i have an back up email adress verified but still dont see the link ???

    what if i have a back up email adress but i stilll dont see the link to change the security question??

  • A bunch of 10.4.9 issues

    I updated to 10.4.9 last night, and was working fine until the blue light on my external harddrive turned completely red and to prevent a problem with the drive it's self i shut it off without ejecting, then i turn it on the read only cd partition do