Model Object / Business Logic question

Hello,
Question about how to architect the model objects and services in our system. We are defining our own Model Object / Transfer Objects without the use of an ORM tool (long story). Some of these model objects have to maintain Association objects such as:
public class Teacher {
     private List<StudentAssociation> kids;
public class StudentAssociation {
     private Teacher teacher;
     private Student student;
     private Date fromDate;
     private Date toDate;
     // Getters / Setters ....
}My question is, where should the logic be to add, remove student associations? Originally we had it defined in the Teacher model object with:
public void addStudentAssociation(Student student, Date fromDate, Date toDate);
public void removeStudentAssociation(Student student, Date fromDate, Date toDate);But I am hesitant to put such logic in the Model Object. I always thought those should be pretty empty of any sort of business logic. Instead I want to have a TeacherService that does that and instead just a getter/setter on the Teacher object for the Association List. However, in doing that, I find I have to create a new List of Associations then call the setAssociations method on the Teacher object, which seems kind of strange.
Is it bad to put the add/remove method in the model object itself? The remove logic has a bit of business logic in it, so it seems weird being there.

Not sure I can be of much help, but here's my two cents worth:
You have a teacher object and student object. A teacher doesnt really have an association with a student. I think you need another object such as a class object. I class has a teacher and the students (an association can be a business association, social association, etc). That same teacher may be assigned to other classes (provided they dont occur at the same time since the teacher cant be in the two classes at the same time. Likewise, for a student. Complicating things is the fact that a teacher of one class may be a student in another class. Also, a class may exist that has students but no assigned teacher yet (your original idea wouldn't be able to handle this since you will need a teacher before you add students). Another case, you have a class without students. Still another case, you have people (either future students, or teaching staff that haven't been assigned as teachers yet), but no classes yet., I think it would be best to figure out a database schema first (you can use Oracle Lite, MySql, etc).
here is an example:
Assuming you are putting this in a database I would create tables and fields something like this:
Person ((a person is either a student or teacher, or just someone that is no longer a student or teacher but may be one day))
personId not null
firstname not null
middleName nullable
lastname not null
ssn not null
Class ( a class is where a teacher teaches students))
classId not null
nameOfCourse not null
building nullable (may not be assigned yet)
room nullable (may not be assigned yet)
startDate ((when the class starts)) nullable
endDate ((when the class ends)) nullable
teacherId ((this is the parentId from the person table)) nullable
Students
personId ((this is the personId from the person table))
classId
associations:
a class has 0 or 1 teacher,
0 or many students
a teacherId must exist in the person table as a personId
a studentId must exist in the person table as a personId
(if you delete a personId in the person table, it cascades deletes any teacherId or studentId of the same value)
your class has a collection of students. therefore:
private List<Student> students
Your class will also have something like
addStudent(Student student) (throw exception if student already exists) (note you dont pass in the start and
end date since its the class's responsibility for start and end date, not student)
isStudent(Student student) (return true if student is already in class, false if not)
deleteStudent(Student student) ((returns true if student found and deleted, false if student not found to delete)
Your business logic can check things such as if the start date occurs before the end date (an error), you have a class with no teacher or no students, etc. The first case you can do in the database with constraints if you want, but the second you cant since you want to store info for a class even if a teacher isn't assigned to it yet.
One way to do this is to have a validate() function in your class object. The validate() function checks such things as a class with no teacher and returns a collection of warnings if it finds anything wrong. All the above is just something off the top of my head. So there may be some issues with my approach that you will have to work out.
Good Luck!

Similar Messages

  • Best Practice Question - Business Logic in Value Objects?

    Just wondering what people's thoughts on best practices for setting properties of Value Objects.
    For instance, I have several getter/setters in one of my Value Objects with logic in the setter that uses the value to set values of other properties.
    For example, I have a Value Object that has the following properties:
    category (of type Category, which is another Value Object with properties "name" and "id")
    categoryId (of type int)
    categoryUpdated (of type Boolean)
    I have a collection of Category Objects in the Model. When I set the categoryId of this class, I set the "categoryUpdated" to true, and dispatch an CairngormEvent to that find the "category" with the specified "categoryId" and set the "category" property to this item.
    So what is the best practice? To simply make the "categoryId" a public variable, and create a new Event/Command to perform all this logic? Or is it ok to do it all in the Value Object setter?
    Thanks.

    Hi Eric,
    I can't speak for best practices, but the only logic I've ever added to a VO were getters: an example was a set of getters on an airline flight VO to get overall flight departure/arrival times/cities from an array of flight segments in a property of the VO.
    I feel uneasy (in the nicest possible way) about your VO for two reasons: firstly it has a strong dependency on bits of the Cairngorm framework to look up the category (and VOs normally don't need to depend on anything), and secondly the intent of Commands in Cairngorm is more to represent user gestures than to wire up VO properties (I often see people shoehorning stuff into Commands that might be better of as plain old business utility classes). I would rather see an UpdateCategoryCommand (that's what the user is trying to do?) that updates categoryId and hits a delegate to populate the category property.
    That said you might have a very good reason for doing this. Could you tell us where the code is that's setting categoryId, and if anything is using categoryUpdated?
    Cheers,
    Robin

  • Data dinding to non JFX objects - bind to business logic

    Hi,
    I want to seperate my underlying model clearly from JavaFX. This obviously means, that my model is plain Java. So I tried to bind the selected-value of a checkbox to a boolean value of a field of one of my Java classes. Unfortunately this does not work. Is this true? Is a binding only possible to variables which are defined inside a .fx file?
    And as another question, do you know a good tutorial concerning the usage of existing business logic with JavaFX?

    Hi raltlan,
    You says: you can't bind directly to Java classes.
    I didn't understand exactly, what you mean.
    I'm developing an application, that confirms to MVC pattern.
    It seems, it's well possible to keep data and presentation layers separated, even with JFX SDK ver. 1.0
    As far as I understood:
    You can bind to any Java classes.
    Here, better if we distinguish between Java's UI and non-UI related classes.
    Using UI-related Java APIs needs a little bit more coding (there are good samples available about how to do it.)
    Binding to instances of non UI-related Java classes is easy. See Blog of Michael Heinrich at following links about JFX – Java interaction:
    http://blogs.sun.com/michaelheinrichs/entry/writing_java_for_javafx_part (Writing Java code for JavaFX Script)
    ... and for other direction of interaction:
    http://blogs.sun.com/michaelheinrichs/entry/using_javafx_objects_in_java
    Taking care about direction of Java - JFX interaction is helpful to avoid problems (and unnecessary loose of time).
    As already known, it's better to embed Java code into JFX code (JFX code calls Java code).
    Regards,
    Asghar

  • Problem in creating a callable object of type Business Logic

    Hi SDN,
    I am trying to create a callable object of type Business Logic in CE.
    When I give all information and click Next, I get this error message.
    Error while loading configuration dialog: Failed to create delegate for component com.sap.caf.eu.gp.ui.co.CExpConfig. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Can anybody help me out with this problem.
    Regards,
    Sumangala

    Hi.
    I'm having the same problem as Senthil in NW2004s SP15 with my application service and methods not showing up in the Callable Object wizard for Composite Application Services after I choose the Endpoint.  The only application name that shows up in the wizard is caf.tc, and the only service names that show up for it are LDDataAccessor, Metadata, and PropPermissionService.
    My IDE is on one machine and the application server I deploy to is located on a different machine.  My endpoint to the remote application server looks to be correctly configured.  The Composite Application Service seems to be deployed properly as I'm able to see it and test that it works in the Web Services Navigator <http://remotehost:50000/wsnavigator/>
    My deployed application service is a remote enabled service and is also web services enabled as well.
    I'm not sure if this is relevant, but I noticed that the generated Java code does not create any remote EJB interfaces (only home and local interfaces were generated).
    Something else I noticed is that when I proceed to the External Service Configuration -> Business Entities screen <http://remotehost:50000/webdynpro/dispatcher/sap.com/cafUIconfiguration>, I only see three business entities displayed, and the following error message is displayed: "Corrupt metadata has been detected. This may prevent some objects from being displayed. Check the server log for more details."  I was unable to find anything in the instance log files.  Is the error message indicative of the problem?
    I am developing locally without a NetWeaver Development Infrastructure (NWDI) in place.
    I'm wondering if the credentials specified in the endpoint require any special roles or privileges.
    Senthil, do any of these additional descriptions apply to you as well?
    Edited by: Ric Leeds on Jun 20, 2008 4:37 PM

  • Unable to create Business logic Callable Object

    Hi All,
    We are working on CE 7.1 SDN trial version.
    while creating Business Logic Callble object, it is giving an error: Error while loading configuration dialog: Failed to create delegate for component com.sap.caf.eu.gp.ui.co.CExpConfig. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Waht is the problem?.
    Thanks
    Sampath

    Hi All,
    when i try to create business logic CO, in Default Trace files it is giving following errrors:
    This callable object type is not deployed on the system: sap.com/cafeueruico~bi
    This callable object type is not deployed on the system: sap.com/cafcoregpuibackgroundco~admin
    This callable object type is not deployed on the system: sap.com/cafcoregpuivisibleco~admin
    This callable object type is not deployed on the system: sap.com/cafeueruico~r3transaction
    This callable object type is not deployed on the system: sap.com/cafeueruico~km
    Do we need to deploy any extra DCs.
    Sampath

  • Cannot use DSUB function in Business Logic Callable Object

    Hi sdners! I am trying to create a Business Logic Callable Object, that compares a date and actual date. I used DSUB like this:
    DSUB(DVAL(DSTR(NOW(),'DATE')),DVAL(DSTR(@beginning_date,'DATE')),'D')
    @beginning_date is of type Date. DSUB should return how many days passed between actual date and @beginning_date. However, when I test it using Test tab, it returns 0 (zero). I tried using this also with same result:
    DSUB(NOW(),@beginning_date,'D')
    DSUB(NOW(),@beginning_date,'DD')
    DSUB(@beginning_date,NOW(),'D')
    DSUB(DVAL(DSTR(NOW(),'DATE')),DVAL(DSTR(@beginning_date,'DATE')),'DD')
    DSUB('5/05/2009','1/20/2009','D')
    DSUB(5/05/2009,1/20/2009,'D')
    Does anyone know what should I do to get it solved??
    Any help is highly appreciated!
    Regards,
    Fede

    Hi,
    I have the similar issue.
    In my case it is taking too much time for completion.
    It is a background step so it should execute automatically.
    I have also checked Queue's for this.
    But could not understand why it is taking soo much time?
    Regards,
    Pratik

  • Problem in Business Logic Callable Object execution

    Hi All,
    We are working on a workflow scenario where 2 approvals are present. Second approval is optional.
    Second approval is required or not is decided by a business logic callable object.
    This callable object is assigned (user role0 to initiator.
    Issue is, when first approval is completed, flow goes to business logic callable object. A UWL entry comes in initiators inbox. And from there, flow doesn't move forward. It simply shows message 'The next activity is not yet available: try again later using the "Refresh" button".
    I have tested this business logic callable object individually, and it works fine.
    But in process, it doesn't move further.
    What can be the solution to this?
    Thanks,
    Deepti

    Hi,
    I have the similar issue.
    In my case it is taking too much time for completion.
    It is a background step so it should execute automatically.
    I have also checked Queue's for this.
    But could not understand why it is taking soo much time?
    Regards,
    Pratik

  • Business Logic in Oracle Applications (General Question)

    Hello everyone!
    I am relatively new to Oracle Apps and interested in learning and joining this community.
    I was trying to figure out how is the Business Logic programmed in E-Business Suite. Is it just PL/SQL or is it BC4J? Is there anyone who could help me answer this question or point me in the right direction (I went through the documentation very quickly (it is rather large so it was only "briefly") and could not find anything that would answer my question exactly)
    By Business Logic I mean business-related tasks such as "enter a journal entry" or "issue sales order" (with a higher or lower level of granularity of course)
    Any help is much appreciated !

    Just to expand on Bala's answer, it depends on how your application is architected.
    If you have a Forms based application, then your Business Logic (BL) resides in PLSQL. The forms tier performs the basic validation and partial BL execution and passes the data to the handlers in the database to perform the DMLs and initiate required Business Process.
    If you have a OA Fwk based application, then your BL could reside either in BC4J or PLSQL. There are OA Fwk applications that are written that performs some business logic execution within the middle tier and passes the rest to underlying PLSQL code. Take for example an application that was originally written in Forms but later on extended or migrated to OA Fwk. Since most of the BL was already written in PLSQL and some of the forms would still be using the same PLSQL APIs, it essential that the OA Fwk based application too uses those APIs to be in synch.
    If you are designing a new application to be based on OA Fwk, it is strongly recommended that you go with your BL as much as on the middle tier.
    So it all depends... :)
    Thanks
    Vijay

  • Business logic callable object and Dynamic User assignment

    hi all,
    I have to design scenario using VC and GP
    using VC i designed a form that consist of some input parameters value,product..
    i integrated the designs created in VC to CO's
    My workflow should be like this
    now if the value<500
    it should go for approval to user1->user3
    if 500<value<1000  means it should go for approval to user1->user2->user3
    i tried this by using a businesslogic callable object
    the input ot this businesslogic CO is "value" parameter
    reult state
    continue BOOL(@value<500)
    break  Bool(500<@value<1000)
    process
    sequential block1
    Altenateblock block
                  Action
                result state:
                 continue->target->seqblock2
                 break->target->seqblock3
                 business logic CO
    seqblock2
                            Action1
                            Action3
    seqblock3
                              Action1
                              Action2
                              Action3
    i designed the workflow like this
    but the problem is that during runtime its directly jumping to seqblock3 with out asking the input value for business callable object
    and its not exiting from that block3.its going like infinite  loop(action1->action2->action3->action1->action2->Action3)
    pls suggest me the way to achieve this task
    Thanks
    kiran
    Edited by: kiran_mareedu on Aug 26, 2009 3:48 AM

    Hi,
    I have the similar issue.
    In my case it is taking too much time for completion.
    It is a background step so it should execute automatically.
    I have also checked Queue's for this.
    But could not understand why it is taking soo much time?
    Regards,
    Pratik

  • UCES Business logic / Implementation question

    Hello,
    I hope this is the right forum for this, I found nothing relevant about it with the search...
    I hope you can help me or perhaps at least point me in the right direction or give me some links.
    It's really hard to find anything substantial about UCES on the net, so ANY help is greatly appreciated!!!
    Okay here we go:
    I have a requirement for a client who wants a Web 2.0 Portal with the Business logic implemented with UCES (Utility Customer E-Services)
    What I now (for a start) need to know is:
    1.
    How is business functionality in UCES implemented? With Java or with ABAP? Does anyone know this? Are both approaches possible?
    2.
    How does a possible interface between UCES business logic and the frontend look like?
    - JSP -> EJB -> Java Connector -> ABAP?
    - JSP -> EJB ?
    - JSP -> EJB -> ABAP over Web Services ?
    - or other ?
    Like you see, I'm really just trying to get a grip on the basics, a starting point from which to find further information. So really, anyone who has experience with this, please answer, it's greatly appreciated.
    Thanks
    Ralf

    Hello Ralf,
    This seems to be the wrong forum but a quick check and I found
    Re: SAP Utilities Customers E-Services (SAP-UCES) - Documentation?
    Maybe this can help.
    Regards
    Mark

  • Urgent: how to really seperate business logic class from data access class

    Hello,
    I've this problem here on my hand and i really need help urgently. so please allow me to thank anyone who replies to this thread =)
    Before i go any futhur, let me present a scenario. this will help make my question clearer.
    "A user choose to view his account information"
    here, i've attempted to do the following. i've tried to seperate my application into 3 layers, the GUI layer, the business logic layer, and the data access layer.
    classically, the GUI layer only knows which object it should invoke, for example in the case above, the GUI would instantiate an Account object and prob the displayAcctInfo method of the Account object.
    here is how my Account class looks like:
    public class Account
    private acctNo;
    private userid;
    private password;
    private Customer acctOwner;
    the way this class is being modelled is that there is a handle to a customer object.
    that being the case, when i want to retrieve back account information, how do i go about retrieveing the information on the customer? should my data access class have knowledge on how the customer is being programmed? ie setName, getName, setAge, getAge all these methods etc? if not, how do i restore the state of the Customer object nested inside?
    is there a better way to archieve the solution to my problem above? i would appriciate it for any help rendered =)
    Yours sincerely,
    Javier

    public class AccountThat looks like a business layer object to me.
    In a large application the GUI probably shouldn't ever touch business objects. It makes requests to the business layer for specific information. For example you might have a class called CustomerAccountSummary - the data for that might come entirely from the Account object or it might come from Account and Customer.
    When the GUI requests information it receives it as a 'primitive' - which is a class that has no behaviour (methods), just data. This keeps the interface between the GUI and business layer simple and makes it easier to maintain.
    When using a primitive there are four operations: query, create, update and delete.
    For a query the gui sets only the attributes in the primitive that will be specifically queried for (or a specialized primitive can be created for this.) The result of a query is either a single primitive or a collection of primitives. Each primitive will have all the attributes defined.
    For a create all of the attributes are set. The gui calls a method and passes the primtive.
    For an update, usually all fields are defined although this can vary. The gui calls a method and passes the primitive.
    For a delete, only the 'key' fields are set (more can be but they are not used.) The gui calls a method and passes the primitive.
    Also keep in mind that a clean seperation is always an idealization. For example verify that duplicate records are not created is a business logic requirement (the database doesn't care.) However, it is much easier and more efficient to handle that rule in the database rather than in the business layer.

  • Where to implement my Business Logic in ADF?

    Hi,
    I am new to Oracle ADF. I found this forum very useful to get my queries and doubts answered. Thanks to the participants.
    I am basically from Struts background,
    Where i design my UI in jsp pages using Struts tags,
    Actions and some utility classes handles my most of the business logic (generally called as Business Layer)
    Then i have custom DAOs or Data Layer to query or update the data in database.
    Now as I am into new Project and I have to learn Oracle ADF.
    I started learning this by following some questions in the forums and various sites (from Google).
    I got info on How to create Entity Objects, Value objects etc.
    But my major doubt is where shall i write my Business Logic in this stack?
    I can easily drag and drop my data controls into my JSF page and create table, forms or charts. But if i have a multi line business logic, say for a Submit button, In which i may be doing the following steps -
    a.  Get data pertaining to user role , department, his tenure in the department etc
    b. On submit do processing based on data collected in above step.
    c. update data in data base.
    d. initiate an approval process
    e. call some business process for Approval
    f. Audit Trail
    g. Transaction handling
    and so many other steps (I know most of you will have gone through these situation before starting work on ADF)
    Now, in the above scenario in Oracle ADF layers where shall i write this whole bunch of logic or steps and then forward the user the page depending upon the outcome of this logic.
    Please let me know where to write all this??
    Thanks a lot,
    Amit
    Edited by: ur.amit on May 13, 2010 4:58 PM

    Generally speaking all of that code would reside in the app module Impl classes or the View object Impl classes - for VOs and AMs you can expose subclasses and add code in there - you can then define whether any of your methods should be exposed to the client, in which case they appear in the Data Controls panel as operations.
    General word of advice -keep business logic code in the Model - don't be tempted to start trying to access your AMs and do any of this stuff from the ViewController project. Keep it nice and simple and just access ALL the business logic code through ADF Model.
    Hope this helps
    Grant

  • Separating presentation from business logic.

    I recently wrote an article on how to separate JSP presentation from the business logic without a complicated framework.
    http://labs.revision10.com/?p=16
    I haven't seen this exact approach taken before, but believe it works fairly well for most simple web applications. Applications which tend to attract many developers to PHP do to its simple architecture.
    What are your thoughts on this approach?
    Thanks!

    Here goes the answers to your question. (according to my knowledge)
    1. Deciding a server is depends on your design of the application. According to point 3, you are better to use JMS with publish and subscribe model. In this case you have to choose a JMS server that supports your needs
    2. Again it is depends on your Design, one way is to put a shared memory for data and write a thread that reads from the shared memory or use java.net package or use JMS etc.
    3. Create one JMS source and all other will be JMS destinations.
    4. You can use EJBs or Java classes based on your requirements and design to process the data.
    5. Using AWT or Swing as a presentatin layer is good. But you desperately want to display it using Win 32 objects, then why dont to go for Microsoft technologies??

  • Future support for using PL/SQL core business logic with ADF BC

    We want to migrate our large Forms client/server (6i) application to ADF, possibly using a migration tool like Ciphersoft Exodus.
    One scenario could be to use ADF BC and ADF-Faces or a different JSF-Implementation for presentation and business layer but keep our heavy PL/SQL-businesslogic inside the Oracle database in packages, triggers, functions and procedures.
    This scenario could be chosen due to the huge amount of interconnected logic inside the database (10 years of development; no technical components; any package may access any table and more of this kind of dependencies). The business logic nowadays held in Forms client will be moved mainly into the database as a prerequisite to this scenario.
    Choosing this "keep-logic-in-DB"-scenario we need a good support by ADF BC to do so. We know and prototyped that it is possible to call some PL/SQL via JDBC from ADF BC and it is possible to use stored procedure calls for standard business entity data access (ins, del, upd, ..). But this does not solve our problems. We want to reuse core business logic coded in PL/SQL. This is much more than change the ADF standard behavior for an update with an own PL/SQL-call.
    Now my question:
    Will there be a kind of sophisticated support to use ADF BC in combination with database-kept logic?
    If so, when will this happen and how will the common problems of transactional state inside the database and inside the ADF BC be solved? Any plans or ideas yet?
    Many other clients do have similar applications built in Forms and PL/SQL and would be glad to hear about a path of direction.
    I've read the technical article 'understanding the ADF BC state management feature' which you have contributed to. One current limitation is pointed out there: Using PL/SQL with ADF BC limits ADF AM pooling to 'restricted level' which reduces scalability.
    Are you aware of additional main problems/tasks to solve when using PL/SQL heavily with ADF BC, which we have to think about?
    Thank you for any response.
    Ingmar

    My main problem is two 'concurrent' areas holding state in an application system based on DB-stored PL/SQL-logic in combination with ADF BC.
    For a new System everything can be made ok:
    Sure, it is possible to build a new system with the business logic included in ADF BC only. All long-living state will be handled in the BC layer ( including support for UnitsOfWork longer than the webside short HTTP-requests and HTTP-sessions and longer than the database transactions.
    For an old system these problems arise:
    1. DB data changes not reflected in BC layer:
    Our PL/SQL-logic changes data in tables without notifying the ADF BC layer (and its cache). To keep the data in ADF BC entity objects identical to the changed database content a synchronization is needed. BC does not know which part of the application data has been changed because it has not initiated the changes through its entity objects. Therefore a full refresh is needed. In a Forms4GL environment the behavior is similar: We do frequently requeries of all relevant (base)tables after calling database stored logic to be sure to get the changed data to display and to operate on it.
    -> Reengineering of the PL/SQL-logic to make the ADF BC layer aware of the changes is a big effort (notifying BC about any change)
    2. longer living database transactions
    Our PL/SQL-logic in some areas makes use of lengthy database transactions. The technical DB-transaction is similar to the UnitOfWork. If we call this existing logic from ADF BC, database state is produced which will not be DB-committed in the same cycle.
    This reduces scalability of ADF BC AM pooling.
    Example:
    a) Call a DB-stored logic to check if some business data is consistent and prepare some data for versioning. This starts a DB-transaction but does not commit it.
    b) Control is handed back to the user interface. Successful result of step a) is displayed
    c) User now executes the versioning operation
    d) Call another DB-stored logic to execute the versioning. DB-transaction is still open
    e) Business layer commits the transaction automatically after successful finishing step d). Otherwise everything from a) to e) is rolled back.
    -> redesign of this behavior (= cutting the 1to1 relation between LogicalUnitOfWork and the technicalDatabaseTransaction is a big effort due to the big amount of code.

  • How to display values after doing some business logic in data action

    hi guys i got the same problem but iam unable to display the values..in my display page when iam trying to do some business logic in my data action class..
    can u guys help me out
    iam pasting my code which iam working here
    my struts-config.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="DataForm" type="oracle.adf.controller.struts.forms.BindingContainerActionForm"/>
    </form-beans>
    <action-mappings>
    <action path="/inputform" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/inputform.uix">
    <set-property property="modelReference" value="inputformUIModel"/>
    <forward name="success" path="/inputAction.do"/>
    </action>
    <action path="/inputAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="order.view.InputAction" name="DataForm">
    <set-property property="modelReference" value="displaypageUIModel"/>
    <forward name="success" path="/displaypage.do"/>
    </action>
    <action path="/displaypage" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/displaypage.uix">
    <set-property property="modelReference" value="displaypageUIModel"/>
    </action>
    </action-mappings>
    <message-resources parameter="order.view.ApplicationResources"/>
    </struts-config>
    my input form uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0" method="post">
    <contents>
    <messageTextInput model="${bindings.password}" text="username"/>
    <messageTextInput model="${bindings.username}" text="password"/>
    <submitButton text="submit" event="success" destination="inputAction.do"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    my display uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <messageStyledText model="${bindings.password}" prompt="Prompt 0"/>
    <messageStyledText model="${bindings.username}" prompt="Prompt 1"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    my model bean
    package order.model;
    public class TestBean
    private String username;
    private String password;
    public TestBean()
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username=username;
    System.out.println("the username after actions class:"+username);
    public String getPassword()
    return password;
    public void setPassword(String password)
    this.password=password;
    my data Action class
    package order.view;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.jbo.uicli.binding.JUCtrlActionBinding;
    import oracle.jbo.uicli.binding.JUCtrlAttrsBinding;
    import order.model.TestBean;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;
    public class InputAction extends DataAction
    * Delegate to the Struts page lifecycle implementation
    * {@link StrutsJspLifecycle#findForward findForward}
    * @param actionContext the lifecycle context for the DataAction
    * @throws Exception
    protected void findForward(DataActionContext actionContext) throws Exception
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    //super.findForward(actionContext);
    TestBean testbean=new TestBean();
    System.out.println("this is action form"+actionContext.getActionForm());
    String username=(String)((JUCtrlAttrsBinding)actionContext.getBindingContainer().findCtrlBinding("username")).getInputValue();
    System.out.println("this is username"+username);
    String username1=username+"hye wats up";
    testbean.setUsername(username1);
    ActionForward forward=actionContext.getActionForward();
    ActionMapping mapping =actionContext.getActionMapping();
    System.out.println("this is mapping"+mapping);
    mapping.findForward("success");
    // To handle an event named "yourname" add a method:
    // public void onYourname(DataActionContext ctx)
    // To override a method of the lifecycle, go to
    // the main menu "Tools/Override Methods...".
    check this out iam unable to display in my display page so help me out if any one can

    No, in this case, I'm using standard JSP with ADF and struts validator.
    If I don't use struts validator and there are errors (such as putting a string into a number which produces a jbo-25009), the list value will be retained.
    When using the validator, it appears that it is NOT retained.
    I've written some code to attempt to set the list element back, which "looks like" it's working right now.
    There's still a problem with the second scenario:
    1. user clicks checkbox and hits [submit]
    2. get's error - you have to enter 5 address items
    3. User wants to backout, so he unchecks the box and resubmits
    4. The box redisplays as "checked"
    SO, at that point, I thought... can't I use YOUR EXAMPLE on how to handle a checkbox.
    I place some code in the reset method of the form to perform this:
    map.put("AddressChangeFlag", (String) "" );
    (that is, I've detected via the request that this flag is null), so I'm trying to make sure it retains it!
    I do that and it runs into a problem during the processUpdateModel aT:
    BindingContainerValidationForm updateForm= (BindingContainerValidationForm) actionContext.getActionForm();
    //Get the binding for our particular column JUCtrlAttrsBinding checkBoxBinding = (JUCtrlAttrsBinding)updateForm.get("AddressChangeFlag");
    call, with an error:
    JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=java.lang.String
    java.lang.String
    The value for updateForm.get("AddressChangeFlag") is "", which I'm assuming means the form field is no longer in the request object??
    I'm lost at this point, and have been working on it for more than 1 day.
    Thanks for responding though, and I await feedback ;)

Maybe you are looking for