How control buttons in JSP?

Hi there,
I'm currently working with some educational content I found here:
http://otn.oracle.com/obe/obe9051jdev/ADFtoJSP/defaultendtoend.htm
I followed these steps:
-Create new app workspace
-Use the default web application template
-right click the model node in the upper Left Hand Side (LHS)
to create a new business components diagram
-Here, I deviate and create this package name:
com.e2e.model
-Establish a connection to the demo HR schema via Connections-navigator
-Drag-drop DEPARTMENTS table into the new business components diagram
Next, they lead through these steps to create the next
layer of software they call 'ADF View Objects:
-Drag-drop a 'View Object' from 'Business Components' palette on RHS
-Drag-drop the ADF-Entity-Object inside the new ADF-View-Object
Next, they lead through these steps to create the next
layer of software they call 'ADF Business Services':
-Drag-drop an 'Application Module' from 'Business Components' palette on RHS
-Drag-drop the ADF-View-Object inside the new Application Module
They say that at this point, creation of the Business Services
layer is complete.
Next, they lead through these steps to create the
layers of software they call Model and View Controller:
-On the LHS bring the Application-navigator to front
-Expand ViewController node via left-clicks
-Right-click open a Struts diagram from the struts-config.xml node
-From RHS, Drag-drop a DataPage from Struts palette
-Drill down into resulting diagrammed object
-During drill-down-dialog make it a .jsp
-This opens a .jsp design editor; add some text and various HTML objects
-Open 'Data Control' Palette on RHS
-Pick 'read-only table' from drag-drop pull down
-Drag-drop view object into .jsp editor
-Drag-drop various operations into the bottom of the page:
-first, previous, next, last
-Run the .jsp via the green light right-click in struts diagram
Next, they lead through these steps to create a .jsp which allows
a user to insert a new row into the DEPARTMENTS table:
-On the Struts diagrammer, create a /createDept data page
-On the Struts diagrammer, use 'Forward' components to
setup back and forth navigation between
/deptBrowse and /createDept
-/deptBrowse -- Create -- > /createDept
-/createDept -- Submit -- > /deptBrowse
-Drill down into /createDept
-Pull down 'Input Form' from Data Control Palette
-Drag-drop DeptView1 from Palette into .jsp editor
-Notice that a 'submit' button was created for me
-Add commit, rollback buttons to the .jsp editor of /deptBrowse page
-From data control palette,
Add Create button to the .jsp editor of /deptBrowse page
-Edit a property of the Create button
-Run the deptBrowse page
At this point I bumped into a bug. The commit, and rollback buttons
did exactly the same thing as the Create button; they sent me to the
/createDept page. An additional problem was that the commit key did
not send a commit to the DB; the data from the form never got
inserted into the table.
I should be able to debug this if I can get some understanding about
how buttons work in this environment.
I understand how a button works in an ordinary HTML form but not
in this .jsp that I created. From an HTML perspective, one thing
which seems odd to me is that the form tag has no action attribute.
Somehow, the App server is sensing my button press but I don't see how.
So, my question is kind of general: How do I trace/debug button presses
in .jsp files created by JDeveloper?
-moi

I did some more poking around and learned a little bit more.
The problems I was having were related to pilot error
and lack of understanding about how JDev generates code.
The pilot error was fixed by Peets coffee.
To get a better understanding of code generation,
I now spend more time in the source screen rather than
the designer screen when I drag-drop objects off the palettes.
-moi

Similar Messages

  • How can we add a control on our .jsp webpage for uploading several image fi

    How can we add a control on our .jsp webpage for uploading several image files as done in gmail attachment, Where a Remove button also appears if we wanna remove the particular attachment.

    The SCOM Management Server is in Domain A.  I've tried it already and it has failed.  
    So just to clarify the method I used was to go to Administration>Security>User Roles.  Then New User Role>Read-Only Operator.  In the Create User Role Wizard I then gave the User Role a name, Clicked "Add" under User Role Members.
     Then the Select Users or Groups window pops up and I changed the Locations from Domain A to Domain B and searched for the user, which it's able to find, then clicked "OK" to add it to the User Role members which it does just fine.  On
    the next page which is Group Scope I checked the one group I want this account to have access to and then click next.  This brings me to Dashboards and Views where I click the radio button for "Only the dashboards and views selected in each tab are
    approved" and chose the folder of dashboards I want this account to access and then click next.  This brings me to the Summary and I click "Create".  At this point it thinks for a moment then closes out the wizard but the new Read-Only
    Operator does not appear.  I then look in Event Viewer and see the Event I pasted above.
    Am I doing something wrong here?  Any guidance on how to get around this issue would be much appreciated.
    Thanks,
    Jake

  • How to control button in struts

    Hi there!
    How do we control buttons in struts.
    eg: If I've multiple buttons in the jsp, such as "Save Record", "Update REcord", " Delete Record " etc...
    How do I know which button is clicked?. How to control it ?
    Any help pretty much appreciated.
    Thanks.

    you have something called Dispatch action and LookupDispatch action frame works in struts..
    search in google..u will get plenty of resources..if not pls let me know
    regards
    [email protected]

  • Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps wit

    Before I upgraded my iPad mini, you could turn off apps to save battery power by double clicking the control button and then holding your finger on the app button until the minus sign appeared.  That doesn't work anymore.  How do you turn off the apps with ios7

    Now you swipe downward, the app will appear and you delete, keep scolling to the right as in the past.  With the new operating system you also swipe downward to get the search bar to find an app

  • How to create multiple toolbar buttons in jsp ?

    hi all,
    how to create multiple toolbar buttons in jsp ?
    plz help me

    mgmt
    plzhttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal ? in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • How do I break a for loop (inside) and a while loop (outside) at the same time by a control button

    I have a while loop (outside) and a for loop (inside) and a control button within the for loop.  I want to stop the program by click the botton without finishing the for loop.  How can I do that?
    Thank you in advance.

    HI Please find attached snapshot Regards, Santosh
    Message Edited by SanRac on 12-17-2009 05:12 AM
    Message Edited by SanRac on 12-17-2009 05:13 AM
    Attachments:
    Snap1.png ‏4 KB

  • How to remap keyboard - Looking to switch the "fn" and "control" buttons?

    Hi I was looking for a way to switch the function and control on the bottom left side of the keyboard on my macbook pro laptop. I am used to the control button being the button that is furthest to the left and its just really throwing me off having the fn key all the way to the left. If anyone knows how to remap these keys, I would really appreciate the help.
    Thank you.

    Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
    To restore the Firefox 3 appearance you can use these steps:
    * Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
    * Move the Reload and Stop buttons to their previous position at the left side of the location bar.
    * Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
    * Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons.

  • I shrank my Yahoo e-mail by pushing the control button. How do I restore to original size

    I shrank my Yahoo e-mail by pushing the control button. How do I restore to original size?
    == This happened ==
    Just once or twice
    == I pushed the control button

    I corrected my problem, which was having very small print when I went to Yahoo e mail, by clicking on reset on the view menu. Only my text was small, the toolbars were fine.

  • How t o add Link with a button in jsp

    hi,
    I want to add link with a button in jsp. How will i do it? Is there anyone who can help me? Please help me.
    With Regards
    Bina

    Try this,
    <input type='button' onclick='window.location="a.html"'>

  • How can I stop the control button from moving the open applications up and exposing the desktop?

    It is getting very annoying when I want to use the control button for other functions.
    I tried looking in settings under keyboard, but found nothing.
    If anybody knows how to change it, I would really appreciate it!
    Thanks,
    Neel.

    Please describe what you are doing and what is happening more fully. I can press the control key all day long and nothing happens.

  • How to make controls static in jsp page

    Hello Friends.............
    I want to make controls or objects static which are on jsp page.
    i.e. when my window is maximized then every thing is perfect but when i restore my window all the controls on the jsp page gets destorted.....
    I want to make look that jsp page same in both the positions of window.
    1) When window is maximized.
    2) When window is minimized.
    The controls should not get destorted.
    Can any body please help me out in this issue....
    Thanks
    Sameer Rede

    This has nothing to do with JSP. It's all about HTML and CSS. You can use CSS to specify fixed sizes/locations for things, or you can use HTML tables to control layouts.

  • How can I get the remote control button to appear in itunes?

    I cant seem to locate the remote control button that is supposed to appear in iTunes. I do not have any remote controls associated with my iTunes yet the button is not appearing. Help.

    Download the Adobe Flash Player installer directly by right clicking the following link and selecting "Save Link as".
    Flash Player Plug-in (All other browsers)
    THAT's the Flash Player.
    Shockwave Player 12
    THAT's the Shockwave plugin.
    BOTH should be up to date.

  • HOW CAN I CUSTOMIZE A CONTROL BUTTON

    Hi, I want to costumize a control button puting on it a picture or something like that, Do I need an especial toolkit or something else?

    I believe the ability to customize controls exists in all versions of LV. Just right click on the control and select Advanced>>Customize.
    More details on this can be found in the LV user manual.
    Try to take over the world!

  • Crystal Report/STRUTS: Error (404) when clicking on Control Buttons (Print, Export, Next, Previous, etc...) on report viewer

    Post Author: jwenny
    CA Forum: Deployment
    Need help badly!!!
    We are using the crystal reports plugin for STRUTS.
    We are able to display the report in the crystal report viewer.  However, when we click any control buttons (print, export, etc...), then we get:
    JSPG0036E:  Failed to find resource /Report-viewer.jsp
    We then moved Report-viewer.jsp to the WebContents folder (root directory) and got a different error when we clicked any control button:
    Error:  400 page not found
    Does anyone know how to solve this problem?  For instance, is there a setting or parameter that needs to be set?
    Greatly appreciate any help!

    HI,
    Whenever we print the viewer does an auto postback, I believe due to this some of the values are getting missed. Moreover we are referring to the viewer and reportdocument object, it seems. So can you try this simple code in an application to see if it helps:
    ReportDocument rdoc = new ReportDocument();
    rdoc.Load("C:\TASKECrystalReports\Intraday.rpt");
    rdoc.SetDatabaseLogon("uid","pwd");
    rdoc.SetParameterValues("parameter name","value");
    CrystalReportViewer.ReportSource = rdoc;
    Helps?
    Thanks.

  • Working with two buttons in jsp

    hi
    My working with jsp's in struts.
    I have a jsp with two buttons "Save" and "Delete".
    My requirement is, on clicking either the "save button" or "Delete button" in jsp, it should call the corresponding code in the Action class.
    wht is the logic required to call the corresponding code in the Action class ?
    Thanks

    hi
    Thanks nani and jHyena for ur reply , but its not working, can u tell me where i went wrong, how to set them in jsp and action class.
    This is my Action class
    public class EditUserDetailsAction extends Action {
          * Generated Methods
          * Method execute
          * @param mapping
          * @param form
          * @param request
          * @param response
          * @return ActionForward
         public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response) throws DaoException {
                   System.out.println("---------------in execute() befor try/catch-----------");
    //**************************the problem is here calling in if()/else, how should i call i?**************      
          if() {
                    try{
                        EditUserDetailsForm editUserDetailsForm = (EditUserDetailsForm) form;
                        System.out.println("------------ execute()-----------------");
                        DaoImplementer daoImpl = new DaoImplementer();
                        Integer editUid       = (Integer) editUserDetailsForm.getUser_Id();
                        String editName       = (String)  editUserDetailsForm.getName();
                        String editTitle      = (String) editUserDetailsForm.getTitle();
                        String editEmail      = (String) editUserDetailsForm.getEmail();
                        Integer editTelephone = (Integer) editUserDetailsForm.getTelephone();
                        String  editUserName  = (String) editUserDetailsForm.getUserName();
                        String editPassword   = (String) editUserDetailsForm.getPassword();
                        daoImpl.registerUser(editUid, editName, editTitle, editEmail, editTelephone, editUserName, editPassword);
                        System.out.println("------------sent to model components---------------");
                        System.out.println("----------forwarding to edituserdetail.jsp----------");
                        return mapping.findForward("editUserDetails");
                   catch (Exception e) {
                        System.out.println("@@@ ---Exception in EditUserDetailsAction class--@@@@");
                        throw new DaoException("Error adding userDetails: ",e);
                   return mapping.findForward("addUserDetails");
    Here is the jsp
    <html:html locale="true">
      <head>
        <html:base />
        <title>editUserDetails.jsp</title>
        <script type="text/javascript">
             function save_display(){
                  var x = confirm("Save: Are you sure ?")
                  if( x == true ){
                       confirm("Save: OK")
                  else{
                       text("Save: Cancelled")
             function delete_display(){
                  var y = confirm("Delete: Are you sure ?")
                  if( y == true ){
                       confirm("Delete: OK")
                  else{
                       alert("Delete: Cancelled")
             function funSave(){
                  document.form[0].ID.value = id;
                  form[0].ID.value.action="<%=request.getContextPath()%>/division/editDesignation.app?save=save";
                   form[0].ID.value.method="post";
                   form[0].ID.value.submit();
             function funDelete(){
                  function funSave(){
                        document.form[0].ID.value=id;
                        form[0].ID.value.action="<%=request.getContextPath()%>.app?save=save";
                        form[0].ID.value.method="post";
                        form[0].ID.value.submit();
        </script>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
      </head>
      <body>
      <html:javascript formName="editUserDetailsForm"/>
      <html:form action="/editUserDetails" onsubmit="return validateEditUserDetailsForm(this);">
                   user_Id : <html:text property="user_Id"/><html:errors property="user_Id"/><br/>
                      name : <html:text property="name"/><html:errors property="name"/><br/>
                     title : <html:text property="title"/><html:errors property="title"/><br/>
                telephone : <html:text property="telephone"/><html:errors property="telephone"/><br/>
                     email : <html:text property="email"/><html:errors property="email"/><br/>
                 userName : <html:text property="userName"/><html:errors property="userName"/><br/>
                 password : <html:password property="password"/><html:errors property="password"/><br/>
                           <html:submit property="save" value="Save"  onclick ="funSave()"/>
                           <html:cancel property="delete" value="delete" onclick="funDelete()"/>
      </html:form>
      </body>
    pls let me know how to set the hidden variables within the  above jsp .
    and  in Action class how to call it.
    I would be very thankful to u guys.
    Thanks

Maybe you are looking for

  • XSQL and BEA Weblogic 6.1

    I spent a lot of time trying to figure out how to configure the XSQL servlet to run on BEA Weblogic 6.1 It is really simple once you understand that you should work off expanded directory instead of trying to get a .war or .ear file uploaded. I decid

  • Hard Drive Failure on Rev 1 Macbook Air. What are my options?

    My HD on my Macbook Air (Rev 1) 1.6 ghz 80 gb pata HD has failed. so I am going to have to take to it an Apple Service provider to fix. My question is what options do I have, I.e. Could I upgrade disk size, put in an SSD drive instead or is my only v

  • Printing PDF form with information as PDF document

    I've recently filled out a PDF form application with various information. I went to save this as a PDF file in Adobe Reader for my records but this is not supported. I was only able to print out a hard copy. Is there any other program or routine that

  • EJB Module build failed ...

    Hi All, I am trying to build an Entity Service in CAF. But it is unable to create the EJB Module. Error: JDO enhancer failed because of internal Error. Error: Build stopped due to an error: JDO enhancer failed because of internal Error. Can any one t

  • Value Mapping - Mass replication and Integration Directory interface

    Hello all, The following question is often approched in this forum but answer is never cleary provided. Thus I'm sorry to ask it again. We are using Value Mapping mass data replication using special interface provided by XI. We can easily see results