LOV depending on the separate View object with ViewCriteria

Hello

I use JDev 12.1.3. My use case is the following - I've simplified as much as I can. I insert and update the SFGroupUser table, but I want the LOV to the UserID field be limited to only the users that are connected to today's society through the SFCompanyUser table. Here is the structure of the table:CompanyGroupUserTables.png

The key point is that when you assign users (SFUser) (SFGroup) groups in the SFGroupUser table, not all users may be assigned to a group because the groups are part of the business and the users are associated with one or more companies. Could not assign a user to a group that belongs to a company that the user is not assigned to. If GroupID 1 belongs to CompanyID 1 and 1 UserID is also assigned to number 1 in the SFCompanyUser table, then Pseudo1 can be assigned to GroupID 1.

In my ADF application, I created the entity objects and visualization of objects for all tables and all associations and links. I configured the perspective in the AppModule have a master relationship / detail like this:

CompanyGroupUserAM.png

In the SFGroupUserView I put in place a LOV to the UserID field. Is this LOV I want to limit just users who are assigned to the current society (the master of the relationship master / detail). It is possible to limit the LOV uses a separate view object, in this case a SFCompanyUser based, where society is today's society?

I worked with a view read-only as the LOV object. This VO joins SFCompanyUser and SFUser and has a view with a parameter of binding criteria for the CompanyID information. It seems that it is the way to go, but I do not see how to assign the current CompanyID to the variable binding.

Another point. I read different things, including corner Code article http://www.oracle.com/technetwork/developer-tools/adf/learnmore/44-restrict-lov-169186.pdf of Frank Nimphius. In this article, it updates a variable binding in a listener of the popup. I would like to have all the logic to stay in business if possible components. The idea is that the JSF page displays data controls in the form of a table of editable with a menu item drop-down selectOneChoice.

Kind regards

Steve

I solved my problem. The precious documentation carried out since the development of the Fusion of Web Applications with document Oracle Application Development Framework in section 5.12, in particular section 5.12.2 - How to define cascading lists LOV-Enabled view object attributes: https://docs.oracle.com/middleware/1213/adf/develop/adf-bc-vo-queries.htm#ADFFD349.

Using a view criteria named in the view LOV object was correct. When the attribute of username in the SfgroupuserView view object has been configured to use the LOV, a view accessor was created for the SfgroupuserView. The accessor view points to the LOV view object. Edition of the accessor of view I said to use the criteria of view named object View LOV. The problem was that the ID of the company in the main table (sfgroup) was not an attribute of the SfgroupuserView view object, so I was not able to assign a value to the variable binding. So, I added the entity sfgroup as one of the entities that the SfgroupuserView was based on and then added the companyID attribute. I then used the new attribute companyID as the value to be assigned to the variable binding, the criteria of display for the view LOV object in view accessor.

Now, everything works well in the AppModule. When you insert a new record in SfgroupuserView1 the user's selection is a drop-down list that displays only users assigned to today's society.

Tags: Java

Similar Questions

  • Iterators on the same view object

    different iterators on the same view object have the same current selected row?

    for example: if I have a page of two tables in each tab a tabel based on the same view object but each of them have there own iterator, if I change the selection of tables a the current table line change?

    You can try with 2 instances of VO with iterator separate for each, which is supposed to work in all cases

  • Create a view object with only transient attributes in its entity

    Hello

    With the help of ADF 11 g (11.1.2.3) with JHeadstart (11.1.2.1.28).

    I'm looking to create a new line for a view object that is supported by an entity that is not related to an existing database object:

    http://i.imgur.com/ex1Eqwq.PNG

    The view object has two lists of radio and a check box:

    http://i.imgur.com/sFWl5qF.PNG

    Normally, I'd create a page like the following fragment:


    1. drag the corresponding data control (for example, MyMedicationListView) on the JSFF.
    2. drag the create operation to the MyMedicationListView on the same page fragment.
    3. change the definition of page for the page fragment.
    4. Add an invokeAction for call to action of creation with a refreshCondition of #{adfFacesContext.postback == false}.
    5. remove the button create the page fragment.

    When users browse to the report page, the form elements to provide parameters for the report because there is an instance of line.

    I put:

    * Insert authorized einreihig? is checked.
    * New display at the entrance line? is set to true.

    Here you can see the other parameters:

    http://i.imgur.com/3DZBD7T.PNG

    Section 8.1.3 of the JHS Guide development (v11.1.2) pointed out that the executeQueryForCollection method can be overridden, but should match the settings that are currently enabled.

    When I build the application and go to the page of the report, no radio buttons are displayed. I expected to see the two sets of radio buttons. When I look in the generated page definition file, I see the following executables:
      <executables>
        <invokeAction id="clearDeepLinkViewCriteriaInvoke" Binds="clearDeepLinkViewCriteria" Refresh="renderModel"
                      RefreshCondition="#{'true' != pageFlowScope.jhsQueryByKeyValue}"/>
        <iterator id="MyMedicationListIterator" Binds="MyMedicationListView" DataControl="ReportingServiceDataControl"
                  RangeSize="10"/>
        <invokeAction id="ExecuteQueryMyMedicationListInvoke" Binds="ExecuteQueryMyMedicationList" Refresh="renderModel"
                      RefreshCondition="#{jhsPageChanged}"/>
        <iterator Binds="ReportingServiceDataControl" RangeSize="25" DataControl="ReportingServiceDataControl"
                  id="ReportingServiceDataControlIterator"/>
        <variableIterator id="variables">
          <variable Name="MyMedicationListRowKeyVar" Type="java.lang.String"
                    DefaultValue="#{bindings.MyMedicationListIterator.currentRowKeyString}"/>
        </variableIterator>
      </executables>
    There is no invokeAction for:
        <action IterBinding="MyMedicationListIterator" id="CreateMyMedicationList" RequiresUpdateModel="true"
                Action="createInsertRow"/>
    The result is essentially a form "in white": http://i.imgur.com/0cIeoeG.png

    When I look at the newspaper, I see:
    MyMedicationListViewImpl::buildQuery SELECT  FROM MYMEDICATIONLIST MyMedicationList
    This generates a resumption of flight of exceptions (the request is absurd: there should be no application because all fields are transient). I've tweaked the ViewImpl as follows:
      public String buildQuery(int noUserParams, boolean forRowCount)  {
        String query = super.buildQuery( noUserParams, forRowCount );
        System.err.printf("MyMedicationListViewImpl::buildQuery %s\n", query);
        
        return "SELECT 1 FROM DUAL";
      }
    The executeQueryForCollection did not work (because the getEstimatedRowCount triggers the incorrect SQL statement), so I have injected a custom rowcount:

    http://pastebin.com/UKPiEs03

    How to create an instance of line valid using JHeadstart?

    Thank you!

    Dynamic areas are not configured correctly.

    By connecting the dynamic field to the corresponding view object (that is, the areas >... > query parameters > data collection), option buttons appeared.

  • Table of the ADF and shape ADF on the same view object

    Hello

    According to ADF demonstrations available on the website of the ADF, I created a jsf with 2 panels page. A Panel is an ADF table based on a display object. The other Panel is and ADF form based on the same view object. My requirement is that I scroll the records in the table of the ADF, the shape of the ADF should dynamically display the details of the record in the table of the ADF. My understanding is that this should be automatic. However, its does not work as expected. What did I miss?

    Hello

    Ask PPR form that shows the details.

    As:

    ...



    ..

  • What is the problem with the conversion of objects with gradients to the gradient mesh?

    What is the problem with the conversion of objects with gradients to the gradient mesh?

    Radial gradients are special, and it could become difficult edit the gradient mesh resulting.

    Take the layer apnel and inspect your objects. You will find a clipping mask the cracks inside.

  • How to create the View object with several editable entity objects

    I want the two entities in the view object to support the creation of new lines, but when I give create insert that it allows to insert only on the parent and not the child. I found this link
    http://docs.Oracle.com/CD/E21043_01/Web.1111/b31974/bcadvvo.htm#CEGCAJCI which replaces the outgoing class. but I would like to do declarative. Is there another way to do it?

    I use Jdeveloper 11g 2 version.

    Thanks in advance,
    Rakesh

    Hello
    There is a checkbox in the tab "Updatable" entity objects, mark it checked and look in your vo
    Then, you can create the ViewObject also editable attribute
    Make sure that the Association is here.

    Rognard

  • LOV dependent inside the OFA

    Hello

    I'm looking how to implement LOV dependent within a table.

    I have two columns inside the so-called A, B.

    I have a value in a (text style) and then B (LOV). After mark I will be showing the values in the table so A is completed by research and B will take A value of show the dependent values of the a.

    Hope I'm clear with the tip.

    Concerning

    RAM

    This can be achieved by using the following steps.

    To make the second LOV to be dependent by the first style of message text.

    Create a form value in the same region and make the viewobject definition is the same as the message text style (MST).

    now, use the VALUE of the criteria for the lovmap element in the ENTRANCE of the LOV.

    as the value of the form is in the region it will choose the value whenever the LOV is interviewed and helps in implementing this feature.

  • LOV based on a transitional view object

    Hi all

    Our scenario is as below.

    We have two display objects of each with an attribute. First a (VO1) is based on the sql query and second view (VO2) object will fill up with pragmatism.

    We have the third view (VO3) object which has two transient attributes. We have defined the list of values on these two attributes. One based on the attribute VO1 and and the second is based on the attribute of VO2.

    I abandoned VO3 tabular form on the page and added create insert operation.

    When we create a line, I get values in the first attribute based VO1 attribute.

    What should I do to fill the values in the second attribute that is bound to an object attribute view transitional?

    Thank you

    MORICE

    Hello

    This problem is solved.

    Solution is, we need to create lines in VO2 by display VO3 accessor rowset.

    -Pavan

  • Fill the programmatic view object during execution

    Hi all

    I have a requirement to switch between the three different data source during execution in a single page. The user interface and the field names are the same for these three cases, but data from various sources (queries).

    So, imagine that we have 3 objects in view which has implemented read-only (object request depending on the view) and we want to fill a display object at the main performance as a data source for my page.

    My idea is to use "Prgorammatic view object" for this data source and then fill dynamically the contents of one of the three objects view read-only based on a setting in the user's selection.

    First of all, I want to know if it is thin approach and if yes, then get some points on the implementation or any other sample.

    I found this example:

    http://techiecook.WordPress.com/2011/05/17/programmatically-populate-view-objects-in-Oracle-ADF/

    Thanks in advance,

    Nasser

    Hello

    It is more a case of use for Adaptive connections. See:https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf

    You can use EL to change the name of the ViewObject that an iterator in ADF queries its data. If the switch is on the link layer and there is no need for programmatic view objects. Unlike in the article of the blog above, VO 3 exist in your case then you don't need to create on the fly. Just change the name of VO in the managed bean referenced

    Frank

  • LOV depending on the OFA

    Hello

    I create a dependent reference http://oracleanil.blogspot.com/2010/12/dependent-lov-in-oaf.html LOV

    My LOV provider works both SupplierSite LOV fine, but the Site LOV provider are not dependent on the provider LOV.
    If I choose a provider and choose provider Site LOV all the Supplier Site then opens in the LOV.

    Please advice.


    Thanks in advance,
    Roselyne

    Roselyne,

    Make sure you have a mapping for site beg LOV and it is question of criteria is SupplierIdFV and
    make this necessary. So that when you select Site LOV provider, it will complain if the SupplierIdFV is not set.

    Thank you

    With respect,
    Kali.
    OSSI.

  • Panel of the ADF does not variable defined in the ADF view object.

    I created a group of ADF, which allows the user to run some simple queries against a database of Oracle is using the view objects ADF and ADF view links and ADF application module.
    One of them asks detailed information of research on a database object (Table, view, or other) to dba_objects. SQL uses a parameter (: P_OBJ_NAME) which has a default value of "departments". If I run the ADF application by herself outside the ADF panel module, everything works fine, he invites me to provide a value for the parameter: P_OBJ_NAME.
    As I said the Panel contains various links to view ADF which one who must prompt the user to provide a value for: P_OBJ_NAME. When I run the Panel he does not invite me to: P_OBJ_NAME, it only uses the defined default value "departments".
    I hope that I have described my problem for everyone to understand. Of course, the question is how to make the Group ADF to prompt the user to provide a value for the parameter: P_OBJ_NAME, my waiting has been the sql of the view object and request module, both are designed to enter a value for this parameter, then the Panel should do just that, but it's not.

    Expert you would be most appreciated.
    Thank you.
    Bobby has.

    Published by: Babak Akbari, August 13, 2009 08:34

    Published by: Babak Akbari, August 13, 2009 11:12

    The instigation of a parameter is a feature that we have built in the ADF Tester - is not a default behavior that you get in your application when you have just placed a VO on your page.
    To get something like that spend the operations under the VO node in the data control palette and drag the operation "Run with parameters" to your page to drop it as a form of parameter.
    This will give your user name a place to complete the setting, then press a button to run the query.

  • Research on the transient view object attributes

    Hi all

    I have a view X object that has a one-to-many relationship with another object view Y. In there, I have a State attribute that maps to a column of table and X, I have a transitional status attribute that is not mapped to any column in the table. Implementation of line class I derive the status of the status of all the is because the logic of the State is too complicated for a SQL of x. I also search page and brought to provide the ability to search on x status but because the attribute is transient is not considered during the search. What options I have to allow the user to perform a search on an attribute that must be derived? Any suggestions are welcome.

    I use JDeveloper 11.1.1.7.

    Thank you

    Bill

    Option 1:

    If the calculation of x attribute status is too complicated for the implementation as a SQL in queries or SQL expression, you can implement the calculation in function stored in DB (for example as a PL/SQL function) and map the VO attribute to this request of the VO function. In this way, you will make the x status attribute derived from SQL instead of a transient and then you will be able to do filtering against it in the SQL query.

    Option 2:

    If the calculation is a sort of grouping or ranking/grouping and your Oracle DB, you can try to implement the calculation using some of the built-in analytical functions of Oracle, who are very powerful and useful for tasks.

    Option 3:

    If none of above works for you, you can opt for filtering in memory instead of filtering at the level of SQL in DB. You can do this by setting the mode of the corresponding ViewCriteria (i.e. your search pane is based) to 'In memory' instead of 'Database' or 'Both '. This way your VO will retrieve every x lines in memory and the ViewCriteria will filter them in memory after that. This approach is not good, however, if X contains a very large number of lines, because all these lines must be read into memory before filtering.

    Dimitar

  • With the help of objects with one fill to cut through another

    Sorry for clumsy description in the subject line. Do not know how to look for a solution to this, but it's probably pretty simple.

    This is Illustrator CS3 on Mac. Everything is on a single layer. I used the white alterations forms to fine tune black objects below. I would like to meet constantly so I can be left with the black forms (for a color simple screenshot). Is there a way to 'collapse', objects and constitute an Illustrator to eliminate white? I tried everything in the Pathfinder palette without results I'm after.

    Any suggestions?

    Thank you!

    Brad

    illustrator-problem.jpg

    a number of questions arise that I see your design:

    1. you send the file to someone to be "silkscreen"?

    2 - is any vector art?

    3. print the gray background?

    IF the gray background doesn't print - delete.

    IF all vector art - make sure that white objects are NOT defined for a recovery - make sure of course black objects are really black and not a RGB or CMYK build.

    IF you send files to someone ' one - after doing what I said above - save as PDF - using the parameters of "high quality print".

    send file

    to test the separations - try to print (assuming you have a connected printer)

  • The call for objects with specific CMYK values?

    Hello

    I'm trying to create a script that seeks paths that have specific CMYK values within a document and then changes the opacity of this path. I can clarify that he only looks for objects that have a CMYK color, but not getting anything once I have try to specify CMYK values, that I'm looking.

    In addition, should I specify that the output will be a "new CMYKColor", or is it sufficient to say "paths [i].fillColor.back = 100.0", for example, in the output. Here's what I have for this particular function:

    var docRef = app.activeDocument; 
    var paths = docRef.pathItems; 
    
    for (i=0; i< paths.length; i++) {
    
    if (paths[i].fillColor.typename == "CMYKColor" ) {
    
    if (paths[i].fillColor.cyan == 0.0 &&
    paths[i].fillColor.magenta == 0.0 &&
     paths[i].fillColor.yellow == 0.0 &&
     paths[i].fillColor.black == 20.0 &&
     paths[i].opacity == 100.0) {
    
    var NewColor = new CMYKColor ();
    
    NewColor.cyan = 0.0;
    NewColor.magenta = 0.0;
    NewColor.yellow = 0.0;
    NewColor.black = 100.0;
    paths[i].opacity = 20;
    }
    
    else {
    alert ("Object(s) not recognized.")
    }
    
    }
    else {
    alert ("Object not CMYK.")
    }
    }
    

    Thank you.

    Hi Silly-V,

    No, it's isn't weird.

    Illustrator is a bit crazy. Most of the values should be rounded off during playback. (as in this thread: Re: working on a script that will add a new work plan and remove the old if it is not a specific size)

    And if Luis Oyola can do something like this:

    var docRef = app.activeDocument;
    var paths = docRef.pathItems;
    
    for (i=0; i< paths.length; i++) {
        if (paths[i].fillColor.typename == "CMYKColor" ) {
            if (Math.round(paths[i].fillColor.cyan) == 0.0 &&
                Math.round(paths[i].fillColor.magenta) == 0.0 &&
                Math.round(paths[i].fillColor.yellow) == 0.0 &&
                Math.round(paths[i].fillColor.black) == 20.0 &&
                Math.round(paths[i].opacity) == 100.0) {
                    paths[i].fillColor.black = 100;
                    paths[i].opacity = 20;
                    } else {
                        alert ("Object(s) not recognized.");
                        }
                    } else {
                        alert ("Object not CMYK.");
                        }
                    }
    

    Have fun

  • How to regulate the movement of the if linked object with another object?

    Hello

    the man is moving and it has a bug on him. I used the motion tracker to capture the movement of the body, and then I applied the motion to the bug. Now, it stays on the body, BUT I need the bug moves on the body of many. So I need to adjust the position of the keyframes. I can not simply adjust all keyframes, and then track losing its sense of movement... Can you please guide me, how would you do? I thank.

    Michael

    Add a null value. Apply followed by the null value. Do the children of the null value bug, and animate the position of the bug.

Maybe you are looking for