Struts ActionForm wizard

In jdev 9.0.3 you used to be able to select File..New..Struts..ActionForm which would then create a skeleton class extending struts.action.actionform.
Any way of doing this jdev 10g ???
I know I can do new..Java class then extend it myself but the previous way was a lot easier.
Thanks
Conrad

Using the Struts Diagram:
--If you already have the Action element in the Struts diagram, Rt click on the Action element to invoke the context menu and select "Go to Form Bean".
--A dialog ("Create Struts Form Bean") opens, enter Action Form details and click OK
--You should see the skeleton class for your action form.
HTH,
Prashanth

Similar Messages

  • Struts ActionForm variable values in JSP

    I've tried to get variable values from a Struts ActionForm. I know that I can use Struts's bean tags, but can't figure out correct syntax or may there's some thing else to discover.
    I'm trying something like:
    <bean:define id="atr" name="MyActionForm" property="attribute"/></address>
    <p><%=atr%></p>
    And my struts-config look like:
    <form-bean name="MyActionForm" type="sth.MyActionForm"/>
    And the ActionForm is like:
    private String attribute;
    public String getAttribute() { ... }
    public void setAttribute(String attribute) {...}
    What may be wrong?
    Edited by: aproppon on Sep 26, 2007 9:46 AM

    I've tried with <bean:write... but since I catch exception saying MyActionForm can't be found in any scope. As far as I'm aware I've set request scope like:
    <action input="/jsp/something.jsp" name="MyActionForm" path="/jsp/myAction" scope="request" type="sth.MyAction">
    <forward name="success" path="/jsp/index.jsp"/>
    <forward name="failure" path="/jsp/something.jsp"/>
    </action>
    Edited by: D.A.R. on Sep 26, 2007 12:09 PM

  • Struts Support: "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

  • "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

  • UIX and Struts ActionForm

    Hi,
    Can I use Struts ActionForm and ADF UIX?
    Thanks

    The "Simple Hello World sample using ADF UIX and JDeveloper 10g Preview" application integrates Struts with ADF UIX.
    http://jjacobi.blogspot.com/2003_11_30_jjacobi_archive.html
    Simple ADF UIX User Input Application
    http://www.oracle.com/technology/products/jdev/howtos/10g/adf_uix_userinput_ht/index.html

  • Struts ActionForm - Is there a bug?

    Hi,
    I�ve been using the 9.0.3.3 (build 1205) and
    when I try to create a new ActionForm the wizard
    is not displayed...
    Yes, I�ve selected a project in the navigator.
    Does someone have an opinion about that?
    Tks in advance,
    Carlos.

    Problem occurs in JDeveloper 9.0.3.3 Build 1205 and seems to be introduced with the new version of Struts.
    When running jdev.exe instead of jdevw.exe, a stack trace is displayed. Bug 2835622 was logged for that.
    Regards,
    Didier.

  • Problems creating Struts ActionForm in JDeveloper 9.0.3.3

    I am very new to JDeveloper, where recently i am learning on how to use the struts technology. The problem occurs when i right-click the project file at the navigator and i choose NEW then at the Web-Tier i choose Struts, and at the item columns i choose ActionForm. The thing is the dialog doesnt prompt and it goes back to the main Window. What's the problem? Any patches that i need to upgrade? I use JDeveloper 9.0.3.3 is because my company doesnt want to migrate to 10g for the time being. So, I have limitation in using 10g instead.
    Regards,
    RoLand
    Java Developer

    Hi Roland.
    Yes, you are right. This does not seem to be working in the 9.0.3.x code base. I checked the 9.0.3.4 release and all the available patches and I don't see it as being fixed.
    It is working in the 9.0.4.x release though and that is not 10g... Would that work for you?
    Alternatively, you can could the action form class manually. Check out the 9.0.4 release on OTN to see what is generating and replicate that your 9.0.3.x product.
    Hope that helps.
    Pete

  • Using Struts ActionForm to collect multiline input

    I am trying to build an inventory page that displays a list
    of items on a page and lets you update and items price or
    quantity available. I know how to build a static ActionForm
    that does say username and password. I also know how to build
    an InventoryBean which returns a collection of ItemBean's.
    I can't figure out how to have a dynamic ActionForm. Here
    is what I have so far...
    Here are the struts-config snipets:
    <form-bean name="inventoryForm"
    type="ww.caps.inventory.InventoryForm"/>
    <action path="/inventory"
    type="ww.caps.inventory.InventoryAction"
    name="inventoryForm"
    scope="request"
    input="/inventory.jsp">
    </action>
    here is some of the JSP:
    <html:form action="/inventory">
    <table>
    <logic:iterate id="item" name="invent" property="items">     
    <tr>
    <td align="CENTER" valign="CENTER">
    <bean:write name="item" property="sku"/>
    </td>
    <td align="CENTER" valign="CENTER">
    <html:text name="item" property="priceString" size="6" maxlength="8"/>
    </td>
    </logic:iterate>
    </table>
    </html:form>
    This paints the page with <INPUT>'s just fine but the name of the
    price inputs is NOT indexed so there is no way to capture the data
    back, not to mention matching it with the right row in the database.
    Any examples or hints on how to solve this problem would be greatly
    appreciated.
    Thanks,
    Wayne R. Baldwin

    Use a java Collection (probably an ArrayList) to store your list of items:
    class MyForm extends ActionForm {
      private static ITEM_COUNT = 10;
      private Collection items = new ArrayList();
        for (int i = 0; i < ITEM_COUNT; i++)
          items.add(new Item());
      public Collection getItems() { return items; }
    class Item {
      private String value;
      public void setValue(String data) { value = data; }
      public String getValue() { return value; }
    }When struts sees a parameter like this passed into the POST:
    items[0].value=test
    it will do the same as if you had coded this in Java:
    Collection c = getItems();
    Item i = (Item)c.get(0);
    i.setValue("test");

  • Newbie Struts ActionForm creation question in JDeveloper

    Hey guys,
    I am playing around with Struts and the JDeveloper functionality for that framework. So I am getting the hang of the diagramatic way of viewing the entire Web application by graphically creating the struts-config.xml file. That is great.
    But now I have a question. Suppose I have a simple Login jsp page and I created it using the Struts html tag library. So I guess I am to have a corresponding ActionForm object for that page. How does one go about creating an ActionForm object corresponding to a particular JSP page diagramatically in struts-config.xml? I hope my question makes sense.

    Hmm, I guess you just specify what ActionForm you are wanting to take the parameter values from by just editing the properties of the Action object itself. I think I figured out the answer guys. Thanks anyway.

  • Struts actionform and checkboxes

    hi!
    I'm having trouble creating an actionform for a jsp that i have. Basically, my jsp lists files which have their corresponding checkboxes. The user can click multiple checkbox representing the files he wants to download. On clicking the download button, it submits it to my DownloadAction.
    My problem is that only the first checkbox is stored in my actionform.
    here's my actionform:
    package mybeans;
    import org.apache.struts.action.ActionForm;
    import java.util.*;
    public class FilesForm extends ActionForm
        Vector files = new Vector();
        String file = null;
        public String getFile() {
             System.out.println( "getting file" );
             return file;
        public void setFile( String string ) {  
             System.out.println( "setting file" );      
             file += string + ",";
             files.add( string );
        public Vector getFiles() {
             return files;
    }my jsp is a bit big. here's the form part:
    <html:form action="/download">
      <table>
        <tr>
          <td><input type="checkbox" name="file" value="someDynamicID"></td>
          <td>filename</td>
        </tr>
      ...more files here...
      </table>
    </html:form>Thanks in advance!

    Make your setter take a String[] argument and your getter return a String[] argument (I think List or Set might also work).

  • Struts ActionForm bean retuning null values

    Hello friends,
    I am new to struts framework, I am trying a simple application which gets form details from user store it in ActionForm and showing in a jsp. Now the problem is when i try to get the bean values form the Action form it is returning only null values. but the values i entered in <html:form> is getting stored in the ActionForm.
    I am very much confused with this problem.Your help is greatly appreciated
    regards,
    Muthu

    r035198x wrote:
    I'm not too sure about this but I think struts questions are not all that welcome in this forum.
    Better try the dedicated struts forum at Apache.They're not per definition forbidden here, but it's just merely that you will have more chance to meet real Apache Struts experts at a Apache Struts forum instead of a general Sun Servlet forum, let alone Sun JSP/JSTL or Sun JSF forum.

  • Struts ActionForm and Model Objects design

    I've managed to make a pretty nice model with persistence managed by hibernate logic encapsulated in DAO's.
    But now Ive reached the web layer and I'm with struts, and I'm kind of stuck so I would love to hear some suggestions.
    How should I create ActionForms without duplicating the model state in ActionForm classes?
    Right now, my model implements ActionForm, which is tight coupling .
    But this increases maintenability.
    Other suggestions?

    It is a very bad idea to have your model implement ActionForm, for the reason you mentioned -- tight coupling. When you do that, you are tied to a web application; and, more specifically, Struts. "Best practice" says you need to duplicate a bit of your model in your ActionForm (Jakarta Commons BeanUtils makes this painless). As you probably know, the ActionForm should correspond to the form being displayed in the browser; each HTML form element should have a corresponding property in your ActionForm class. These properties might come from various parts of your domain model, so this gives you a place to muster them all together. I use an initXXXAction to populate the ActionForm, if needed, before display and a completeXXXAction to process the users input after they submit (although I'm thinking about switching to one of the DispatchAction flavors). Also, if the idea of maintaining the ActomForm classes is a hang-up, I'd suggest looking into the DynaXXX classes.
    Just to re-iterate, having your model implement ActionForm is BAD.

  • Struts (ActionForm beans)

    Does anyone have any information on the
    public void reset(ActionMapping, HttpServletRequest)
    method that ActionForm classes have.
    To be more specific at what points will the Struts framework call this method and why?
    Basically I have set the ActionForm with a scope of session and implemented the reset method to reset all my form variables.
    Yet every time the associated Action class is called the data is reset.
    I assumed this would only happen if I had set the scope as request.
    Should this be happening or should I not be implementing the reset method in the ActionForm bean?

    I checked out the source code and the main ActionServlet calls the ActionForm reset method on each request. I'm not sure what you mean by "set the ActionForm with a scope of session", but ActionServlet does not check anything, it just calls reset() as part of processPopulate().
    I think the idea is that the ActionForm reflects whatever is coming in from the request and a bean would perform persistence. If you are using the ActionForm to save across requests, you may need special logic in reset() to determine which elements to reset and when.
    Hope this helps. By the way, if you are doing a lot of Struts work, I recommend downloading the source code for research purposes and for customizing.

  • BUG??? Can't  create a class deriving from ActionForm using wizard

    Has anyone managed to create an class deriving from ActionForm class using the wizard in JDev 9033?
    When I try to do create a class by right-clicking.."New"..etc nothing happens!!

    Yeah. Same thing happens for me. I went to File->New->Web Tier->Struts->ActionForm. Can't get it to do anything.

  • How to list an array of objects using struts in jsp and ActionForm

    I am using the struts ActionForm and need to know how to display an Array of objects. I am assuming it would look like this in the ActionForm:
    private AddRmvParts addRmv[];
    But I am not sure how the getter and setter in the ActionForm should look. Should it be a Collection or an Iterator?
    I am thinking I need to use an iterator in the jsp page to display it.
    I am also wondering if the AddRmvParts class I have can be the same class that gets populated by the retrieval of data from the database. This class has 10 fields that need to display on the jsp page in 1 row and then multiple rows of these 10 fields.
    Thanks.

    Most probably the easiest way to make it accessible in your page is as a collection.
    ie
    public Collection getAddRmvParts()
    You can use the <logic:iterate> or a <c:forEach>(JSTL) tag to loop through the collection
    As long as the individual items in the collection provide get/set methods you can access them with the dot syntax:
    Example using JSTL:
    <c:forEach var="addRmvPart" items="${addRmvParts}">
      <c:out value="${addRmvPart.id} ${addRmvPart.name} ${addRmvPart.description}"/>
    </c:forEach>

Maybe you are looking for

  • How do I get the Firefox icon to appear on my menu bar instead of a question mark?

    I have been using Firefox 3.7 and recently downloaded 4.0 An icon showing Firefox on what lloks like a memort stick icon appeared on my desktop. I am a Mac OSX user. When I dragged the icon to my menu bar, a question mark (?) appeared instead of the

  • Error when adding a new account

    I am trying to make a new account that does the following but when I process the dimension it errors out. Is the formula just too long? (([CALC_REV],[R028])([CALC_REV],[44])([CALC_REV],[R046])([CALC_REV],[R047])([CALC_REV],[R048])([CALC_REV],[R049])(

  • Dynamic Link from After Effects CC Altered in Premiere Pro CC

    I have created a series of animations in After Effects, but whenever I add a Dynamic Link in Premiere, the Dynamic links are altering their look. Example: The particle world animation, Ice layer, Bounce layer and a Glue layer to create the effect tha

  • Noticed that my NEF files from Nikon D7000 camera are noticeably different in LT4 vs Nikon software?

    Hello, Noticed that my NEF files from Nikon D7000 camera are noticeably different in LT4 vs Nikon software. Read where folks are adjusting setting in LR4 for Nikon camera, but need help in how please. Also, perhaps there is a better way? thanks, mo

  • Remote xml with user validation

    ok am trying to make a gmail new mail checker (its a hobby) so am gonna parse an atom file (https://mail.google.com/gmail/feed/atom) but the problem is how can java send the username and password to google before accessing the xml file