- This topic has 3 replies, 2 voices, and was last updated 20 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
elmaritMemberHi,
I’m just curious if anybody noticed that the form-property line in struts-cinfig.xml is never created. Holds for both 3.8Beta2 as well as 3.8.1+QF20040825 (Windows XP SP1, Eclipse 3.0.0).
Easily reproducible using your flash struts tutorial – the ‘name’ text property is created in login.jsp and LoginForm.java, but in struts-config.xml, there’s only
<form-beans >
<form-bean name=”loginForm” type=”com.meicompany.struts.form.LoginForm” /></form-beans>
so I had to manually add the property:
<form-beans >
<form-bean name=”loginForm” type=”com.meicompany.struts.form.LoginForm” >
<form-property name=”name” type=”java.lang.String” />
</form-bean >
</form-beans>Didn’t help to r-click and Edit the loginForm form-bean in the Outline either – I tried to add another property, but ended up back on the following in the struts-config.xml file:
<form-beans >
<form-bean name=”loginForm” type=”com.meicompany.struts.form.LoginForm” />
</form-beans>Thanks.
Riyad KallaMemberelmarit,
This isn’t actually a bug, the form-property field is only needed for DynaForms, with custom form classes the methods are discovered/populated via reflection.
elmaritMemberRiyad,
thanks for the explanation, but how come then that in your flash struts tutorial this form-property gets filled automatically, even if the ‘Dynamic’ checkbox on the Create Struts FormBean wizard page was not checked? By the way the screens of this tutorial are obsolete, the new wizards look way different. No plan to keep this up to date?
Also, what about the weird behavior of the Edit of the form-beans in the Outline I described earlier. Is that how it should be?
Thanks.
Riyad KallaMemberthanks for the explanation, but how come then that in your flash struts tutorial this form-property gets filled automatically, even if the ‘Dynamic’ checkbox on the Create Struts FormBean wizard page was not checked?
This was actually a bug, we were generating the form-bean entries for concrete implementations and NOT generating them for DynaForms, which was exactly backwards as a user pointed out soon after.
No plan to keep this up to date?
This will most certainly be updated when we revamp the documentation.
Also, what about the weird behavior of the Edit of the form-beans in the Outline I described earlier. Is that how it should be?
There is actually a more complicated reason for this… to add/remove properties after a form has been generated requires a certain amount of refactoring (changing of the class) that we don’t currently support. So the results of editing the properties on a concrete form impl are pointless for now. On a dynaform they work as they should because no refactoring is needed.
-
AuthorPosts