On 03/23/2011 05:59 PM, nikhil gupta wrote:
Hello,
I have gone though the form editing part of the xwiki,where we can include
the fields according to the requirement.
As per the requirement of our project (AJAX FORM EDITOR) we have to provide
one USER INTERFACE for the user through which he can drag /drop the fields
according to his form requirement.
We can extend this idea a little bit .We will not only provide the form
generation part but also include its action part i.e user will give the
name of the database where the action has to take place(if have to insert
the record or update the record in the database).
That's not needed. The application logic is already handled by XWiki,
this is by definition what XWiki applications do. I suggest reading and
following the FAQ tutorial in order to understand better how structured
data works in XWiki, and to see in which context the form editor is
needed:
http://platform.xwiki.org/xwiki/bin/DevGuide/FAQTutorial
Moreover, we can also add
style for each field where user can define its style according to its choice
and we can also provide the style sheet for the whole form also.
The form editor should not be too complex, it should offer an easy way
of editing simple forms. This allows the UI to remain easy to use and
understand, and also ensures a consistent look of different applications
in the same wiki. For more complex forms, there's the lower-level class
editor and the scripting support in the class sheet. For styling support
in XWiki, you should take a look at SkinExtensions:
http://platform.xwiki.org/xwiki/bin/DevGuide/SkinExtensionsTutorial
User will select the type of the field for example in
the form there are
certain fields which get insert ,some gets updated when the form gets
submitted,so according to the nature and requirement, user will enter the
type of the field.Types can be "INSERT","UPDATE","VIEW"
etc.
Again, follow the FAQ tutorial to see that there's no need for such
low-level database operations. See also a bit more documentation about
the data model:
http://platform.xwiki.org/xwiki/bin/DevGuide/DataModel
So for this we can use the resources which is present
in the xwiki,in that
we have all the fully functional fields , we can make any field , so our
work will now to provide the interface for the user where he can drag/drop
the fields and also provide the interface for the style part and also to
create the action file and rendering file which would render the
requirement.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/