Access the current instance of request module in a java class in the model

Hi all
I'm trying to implement the custom story types in our application, (ModifiedById), I can read the user name of the security context, but not the username.
I have a view object, say UserInfoVO which contains the logged in users info.
I know, I can create a new instance of the application at the bean module and using security context information, I can go get the user ID.
            ApplicationModule am =
                  Configuration.createRootApplicationModule(amDef, config);
                ViewObject vo = am.findViewObject("UserInfoVO1"); // view criteria applied by default
                vo.setNamedWhereClauseParam("bUserName", user); // user from security context
                vo.executeQuery();
I'm trying to access the current instance of the Application module in my java class customized, that is used to return the attribute history ModifiedById.
//referring the blog

http://jobinesh.blogspot.in/2011/02/creating-custom-history-types.html
It is, how do I access the current instance of ApplicationModule in a class as * "HistoryAwareEntityImpl" * located in project template. ?

any help will be appreciated.

Kind regards
Rognard

OK, in this case, you get the transaction of db of the base class object and this object allows you to search the module of the application

public final DBTransaction getDBTransaction();
...
DBTransaction:
public ApplicationModule findApplicationModule(java.lang.String amName)

or if you get the application root module

public ApplicationModule getRootApplicationModule()

Timo

Tags: Java

Similar Questions

  • How can I access the models "Scripted' in PS creative cloud as described in the tutorial titled"creating with Patterns"Andy Anderson as of 13/01/2014?  Specifically, the option "Trees".  They are not available in the drop-down list.  I downloaded t

    Can't access scripted bosses - specifically "trees".

    in the program Photoshop Creative Cloud such as shown in the tutorial "Creating with Patterns" Andy Anderson.

    I found the answer.  The tutorial is not common.  It seems that the 'trees' have been moved to the menu Filter under the section of rendering.  Please up date the tutorial to reflect this change/move.  Thank you

    [Duplicate message deleted... post the same question more than once is confusing... MOD]

    [This is an open forum, not a direct line to Adobe support... you have to wait a response]

  • How to access the model nested via library DAM?

    I'm trying to use the dam library to access a list of objects data center as well as a list of objects to store data that is associated with each of them. I have not found anything that talks about how to use the relations of model and tables at the same time.

    My data objects look like this (they are in packs, with imports, etc.) that compile cleanly.

    [Bindable]

    [Model(type="Datacenter")]

    SerializableAttribute public class DatacenterDataItem extends to {DataObject

    [Model (property = "name")]

    public var name: String;

    [Model (relation = "datastore", property = "name")] / / works but only name returns

    [Model (= "datastore" relationship, nestedModel = "com.example.model.DatastoreDataItem")]

    public var datastoreList:ArrayCollection;

    }

    [Bindable]

    [Model(type="Datastore")]

    SerializableAttribute public class DatastoreDataItem extends to {DataObject

    [Model (property = "summary.name")]

    public var name: String;

    [Model (property = "summary.type")]

    public var type: String;

    [Model (property = "summary.url")]

    public var url: String;

    }


    When I try and interrogate customer data centers list explodes with a message box that says "an internal error occurred - error #1065" so obviously something is not correct.


    Can I return a list of names if I specify the property directly, however based on the documentation, it seems that the nested object should work... Ideas?

    This should be

    [Bindable]

    [Model(type="datastore")]

    NOT

    [Bindable]

    [Model(type="Datastore")]

  • The model tree

    is someone can you please tell me how I can access the model tree using an iPad... It is even possible and which variant of adobe I use, I just drive and which seems not to support the model tree? any help would be great...

    Hi Graham,

    Ah! Very well! But this feature is not available in the Mobile application.

    Kind regards

    Rahul

  • How to reference the value of a < af:inputText > to the level of the view in a java class

    How to reference the value of a < af:inputText > to the level of the view in a java class to level model? Thank you!

    Hello!
    1: you must close this topic and open another... :))) and game question calls for a response (if my answer is correct: set my answer - correct answer)...

    2nd: for example in your java class in view level:

    links BindingContainer private;

    public BindingContainer {} getBindings()
    If (this.bindings == null) {}
    FacesContext fc = FacesContext.getCurrentInstance ();
    This.Bindings =
    (BindingContainer) fc.getApplication () .evaluateExpressionGet (CF,
    "#{bindings}."
    BindingContainer.class);
    }
    Return this.bindings;
    }

    Public Sub UseSetMyParam()
    {
    Fcab FacesCtrlActionBinding = (FacesCtrlActionBinding) getBindings () .getControlBinding ("setMyParam");
    fcab.doIt ();
    }

  • Listener (and the database instance) does not start automatically: ORA-12514: TNS:listener does not currently of service requested in connect descriptor

    Hi all... I am a newbie with oracle database.,.

    I have the problem of monitoring:

    I installed Oracle Database 11 g R2 XE on my CentOS 6.5 guest operating system.

    I changed the host name in my CentOS so (where installed oracle 11g R2 XE) after the installation was completed successfully.

    Installation-) before and during the hostname is localhost.

    (-) After the installation, I changed the host name in VMCentOS

    From the moment where I changed the host name, nothing starts automatically. In particular, the listener and the database instance does not start automatically.

    When I start the listener manually and I try to connect to the instance of database with SQLPLUS I get this error:

    ORA-12514: TNS:listener is not currently of service requested in connect descriptor

    I think that the problem is due host name changed because I have to test and debug the object, re-installed a machine virtual operating system CentOS, re-installed oracle database 11 g and I do not have this problem. The database instance and the listener starts automatically!

    Can someone tell me if, maybe, the problem is with the host has changed? ... and why?

    P.S.: After changing the hostname I also modified the listener.ora and the tnsnames.ora by changing the HOST with the correct host name.

    Hello

    It seems that you don't install Oracle Database Express Edition (XE). If you post this question in the wrong forum.

    When you install EA or there is no script that starts the database at startup.

    If you wish, you can create by yourself. For example search for instructions to Google how to create script.

    Kind regards

    Jari

  • A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.

    Hello

    I just bought an HP computer, Windows 8 Pro, x64bit. I worked OK for a week and then started to freeze. It freezes all the time. I'll send the error message in the event log. I'd appreciate your help because I've had enough of this gel and I turn it works all the time.

    Log name: System
    Source: Schannel
    Date: 12/07/2013-12:55:12
    Event ID: 36870
    Task category: no
    Level: error
    Keywords:
    User: SYSTEM
    Computer: Aleksey
    Description:
    A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030D. The internal error state is 10001.
    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        36870
        0
        2
        0
        0
        0 x 8000000000000000
       
        7179
       
       
        System
        Aleksey
       
     

     
        Server
        0x8009030d
        10001
     

    Thank you

    Hi Aleksey,

    I appreciate the efforts that you put to publish the query on this forum.

    Please help me with the following information about this issue:

    (1) is the computer that is connected to a domain network?

    (2) when exactly you receive the error message? It is by accessing any application?

    If the computer is connected to a domain network, I suggest you send the request on 8 Windows IT Pro. Check out the link:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w8itpro

    Please let us know if the computer is not in a domain. We will be happy to help you come.

  • in a PivotTable, the Director of the Forum can tell the index of the current instance of the line?

    Script dependencies and "recalculate()".

    I am the example here and use it to make a dynamic array. The button now work as my Add/Delete a button line + /.

    From the guide, I can use the instance manager and add or remove any instance of line. Now, I want to know what line I'm publishing now, so that when there is data in the other lines that the first line, it appears an alert reminding me to complete the first line beforehand.

    Capture.PNG

    Code instance manager that works in my local:

    var oTargetSubform = addButton.parent.repeatingTable.repeatingRow; Line subform or a table, the controls are intended to manipulate.

    oManager var = oTargetSubform.instanceManager; Download the instance Manager.

    while I suppose that property I should want to talk is oManager.index, it always returns 0, but I can't find the definition of 'index' in Designer 11: Adobe LiveCycle ES4 * instanceManager

    Hello

    to be able to know what line you are currently in when you change a field in any event you can call the index property of the parent row of the field... In this case, you can use the property parent to access the line where the field is inside of...

    For example: this.parent.index-> (1) parent means that the field is directly in the line considered a cell

    This.parent.parent.index-> (2) parents means that the field is in a subform in the line

    I hope this will help you!

  • New methods in the project request module not available to view the project

    Hello

    I have migrated from 10.1.2.3 to 10.1.3.4 JDeveloper and received the application (Struts base) upwards and works well.
    But when I add methods to the ApplicationModule class, is not available in the classes of the action in the draft opinion.

    In the project settings for the draft opinion, the model project is in the list of dependencies.
    What will take to make it work?

    Kind regards
    Terje

    Hello
    just my experience:
    You must remove all the way classes (model view controller) and then rebuild the model and the view of the controller. JDev sometimes left a few old files, classes and never build them again even if you have changed the java file. I never really learned when this happens, so there is no test case to reproduce this. We use an ant script to clear the path of classes before you rebuild an application.

    If the error persists after this own reconstruction, debug the application and the st a breakpoint in your action class where you get the module of the application. Then check the class of the returned request module. If you see a class of the type of your ApplicationModuleImpl, you should be able to access your methods. If you do not see your ApplicationModuleImpl something wrong with the cpx-file configuration struts - config.Xml.

    Timo

  • Cannot access the page «get modules»

    I had just refreshed my computer and I am trying to reinstall my Add-ons, but I can't access the page of the modules 'get '. I tried all the troubleshooting methods suggested. and still no:
    The secure connection failed

    An error occurred during a connection to services.addons.mozilla.org. The peer certificate has been revoked. (Error code: sec_error_revoked_certificate)

       The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
       Please contact the website owners to inform them of this problem.
    

    Can anyone help?

    How about you just go to https://addons.mozilla.org/ instead.

    Edit: this is not a Firefox 35.0.1 or any number of version, but with a certificate revoked on services.addons.mozilla.org

    The https://addons.mozilla.org still works fine.

    For playback so you understand how to properly use Bugzilla.
    Bug 1128368 - cert revoked about breaks services.addons.mozilla.org subject: addons

  • On my iTouch Gen 5, to access the app store results by requiring a password to one account Yahoo, I deleted a year ago.  All other parameters recognizes my current e-mail and password.  I tried everything I can think of.  Ideas?

    On my iTouch Gen 5, to access the app store results by requiring a password to one account Yahoo, I deleted a year ago.  All other parameters recognizes my current e-mail and password.  I tried everything I can think of.  Ideas?

    What you are your trying to do?

    If you update the application, you enter log on the account that was purchased to update. It looks like your case.

  • Trying to access the electronic books in the library of our audience. Downloaded the software, but I get an error saying: the current version of the security of MP's 2.5.0.0 and I need 2.

    Trying to access the electronic books in the library of our audience. Downloaded the software, (Overdrive Media Console) but I get an error saying: the current version of the security of MP's 2.5.0.0 and I need 2.5.0.1. How to do only what I can read ebooks? People have suggested using IE, but I prefer to much HELP Firefox!

    Try to update the media player while using Internet Explorer. Windows Updates site uses ActiveX to perform "duties. Firefox does not support ActiveX.

  • I'm adding several modules of memory, BUT I can't access the 4th slot. How can I move the disk drive?

    I bought two modules of memory to upgrade my HP s5250t model, but the disk drive is in the way. How can I move it so I can access that 4th slot?

    ohgioia2 wrote: I bought two modules of memory to upgrade my HP s5250t model, but the disk drive is in the way. How can I move it so I can access that 4th slot?

    Hello ohgioia2, here is a link that contains information. I don't know if that's enough to get the last memory module.

    I don't think you would need to completely remove the DVD disc, but just push forward enough to access the memory.

  • How to access the tab 'Save all' when I close several jpeg files that have been adjusted with the "color adjust tool? He is currently making me close and save one at a time. Thanks for any help :)

    How to access the tab 'Save all' when I close several jpeg files that have been adjusted with the "color adjust tool? He is currently making me close and save one at a time.  I've just upgraded to El Capitan.  Thanks for any help :)

    I assume that you use the application overview.

    I can't find an answer to back up everything, but a workaround could be while the file menu options are visible, press the option key

    and the point of the window will become close, if you click on that dialogue will ask you if you want to restore the changes or save

    pressing Save will close the image with the changes and then move to the next image and so on.

  • in family vista premium I get the application message has requested to stop in an unusual way (this when I try to access the windows messages)

    In Vista hom premium when I try to access the windows messages I get the message "the application has requested runtime to stop completely in an unusual way, contact the applications support team"

    Try to compact and repair the database of WinMail (see www.oehelp.com/WMUtil/).  Also check for interference from antivirus software (see www.oehelp.com/OETips.aspx#3).

    Steve

Maybe you are looking for