facebook

form-property bug [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #215115 Reply

    elmarit
    Member

    Hi,

    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.

    #215129 Reply

    Riyad Kalla
    Member

    elmarit,
    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.

    #215225 Reply

    elmarit
    Member

    Riyad,

    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.

    #215243 Reply

    Riyad Kalla
    Member

    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?

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: form-property bug [Closed]

You must be logged in to post in the forum log in