How to pass UserID to the view object after authentication?

Hi,
I am developing an application using Oracle JHeadstart 10.1.3 Version 10.1.3.0.83
I have a view where all clients' data are. But when a client logs in he/she should see only his/her data, he/she should not see other clients' data.
So after logging how I can pass his/her UserID to the view? We are planning to use the OID for authentication. So when the client logs in with his/her user id, I want to pass that user id to the view so that the view query will return only the records associated with that client.
Any help would be appreciated
Thanks
Syed

Syed,
Although not fully documented yet in the Devguide, 10.1.3 still ships with basically the same security code that we had in 10.1.2. I suggest reading the security section in Chapter 5 of the 10.1.2. Devguide to get an idea of how that would work. Basically, it boils down to setting a JhsUser object on the session that you can access in the Model through the JhsApplicationModuleImpl.getUser() method.
Using the user in a whereclause could be done programmatically by altering the whereclause of a VO on the "executeQueryForCollection" method, but you could also use a bind variable and then bind it to the JhsUser object on the session through an EL expression like #{jhsUser.displayName}
Hope this helps,
Peter Ebell
JHeadstart Team

Similar Messages

  • How to pass back Subject do Client app after authentication via identity assertion

    I have developed an Identity Assertion Provider based on
    SampleIdentityAsserterProviderImpl provided by BEA.
    It seams that all works fine, but I don't now how to pass back authenticated
    Subject to client application in order to call methods runAs(Subject,
    PrivillegedAction). I have tried build Subject from
    connection.getInputStream() but when I use Subject constructed in that way I
    have received an error:
    lava.lang.SecurityException: Invalid Subject: principals=[user, usergroup1,
    usergroup1]
    Thanks in advance for any suggestions.
    Jerzy Nawrot

    Hi,
    as per the below comment.
    We want to change this and do this dynamic way so that the XCM configuration application can read these dynamic parameters and behave accordingly(like customers with different languages, client systems etc). This is the 1st part .
    You have to use different scanrios to be set in XCM like (customer specific to language, and client), and that to be passed in
    Where language specifications should maintained in XCM settings only. also to be noted that Product catalog for those should also maintain in that specific language.
    "/init.do?scenario=value2;
    The 2nd part leading this scenario is after the portal user successfully lands into ISA application, if the user needs to go back to the WDP java screen, would the JSP based ISA application be able to navigate back to the original WD Java iView Screen. ? or would it open in a new window ? (probably this can be set to be launched in same window)
    I am not sure, but if you go back to WD from ISA , ISA Session will die.
    Let me know if you have any further queries.
    Regards,
    Devender V

  • How to get the view Object in UserDefined Action

    Hi  All,
       Any body tell me how to get the view object , like the view object avilable in the wdDoModifyView() method as parameter.
    I have requirement like, i want to change the , no of rows displaying in the table should be changed at the runtime based onthe no of rows  selected in the dropdown box.
    The action which i created will be assigned to that dropdown box, on select of the available option, i will get the view object and change the properties of the "maxrows" of the table .
    so for getting the view object in the  the Action methods tell me what is the procedure for getting the current view object.

    Hello Vishal,
    Simply create a value attribute (say rowCount) of type 'integer' and bind it to the 'visibleRowCount' property of your table. Then, in the actionHandler get the value from the UI element (in your case, I guess it is drop down) and set it to the attribute 'rowCount' like this.
    wdContext.currentContextElement.setRowCount(
        wdContext.current<nodeElement>.set<AttributeBound toDropDown>);
    Bala

  • RowSetInfo; bc4j; how to get the View Object

    So I'm trying to get/update/insert/delete records in a database that contain an interMedia image in a blob.
    I've figured out that I can't simply set the ImmediateAccess attribute. It doesn't like that...
    So I'm trying to go after the view object, since the interMedia white paper uses a VO row setAttribute to accomplish the write.
    RowSetInfo extends ResultSetInfo which has a method getViewObject(). Cool.
    So I try it... and get an error that getViewObject() has protected access.
    Anyone know what I am doing wrong? Or should I be even taking this approach?!?!?!
    If I go exclusively with the VO layer... how do I preserve the navigationBar functionality? Or do I need to roll my own?
    ( NOTE: This hilights another example of the perception of 'friction' between rowsetinfos and the view objects/entity objects. An approach that makes "sense" to me as a naive novice didn't pan out. And oddly, most of the bc4j examples go against VOs when, if you are an application programmer, you may never see or use the VO methods ( although it looks like we should be)... we're working at the ResultSetInfo layer. )
    Is the the observation of other folk who are building Java Applications/Applets? Or do you all work directly with VOs instead of going through the ResultSetInfo "layer"?

    Here is some sample code that I am currently working on and will post on OTN when complete. The code shows how to access a BC4J Domain based on an Oracle type. Working with interMedia is similar since interMedia utilizes Oracle Object types. Please note that I have not tested this yet against interMedia, but I'm hoping that you may find the general process useful.
    // Copyright (c) 2000 Oracle Corporation
    package ObjectSampleDAC;
    import oracle.dacf.control.swing.*;
    import javax.swing.*;
    import oracle.dacf.dataset.*;
    import oracle.dacf.dataset.connections.*;
    import java.awt.*;
    import oracle.jdeveloper.layout.*;
    import java.awt.event.*;
    import javax.infobus.*;
    import oracle.jbo.domain.DomainInterface;
    import ObjectSampleBC4J.common.TAddress;
    import java.sql.SQLException;
    * A Frame class.
    * <P>
    * @author Scott Tiger
    public class Frame1 extends InfoFrame {
    * Constructs a new instance.
    public Frame1() {
    super();
    try {
    jbInit();
    sessionInfo1.publishSession();
    // call my initialization method
    bfInit();
    catch (Exception e) {
    e.printStackTrace();
    * Initializes the state of this instance.
    private void jbInit() throws Exception {
    /* All of the following code in this method was added by the designer except where noted below
    EmailrowSetInfo1.setName("Email");
    jPanel3.setLayout(gridBagLayout1);
    StatusrowSetInfo1.setName("Status");
    AddressrowSetInfo1.setName("Address");
    PasswordrowSetInfo1.setName("Password");
    UsernamerowSetInfo1.setName("Username");
    LastnamerowSetInfo1.setName("Lastname");
    FirstnamerowSetInfo1.setName("Firstname");
    IdrowSetInfo1.setName("Id");
    rowSetInfo1.setAttributeInfo( new AttributeInfo[] {
    IdrowSetInfo1,
    FirstnamerowSetInfo1,
    LastnamerowSetInfo1,
    UsernamerowSetInfo1,
    PasswordrowSetInfo1,
    AddressrowSetInfo1,
    StatusrowSetInfo1,
    EmailrowSetInfo1} );
    this.setDataItemName("infobus:/oracle/sessionInfo1");
    this.setTitle("Customer Information");
    this.getContentPane().setLayout(borderLayout1);
    this.setSize(new Dimension(536, 473));
    jPanel1.setLayout(borderLayout2);
    sessionInfo1.setAppModuleInfo(new ModuleInfo("ObjectSampleBC4J", "ObjectSampleBC4JModule"));
    sessionInfo1.setConnectionInfo(new LocalConnection("MyJdbcConn"));
    sessionInfo1.setName("sessionInfo1");
    rowSetInfo1.setQueryInfo(new QueryViewInfo(
    "CustomerView",
    rowSetInfo1.setSession(sessionInfo1);
    rowSetInfo1.setName("rowSetInfo1");
    /* The following listener was added using the event tab in the property inspector in design
    mode. The rowsetPopulated method is called when the rowset is queried/requeried.
    rowSetInfo1.addChangeListener(new oracle.dacf.dataset.ChangeAdapter() {
    public void rowsetPopulated(RowSetChangeEvent e) {
    rowSetInfo1_rowsetPopulated(e);
    textFieldControl1.setText("textFieldControl1");
    textFieldControl2.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Firstname");
    textFieldControl2.setText("textFieldControl2");
    textFieldControl3.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Lastname");
    textFieldControl3.setText("textFieldControl3");
    textFieldControl4.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Username");
    textFieldControl4.setText("textFieldControl4");
    textFieldControl5.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Password");
    textFieldControl5.setText("textFieldControl5");
    textFieldControl6.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Status");
    textFieldControl6.setText("textFieldControl6");
    textFieldControl7.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Email");
    textFieldControl7.setText("textFieldControl7");
    navigationBar1.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1");
    jLabel1.setText("ID:");
    jLabel2.setText("First Name:");
    jLabel3.setText("Last Name:");
    jLabel4.setText("User Name:");
    jLabel5.setText("Password:");
    jLabel6.setText("Status:");
    jLabel7.setText("Email:");
    jLabel8.setText("Address:");
    jPanel4.setLayout(      gridBagLayout2);
    textFieldStreet.setColumns(20);
    textFieldStreet.setText("textFieldStreet");
    /* The following listener (as well as the listeners on textFieldCity, textFieldState, and
    textFieldZipcode were added by the designer, but the focusGained and focusLost methods
    were modified in each case to call a common textField_focusGained method
    textFieldStreet.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(FocusEvent e) {
    textField_focusGained(e);
    public void focusLost(FocusEvent e) {
    textField_focusLost(e);
    textFieldCity.setColumns(20);
    textFieldCity.setText("textFieldCity");
    textFieldCity.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(FocusEvent e) {
    textField_focusGained(e);
    public void focusLost(FocusEvent e) {
    textField_focusLost(e);
    textFieldState.setColumns(20);
    textFieldState.setText("textFieldState");
    textFieldState.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(FocusEvent e) {
    textField_focusGained(e);
    public void focusLost(FocusEvent e) {
    textField_focusLost(e);
    textFieldZipcode.setColumns(20);
    textFieldZipcode.setText("textFieldZipcode");
    textFieldZipcode.addFocusListener(new java.awt.event.FocusAdapter() {
    public void focusGained(FocusEvent e) {
    textField_focusGained(e);
    public void focusLost(FocusEvent e) {
    textField_focusLost(e);
    jLabel9.setText("Street:");
    jLabel10.setText("City:");
    jLabel11.setText("State:");
    jLabel12.setText("Zip Code:");
    textFieldControl1.setDataItemName("infobus:/oracle/sessionInfo1/rowSetInfo1/Id");
    this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    jPanel1.add(jPanel2, BorderLayout.NORTH);
    jPanel2.add(navigationBar1, null);
    jPanel1.add(jPanel3, BorderLayout.CENTER);
    jPanel3.add(textFieldControl1, new GridBagConstraints2(1, 0, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(37, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl2, new GridBagConstraints2(1, 1, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(7, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl3, new GridBagConstraints2(1, 2, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(7, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl4, new GridBagConstraints2(1, 3, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(6, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl5, new GridBagConstraints2(1, 4, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(6, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl6, new GridBagConstraints2(1, 5, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(7, 11, 0, 0), 0, 0));
    jPanel3.add(textFieldControl7, new GridBagConstraints2(1, 6, 1, 1, 1.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(6, 11, 0, 0), 0, 0));
    jPanel3.add(jLabel1, new GridBagConstraints2(0, 0, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(37, 106, 0, 0), 0, 0));
    jPanel3.add(jLabel2, new GridBagConstraints2(0, 1, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 54, 0, 0), 0, 0));
    jPanel3.add(jLabel3, new GridBagConstraints2(0, 2, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 54, 0, 0), 0, 0));
    jPanel3.add(jLabel4, new GridBagConstraints2(0, 3, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(10, 54, 0, 0), 0, 0));
    jPanel3.add(jLabel5, new GridBagConstraints2(0, 4, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 62, 0, 0), 0, 0));
    jPanel3.add(jLabel6, new GridBagConstraints2(0, 5, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(9, 83, 0, 0), 0, 0));
    jPanel3.add(jLabel7, new GridBagConstraints2(0, 6, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(9, 86, 0, 0), 0, 0));
    jPanel3.add(jLabel8, new GridBagConstraints2(0, 7, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(7, 72, 94, 0), 0, 0));
    jPanel3.add(jPanel4, new GridBagConstraints2(1, 7, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel4.add(textFieldZipcode, new GridBagConstraints2(1, 3, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 10, 0, 0), 0, 0));
    jPanel4.add(textFieldState, new GridBagConstraints2(1, 2, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 10, 0, 0), 0, 0));
    jPanel4.add(jLabel9, new GridBagConstraints2(0, 0, 1, 1, 0.0, 0.0,
    GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
    jPanel4.add(textFieldStreet, new GridBagConstraints2(1, 0, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 10, 0, 0), 0, 0));
    jPanel4.add(jLabel10, new GridBagConstraints2(0, 1, 1, 1, 0.0, 0.0,
    GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
    jPanel4.add(jLabel11, new GridBagConstraints2(0, 2, 1, 1, 0.0, 0.0,
    GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
    jPanel4.add(jLabel12, new GridBagConstraints2(0, 3, 1, 1, 0.0, 0.0,
    GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
    jPanel4.add(textFieldCity, new GridBagConstraints2(1, 1, 1, 1, 0.0, 0.0,
    GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 10, 0, 0), 0, 0));
    /* The following vaiable declarations were made by the designer
    BorderLayout borderLayout1 = new BorderLayout();
    JPanel jPanel1 = new JPanel();
    SessionInfo sessionInfo1 = new SessionInfo();
    RowSetInfo rowSetInfo1 = new RowSetInfo();
    AttributeInfo IdrowSetInfo1 = new AttributeInfo(java.sql.Types.NUMERIC);
    AttributeInfo FirstnamerowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    AttributeInfo LastnamerowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    AttributeInfo UsernamerowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    AttributeInfo PasswordrowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    AttributeInfo AddressrowSetInfo1 = new AttributeInfo();
    AttributeInfo StatusrowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    AttributeInfo EmailrowSetInfo1 = new AttributeInfo(java.sql.Types.VARCHAR);
    JPanel jPanel2 = new JPanel();
    JPanel jPanel3 = new JPanel();
    TextFieldControl textFieldControl1 = new TextFieldControl();
    TextFieldControl textFieldControl2 = new TextFieldControl();
    TextFieldControl textFieldControl3 = new TextFieldControl();
    TextFieldControl textFieldControl4 = new TextFieldControl();
    TextFieldControl textFieldControl5 = new TextFieldControl();
    TextFieldControl textFieldControl6 = new TextFieldControl();
    TextFieldControl textFieldControl7 = new TextFieldControl();
    BorderLayout borderLayout2 = new BorderLayout();
    NavigationBar navigationBar1 = new NavigationBar();
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JLabel jLabel6 = new JLabel();
    JLabel jLabel7 = new JLabel();
    JLabel jLabel8 = new JLabel();
    GridBagLayout gridBagLayout1 = new GridBagLayout();
    JPanel jPanel4 = new JPanel();
    JTextField textFieldStreet = new JTextField();
    JTextField textFieldCity = new JTextField();
    JTextField textFieldState = new JTextField();
    JTextField textFieldZipcode = new JTextField();
    JLabel jLabel9 = new JLabel();
    JLabel jLabel10 = new JLabel();
    JLabel jLabel11 = new JLabel();
    JLabel jLabel12 = new JLabel();
    GridBagLayout gridBagLayout2 = new GridBagLayout();
    /* The following declarations were made manually
    /* DomainAccess provides a means for getting and setting values of a column object as domain
    DomainAccess da = null;
    /* TAddress is the domain class
    TAddress addr = null;
    /* Declare variables for determining if JTextField values have been changed by user
    String oldVal = null;
    String newVal = null;
    /* The following method is generated by the wizard when the frame was created
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSED) {
    System.exit(0);
    public void bfInit () throws Exception {
    /* To add code to be invoked when the user moves from one row to another, get the
    DataItemChangeManager from the RowSetInfo (via RowsetAccess) and add a
    DataItemChangeListener. The specific method we want to use here is rowsetCursorMoved
    which is invoked when the user moves from one row to another; the other methods are
    defined simply because the interface requires them.
    RowsetAccess ra = rowSetInfo1.getRowsetAccess();
    DataItemChangeManager dcm = (DataItemChangeManager)ra;
    dcm.addDataItemChangeListener(new DataItemChangeListener() {
    public void rowsetCursorMoved(RowsetCursorMovedEvent e) {
    rowSetInfo1_rowsetCursorMoved(e);
    public void dataItemAdded(DataItemAddedEvent e) {
    public void dataItemDeleted(DataItemDeletedEvent e) {
    public void dataItemRevoked(DataItemRevokedEvent e) {
    public void dataItemValueChanged(DataItemValueChangedEvent e) {
    /* This method was generated by the designer. See rowSetInfo1.addChangeListener(...) in jbInit
    above.
    void rowSetInfo1_rowsetPopulated(RowSetChangeEvent e) {
    try {
    /* When the rowset is populated, set the JTextField values based on the domain. See
    updateFields() below.
    updateFields();
    catch (Exception ex) {
    System.out.println("Error occurred while retrieving values");
    ex.printStackTrace();
    /* This method was added manually to track row navigation. See dcm.addDataItemChangeListener(...)
    in jbInit above.
    void rowSetInfo1_rowsetCursorMoved(RowsetCursorMovedEvent e) {
    try {
    /* When the user moves from one row to another, set the JTextField values based on the
    domain. See updateFields() below.
    updateFields();
    catch (Exception ex) {
    System.out.println("Error occured while assigning values");
    ex.printStackTrace();
    /* This method finds the values from each field of the column object by using the domain, then
    sets the values of the JTextFields respectively. It is invoked when the rowset is initially
    populated, and each time the user moves from one row to another.
    public void updateFields () throws Exception {
    /* Get DataItem for the Address column object and cast to DomainAccess for to prepare for
    getting and setting column value as domain.
    da = (DomainAccess)AddressrowSetInfo1.getImmediateAccess();
    /* Get the value of the attribute as a Domain and cast to DomainInterface.
    DomainInterface di = da.getValueAsDomain();
    /* null out addr. Otherwise, if the address column is null for a particular record, when
    the user navigates to the record with the null values, addr will retain the previous record's
    values. This ensures a clean slate.
    addr = null;
    /* Using DomainInterface allows us to cast the domain object to the specific Domain class for
    that type. So, cast the address attribute's value to TAddress, the class that
    represents the T_ADDRESS type created in the database. This provides getters and setters
    for each of the fields of the Object Type.
    if ( di instanceof TAddress ) {
    addr = (TAddress) di;
    /* If the above statement resulted in some non-null object assigned to addr, it is because
    one or more of the fields of the domain contained non-null values. Therefore, if addr is
    not null, get the values from each field of the domain and assign them to their
    respective JTextFields. Otherwise, set each JTextField to an empty string.
    if (addr != null) {
    textFieldStreet.setText(addr.getStreet());
    textFieldCity.setText(addr.getCity());
    textFieldState.setText(addr.getState());
    textFieldZipcode.setText(addr.getZipcode());
    else {
    textFieldStreet.setText("");
    textFieldCity.setText("");
    textFieldState.setText("");
    textFieldZipcode.setText("");
    /* If addr is null, after making sure the JTextFields are cleared, create a new TAddress
    object so that we have something to assign values to if the user edits the JTextFields.
    try {
    addr = new TAddress();
    catch (SQLException ex) {
    System.out.println("Error creating domain TAddress");
    ex.printStackTrace();
    /* The method below is invoked when the user navigates to textFieldStreet, textFieldCity,
    textFieldState, or textFieldZipcode. It's used just to find the value of the field when
    the user enters the field (the "before" value).
    void textField_focusGained(FocusEvent e) {
    Object obj = e.getSource();
    if (obj instanceof JTextField) {
    JTextField field = (JTextField)obj;
    oldVal = field.getText();
    /* The method below is invoked when the user navigates away from textFieldStreet, textFieldCity,
    textFieldState, or textFieldZipcode. It checks to see if the user changes the value of the
    field, and if so, updates the value of the address attribute.
    void textField_focusLost(FocusEvent e) {
    /* Find out the value of the JTextField now that the user is attempting to leave the field.
    Object obj = e.getSource();
    if (obj instanceof JTextField) {
    JTextField field = (JTextField)obj;
    newVal = field.getText();
    /* Compare the new value of the field ("after" value) to the "before" value captured
    in textField_focusGained above. If they are equal, we do nothing. If they are not equal,
    then the user must have changes the value in the field, and we have some work to do.
    if (!oldVal.equals(newVal)) {
    /* Since this same method is called regardless of which JTextField has been left, we find
    out which text field the user is leaving, and then set the value of the appropriate
    element of the addr domain.
    if (obj.equals(textFieldStreet)) {
    addr.setStreet(newVal);
    if (obj.equals(textFieldCity)) {
    addr.setCity(newVal);
    if (obj.equals(textFieldState)) {
    addr.setState(newVal);
    if (obj.equals(textFieldZipcode)) {
    addr.setZipcode(newVal);
    /* So, we've set the value of the appropriate element of the addr domain, but we have not
    "posted" those changes to the BC4J (middle-tier), so if we were to commit at this point
    our changes would not get saved to the database (because BC4J is not aware of these
    changes). The next step is to notify BC4J of the changes.
    try {
    da.setValueAsDomain(addr);
    catch (InvalidDataException ex) {
    System.out.println("Invalid Data assigned to TAddress");
    ex.printStackTrace();
    /* Clear out the oldVal and newVal variable so we are ready to track more changes.
    oldVal = null;
    newVal = null;
    }-- Brian

  • How to populate the view object programetically

    Hi all,
    Is there any way to populate the records present in my backing bean. In my beacking Bean there is an array list how can i assign the array list values to the View Object.
    Thanks in Advance.,
    Mohan Krishna m.,

    It's something like this that are you finding ?
    populateViewObject(ViewObject vo, ArrayList<MyBean> arrayBean){
    Ror myRow = null;
    for(MyBean my : arrayBean){
    myRow = vo.createRow();
    myRow.setProperty("<PropertyName>", my.getPropertyName())
    //Another Properties ...
    vo.insertRow(myRow);
    }

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • How to Insert the row in the View object

    I want to insert the row in the view object by instantiating Impl.java file
    Could someone please let me know how to insert the blank row
    Thanks

    Inserting onto a view object should be done the following way:
    //vo is your view object
    Row aRow = vo.createRow();
    //Set your attributes
    aRow.setAttribute("AttributeName", objectValue);
    //insert
    vo.insertRow(aRow);
    That should work for you if you are programming the input. If you are using java components bound to columns in a view object then the input should be done automatically for you when you commit.

  • How to add a new table or view in the view object

    hello,every one.
    I wanna add a new table or view in the view object's query statement.
    when the table or view not in the where clause,the query statement is working fine.
    If they in the where clause,I got the "java.lang.NullPointerException".
    who can help me
    thank you very much

    thank you for your reply
    I wanna extend the VO
    oracle.apps.pay.selfservice.payslip.US.server.PayPayslipGetPersonDetail
    the original sql is:
    SELECT ppf.person_id,
    FROM per_people_f ppf,
    per_assignments_f paf,
    pay_assignment_actions paa
    where paa.assignment_action_id = :1 AND paf.assignment_id = paa.assignment_id AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date AND paf.person_id = ppf.person_id
    I wanna extend:
    SELECT ppf.person_id, pay_v.element_name,pay_v.assignment_action_id
    FROM per_people_f ppf,
    per_assignments_f paf,
    pay_assignment_actions paa,
    pay_run_results_v pay_v
    where paa.assignment_action_id = :1 AND paf.assignment_id = paa.assignment_id AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date AND paf.person_id = ppf.person_id
    pay_v.assignment_action_id =paa.assignment_action_id
    if the pay.v in the where clause. I will got the exception. whereas,it's works fine.

  • How to populate bind variable in view objects where clause in ADF faces

    I've got a page with 2 input items.
    The user manually enters the first value.
    On the second input item I have created a LOV for the item which opens in a popup. How do I restrict the data returned in the LOV using the value entered in the first input item. I have created a bind variable and have included it in the where clause for the view object but how do I populated it.

    Here is an example:
    Using the HR schema with the EMPLOYEES and DEPARTMENTS tables.
    Example is using ADF BC and created an EMPLOYEES entity with an updateable view object for page,
    and created a DEPARTMENTS view as a lookup
    (SQL: select department_id, department_name from departments where department_name = :DeptName)
    1: add method to the backing bean to filter the LOV
    public void getTextValueToFilterLOV(ValueChangeEvent valueChangeEvent) {
    Object value_from_form = valueChangeEvent.getNewValue();
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application fapp = fctx.getApplication();
    JUFormBinding formBinding = (JUFormBinding)fapp.createValueBinding("#{bindings}").getValue(fctx);
    DCIteratorBinding dcBinding = (DCIteratorBinding)formBinding.get("DeptLOVIterator");
    ViewObject vo = dcBinding.getViewObject();
    vo.setNamedWhereClauseParam("DeptName",value_from_form);
    vo.executeQuery();
    2. add valueChangeListener to the inputText on the page with an id and autoSubmit="true"
    <af:inputText value="#{bindings.LastName.inputValue}" label="#{bindings.LastName.label}" binding="#{backing_DeptForm.inputText3}"
    id="inputText3"
    autoSubmit="true"
    valueChangeListener="#{backing_DeptForm.getTextValueToFilterLOV}">
    </af:inputText>
    3. reference the LOV with the id name on the partialTriggers property
    <af:selectOneChoice value="#{bindings.EmployeesUpdView1DepartmentId.inputValue}"
    label="#{bindings.EmployeesUpdView1DepartmentId.label}" binding="#{backing_DeptForm.selectOneChoice1}"
    id="selectOneChoice1"
    partialTriggers="inputText3">
    <f:selectItems value="#{bindings.EmployeesUpdView1DepartmentId.items}"
    binding="#{backing_DeptForm.selectItems1}"
    id="selectItems1"/>
    </af:selectOneChoice>
    Summary:
    When you entered a text (LastName), that value is passed into the backing bean method.
    The Bean method code will find the LOV Iterator and put the value into the bind variable.
    Cheers,
    Jim

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • How to add row in multiple view object based on common entity object.

    Hi ,
    I have
    Jdeveloper version - 10.1.3.3.0
    Oracle Database - 11g R2
    I have a situation where i have to show data from one table in three adf tables on jsf page depending on a flag value in a column in table. For this purpose i have done the following steps
    a) Created an entity object on the database table .
    b) Created three view objects on this entity object and edited the view object's SQL and included the where clause
                       WHERE  A.USER_PERSONAL_NO = :P_USER_PERSONAL_NO AND
                           A.AUTH_TYPE = 'LF'
                       The auth_type cloumn decided in which view object the data will be shown
    Now, when i query the data from database by executing the query of these view objects the data is shown correctly in all three view objects. Till here there seems every thing ok
    Now , i have to provide the logic to add records in the adf tables for this i have provided add button in action facet of all three tables which are binded to methods in managed bean,
    when i add a record in a adf table by add button the new row which is created is shown in all three tables . I cant understand why this is happening , please help me to solve this problem.
    How can i make it possible so that the record appears only in that adf table in which the record is added.
    The method for adding record is
                Row rw = currentAM.getWfRecommAuths().createRow();
                rw.setAttribute("UserPersonalNo",this.getQuery_personal_no().getValue());
                rw.setAttribute("AuthPersonalNo","");
                rw.setAttribute("AuthType","LX");
                currentAM.getWfRecommAuths().last();
                currentAM.getWfRecommAuths().insertRow(rw);
               Please help , thanks in advance.

    Hi,
    have a look at polymorphic view objects
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#CEGDCCCB
    Frank

  • ADF -how to create table binding when view object is no known until runtime

    I want to programmatically create a table binding to a view object where the view object name is not known until run-time. Then I will use a dynamic table to display it. Can anyone provide an example?

    I looked at example #9. It gets me closer to what I am looking for but not quite enough. In my case, I don't have (or want in this case) a pageDefinition with a pre-declared Iterator binding. I am converting an exsisting BC4J/Struts/JSP application. I would like to rewrite my reusable component tags to make use of ADF bindings and Faces. My tags are passed the ApplicationModule and ViewObject names as parameters, much like the old BC4J datatags. I do not want to go back and rewrite all of my pages from scratch using drag-and-drop declarative bindings with a pageDefinition for every page. I am hoping to have my rewritten tags handle everything programmatically based only on the ViewObject name passed at run-time.

  • Keep the record in the view object if deletion failed.

    I have a view object which is based on the entity object, when I am trying to delete a row it failed because it has a child record associate with. I know the row is not delete from the database, but the record is deleted fromt the view.
    How to keep the record in the View object if delete failed?

    Hi,
    the row is not delete from the database,refresh the view . re-execute query and the view show the row

  • Replace default table sort with order by on the view object

    The Jdeveloper help for af:table says:
    If the underlying model is not a CollectionModel , the Table automatically examines the actual data to determine which properties are sortable. Any column that has data that implements java.lang.Comparable is sortable. This automatic support cannot be nearly as efficient as coding sorting directly into a CollectionModel (for instance, by translating the sort into an "ORDER BY" SQL clause), but is sufficient for small data sets.
    I have a database table with varchar2 columns that can contain string, date or number values. So in the af:table I want to sort the columns either in string, date or number order.
    I tried creating a sort listener and in that listener set the view object order by clause and execute the query, but it does not affect the row order - it is always sorted as a string. I assume that the collection is doing its sort after I do the query, and overwriting the query order. I have tried disabling the sort in the listener by setting the sortcriteria to null but it has no effect.
    Can anyone suggest how to stop the default sort re-ordering the rows, or else how to code sorting directly into the CollectionModel as suggested in the help.
    Hugh Nelson

    By running in debug I discovered that when you click on a column heading to sort by the column values it actually sets the order by clause on the view object and executes a query. The help says that the default sorting is not as efficient as setting the order by clause - perhaps the help is out of date because default sorting does set the order by clause.
    This means that you cannot do a column sort on a transient attribute. The attribute being sorted on must exist in the table/query.
    The easiest solution is to override the setOrderByClause method on the view object. The string parameter is the column to order by eg "COLUMNA". If this column holds date values I can change it to something like "TO_CHAR(TO_DATE(COLUMNA,'DD-MON-YYYY'),'YYYYMMDD')". For numbers I do "LPAD(COLUMNA,10,'0')".
    This works OK.
    Hugh Nelson

  • How to Filter & Sort on Cached view object data?

    We are using JDeveloper 9.0.3.4 and implemeting a Struts/JSP application that query's via view object on one table. Is it possible to sort and order by on the view object's cached data? How does one do this?
    Thanks
    Natalie

    As for filtering rows, there are two ways:
    1. In the VO that's sorting data (in my article), you can add logic to skip unmatching rows in the following methods:
    protected boolean hasNextForCollection(Object qc)
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet)
    2. In the base VO (unsorted), you can apply a RowQualifier. For example,
    oracle.jbo.server.RowQualifier rowQual = new oracle.jbo.server.RowQualifier("EmpDeptNum = 20");
    myVO.setRowQualifier(rowQual);
    Thanks.
    Sung

Maybe you are looking for

  • How to solve problem related to svchost and Adobe flash player 11.6 r602 failing to work?

    Hi... I have been consistently facing a serious problem regarding the firefox I use. It's Firefox 20.0.1. I use Windows 7 and I have 8 gb of Ram. The problem is after I launch Firefox two dialogue boxes appear in quick succession one telling that "sv

  • Php configuration issue with libmysqlclient

    Hi , I am getting  below issue while configuring php 5.3.3 with below command ./configure --with-apxs2=/local/apps/rxapi/apache/bin/apxs --with-openssl --with-mysql=/opt/mysql/mysql --enable-dbase --with-libdir=lib/64 --prefix=/local/apps/rxapi/php5.

  • [help] how to client a Web Services server which need authenticate?

    I am programming a Web Services Client, and the Web Services need http basic authentication. Most of codes are generated by Netbeans from a WSDL file, but the program return me a ClientTransportException: request requires HTTP authentication: Unautho

  • Using OEPE 11.1.1.5.0 for OSB IDE

    Hi, I have downloaded oepe-galileo-all-in-one-11.1.1.5.0.201003170852-win32 stand-alone from http://www.oracle.com/technology/software/products/oepe/oepe_11115.html?rssid=rss_otn_soft. I am planning to install Oracle Service Bus 11.1.1.3.0 on a remot

  • IPod and Skype

    I'm considering an iPod touch but I want to ask some questions about it concerning the use of Skype. I have a mono (for one ear), wired head set with mic. The kind you'd use with a cell phone. Will that work with the new 64Gig iPod touch and Skype? I