- This topic has 19 replies, 4 voices, and was last updated 20 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
Carlos ValcarcelMemberI am using MyEclipse 3.7 with Eclipse 3.0M7 under W2K.
When I create a Struts form, either from action-mappings, “New Form, Action and JSP”, or from form-beans, “New Form”, the elements in struts-config.xml do not appear
to be correct.When I create a new non-dynamic form I get the individual <form-property> entries
(which I would not expect), while checking the Dynamic box in the Form wizard
page does not create the <form-property> entries.Carlos
Riyad KallaMemberCarlos,
Why do you think this is incorrect? The explicit form-property entries speed up the struts ops by avoiding reflection during bean population. But with DynaFormBeans, they are intended to hold anything, so it doesn’t make sense to predefine the properties on them (as I understand it).Were you thinking of something else?
Carlos ValcarcelMemberThe behavior the wizard is exhibiting is the reverse of what is normal for
Struts. When you define a custom form the only thing that needs to be
defined is the form name and type. Having the form-properties causes
no harm, but for a DynaActionForm the wizard gives the impression that
it is going to create the form properties I defined using the Form properties
dialog and which I need to make the DynaActionForm work. Why let me
define the fields if the wizard is not going to add them to the form-bean element?Carlos
Riyad KallaMemberOk I see what you mean, I will pass on your comments to the dev team. Thank you for the attention to detail!
Carlos ValcarcelMemberThanks! I am writing a book on Eclipse and I devote 2 chapters to using MyEclipse
for J2EE and Struts development. I am going ahead on the hope it will work the
way Struts developers expect it to, but I will keep my ear to the ground!Thanks for all of your help! MyEclipse is truly a great tool.
Carlos
support-michaelKeymasterDefinitely looks like reverse logic. I have entered a PR on this issue and we’ll resolve it in the 2.7.1/3.7.1 releases planned in a couple of weeks.
support-michaelKeymasterThis problem was fixed in 2.7.1/3.7.1 such that now form-properties only appear when DynaActionForm is specified. Form properties entered for a regular formBean class should appear as fields of the new formBean class. We also extended the JSP creation process to now incorporate form-properties of DynaActionForm as properties of in the JSP form.
Carlos ValcarcelMemberThanks! I will look forward to the release of 3.7.1 as I need to check the behavior against the book chapter before we go to print.
Thanks for all of your help!
Carlos
support-michaelKeymasterNote: 3.7.1 was released last Friday (20040326). Good luck with your book and stay in touch.
Brice RuthMember@support-michael wrote:
This problem was fixed in 2.7.1/3.7.1 such that now form-properties only appear when DynaActionForm is specified. Form properties entered for a regular formBean class should appear as fields of the new formBean class. We also extended the JSP creation process to now incorporate form-properties of DynaActionForm as properties of in the JSP form.
I’m running 3.7.2 on Eclipse 3.0M8 and I’m still seeing incorrect behaviour. I just went through the “New Form, Action and JSP” wizard, entered all my properties, and I see a few things that are wrong. First, I specified that a dynamic form should be used, and I saw that it picked org.apache.struts.action.DynaActionForm. When the wizard completed, I saw that it had CREATED a java class in my src directory for org.apache.struts.action.DynaActionForm. This is definitely not the intended behaviour, right? Also, the struts-config.xml does not show form-property elements in the form-bean definition. All in all, it would seem that the wizard did very little that I can actually use – I need to go ahead and add in the form-property elements myself and I need to remove the created org.apache.struts.action.DynaActionForm that was created.
Please advise if I have done something terribly wrong!
Brice Ruth
Riyad KallaMemberI saw that it had CREATED a java class in my src directory for org.apache.struts.action.DynaActionForm.
This is a bug we found too late that will be fixed in the next release.
All in all, it would seem that the wizard did very little that I can actually use
It certainly sounds like that, I will end this report off ASAP to the devs and see what we get. Thank you for the report!
support-michaelKeymasterBoth of these problems have been resolved in the latest codebase along with a number of improvements. The fix will be available in the next release. Sorry for the inconvenience. Its seems the individual formBean and actionMapping wizards get it right but the combined flow of them got stupid. 🙂
Carlos ValcarcelMemberEclipse 3.0M9
Win2K
MyEclipse 3.7.101This problem is still not fixed.
I am trying to create an ActionForm using the “Action, Form and JSP” wizard. Even after selecting a Superclass of ActionForm the wizard still updated the struts-config.xml with <form-property> entries which it should only have done if I were creating a DynaActionForm.
Help! I am in author review for my book and am editing the Struts chapter. I don’t want to have to explain a workaround for this problem in the chapter.
Carlos
Riyad KallaMemberCarlos,
We appologize for this and I was able to reproduce it. I have emailed the team about this, please stay tuned.
Carlos ValcarcelMemberStop being so understanding. It is difficult to stay upset otherwise.
🙂
Carlos
-
AuthorPosts