How to use one form to calculate totals form 4 individual forms

If i had 4 separate forms with 3 number fields each, how can i use one form to calculate theirs totals?
Form 1 numbers + Form 2 numbers + Form 3 numbers + Form 4 numbers = Form with combined totals
can anyone point me in the right direction?
Thanks

kwesij wrote:
Can someone please help me on this,
I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
Can someone bail me out of this ....I've hit a hard brick wall!!!!...What's the problem? What does a brick wall look like?
Connect to the database and execute four SQL INSERT/UPDATE statements as a single unit of work. The fact that you have one form shouldn't be an issue.
I'll bet you're having trouble because you haven't layered the problem either in code or in your mind.
I'd recommend that you write a POJO to take in some objects and execute the SQL. Once you have that running successfully you can worry about the form. Decouple the two.
Computer science is all about decomposing large problems into smaller ones.
%

Similar Messages

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • How to use stack canvas in tab canvas in oracle forms

    hi all,
    how to use stack canvas in tab canvas in oracle forms. please if any one help out in this.

    Hi
    u can simply create a button in ur tab canvas in this button pls write the following as an example...
    SHOW_VIEW('STACKED_CANVAS');
    GO_ITEM ('SAL'); -- Pls note this item should be navigable and visible in ur stacked canvas form
    HIDE_VIEW('TAB_CANVAS');In order to return back to ur tab_canvas pls create a button in this button pls write the following...
    HIDE_VIEW('STACKED_CANVAS');
    SHOW_VIEW('TAB_CANVAS');
    GO_BLOCK('EMP');
    GO_ITEM ('EMPNO'); -- Pls note this item should be navigable and visible in ur stacked canvas form
    Hope this helps...
    Regards,
    Abdetu...

  • How to use one email adress for multiple recipients

    Hello,
    I'd like to know how to use one email adress for multiple recipients. 
    this would be very useful or projects. for example;
    if i send one mail to [email protected], all people in this project get an email.
    I will add the people in this project myself. 
    I know it is possible, but I don't know how to do it ;-)
    please help me! 

    Hope this help.
    _http://technet.microsoft.com/en-us/library/cc164331(v=exchg.65) .aspx

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • How to use touchpad to sign electronic signature on website form?

    how to use touchpad to sign electronic signature on website form?

    website is related to personal information i am completing for new job (background check). You will not be able to access site they provided user name/password. After completing the form the instructions are to hold left button on mouse in my case trackpad and sign the form ..no luck. I added microsoft mouse as another alternative to trackpad still no luck. Apple support is closed today. Any help is appreciated.

  • How can u know the process chain total time, individual time?

    Hi guru's
    How can u know the process chain total time, individual time?
    and what options will available in sm37?
    Thanks
    prabha reddy

    Hi Prabha
    Iam not very sure about total time and individual times.
    But you can go to tcode rspcm for monitoring the daily process chains. it gives you details like 1. status  2.start date & time  3. Log ID  of each process chain.
    or you can go to log view of particular individual chain to know how long it has run.
    SM37: tcode for simple job selection.
    here you check the status of job.
    you can select for certain conditions like
    1. scheduled
    2. released
    3. ready
    4.active
    5. cancelled
    Assign points if it was helpful
    Revert back if you need further info/
    regards
    AP

  • How to use one form to submit data to 2 tables on mysql

    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...

    kwesij wrote:
    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...What's the problem? What does a brick wall look like?
    Connect to the database and execute four SQL INSERT/UPDATE statements as a single unit of work. The fact that you have one form shouldn't be an issue.
    I'll bet you're having trouble because you haven't layered the problem either in code or in your mind.
    I'd recommend that you write a POJO to take in some objects and execute the SQL. Once you have that running successfully you can worry about the form. Decouple the two.
    Computer science is all about decomposing large problems into smaller ones.
    %

  • How to use one query results in another query

    hi,
    in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
    How I can do this?
    Result I want to get is:
    In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
    Can I do this?
    Regards,
    Andrzej

    Hi Andrzej,
    please check out this thread: Set parameters values depending on other parameters
    I had a discussion about query results as input for another query in there.
    For creating a workbook, just click on the save button after you ran your query in the bex.
    Siggi
    Message was edited by: Siegfried Szameitat

  • How to use one SessionInfo for many Frame

    Hi Sathish;
    thank's for your answer but How do this?
    thank you

    I use one sessionInfo on the base frame and then pass it to child forms in constructor.
    You then have to correctly set the bind names for all controls on the child forms.
    The truth is that yes, this way you loose the design facilities but I use a simple trick:
    I also have sessionInfo objects on the child forms and let the designer generate as much as I can get from it and then I adjust the code so that it uses the base sessionInfo.
    Easy uh ?

  • How to use one ODSI project artifact as jar for other ODSI project?

    Hi,
    I am working on multiple ODSI proejcts in Same Server. My problem is how to call one projects resources in other ODSI project. I need this as Some of Data Services read the data from more then one database. The projects are in seprate Dataspace projects but they are deployed in same server. When I try to export artifacts from one projects and include them as Jar in other projects I am not able to see any Data service methods so unable to call any method of one project in other project. Please advise how to recsolve this problem.
    Thankyou in advance.
    Rahul

    If you already have a case open, it's polite if you mention that - so I don't have to answer the same questions to support and also to this forum. Likewise, when you get an answer to your question on this forum, you can tell support. So they don't keep looking for something you already have the answer to. Cuts down on the duplication of effort.
    You have one project. You add more files to it (regardless of how you add them - by creating files with the editor, by using a wizard or by importing files from another project), you still have only one project.
    If you had some other project that you exported the files from - that project is still there - but the original project does not know or care about it.
    Edited by: mikereiche on Jun 21, 2010 1:55 PM

  • How to use one pageflow to cater for multiple display?

    Hi, I trying to use one pageflow to display different kind of contents because the logic behind the retrieval is similar except that different parameter(string) us passed in for different content retrieval.
    How do i achieve the above? thanks in advance :D
    Cheers

    What do you mean by "display different kind of contents"? do you mean you want to display PDF/HTML/Image based on certain parameters or You are using different media like PC/PDA etc.
    In both cases you can redirect to different success page based on your query parameters.
    if(param.equals(image))
    forward image.jsp
    if(param.equals(pdf))
    forward pdf.jsp
    else
    forward html.jsp
    Hope it helps

  • How to use one DC's view/component/appln in another DC

    Hi All,
      I am new to DC concept. I am trying to use one DC's component in another DC. I have done following steps.
    a)Created two DCs A and B
    b) DC A's 'New Public Part-->Entity Type(Web Dynnpro Component) I selected component
    c) Add Used DC in B, I added A's component
    <b> From this point onwards I am not getting any clues</b>. How do I call A's component in DC B. <i>Please guide. Any examples will be great.</i>
    Thanks and Regards,
    Ganga.

    Hi Gangadharaya,
    Just tell me do u want to display a view, use some context or use some methods defined in other controller.
    So that i can help you in the same direction.
    <b>Component Usage</b>
    Suppose you have following scenario:
    1) DC2 has component Comp2. In this dc you read the context a value and stores it in context named "Ctx_value".
    2) DC1 has component Comp1. Here you want to read the Ctx_value from comp2.
    In Comp2 create a method getValue()
      public java.lang.String getProcessId( )
          return wdContext.getCurrentElement().getAttributeValue("Ctx_value");
    In the interface controller of Comp2 click on properties tab and add reference to the cont2 controller. Now create a method here in interface controller to get the value of Ctx_value
      public java.lang.String getValue( )
        return wdThis.wdGetComp2Controller().getValue();
    Expose the Comp2 as public part now.
    In DC1 add DC1 as used DC.
    Build both dc's
    In Comp1 create Component usage by name Comp2Usage to Comp2.
    Now you can access the method getValue() from interface controller of Comp2.
    wdThis.wdGetComp2UsageInterface().getValue();
    This is how you can access a value of Context. Same can be done by direct binding.
    <b>View Access</b>
    If you want to access a view v2 in comp2 then goto windows in comp1 and embedd an existing view and in that select the interface view of comp2. The default view in comp2 can now be displayed in comp1.
    Regards,
    Murtuza
    Message was edited by:
            Murtuza Kharodawala

  • How to use ONE query to find out tree structure?

    ID------------upperID----------Name------------------------isFolder
    1------------ 0---------- Folder
    1------------------------------------1
    2------------ 1------------ Folder 1- Sub
    Folder--------------------1
    3------------ 2------------
    Folder1-Item1-A--------------------------0
    4------------ 1------------ Folder 1- Sub
    Item-----------------------0
    Hi all, if I have a table like above to demonstrate the
    folders and item relationship. This structure allows the user to
    create unlimited folders and items.
    Now I would like to use one query to find out the tree
    structure of this table, how could I do the query.
    Any help on this will be highly appreciated!
    Thanks,
    ez

    Also, see this thread:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y

Maybe you are looking for