ADF Toy Store - adf:inputrender - EditRenderer

hi
The ADF Toy Store Demo (*1) uses the adf:inputrender tag in the formControl.jsp page.
While trying to understand the inner workings of this adf:inputrender tag, I came across the JDeveloper Online Help topic "About Rendering Data with ADF Renderers" (*2).
(1) I couldn't find anything on the workaround for bug 3703925, as implemented in the setupDefaultFieldRenderers() method of the RegisterAction class in the ADF Toy Store Demo. But maybe this workaround is intended not to be documented.
(And by the way, there seems to be no mention of bug 3703925 being resolved in the fixlist for JDev 10.1.2)
(2) The help topic (*2) ends with a paragraph that says "The following is an example ...", but there doesn't seem to be an example.
(3) Where can I find some documentation on the default behavior as to mapping between "attribute types" and "EditRenderer"?
thanks
Jan Vervecken
*1 : http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adftoystore.html
*2 : http://helponline.oracle.com/jdeveloper/help/topics/jdeveloper/developing_mvc_applications/adf_aclientrenderingdata.html
*3 : http://www.oracle.com/technology/products/jdev/htdocs/10.1.2.0.0/1012fixlist.htm

Go to project properties and change the default package to myapp.view every newly added UIModel gets added to that package. If you do this before dragging datacontrols to pages you don't have to change things .
When a UiModel gets added to the wrong package what I do is I close the file with JDeveloper (with the red cross in the applications tab). Then I close JDeveloper. I move the UIModel file on the file system. Change the FullName of that UIModel in the databindings.cpx file to the new location. Start JDeveloper and open the file with JDeveloper again (green cross under the applications tab). I know this doesn't sound good but it works. Try it in a bogus project and if it works for you do it in your production project.
You say "(using jdeveloper)" so this might not be what you want but as far as I know this is the only way. (correct me if I'm wrong)
Joris

Similar Messages

  • ADF Toy Store : create row : problem scenario

    hi (Steve)
    While experimenting with the ADF Toy Store Demo (*1) I tried this scenario:
    (1) Use the "Sign In" icon to navigate to "Register as a New User".
    (2) Without entering data into the input fields, click the "Register" button. You will get errors for the required fields.
    (3) (You change your mind about registering.) Click on "Games".
    (4) (You see a nice game, so you still want to register.) Use the "Sign In" icon to navigate to "Register as a New User".
    (5) Be nice and fill out all the fields and click the "Register" button.
    [!] This will result in errors for the required fields (although you filled out all of them).
    My guess is these errors are related to the first "account row" that was created.
    Could someone suggest a "best practice" approach to avoid problems like these?
    thanks
    Jan Vervecken
    *1 : http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adftoystore.html
    * : using JDeveloper 10.1.2 and ADF Toy Store 9.0.5.2.31 (Built on 21-Jun-2004)

    thanks for your reply Steve
    (1st) I've updated ToyStoreServiceImpl like you suggested:
      public boolean validSignon(String username, String password) {
        System.out.println("validSignon() : begin");
        removeAnyInvalidNewAccounts();
        return getAccounts().findAccountByUsernamePassword(username, password);
      public void prepareToCreateNewAccount() {
        System.out.println("prepareToCreateNewAccount() : begin");
        removeAnyInvalidNewAccounts();
        ViewObject vo = getAccounts();
        vo.clearCache();
         * Mark the view object as insert only by setting
         * it's max fetch size to zero. Executing the query
         * when the max fetch size is zero won't actually
         * perform any query, but will mark the VO as
         * executed so the ADF binding layer will know it
         * doesn't need to re-execute it later.
        vo.setMaxFetchSize(0);
        vo.executeQuery();
        Row newRow = vo.createRow();
        vo.insertRow(newRow);
        newRow.setNewRowState(Row.STATUS_INITIALIZED);
        vo.setCurrentRow(newRow);
        System.out.println("newRow = " + newRow);
        System.out.println("prepareToCreateNewAccount() : end");
       * Purge any new but invalid AccountImpl (and associated SignInImpl) instances
       * from the Entity Cache. These could get into the system if the user visits
       * the "Register a New User" page, enters invalid data and submits, but
       * instead of fixing the invalid data, click on another link to sign-in
       * as another valid account instead.
      private void removeAnyInvalidNewAccounts() {
        System.out.println("removeAnyInvalidNewAccounts() : begin");
        EntityDefImpl def = AccountImpl.getDefinitionObject();
        com.sun.java.util.collections.Iterator iter = def.getAllEntityInstancesIterator(getDBTransaction());
        while (iter.hasNext()) {
          AccountImpl acct = (AccountImpl) iter.next();
          System.out.println("considering acct = " + acct);
          if (acct.isInvalid() && (acct.getEntityState() == Entity.STATUS_NEW)) {
            System.out.println("removing acct = " + acct);
            acct.remove();
            acct.getSignon().remove();
        System.out.println("removeAnyInvalidNewAccounts() : end");
      //...(2nd) I've followed the original problem scenario I described at the beginning of this thread:
    (1) Use the "Sign In" icon to navigate to "Register as a New User".
    (2) Without entering data into the input fields, click the "Register" button. You will get errors for the required fields.
    (3) (You change your mind about registering.) Click on "Games".
    (4) (You see a nice game, so you still want to register.) Use the "Sign In" icon to navigate to "Register as a New User".
    (5) Be nice and fill out all the fields and click the "Register" button.
    [!] This will result in errors for the required fields (although you filled out all of them).
    (3rd) That results in this output:
    prepareToCreateNewAccount() : begin
    removeAnyInvalidNewAccounts() : begin
    removeAnyInvalidNewAccounts() : end
    newRow = toystore.model.dataaccess.AccountsRowImpl@1
    prepareToCreateNewAccount() : end
    prepareToCreateNewAccount() : begin
    removeAnyInvalidNewAccounts() : begin
    removeAnyInvalidNewAccounts() : end
    newRow = toystore.model.dataaccess.AccountsRowImpl@18b
    prepareToCreateNewAccount() : end
    questions
    (1) I never seem to enter the while loop of your removeAnyInvalidNewAccounts() method, how come?
    (2) Although my scenario never signs in with another valid account, do you consider my scenario to be similar to the one you describe in your comment for the removeAnyInvalidNewAccounts() method?
    (3) In general, if creating (and inserting) new rows should be accompanied with methods like removeAnyInvalidNewEntityXs(), what would be the "rule of thumb" to determine where to call these methods? It is my impression that such methods should be inserted in different places to account for all the scenarios (paths in the application) a user can follow (and you better forget none).
    thanks
    Jan

  • ADF Toy Store demo - problem

    I have just downloaded JDeveloper for the first time and installed the ADF Toy Store demo, but when I try to run it I get:
    C:\adf\adftoystore\FwkExtensions\src\toystore\fwk\controller\ToyStoreInitModelListener.java
    Error(4,8): InitModelListener not found
    Error(5,8): UIXRequestEvent not found
    C:\adf\adftoystore\FwkExtensions\src\toystore\fwk\controller\ToyStoreDataForwardAction.java
    Error(29,8): MessageData not found
    Have I missed a step?

    The 10.1.3 EA1 release doesn't include UIX, which is definitely part of your problem, so you are better off trying the sample in 10.1.2. You don't need to uninstall 10.1.3 though; as long as you install them in different directories, the different releases can happilly coexist. I have at least five different versions currently installed on my laptop.
    Blaise

  • How can I change the colour of an adf:inputrender tag

    Hello,
    I have an jsp page with an input render tag
    <adf:inputrender model="bindings.OutDateTime" />
    Using a choose tag <c:choose> I want to change the colour of the tag if it is a mandatory field
    The test condition is simple
    <c:when test="${bindings['OutDateTime'].mandatory}">
    however I cannot see anyway of changing the colour of the <adf:inputrender> tag since it does not accept a style or styleclass attribute.
    Can someone please help me.

    I looked into this before, and at the moment there is little you can do to customize the inputrender tag, short of subclassing it and adding the functionality you require

  • Java.lang.NoSuchMethodError on my adf:inputrender tag for Date attribute

    Hello!
    Please help. I don't know how to fix this error:
    java.lang.NoSuchMethodError: oracle.adf.model.binding.DCUtil.findSpelObject(Ljava/lang/Object;Ljava/lang/String;Z)Ljava/lang/Object;     
    at oracle.jbo.html.jsp.datatags.DataTagBase.initializeUsingModelReference(DataTagBase.java:112)     
    at oracle.jbo.html.jsp.datatags.DataTagBase.initializeDataSource(DataTagBase.java:144)     
    at oracle.jbo.html.jsp.datatags.DataTagBase.internalInitialize(DataTagBase.java:274)     
    at oracle.jbo.html.jsp.datatags.InputTagBase.internalInitialize(InputTagBase.java:164)     
    at oracle.jbo.html.jsp.datatags.InputRenderTag.internalInitialize(InputRenderTag.java:77)     
    at oracle.jbo.html.jsp.datatags.InputTagBase.doStartTag(InputTagBase.java:235)
    I am using Jdev 10.1.2 and this error points to my adf:inputrender tag. I am rendering a Date attribute from my viewobject. Also this error only shows up in my deployed jsp (deployed to OAS 10.1.2). If I just run the web app in JDev 10.1.2 (using Standalone OC4J), there is no error.
    Please help!

    Hello,
    Anyone, please help me on this... by the way, I run my program without errors in JDev's OC4J, not the standalone OC4J. But when I deploy it to my server's OAS, it gets the error above whenever I load a jsp with an adf:inputrender on a Date attribute of my VO.

  • BC4J Toy Store Demo  --LoginForm.java

    Excerpted from LoginForm.java
    public class LoginForm extends ActionForm {
    private String _username;
    private String _password;
    public LoginForm() { }
    public String getUsername() { return _username; }
    Now, I changed getUsername function to
    public String getUsername() { return null; }
    in order to stop and popup error (for testing purpose).
    But it never stop and display error but proceed to success.
    What is going on?
    Thanks.
    Scott

    I opened the BC4J Toy Store source, set a breakpoint (*)on the unchanged source line in LoginForm.java of:
    (*) public String getUsername() { return _username; }Then I right-moused on the "index.jsp" page in ToyStoreController project, and picked "Debug".
    Next, I clicked on the toolbar "Signin" icon, and during the rendering of the login form HTML page, I stop at my breakpoint once.
    When I submit the form after entering a username and password, I stop again at the breakpoint.
    Did you change anything about the struts-config.xml file in the example that you're trying?

  • Toy Store related question

    I was reviewing some of the code for the toy store project and wondering why in ShoppingCart fillInCartItemDetailsUsingViewObject method the following code was use to get the view object:
    ViewObject lookup = getDBTransaction().getRootApplicationModule() .findViewObject("ShoppingCartItemLookup");
    Based on the javadoc I believe one could use the following:
    ViewObject lookup = getApplicationModule() .findViewObject("ShoppingCartItemLookup");
    Why would you choose to use one approach over the other?
    I apologize if this is a stupid question, but it appears these would do the same thing.
    Thank you.

    From the white paper:
    "View Row message bundle (ViewNameRowImplMsgBundle.java) appears automatically when you define any built-in prompts, tooltips, format masks, etc., for your view object."
    In the Toy Store Demo, you can see that there were hints created on "Userid" and "Status". You can validate it by clicking on the "Accounts" view in the navigator, double clicking on one of the 2 attributes in the Structure pane, clicking on "Control Hints", and noticing that "Display Hint" has a value of "Hide".
    HTH.
    Thanks, George

  • ADF Toy Store Demo App

    Hi experts,
    I am new in developing JDeveloper, so I search sample application and found toystore webstore application created by Steve Muench, the documentation explain to run it on Oracle JDeveloper 10g production, version 10.1.2. but I do not have it, so I try with the one I have (Oracle JDeveloper 10 production 10.1.3.0.4). After I download JUnit using Check update feature, I try to run it as said in the readme. And I get the following errors:
    Project: C:\adftoystore\FwkExtensions\FwkExtensions.jpr
    C:\adftoystore\FwkExtensions\src\toystore\fwk\controller\ToyStoreDataForwardAction.java
    Error(29,8): MessageData not found
    C:\adftoystore\FwkExtensions\src\toystore\fwk\controller\ToyStoreInitModelListener.java
    Error(4,8): InitModelListener not found
    Error(5,8): UIXRequestEvent not found
    Do someone could tell me what should I add to the lib or point me a solution. (Three errors above pointing to import oracle.cabo.ui.data.MessageData; import oracle.cabo.adf.rt.InitModelListener; import oracle.cabo.servlet.event.UIXRequestEvent;)
    Thanks

    Hi user556888
    The Toystore demo is a little outdated now. Instead why not try the SRDemo? There is a whole tutorial manual that relates to the SRDemo so it's a much better choice than Toystore.
    SRDemo is downloaded within JDeveloper by selecting the Help menu, Check for Updates option, selecting the Official Oracle Extensions link, then next, finally selecting the ADF SRDemo Application (ADF BC Version). Once downloaded it does require that database schema objects are created, so make sure you have a database to work with.
    In turn the tutorial known as the JDeveloper guide for Forms/4GL Programmers is available here:
    http://www.oracle.com/technology/obe/ADFBC_tutorial_1013/10131/index.htm
    Happing learning.
    CM.

  • ADF Toy Store Demo

    In http://otn.oracle.com/products/jdev/tips/muench/adftoystore_10_1_2.zip there are two SQL scripts, CreateToyStoreUsers.sql and ToyStore.sql. Running these in SQLPlus result in
    -two users are created, TOYSTORE and TOYSTORE_STATEMGMT
    -both users are 'empty', i.e. no tables, nothing
    -all tables et cetera are found under the SYSTEM user
    What's wrong (with the scripts)?
    The log files indicate success.
    I'm running
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    What's wrong (with the scripts)? Nothing, they are OK. You didn't connect as a toystore before runing ToyStore.sql script.
    Run the SQL script ./adftoystore/DatabaseSetup/ToyStore.sql like this:
    sqlplus toystore/toystore @ToyStore.sql

  • Toy Store Best Practice: How to implement 'cancel' for register user page

    Let's say user wants to register or (even edit) his/her account. But when forwards to register(edit) account page, he/she decides not to do it. I would like to implement 'cancel' button and return the user whereever he/she was before comming to this page.
    What is the best practice?
    Even worse, if user gets to this page and never saves the entry. The model would be dirty. And then let's say that user wants to commit something in DB, it may commit incorrect(blank) entry for created row. What I am up to, is what is the best practice to keep track if the model gets dirty and delete invalid rows in general?

    You might want to read this thread:
    Cancel operation followed by refresh raises JBO-33035
    (very similar discussion I was having with Steve)

  • TOY STORE DEMO (How to default the user name)

    When I logged on to my network I used my user name: scott.
    Now when I opened the signin.jsp page, I want the user name control box default to my network user name, i.e., scott. How can I do it? (The current demo default the user name to blank).
    Thanks.

    If you Google for os user name java site:java.sun.com you'll find the page that lists all System properties that provide info you can retrieve from a Java program.
    This info will allow you to write the appropriate line in your overridden entity object create() method where programmatic defaults are performed.
    However, this scheme won't work well for a web-based application since the code is running on the web server.

  • BC4J Toy Store Demo

    I've followed all the instructions to get the demo up and running, but I can't seem to compile any of the source in JDeveloper. I get the following errors for each .jsp
    Error(1): java.util.zip.ZipException: invalid entry size (expected 2376 but got 2334 bytes)
    Error(1): Unable to load taghandler class: /WEB-INF/struts-bean.tld
    any ideas?

    Brad,
    We've not seen this problem before. Did you download the toystore demo from OTN ?
    If you do a:
    jar tvf bc4jtoystore.zip
    does the ZIP file give any errors?

  • Date inputRender - ADF

    Hello,
    Is there documentation or a sample for getting a Calendar to work?
    The simple form that follows displays the field and the Calendar picker but the selected date does not update the field.
    &lt;html&gt; &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1252"&gt;
    &lt;title&gt;untitled&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;html:errors/&gt;
    &lt;html:form action="testForm.do"&gt;
    &lt;adf:inputrender model="bindings.CreatedOn"/&gt;
    &lt;/html:form&gt;
    &lt;/body&gt; &lt;/html&gt;
    Thanks, HB

    Removing the Google toolbar or simply setting it to "allow popups for the site" gets around the problem.
    The bigger question is why is Oracle using popup windows for this in the first place? The Google toolbar and other popup blockers are in wide distribution because people hate popup windows. One of the enhancements in Windows XP SP2 is to add built-in popup blocking to Internet Explorer. The end result is that the ADF Date InputRender has very limited usefulness in practice.

  • ADF view access from DataForwardAction - help

    Hi,
    i want to access an view object which is unrelated to any page bindings in the findForward method of a DataForwardAction class. How do i register the Application module and view objects with the UIModel for the UIX Datapage?
    At the moment, it cannot find the view object:
    ViewObject vo = ctx.getBindingContainer().getApplicationModule().findViewObject("UserRoleFunctionsView1");
    this results in an internal server error:
    oracle.jbo.NoObjException: JBO-25003: Object UserRoleFunctionsView1 of type View Object not found
    i have tried adding a data model binding on the UIModel assigned to the page, but this does not fix the problem.
    can someone please advise what the correct setup procedure is?

    The getApplicationModule() method of binding container is for upward compatibility of JClient applications coming from pre-9.0.5 JDeveloper.
    The correct way to get your application module from your DataAction, as noted in the ADF Data Binding Primer white paper and as illustrated in the ADF Toy Store Demo, is to:
    ApplicationModule am = (ApplicationModule)ctx.getBindingContext().findDataControl("YourAMNameDataControl").getDataProvider();If you have exposed custom AM methods on your client interface, you can use this instead to cast the ApplicationModule to the YourAMName interface:
    YourAMName am = (YourAMName)ctx.getBindingContext().findDataControl("YourAMNameDataControl").getDataProvider();

  • ADF Toystore question:  no blank row in viewobject on "Add" JSP form

    A new thread based on Suggestions for Automatic Commit/Rollback
    In the ADF Toystore application, I did not notice the blank row behavior in the user registration section like we encountered in the other thread posting (Suggestions for Automatic Commit/Rollback To test this, I created another instance of the Accounts viewobject (called it AllAccounts) inside the ToyStoreService app module and then created a JSP to list the contents of the AllAccounts viewobject. Then, I went to the registration page (which creates a blank row in the view object with a status of STATUS_INITIALIZED) and then without submitting the form, I clicked on the link that I created to view the contents of the AllAccounts view object and noticed that a blank row did not appear. What is causing a blank row to appear in our discussions in the other thread (Suggestions for Automatic Commit/Rollback but not in the ADF Toystore application? I guess somehow this row with a status of STATUS_INITIALIZED is being "removed" but I cannot find the code that does this.
    Steve -- any ideas?

    I was trying to figure out what would be the best practice to implement 'partial rollback'. Could not really find the example in Toy Store demo. For example if we create new account, the model will get dirty. And let's say user does NOT commit the record but rather uses link and navigates to some other pages. After some work user may commit the transaction which in turn will commit blank entry in account table. Well for the sake of example let's assume that this is possible scenario.
    So what I am up to is how to implement 'cancel' operation when user changes his/her mind and does something else rather then commit/save_changes in new/edit screens? What would be the best practice?
    What I have done so far is rather too bulky. I have implemented event handler for all my links and cancel button in data page:
       * "Cancel" Event Handler.
       * @param ctx The DataAction context
      public void onCancel(DataActionContext ctx) {
        HttpServletRequest request = ctx.getHttpServletRequest();
        BindingContext bcc = HttpBindingContext.getContext(request);
        DCBindingContainer dbc = DCUtil.findBindingContainer(bcc, "modifyAddSchedulingUIModel");   
        DCIteratorBinding studentCat = dbc.getIteratorBinding("AddModifyScheduleView1",null , "AddModifyScheduleView1Iterator");
        Row currentRow = studentCat.getNavigatableRowIterator().getCurrentRow();   
        currentRow.refresh(Row.REFRESH_REMOVE_NEW_ROWS | Row.REFRESH_WITH_DB_FORGET_CHANGES);
        dbc.getApplicationModule().getTransaction().commit();
        String target = "individual";
        ctx.setActionForward(target);
      Any other idea?

Maybe you are looking for

  • Desde que instalei o ios 8 no meu iphone 4s venho tendo VARIOS problemas!

    O iOs 8 não estava pronto ainda e acabou acabando com a agilidade e melhorias do meu 4s,ele não travava antes, não paralisava e reiniciava do nada, os aplicativos paralisam e só pegam quando é liberado, muitas vezes ele paralisa e come a bateria a ce

  • How to start BPM process WSDL from WDA

    Hello, I need to start BPM Process from SRM ECC with WDA; i have been through this link ; http://forums.sdn.sap.com/thread.jspa?threadID=1643425 also followed the pdf named 'Triggering NetWeaver BPM Process from ABAP' provided from SAP but still stuc

  • How do you upgrade an unlocked iphone 3gs

    will upgrading an unlocked iphone 3gs from 5.0.1 to 5.1 undo the "unlocking"?

  • Printing Errors from Illustrator CC

    I have been having intermitent firmware Error (900.43) on my new Lexmark MS510DN when printing from Illustrator CC. I have upgraded to the most recent version of the firmware and drivers for this printer. Also had this problem with a T642 lexmark pri

  • Problem when opening an iCloud-Numbers-Document

    Hello! I cannot open a iCloud-Numbers-Document either on my iPad, neither on my MacBook. It only shows me an error message... I hope you can help me. Thanks in advance, Stefan