ANN: Updated ADF Binding Primer and ADF/Struts Overview Whitepaper

This is now in sync with JDeveloper 10g production and features an enhanced sample application (explained in the paper).
http://otn.oracle.com/products/jdev/collateral/papers/10g/ADFBindingPrimer/index.html
Enjoy.

ADF Controller questions should be posted in the JDeveloper forum.

Similar Messages

  • ANN: Major Update to ADF Binding Primer Whitepaper

    I've published a major update to my "ADF Binding Primer and ADF/Struts Overview" whitepaper here on OTN.
    More details here on my blog:
    http://radio.weblogs.com/0118231/2004/06/04.html#a322

    ADF Controller questions should be posted in the JDeveloper forum.

  • Help with simple display and add in ADF/Struts app

    I created a simple ADF/Struts application based on the HR schema. I have a department view object and entity object based on the Departments table. From the Struts page flow designer, I create a data page action (viewDepartments) that binded to a departments view object by dragging the departments view object as a "Read-Only" form from the palette with the navigation buttons --- this page will just display the departments. Next, I created another data page action (addDepartments) that allows a user to add a department. I did this by dragging the departments view object from the palette as an "Input Form" and then dragging the "Create" operation onto the data page action. Each data page action has its own JSP of course.
    I'm noticing that every time when I go to to the "addDepartments.do" and then go to "viewDepartments.do", a blank record is added to the view object. Why is this? Also, I want the Submit button to do the "save and commit" in one step. How do I do that?
    If it helps, I can email anybody the workspace file so that you can see this behavior.
    Thanks.

    Try following this step by step tutorial to see if it will make things better for you.
    http://otn.oracle.com/obe/obe9051jdev/adftojsp/defaultendtoend.htm#t3

  • View with Bind Variable and ADF table

    Hi all,
    Please note what i have noticed. I created a view with a bind parameter, overriden the prepareSession of my Application Module to set the bind parameter and execute the query. I then created a simple jsf page and included the view as an adf read-only table. When i run the page, the prepareSession is called, sets the bind parameter, however the selected record of the table is always the second record (Not the first record).
    This behaviour can be reproduced with the HR schema. Please follow the below instructions for reproducing the problem.
    1. Create a Fusion Web Application (ADF).
    2. Create business components from tables.
    3. Create a new connection with the HR schema.
    4. Import the Departments table as an entity and then click finish.
    5. Create a view based on the Departments entity.
    6. Modify the Query to include a where clause (where DDepartmentsEO.DEPARTMENT_NAME LIKE :BindParam)
    7. Provide an order by clause (DepartmentsEO.DEPARTMENT_ID DESC)
    8. Creata a bind variable named "BindParam" of type string.
    9. Create an Application Module and include the view object.
    10. Open the Application Module Class and override the prepareSession method
    11. include the following code after super.prepareSession(session):
    ViewObject myView = this.getDepartments1();
    myView.setNamedWhereClauseParam("BindParam", "%");
    myView.executeQuery();
    12. Create a jsf page
    13. Drag the view object on the page as an adf read-only table, selecting the Row Selection, Sorting and Filtering
    14. Run the page.
    You will see that instead of the first record being selected, the second record in the table is selected.
    Can anyone please help me?
    Thank you

    First of all i would like to thank you for replying to my thread.
    Secondly, i would like to inform you that the example that i have provided is just for REPRODUCTION purposes.
    The real scenario has to do with setting the where clause with the authenticated user so that the view will query for data only associated with the authenticated user.
    The only way to overcome this behaviour is to include a view action (namedWhereClause in the page definition)
    However, this is not how i want to implement this. This was working properly in 10g

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • Login Box example and source code on adf struts and JSP

    Dear all..
    I want to make application using ADF struts and JSP using oracle 10g Jdeveloper.
    The user should login into the login box and verify everyone who has right to enter the home.jsp.
    Anybody could help me with the source code as well as the step by step explanation...
    I'm looking forward the help...

    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/reviewer/viewlets/reviewer_struts_viewlet_swf.html

  • Friendly Printed Adf struts and CVS( case 1)

    Dear All,
    these link has good example for CVS on ADF struts for friendly printed.
    Try the CSV sample (#27) at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html.
    The problem is there are no explanation in step by step fashion for new comers like me.
    I try to make the same project like the no 27 example. But the searching creteria always has a value that collected from data on the database when we run it from Jdeveloper. While on the example no 27 zip file, it will appear null and we can put the criteria there for our searching....
    Anybody can show me my mistakes and the step to solve these problems?
    Reply me soon...
    Regards
    Erie

    Please...anybody help me?
    Show me how...please...
    I'm so eager to know my mistakes...
    reply me soon
    take care

  • ADF/Struts Generated tag code variations? Struts html:text vs Html input

    Hi,
    JDev 10.1.2.1
    ADF/Struts
    I noticed that the JDev IDE generates different code for a same component/binding combination.
    Example:Data Control of type Input form with same VO selection.
    Generated code for 1 field:
    case 1)
    JSP code:
    <tr>
    <td>
    <c:out value="${bindings['TitleLang1'].label}"/>
    </td>
    <td>
    <html:text property="TitleLang1"/>
    </td>
    </tr>
    HTML output:
    <tr>
    <td>
    Short Title Language 1
    </td>
    <td>
    <input type="text" name="TitleLang1" value="Preliminary Demo">
    </td>
    </tr>
    case 2)
    JSP code:
    <tr>
    <td>
    <c:out value="${bindings['TitleLang1'].label}"/>
    </td>
    <td>
    <input type="text" name="<c:out value='${bindings.TitleLang1.path}'/>" value="<c:out value='${bindings.TitleLang1}'/>"/>
    </td>
    </tr>
    HTML output:
    <tr>
    <td>
    Short Title Language 1
    </td>
    <td>
    <input type="text" name="VB_TitleLang1" value="Preliminary Demo"/>
    </td>
    </tr>
    Case 1 generated code is obvious to me, the html name of the field equals the field binding id.
    In Case 2, the VB_ prefix is added and the binding variable references bindings.fieldName.path?
    Could someone explain me the second flavor?
    When should we use the path reference and replace the Struts html:text tag with html input tag?
    Thanks
    Fred

    I dont think you can mix static values and rt expressions together in attribute values.
    String onBlurString = "dontLeaveItEmpty(this);referenceEntered(" + recordNumber + ")" ;
    html:text styleClass="textFieldInTable" name="refrences" property="referenceName" onblur="<%=onBlurString%>" />cheers,
    ram.

  • LOV Databinding on ADF Struts

    Dear All..
    I want to migrate my report application from Oracle report into Java with ADF and struts.
    my report application on oracle report I made the parameter to display the data using these query
    select a.Salesno, a.salesdate, a.prodcode, b.prodname, a.qty
    from sales a, products b
    where
    a.prodcode = b.prodcode
    and
    a.sales date between :p_date1 and :p_date2
    and
    a.prodcode between :p_prod1 and :p_prod2
    while P_date1, P_date2, P_prod1 and p_prod2 are the
    parameter to display data. the parameter itself using
    the combo box.
    How to make these simple things on ADF struts using LOV data binding with step by step configuration..
    Hope anyone can help me to learn about these...
    thanks you

    Erie,
    have a look at the Jdeveloper website (otn.oracle.com/products/jdev). There are howto documents written that explain the use of LOVs.
    Frank

  • How to use ActionForm validate() method in ADF/Struts project

    Hi
    We are developing a project using ADF/Struts. We are not planning to use entity level validation. Rather we prefer to have it at Struts Form Bean level. So we need to have validate() method in Form Bean.
    That mean we need to have seperate bean for all the actions /jsp. The ADF's DataForm form bean is not gonna work for us. Is that correct.
    Please let me know...am I in the right direction.
    That could be a different discussion why we don't prefer entity level validation

    You can use the Struts validator plug-in (there's a howto on doing that on OTN) and it will handle the basics for you through XML definitions.
    If you want to specifically have a Form bean with a Validate() then the issue is that the current "DataForm" is a generic bean driven of the databinding files, so yes you'd have to write a bean per screen to use instead and loose that benefit of having a universal Bean. (Internally the DataPage and DataActions will respect the ActionForm APIs so you can pluf your own ActionForm subclass in with no problem.
    Plan B might be to leave the DataForm Bean in place and instead override the lifecycle of the datapage, probably in prepareModelUpdates()

  • ADF Struts on Login Box with User on DB

    Dear All,
    I read the respond on my last post about the login box and it was help me a lot.
    Now, my problem are how to make a login box on ADF Struts technology which the username and password verification from user and privilage on oracle database?
    Noone can connect to menu and the privilage from oracle database regulate the data that will be display.
    I hope somebody will help me with the step by step configuration. I'm new in these technology...
    Thanks a lot

    this is probably a question for the JDEV forum.
    Regards
    Grant ROnald
    Forms Product Management

  • ADF Struts JSP SelectList

    JDeveloper 10g JSP, Struts and ADF application.
    I am developing a search form that has a number of criteria fields one of which is a selectlist.
    The code that is generated when I drop the data control as a single select list onto the jsp page is as follows:
    <html:select property="SearchCodeType">
    <html:optionsCollection label="prompt" value="index" property="SearchCodeType.displayData"/>
    </html:select>
    The list is populated and I can select a value, however the value I need is the value of the prompt not the value of index (the prompt is a string) to be assigned to the parameter SearchCodeType when I submit so I can use this when adjusting the where clause of my view object to return the correct results.
    I am looking for a Struts/ADF/JSP solution.

    Have you guys find a way to save(commit) the multi-selection that is created as a part of the list. Steve Muenek put me in the right directions but if you guys have find a way or code please let me know since the time is running short and I would hate to move to another tool to get this functionality.
    I have the implementation methods using BC4J/View Object and do understand I'll need to override the create() method but just don't know how to read the records using the iterator or from the array of strings that is saved after the user has created multiple selections.
    We are using ADF Struts at least for now.
    Thanks a lot,
    Kamran

  • Adf Struts + Logon + Security

    Hi All
    I have developed an adf web application and have some questions about logging on and security. I have read the jaas security documents and understand the process. The application will have several users.
    My question is what is the best way to log users onto the model layer.
    Should I use one username and password for the schema and deploy the application and maintain a user table and use the jaas security with this. Will I get record locking ?
    Should every user get there own schema username and password and pass this username and password to the app module logon ?
    Anyone got any other suggestions ?
    Can anyone give me some advice on what ways they have handled user logons to an adf struts application.
    Any help would be greatly appreciated.
    Thank you
    Darren

    Hi,
    Should I use one username and password for the schema and deploy the application and maintain a user table and use the jaas security with this. Will I get record locking ?
    Actually the account a user authenticates with is not the account he works in. In web applications it is common to use a shared application account to access the database.
    If you want to keep the user security provider as a table in the database then you can do this as well, with no risk of locks
    Anyone got any other suggestions ?
    Use container managed security with a JAAS login module that authenticates the user against the database table. This decouples application logic from security logic
    see: http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfstrutsj2eesec.pdf
    Frank

  • [freelance job] Experienced ADF/Struts/JSP View-Controller developer

    Hi,
    I'm looking for a freelance "10.1.2 JDeveloper":
    - First task: Development of multi-lingual Struts View and Controller for login, logout, contact, free registration(create/modification of account info, new password, ...) pages.
    Period: may, june 2005 and more if first collaboration is succesful.
    Skills on following technologies are required:
    - View: Struts tags , Struts-el tags , JSTL , JSP , Servlets => no javascript, no UIX, no faces
    - Controller: ADF/Struts
    - Model: Oracle ADF-BC 10.1.2 Oracle 10g Database
    We provide the static html pages + css files and the ADF-BC model components.
    We develop/enhance the Model service methods based on your requirements.
    You "translate" the static html pages to Struts/Struts-EL/JSTL/JSP and the necessary ADF-Struts controllers that inter-act with our ADF-BC Model.
    Contact: [email protected]
    Regards
    Fred
    PS Sorry for polluting this technical forum with this kind of request.

    Dear all..
    I have change the block program, but still can't run..
    My EmpAction.java like these
    ==============================================
    package BindTest7.view;
    import BindTest7.model.EmpViewImpl;
    import java.text.DateFormat;
    import java.text.ParseException;
    import
    oracle.adf.controller.struts.actions.DataActionContext;
    import
    oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import java.util.Date;
    public class EmpAction extends DataForwardAction
    protected void prepareModel(DataActionContext ctx) throws Exception {
    super.prepareModel(ctx);
    ctx.getBindingContainer().findIteratorBinding("FindEmpView1Iterator")
    .setFindMode(true);
    public void onSearch(DataActionContext ctx) {
    ctx.getBindingContainer().findIteratorBinding("EmpView1Iterator")
    .executeQuery();
    //-public void onFilter(DataActionContext ctx)
    //recovery view
    ApplicationModule
    am=ctx.getBindingContainer().getDataControl().getApplicationModule();
    ViewObject EmpView=am.findViewObject("EmpView");
    //recovery dates
    String
    d1Str=ctx.getHttpServletRequest().getParameter("hiredate");
    String
    d2Str=ctx.getHttpServletRequest().getParameter("endDate");
    java.text.SimpleDateFormat formatter =
    new java.text.SimpleDateFormat("dd/MM/yyyy");
    Date d1=null;
    Date d2=null;
    // parse method could try a ParsingException,
    // it doesn't happpeend when dates are correct
    try
    d1=formatter.parse(d1Str);
    d2=formatter.parse(d2Str);
    catch (Exception e)
    //set where clausole
    EmpView.setWhereClauseParams(null);
    EmpView.setWhereClause("Hiredate>=:1 and Hiredate<=:2");
    EmpView.setWhereClauseParam(0,d1);
    EmpView.setWhereClauseParam(1,d2);
    EmpView.executeQuery();
    ===============================================
    Please help me....
    I just want to make a little modification on Steve Muench's Example
    by placing two input form for hiredate column so that
    the user only put the date
    on the query " between hiredate :1 and :2
    I'm waiting...
    regard
    erie

  • Problem commit w/intermedia adf struts uix & 1 step submit/commit to user

    JDev 9051, ADF, Struts, ix & Intermedia
    Problem:
    Inserting intermedia data type (ORDSYS.ORDIMAGE) AND wanting the "commit to happen behind the scenes" so the user does not have to press submit and then commit.
    I am having a problem committing a record to the DB when the form contains an intermedia data type. If I do not fill in the image column (using file upload) it works fine. My work around for now is to commit twice.
    To create a new entry that contains intermedia data type (ORDSYS.ORDIMAGE) I am using the following flow of events.
    NOTE: THIS DOES NOT WORK IF I UPLOAD AN IMAGE, HOWEVER, IF I LEAVE THE IMAGE COLUMN BLANK IT WORKS FINE.
    01. start at browseInventory.uix
    02. press create button which triggers event named createInventoryEvent
    03. which gives control to createInventoryFoward
    04. which fires Data Action named createInventoryAction
    05. which forwards to formInventory.uix
    06. user supplies data and presses the submit button which triggers event named commitInventoryEvent
    07. which gives control to commitInventoryFoward
    08. which fires Data Action named commitInventoryAction
    09. which forwards to browseInventory.uix
    NOTE: THIS WORKS IF I DO UPLOAD AN IMAGE (COMMIT TWICE)
    01. start at browseInventory.uix
    02. press create button which triggers event named createInventoryEvent
    03. which gives control to createInventoryFoward
    04. which fires Data Action named createInventoryAction
    05. which forwards to formInventory.uix
    06. user supplies data and presses the submit button which triggers event named commitInventoryEvent
    07. which gives control to commitInventoryFoward
    08. which fires Data Action named commitInventoryAction
    09. which (on success) fires Data Action named commitInventoryAction_2
    10. which forwards to browseInventory.uix
    BTW - is there some codes I can use to display an image (Struts Config - Page Flow) on the OTN forums if I am hosting the image?
    Thanks,
    Bill G...

    Did you ever get a soluction for the duoble commit thingie?
    cause I cuirrently have the smae problem. It seems that it uses the first commit to instantiate the object, and the second commit to actually upload it to the database.

Maybe you are looking for

  • Printing Barcode in Dot Matrix Printer

    Dear Experts, We have developed Smart form to print Barcode and it's printing fine in LaserJet printer & readable by the scanner,  We need it on Dot Matrix printer for (multiple copies) and tried the same with Dot Matrix printer it use to print but n

  • Audigy 2 zs soundblas

    I have an audigy 2 zs soundblaster and a 6. surround sound Logitech speaker system, but only the front center speaker is working. I also have lost the cd that came with the card, but i have installed the new driver update. If anyone knows of any down

  • Snapshot for packages

    Hello All, Can anyone guide me on how to create snapshots for packages? Really appreciate it. Thanks.

  • Detection of nic card

    Hi there I just installed solaris 9 on my hp vectra pc, I got it up and running but it doesnt detect the network card, I have a belkin network card, is there anyway I can get that card detected under solaris 9. If yes then how. Samir

  • O2 Refunds - How Long

    So in April I finally had enough of o2's DREADFUL network. A network where of you were on the edge of 4g then calls and texts would fail. A network where you may see h+ on your phone but with no capacity behind it, it wouldn't work. A network where s