Form problem in the XWiki trunk

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Form problem in the XWiki trunk

xavier.moghrabi
I'm still testing the latest XWiki source code. It seems that there are some
bugs in simple form.

For instance, I've a form like this (this is the classic photo album) :
Title: $doc.display("title", $obj)

Description:

$doc.display("description", $obj)

#set($newtitle = $request.title)
#if($newtitle)
#set($newtitle = $newtitle.replace('"',"'"))
<script type="text/javascript">
var title = "${newtitle}";
{pre}
document.forms.edit["XWiki.PhotoAlbumClass_0_title"].value = title;
{/pre}
</script>


- When I edit the page, I see the right form.
- But when I change a input and save the form, the value has not been changed.

I've tested it on all my Wikis (since I have a virtual wiki configuration).
How the "Edit Object" action still works.

Regards

--
Xavier MOGHRABI - Consortium ObjectWeb



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Form problem in the XWiki trunk

Ludovic Dubost

Can you copy paste the HTML output of the form.
Maybe the field names are wrong.

It could be the $obj field
How did you get the $obj field ?

Ludovic


Xavier MOGHRABI a écrit :

> I'm still testing the latest XWiki source code. It seems that there are some
> bugs in simple form.
>
> For instance, I've a form like this (this is the classic photo album) :
> Title: $doc.display("title", $obj)
>
> Description:
>
> $doc.display("description", $obj)
>
> #set($newtitle = $request.title)
> #if($newtitle)
> #set($newtitle = $newtitle.replace('"',"'"))
> <script type="text/javascript">
> var title = "${newtitle}";
> {pre}
> document.forms.edit["XWiki.PhotoAlbumClass_0_title"].value = title;
> {/pre}
> </script>
>
>
> - When I edit the page, I see the right form.
> - But when I change a input and save the form, the value has not been changed.
>
> I've tested it on all my Wikis (since I have a virtual wiki configuration).
> How the "Edit Object" action still works.
>
> Regards
>
>  
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  

--
Ludovic Dubost
XPertNet: http://www.xpertnet.fr/
Blog: http://www.ludovic.org/blog/
XWiki: http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws