Code of Coders - View Accessors

Hi.
My goal is to show some data from static list which is like Code of Coders in another view object.
I'm using Code of Coders. This is just one database table for all my coders that exists in my application. This is like in [FOD/Store Front Demo|http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html] LookupBaseVO.
My table structure is CODE_ID (sequence), CODE (String), TYPE (String) and NAME (String).
Now I have special application module (like in FOD/SFD) which has special configuration just for these static lists which actually live in database.
I have one ViewObject which has X different View Criterias, where X is number of different TYPEs in Coders table.
Each of these VC has own instance of VO in that special AM.
I have created view object myVo which have attribute Status. Now I want to show name for that status from that special instance of VO. For that purpose I have tried to use View Accessors on myVO. Before that I have create View Criteria which has bind variable P_CODE = CODE. When I have defined View Accessor I choose this VC whit bind variable. On Bind Parameter Values property I set Value of that code.
Then I created new transient attribute called StatusName and I have also created Java class MyVORowImpl with accessors included. And source of getStatusName() looks like this
    public String getStatusName() {
        RowSet status = getAppModule_Status1(); //This is ViewAccessor's name
        status.executeQuery(); //Execute query with already defined P_CODE where param
        Row row = status.first();
        return (String) row.getAttribute("Name");
    }Now when I run main AM there is an error
(java.sql.SQLException) Attempt to set a parameter name that does not occur in the SQL: P_CODEI can't figure it out what is wrong. Actually I'm wondering how to show data from static list in another VO?
Thx,
Regards
Boris

Yes, you can use DBMS_METADATA package.
This link will provide a very good idea about what you are trying to do:
http://www.dbasupport.com/oracle/ora9i/DDLgen.shtml

Similar Messages

  • Auto-Refresh and Order By for view accessors

    Hi,
    We have set auto-refresh to true on a VO(LovVO) in shared AM and used the same to create an lov in another VO. Now if we have Order By in LovVO then we get the exception:
    ORA-29983: Unsupported query for Continuous Query Notification
    This is because of the Order By clause. When i remove the order by then there is no error. But we need the data to be ordered. So I have added the below code LovVOImpl.java executeQueryForCollection method:
    if(this.getSortBy() == null){
    this.setSortBy("Name");
    super.executeQueryForCollection(object, object2, i);
    and this is working fine. Is there any other declarative solution for this scenario?
    I tried setting the order by in the view accessor but that also appends to the sql query and throws the above error.
    Thanks
    Thiru

    Please see http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_cqn.htm#CHDGEBFH. Look like OREDER By is supported only in Best-Effort mode.
    When you call .setSortBy("Name"), it happens in memory not part of SQL, apparently that works

  • Multiple view accessor in entity displaying wrong

    In an entity.xml file I need to define several view accessors to use for List Validation.
    However, when I add more than one view access to the entity and go to define the List Validator for the attribute (this dialog box is called "Add Validation Rule for: Attribute"), the display is all screwed up; the view accessor names are overlapped or some are missing.
    Does anyone know how to fix this or can recommend a resonable work-around.
    Thank you.

    Hi,
    Detail Rule, copy attribute value form master.
    In DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    super.create(attributeList);
    Master rule, set flag to 0 if no details else set to 1.
    In the MasterEOImpl added method to check if detail row exists based on Row Iterator => no db retrieval?
    This method also sets the flag accordingly:
    protected void checkHasOtherDetails()
    oracle.jbo.RowIterator ri = this.getRetrieveFromdetail();
    ri.last();
    // last() must be called else hasNext() returns true even on last delete ???
    Number hasDetails = Constants.NUMBER_NO; // = 1
    if (ri.hasNext() || ri.hasPrevious())
    hasDetails = Constants.NUMBER_YES; // = 0
    if (!getHasDetailsFlag().equals(hasDetails)) {
    this.setHasDetailsFlag(hasDetails);
    I call this method in the remove method of the detailEOImpl:
    public void remove()
    this.getRetrieeFromMaster().checkHasOtherDetails();
    super.remove();
    To set the flag I added follwoing code in the create method of the DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    **** ADDED ***
    Number masterHasDetailsFlag = getRetrieveFromMaster().getHasDetailsFlag();
    if (!masterHasDetailsFlag.equals(Constants.NUMBER_YES)) {
    getRetrieveFromMaster().setHasDetailsFlag(Constants.NUMBER_YES));
    super.create(attributeList);
    One more question:
    Is there a danger of calling last() on row iterators in create/update/remove methods of *Impl files?
    => current row changed => any effect on display in JPanel
    Thanks
    Frederic
    PS All variable/method/class names have been manually renamed in this code so some small syntax problems may exist.

  • ADF View Accessor Validation with Bind Variable

    Hi
    I need to solve the following requirement using a view accessors and bind variables;
    1. User can select a value for a attribute from LOV which is unfiltered.
    2. User can manually edit code into the same attribute as in 1 above, which needs to be validated.
    As the data set for the attribute is large, I need to be able to validate 2 using a query with a where clause.
    My approach has been;
    1. I have a view object for the source lookup table, ProductVO.
    2. I have created a view criteria on ProductVO that accepts a bind variable, pProductCode.
    3. On my OrderEO I have a attribute, productCode.
    4. I create a new view accesor on the OrderEO using the view criteria created in point 2.
    5. I have lft the bind variable parameter blank, as I need to be able to dynamically pass a product code at run time.
    6. On my OrderVO for the productCode attribute, I have create a LOV, based on the ProductVO. This will ensure that the user can view and search all products if needed.
    What I am not getting working;
    1. How can I pass the attribute value to the view accessor at runtime when the value is manually captured.
    2. Ensure that if a value is selected from the LOV, that the view accessor validation does not get invoked.
    What I have tried to solve point 1;
    1. I created a validator on the productCode attribute on the OrderEO as a list validator using the view accessor as my list. I am not sure how to get the bind variable populated. Leaving out the bind variable, I assume, would cause the value to be validated against all my products.
    2. I then tried using a method validator and passing in the productCode value and querying the view accessor.
    3. I have not yet tried using Key Exists, is this maybe the missing link/trick?
    All help will be considered a early christmas gift!!

    Hi
    I have found that when using validation type Key Exists and the VO is in the local application, then the bind variable is available in the Create Validation wizard. When I try and create a validator on a VO that is core to all my applications, then I put that VO into an ADF library, the bind variable parameter is not available for mapping to my entity object attribute, even though I can select the VO to create a view accessor from the ADF library.
    Possible bug?

  • How to create transaction code for maintenance view

    hai friends,
    i hope every thing goes good.
    i have doubt, how to create transaction code for maintenance view. I created view for tranperant table and now i want to create transaction code for the view.
    i tried and i donot know the screen number and program name and where can i give the view name.
    if any one know please post in details.
    thanks in advance.

    Hi Elam,
    You need to create a "Parameter Transaction".
    What this means is that you will have a transaction (let's call it "ZMAINT") which calls "SM30" and passes in your table name.
    Go to transaction SE93 and enter your new transaction code. Enter in the Tcode description and choose "Transaction with Parameters" (it shouldbe the last radio button).
    Enter in the default transaction "SM30" and tick the "Skip Initial Screen" check box. Hit Enter.
    Now scroll to the bottom of the screen and you will see a Table Control where you will need to enter in the values to the SM30 selection screen.
    Because you hit ENTER, the program will have loaded in the Selection Screen parameters into it's memory. Hit the drop down for "Name of Screen Field" and select "VIEWNAME" and then enter in your Z Table in the "Value" column.
    Now go to the next line and hit the drop down and select "UPDATE" in the "Name of Screen Field". Enter in a "X" in the value column.
    Now save the transaction and there you have it.
    Hope this helps.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • Add new code in classification view under material master

    Hi Experts!
    I need to add new code in classification view, MM03 for class ZZLOCAL. Can anyone guide me to the path?
    Please help..
    Thanks.

    this is not customizing, this is standard master data maintenance.
    Easiest way to find the menu path is by entering search_sap_menu into the command field.
    then you are prompted for search text. here you can either enter a transaction code or a name of transaction.
    SAP will give a list with all menues and paths to reach this transaction

  • Af:iterator and view accessors with bind variables

    I have a page with an af:iterator where I list up each row in a form layout. On each row there are 2 SelectOneChoice items where the current value is provided by the row. The 2 LOVs are Master-Detail-LOVs. The value of the first one restricts the values of the second one.
    Each LOV is represented by a LOV view object in a shared application module. The view object for the second LOV contains a view criteria with a selection on the column where the value is provided by the first LOV. The value for the restriction is passed via Bind Variable.
    <af:iterator id="i_images" value="#{bindings.Image.collectionModel}" var="row" rows="0" varStatus="vs">
    <af:selectOneChoice value="#{row.bindings.Master.inputValue}" label="#{bindings.Master.label}" id="soc_master" autoSubmit="true">
    <f:selectItems value="#{row.bindings.Master.items}"
    id="si3"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{row.bindings.Detail.inputValue}" label="#{bindings.Detail.label}" id="soc2" partialTriggers="soc_master">
    <f:selectItems value="#{row.bindings.Detail.items}"
    id="si2"/>
    </af:selectOneChoice>
    The view accessor for both LOVs have the settings:
    Row Level Bind Values = true
    SharedInstance = false
    BTW: If I modify one the two view accessor the value for Row Level Bind Values disappear.
    The value for the bind variable on the view accessor is "Master" like the name of the column.
    On loading the page for the first time the LOVs and the values are properly resolved. The master LOV provides the list with all values and the Detail LOV is restricted corresponding the value of the Master LOV. Upon changing the value of the Master LOV the Detail LOV is reloaded, because of the partial trigger, but now the Detail LOV contains all the values as if now View Criteria has been provided.
    We implemented this scenario in an af:query and it worked fine. Are there any restrictions for View Accessors when using an af:iterator??
    Any help is appreciated.
    Thanks,
    Thomas
    P.S.: We're using JDeveloper 11.1.1.4.0
    Edited by: thomas.matzke on Apr 20, 2011 10:07 PM

    Hi Thomas,
    You may be hitting an error that is discussed in the following blog: http://andrejusb.blogspot.com/2011/03/adf-bc-dependent-lov-11g-ps2ps3-bug-and.html
    Hope this helps!
    Russell

  • View Accessors

    Hi
    I have a task flow that have a method call ExecuteWithParam. In the View Object has an attribute that has a LOV. In this LOV query have a Bind Variable.
    In ViewAccessors, the value of Bind Variable I spend so:
    adf.context.sessionScope.client
    This attribute is a combo in the interface.
    In the first passage through the Task Flow behind him the right values, but when I get out of this Task Flow and must get in again, this combo does not have any value. And at the end of the task-flow, I remove the session after commit.
    What can it be?
    In View Accessors I can pass the value of Bind Variable without using sessionScope?
    Thank you
    Marcos Vizine

    Hi,
    when you drag and drop execute with params as a method binding in a bounded task flow, you can use EL to reference a memory scope that belongs to the task flow (e.g. pageFlowScope.client}. Yo then create an input parameter for the task flow which value you set to pageFlowScope.client. This way, each time you start a task flow you can pass in the client value and it will be found when executing the query
    Frank

  • Japanese character in Code Editor of "View" is shown as Question Marks

    Hi All,
    I have a probelm where I tried to create a view having decode function as shown below:
    decode(A.resource_process_name,
            'ザイコ', 'Inventory',
            'PP良後', 'Wafer BE',
            'PP良前', 'Wafer FE',
            'PP良済', 'Wafer',
            'PP良引', 'Wafer in transit',
            A.resource_process_name
      ) as step_code
    Data type of A.resource_process_name is NVARCHAR2. Data in "STEP_CODE" column is displayed correctly after translation using decode function when I run select statement of this view. I don't have any issue till this point.
    But problem happens when I try to see/open the script/code of this view in the SQL Developer (Right click view --> Edit...). It shows me the code of decode function as shown below:
    decode(A.resource_process_name,
            '¿¿¿', 'Inventory',
            'PP¿¿', 'Wafer BE',
            'PP¿¿', 'Wafer FE',
            'PP¿¿', 'Wafer',
            'PP¿¿', 'Wafer in transit',
            A.resource_process_name
    Can you please suggest whay should be done so that the code should be visible in it is original format i.e., it should show decode function with Japanese characters?

    It might be better to ask this question on an Eclipse forum. I have a couple of suggestions, but none of them have made the output in my console look entirely correct:
    1. Try to start Eclipse with these parameters: -vmargs -Dfile.encoding=UTF-8
    2. Try switching the font settings for the Console under Preferences in Eclipse.

  • Which is better creating view accessor based on view object or view instanc

    When creating view accessors whether in the entity object or in the view object, we have two options:
    1- create the view accessor based on a view object.
    2- create the view accessor based on a view instance.
    what are the differences between these two options?
    what are the cases where I should only use option 1 or option 2?
    which one is better?

    Hello Timo,
    I will try to explain my question better.
    when we create view accessor, after click on create new view accessor icon, the create view accessor window is opened, at the header of this window there is a statement says:
    Select a view object or shared view instance and shuttle it to the selected list to create a view accessor.
    and here is my concern, which one to use
    1- select a view object from one of the available view object and shuttle it to the selected list.
    2- select a view instance from the application module and shuttle it to selected area.
    If you have FOD sample (and I am sure you have it :) ), I see that oracle team has used both of them in different places, for examples
    1- in oracle.fodemo.storefront.entities.PersonEO all view accessors are created from view instance in SharedLookupService application module.
    <ViewAccessor
        Name="PersonTypesVA"
        ViewObjectName="oracle.fodemo.storefront.lookups.LookupsBaseVO"
        AMUsageName="SharedLookupService"
        ViewInstanceName="PersonTypes"/>is it because they are used to create LOV?
    2- in oracle.fodemo.storefront.entities.OrderEO the view accessor is created from a view object, not from instance inside application module.
        <ViewAccessor
        Name="OrdersVO"
        ViewObjectName="oracle.fodemo.storefront.store.queries.OrdersVO"/>I couldn't find the usage of this accessor?
    Hope it is clear now.

  • To Find transaction code for maintenance view J_1BT001WV

    Hi Gurus,
    I have to find transaction code for maintenance view J_1BT001WV. Plz tell me how can i do it.
    regards
    Rajesh

    Hello Rajesh
    There are no specific transactions defined for this view (except for SM30 ).
    The IMG activities where the view is used are (check OBJSUB ):
    SIMG_ORFB_J_1BT001WV (Assign business place)
    J_1BASSBRANCH (Assign CGC branch to plant)
    In order to find the view in the IMG call transaction SM30, enter the view and push button Customizing.
    The following activites are found on ERP 6.0:
    South Korea: Basic Settings for Value-Added Tax     Assign Business Place
    Business Place (Generic)                                        Assign Business Places to Plants
    Official Document Numbering (Indonesia)                 Assign Business Places to Plants
    Nota Fiscal                             Assign Business Places to Plants
    Official Document Numbering (Thailand)                    Assign Business Places to Plants
    Regards
      Uwe

  • Access programmatically view accessor

    hello,haw can i access programmatically view accessor of LOV in backing bean.

    Which jdev version do you use?
    What is your use case?
    What kind of LOV are you talking about?
    Timo

  • Problem with code and design view

    When I try to have both the code and design view
    side by side in Dreamweaver CS4 on a PC -- I get the html code in both sections.
    How  do I see the layout while looking at the code?
    Thanks for help.
    Library Friend

    You've probably got View > Split Code checked.
    Click View > Code and Design

  • Protecting code from design view?

    Can you configure the tag pattern that tells Dreamweaver to
    "leave this code alone in design view"?
    Dreamweaver does a good job of respecting code blocks (PHP,
    ASP, whatever) in design mode. However, we're going to have some
    people develop Smarty templates with Dreamweaver, so I need to
    specify the tag pattern of stuff that should only be accessible in
    code view.
    Is this possible?

    I found out how to do this. Open
    "configuration/ThirdPartyTags/Tags.xml". Add a new "directive_spec"
    tag there, defining the start and end tags. I also specified an
    icon to replace the code in design view.
    Works beautifully.

  • Combined code and design view broken

    I use Dreamweaver MX 2004 and normally work in the "split"
    (code and design) view. I just opened a site to work on it and that
    mode does not work - I click on the link in the toolbar, but it
    does not take effect. I also cannot make it work from
    View-->Code and Design. The individual Code and Design views DO
    work so I suspect it's a configuration problem. I checked
    Edit->Preferences->Filte Types/Editors, and .html is not
    listed in the "open in code view" dialog box. What would cause this
    feature to suddenly stop working? I've Googled every conceivable
    keyword and phrase to find an answer, without success. Has anyone
    else experienced this behavior?

    Never mind - figured it out. Duh, do I feel like a dummy! I
    had apparently dragged the bottom border of the code window all the
    way down, so the design view was hidden. Sorry!

Maybe you are looking for