Call a method after the signature of the user

I got my application with the ADF security. After that the user logged on, I want to inform me of ViewObjects. I want to store this information in a managed bean in session. I tried to use a HttpSessionListener but when I create the managed bean session I get an exception: oracle.adf.controller.ControllerException: ADFC-12013: State of the controller has not been initialized for the current request.

@Override

{} public void sessionCreated (HttpSessionEvent event)

InitializerBean userBean = new InitializerBean();

userBean.init ();

event.getSession () .setAttribute ("securityBean", userBean);

}

In addition, the listener is called when a session is created and not only when a user logged on. JDev 11 GR 2

Hello

If you redirect to a specific page after authentication, you can use an afterMethod on the f: view component to listen to RESTORE them after VIEW (to avoid the execution logic for all phases of the life cycle) and then query the information. You want to maintain a flag of session once you read the user information so that it is read again unnecessarily.

Another option would be to use a JSF PhaseListener (after RESTORATION of VIEW with a flag of session to indicate that the query has been run)

Frank

Tags: Java

Similar Questions

  • How to execute a method after the user login

    Hello
    I have an application with a public and non-public part. When a connection from the user to the application, I want to execute a method in a session bean to load default data in certain properties in the session bean. How can I execute a method after a connection/disconnection from the user of the application using the ADF security? Is the only Posibility to write a custom plug-in? If so,... How can I easily extend an existing connection module?

    Kind regards
    André

    Hello

    How is that you are relying on the login? You can connect to WLS FRO m backing bean (see this ) and if everything is ok, call your session bean method.
    You just need the reference of session bean in your backing bean (@EJB injection (yet?) does not work for the safeguarding of the beans, so either do the JNDI research or expose the method in the pageDef and then solve / execute it in the bean to support).

    Another possibility would be to place - the method call activity after your login to the adfc - config.xml, but this page depends on how you set up logging. So, the first solution should work.

    Pedja

  • How to call a method of the AM with parameters of Bean managed?

    Hello world

    I have a situation where I need to call the Managed bean (setDefaultSubInv) AM, under value changes Listner method. Here's what I do, I added the AM method on page links, and then at the bean call it

    Class [] paramTypes = {};
    Object [] params = {};
    invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);

    It works and be able to call this method, if there are no parameters. Say that I pass a parameter to setDefaultSubInv(String a) method AM, I tried to call it bean but raise an error

    The string available = 'test ';
    Class [] paramTypes = {String.class};
    Object [] params = {DISP};
    invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);

    I'm not sure this is the right way to call the method with parameters. Can anyone tell how to call a method of the AM with bean to manage settings

    Thank you
    San.

    Just do the following

    1. your method in the Client Interface.
    2 - Add to Page Def.
    3 - Customize your Script like below one to reach your goal.

    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap () .put ("username", "oracle");
    operationBinding.getParamsMap () .put ("role", "F1211");
    operationBinding.getParamsMap () .put ("Connection", "JDBC");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    Returns a null value.
    }

    I hope it helps you
    Thank you

  • How to call a method of the Module of the Application of a class of ViewObjectImpl?

    Howdy,

    With the help of Studio Edition Version 11.1.1.3.0.

    I have a setup where a user between an element and a price. When the item and the price is committed, I want this event to then influence the price of his parents. My idea is to do a ViewRowImpl class and then call an AppModuleImpl class that is her parents and it affects their attributes.

    Question:

    (1) how to call a method on the Module of the Application of a class of ViewObjectImpl?
      public void setPrice(Number value)
      {
        setAttributeInternal(PRICE, value);
        
        DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
        BindingContext bctx = bindings.getBindingContext();
        DCDataControl control = bctx.findDataControl("AppModuleDataControl");
        ApplicationModule am = (ApplicationModule ) control.getDataProvider();
        //uh now what??
        // am.getProperty("method call(getTipsNum())") ?
      }
    (2) when I set an attribute on a view through the AppModuleImpl object, I'll make an infinite loop in this way? that is the AppModuleImpl calls the ViewRowImpl class on a setAttribue (< name >, < value >)?

    Thank you guys.

    It's an interesting problem, I'll take a stab to solve here.

    First let's see I understand the data model:

    (a) there is a table called BOM with a self referencing FK creating a hierarchy of data
    (b) each record BOM is usually a child to another record BOM, so using your example, a van is composed of frames and tires - Let's say that this amounts to 3 records in the Schedule table.
    (c) check parent, truck, is the root of the hierarchy, and so the FK relationship sucks.
    (d) the price of a truck consists of its children. So if the frame costs $1,000 and tires $500, the pickup truck costs total $1,500.
    (e) a change in the price of any folder BOM, upwards or downwards must be propagated to its parent folder BOM. As an example, if the tires up to $600, the pickup truck is now $1600 ($1000 frame + tires $600).

    Does this sound right?

    Well, that I understand the data model, here's what I'd do build in what concerns objects ADF BC:

    (1) an entity BOM (EO) object - let's call this Bom
    (2) a BOM BOM EO association (representing the self referencing FK)-Let's call it BomBomFkAssoc
    (3) an object to view BOM (VO) based on the EO - let's call it BomView
    (4) BOM VO view link BOM VO based on EO of #2 association - call BomBomFkLink

    Next, we create the Java constructs:

    (5) #1 ensures that the EntityImpl has been created
    (6) #4 guarantees for the EO association that it generates the required Java accessors

    Now the additional code:

    (7) for the EntityImpl # 5, in the field of setter setPrice() something like the following:

    public Number setPrice(Number value) {
      Number diffPrice = value.minus(getPrice()); 
    
      setAttributeInternal(PRICE, value);
    
      BomImpl parentBom = getBom(); // from step #6, the EntityImpl should have an accessor method to it's parent BomImpl record
      Number parentDiffPrice = parentBom.getPrice().add(diffPrice);
      parentBom.setPrice(parentDiffPrice);
    }
    

    From a point of view JSF, now when I change a specific record of the Nomenclature in an edit form, a change for the price of registration for the Bill to submit time will automatically propagated to the top of the hierarchy of the BOM because the method setPrice() of the current OS of BOM will walk to the top of the hierarchy of the BOM to the parent following the call it is setPrice() method , which will be then walk to the next BOM record and so forth. At the time all BOM records with changes should be committed to the database.

    You don't need to test this in JSF, but simply the browser component of company on the Application template project Module.

    .... Of course... If I misunderstood your data model, it will be of no help whatsoever.

    CM.

  • Calling a method in the Parent of window title component

    Hi all

    I have a parent component that opens a window of title when I click on a button. Now, I want to call a method in the parent of the title window component. How do I do this in Flex? Could someone give me a tip please.

    Thanks in advance for the help

    This is a good start:
    http://weblogs.Macromedia.com/pent/archives/2007/11/popup_can_you_h.html

  • Do independent myRIO after the user has defined guidelines

    Greetings,

    I have a labVIEW VI that I write instructions in a text file on the myRIO and then the myRIO executes these instructions.

    I have seen tutorials that start the myRIO as a standalone application. But I need only become independent once the user writes information in the text file.

    Currently the user written instructions, and then click send to myRIO running then all tasks, even if the USB is still attached. After the user sets the instuctions, when they click on the instructions for sending, a message should then say rather unplug the USB of myRIO (this could be set to 10 seconds or something), then the myRIO performs the tasks as a standalone application.

    My project is the starter kit OR using the myRIO. I write instructions in the text file then the robot performs the tasks. The user never interfere with tasks, that the robot made, so the instructions are only sent once.

    Please note that I have a face before poster, I don't know how these screens still work?

    Thanks in advance for your help.

    Hello

    What you have said I think exactly as you want to do is not quite possible but you should be able to achieve the same thing by doing something like the following:

    A start-up executable running on the myRIO would allow him to run separate to the computer. You could then open communication to the myRIO of a separate VI on the PC to send instructions, and then close the communication for you to unplug the myRIO

    These links may help with some other reading on the executables to start on real-time targets:

    http://zone.NI.com/reference/en-XX/help/370622N-01/lvrthowto/rt_building_rt_app/

    http://digital.NI.com/public.nsf/allkb/E2F8C8D4270CCC62862574440054E894?OpenDocument

    Best regards

  • Unable to connect even after the user password reset

    Hai all,

    10.2.0.3 on Linux

    Reset a user password and the user is unable to connect as you can see below


    [oracle@testdb 10.2.0] $ sqlplus sys/Manager as sysdba

    SQL * more: release 10.2.0.3.0 - Production on Tue Nov 27 16:20:21 2012

    Copyright (c) 1982, 2006, Oracle. All rights reserved.


    Connected to:
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - Production
    With partitioning, OLAP and Data Mining options

    SQL > alter user sysman identified by oracle.

    Modified user.

    SQL > disconnected from Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - Production
    With partitioning, OLAP and Data Mining options

    [oracle@testdb 10.2.0] $ sqlplus sysman/oracle

    SQL * more: release 10.2.0.3.0 - Production on Tue Nov 27 16:20:32 2012

    Copyright (c) 1982, 2006, Oracle. All rights reserved.

    ERROR:
    ORA-01017: name of user and password invalid. connection refused



    Unable to connect even after the user password reset

    Check
    How to change the password of the database user Sysman (DB control repository schema) [ID 259379.1]
    EMCA 11 g fails with the error "ORA-01017: name of user and password invalid; connection refused"and" username/password invalid name; For DBSNMP or user SYSMAN"[ID 741530.1]

  • How to call support bean method when the user moves out of field of af: inputListOfValues

    Hello

    I use jdev 11.1.2.4.

    I want to call a method of bean of support depending on the value selected in the af:inputListOfValues field.

    The requirement is similar as Frank Nimphius-Oracle has shown here https://blogs.oracle.com/jdevotnharvest/entry/how_to_notify_the_server but with component input list of values.

    The areas I want to call the method is

    <af:inputListOfValues id="appealNameId"
                          popupTitle="Search and Select: #{bindings.AppealName.hints.label}"
                          value="#{bindings.AppealName.inputValue}"
                          label="#{bindings.AppealName.hints.label}"
                          model="#{bindings.AppealName.listOfValuesModel}"
                          required="#{bindings.AppealName.hints.mandatory}"
                          columns="#{bindings.AppealName.hints.displayWidth}"
                          shortDesc="#{bindings.AppealName.hints.tooltip}"
                          binding="#{backingBeanScope.backing_Donation.appealNameId}"
                          autoSubmit="true" clientComponent="false">
                          <f:validator binding="#{bindings.AppealName.validator}"/>
                          <af:autoSuggestBehavior suggestedItems="#{backingBeanScope.backing_Donation.onSuggestAppeal}"/>
                          <af:clientListener method="onBlurTxtField" type="blur"/>
    </af:inputListOfValues>
    <af:serverListener type="onBlurNotifyServer"
                       method="#{backingBeanScope.backing_Donation.onBlurNotify}"/>
                          
    

    as you can see, af:serverListener is outside the af: inputListOfValues which is probably the reason why this isn't executing this method?

    public void onBlurNotify(ClientEvent clientEvent) {
       // get a hold of the input text component
       RichSelectOneChoice inputTxt =  (RichSelectOneChoice) clientEvent.getComponent(); 
       //do some work on it here (e.g. manipulating its readOnly state)
       //…
       //Get access to the payload
        
       Map  parameters = clientEvent.getParameters();
       System.out.println("SubmittedValue = "+parameters.get("submittedValue"));
       System.out.println("LocalValue =  "+parameters.get("localValue"));
       }
    

    I tried to put the serverListener tag inside the < af:inputListOfValues > but get error below

    "Listener server is not a valid child of list of values of the entry.


    any ideas please?

    Thank you

    As first, make sure you use a correct type for af:serverListener (Traore we are you queue in the javaScript onBlurTxtField function)

    If still not working, go directly to the source code page, and put af:serverListener 'manually', as a child for af:inputListOfValues.

    Because it is possible that these messages are false alarms...

  • What is the best way to call a method in the bean on the adf page loading?

    Hello

    which is the best way to call a method in managing the beans on the adf page loading.

    My version of jdev 11.1.1.5.0

    Thank you

    I don't know if it's the right answer for your question try this...

    In taskflow for properties of method call, you must return a value when you use #{pageFlowScope.returnvalue} (returnvalue is a variable), so you can use your return value in the taskflow... Please let me if this is correct...

  • How an applet instance can call a method in the context of the proceeding one another?

    Consider an applet Java Classic Card with multiple instances that need to share data in a variable byte [] (e.g. persistent mutable, i.e. EEPROM/Flash), containing information common to all instances.

    Variable static ubyte [] would be perfect, but these happen to be prohibited by the validation rules imposed on me (I am told: as a way to tote to show that UN-instantiating an instance releases this she distributed on instantiation).

    This would be solved if an instance of the slave could call one of the method of the applet in the context of an instance of master (perhaps initially identified by AID, or/and/then in another way). How is that possible? Any example?

    Hello

    So I think that you don't need other assistance,
    The link you provide, has a useful example

    Kind regards
    Hana

  • How can I make the submit button that is activated after the user enters a digital signature?

    I have a form that contains a digital signature field. Once the user enters their digital signature, my "submit" button is disabled. I wanted that this remains activated for the user can submit the form with their digital signature and the form (in PDF format) as an attachment.

    I'd appreciate any help.

    Kind regards

    Fanny

    You can configure the fields of lock after the signing of the digital signature. In Livecycle Designer across this field properties: object-> TAB Signature properties. Here can exclude the button submit or any other field, if necessary, do not lock after signing.

    -Rambeau.

  • Calling a method of the Peoplecode Java

    Hello

    We are responsible to PeopleSoft HRHD a Single Sign On to a third party using the 3DES encryption, based in the email of the user to the third party. We managed to get the java program that was used to encrypt the e-mail and use it to treat the decryption side of Peoplesoft.

    First of all, we are right to the SignOn Peoplecode, and then creating a Peoplecode file dealing with the encrypted string that was passed via the URL?
    Assuming that we are right in this first step, what do we call this java method? We placed the java class in the PS_HOME/appserv/classes directory, and we kind of stuck on this part of the Peoplecode.

    < Peoplecode >
    & oDecrypt = CreateJavaObject ("SSOCrpyto");
    & strDecEmail = oDecrypt.decryptString (& strEncEmail);

    The Java class decryptString part is built like this.
    public String decryptString (message [] byte) throws Exception {}
    .. ethical here...
    }


    We are not familiar on how the parameter is passed when the type of data in java is an array of byte [] (if I understood).

    Thank you.
    Jeremy Leung

    Published by: 934351 on May 15, 2012 12:36

    I don't think I am able to provide advice on the mistakes of java, since my java knowledge is at a level of writing reading / (starting). Sorry about that.
    Looking on the net, you see this error a lot and indeed it something to do with the entry is a multiple of 8 and while padding encoding is used to "fill" the 8 bytes.

  • Calling a method in the BPM of jsp page object

    Hi all

    I try to call a method of object of BPM using < f: invokeUrl >

    I change the properties of the method server to yes-side.

    and then how can I get an object request and response within the BPM method.

    Thank you.

    To create a bit of this kind of argument method yo have to

    (1) create a method - right click on the object of BPM-> new method
    (2) add the arguments - in the variables pane, find the Arguments section, then click Add ICO, give it a name, click on the... button to select a type, choose a and type 'Fuego.Net.HttpResponse' in the research section. Also you can find it on the catalog of components-> Fuego-> Net-> HttpResponse
    Do the same for Fuego.Net.HttpRequest

    It's what you want to know?

  • Call a method before the following operation to set the selected values

    Use case: I display a VO as an ADF multiple checkbox select. This VO is the detail of a master/detail. I managed to store the selection state in a bean managed on autoSubmit. Then the user navigate to the record of the master, and then goes back to the previous record. The buttons next and previous were created using operations in data controls. I want to back up the State of the selection by clicking previous or next.

    There are a lot of tutorial on how to get the selected values, but none on how to set the selected values. How would you do it?

    11 GR 1 material JDev

    What I ended up doing:

    1 redefine listener action for the navigation buttons

    {} public void nextQuestion (ActionEvent event)

    saveSelectedState();

    navigateQuestion ("Next");

    restoreSelectedState();

    }

    {} private void navigateQuestion (string operation)

    OperationBinding operationBinding = ADFUtils.findOperation (operation);

    operationBinding.execute ();

    }

    2 Save and restore the selection state using bindings

    Guava Multimap

    Private ListMultimap selectedIndices.

    private void saveSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    int [] valueIndices = listBinding.getSelectedIndices ();

    selectedIndices.putAll (questionId, Ints.asList (valueIndices));

    }

    private void restoreSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    int [] valueIndices = Ints.toArray (selectedIndices.get (questionId));

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    listBinding.setSelectedIndices (valueIndices);

    }

  • Black screen after the user logon in Windows 7

    Hello
    I use Windows 7 ultimate x 64 on my desktop. Recently, I just turned on my PC and when I tried to connect to my account after the Welcome screen, a black screen came up with the cursor and nothing else has been demonstrated. He just hung there.
    There is another account in which I can start but it freezes and does not respond. I can boot into safe mode but no icons, programs do not start which is pinned to the taskbar and I must run firefox.exe via the Task Manager... System Restore does nothing. I do not have the disc to install windows 7. All other patches? Please say.

    Also, the black screen goes after 40 minutes or more and I'm able to use my pc.

    Help, please.
    Thank you.

    Hello

    It looks like certainly there is some sort of virus on the computer. If this is the case, your files will not be deleted but they could have been hidden. So, please run a full scan the system for viruses.


    Method 1: Microsoft Safety Scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again. The Microsoft Safety Scanner is not a replacement for the use of antivirus software that offers continuous protection. For a real-time protection that helps you keep your home or small office PC against viruses, spyware and other malicious software, download Microsoft Security Essentials.

     

    Method 2: Clean boot

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Follow step 7 of section of boot KB929135 to the computer in normal mode.

     
     
    I hope this information helps you!

    Thanks for trying to help me but I used Unhide.exe available on the website of Brian and my files are back.

    Thanks Brian. : D

Maybe you are looking for