PDA

View Full Version : [CLOSED] Best practice: Form Textarea / textfield with HTML or XML data using DirectMethod



CarWise
Jan 06, 2014, 1:49 PM
Hi guys,

I was wondering what's the best way to submit xml or html code from a formfield into the database (through DirectMethod).

At this moment I create a copy of the fieldvalue (encoded) into a Hidden field before submitting the form and use that hidden field as my source:



#{hdnCommentaarEncoded}.setValue(Ext.util.Format.h tmlEncode(#{taCommentaar}.getValue()))


Is there a simpler or cleaner way to do this ? An attribute on the object itself would be fine (Encoded="true") :)

Martin

Daniil
Jan 07, 2014, 5:21 AM
Hi Martin,

You could send the values via ExtraParams instead of using additional Hidden fields. Although, it doesn't look much simpler and cleaner.

Anyway, I don't see any built-in possibility to do it. Your solution is quite good.

CarWise
Jan 07, 2014, 7:34 AM
Hi Martin,

You could send the values via ExtraParams instead of using additional Hidden fields. Although, it doesn't look much simpler and cleaner.

Anyway, I don't see any built-in possibility to do it. Your solution is quite good.

Okay Daniil... I will keep it this way. Thanks for the info.

Martin