On Thu, Sep 29, 2011 at 9:19 PM, Scott Serr <serrs(a)theserrs.net> wrote:
I ran into an interesting side effect of having a form in my Class Sheet.
<input type="hidden" name="parent"
value="${doc.fullName}" />
The above line is in a form which posts to the current page, but then redirects to a
sub-page. The process is exactly like the FAQ Example. The trouble is, when doing Inline
Editing on a page with the class object. No matter what you put in as the parent in the
UI for the parent property, it gets reset to itself on save. The wiki and WYSYWIG editors
don't do this of course.
I think this is a problem because...
1. Should this form (and form element) really be
evaluated? No one hit the submit button.
How did you save without hitting the submit button? (You said "it gets
reset to itself on save").
2. It doesn't seem very safe for variable spaces
to mix so easily. Unless this is a feature.
"Inline form" edit mode is used to edit object properties. If you use
$doc.display method to generate your form fields then you'll see that
the field IDs/names look like this: ClassName_objectIndex_propertyName
, so they don't interfere with the rest of the (hidden) fields like
"parent" which is used to set the document title. If you generate the
form fields yourself then indeed you have to take care to use unique
IDs/names to prevent conflicts.
Hope this helps,
Marius
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users