Issue Regarding HTML Rich Text.Desperately need your help.

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

Issue Regarding HTML Rich Text.Desperately need your help.

Rajesh_1229
Hi,
 
I am new to Orbeon XForms and we are using this product in our application.After a long learning,we somehow managed to complete our XForms module.but we strucked with one issue.In my Xform,there is a need for Use to enter his remarks(Text may be normal text or rich text like MS Word,Excel Data).So we have used two textareas in which first textarea is for displaying older remarks and second one to enter his new remarks.The code we have used for it as follows...
 
<xforms:textarea ref="AddRemarks" mediatype="text/html" class="htmltextarea"></xforms:textarea>
 
but as first one is for display purpose,we need to change it as readonly.but the readonly attribute is not working for the HTMLArea.so i have done it as <xforms:output mediatype="text/html">.
 
When user enter enters his remarks and click "AddRemarks" button,the new remarks will be appended to old remarks.
 
But actual problem is when the page loads,user enters his remarks and saves his work.the page is redirected to same page with updated data.All fields are working and updated fine but First Remarks which we are keeping for displaying remarks,is not updating.and that too it is bevaving asynchronously.Once it will show latest remarks,hencewhile it shows older data deprecating newly added remarks,other time its shows nothing.but at this time,when we refresh the page, the remarks is getting loaded with updated data.
 
We really struck with this issue.And please let me know how to make a RichTextArea readonly or you have any other solution.waiting for ur help.
 
Thanks & Regards,
Rajesh Kumar S



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Issue Regarding HTML Rich Text.Desperately need your help.

fl.schmitt(ops-users)
Hi Rajesh,

> But actual problem is when the page loads,user enters his remarks and
> saves his work.the page is redirected to same page with updated data.All
> fields are working and updated fine but First Remarks which we are
> keeping for displaying remarks,is not updating.

after save/reload, it should display the old remarks with the new
remarks appended, right? So, which mechanism do you use to append the
new data to the old one?

Did you check how the submitted / saved instance looks like before
saving - does it contain the new remarks? How does the instance look
like after reload - maybe it's a sort of HTML problem; just
concatenating the old and the new content may lead to invalid data?

HTH
florian



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Issue Regarding HTML Rich Text.Desperately need your help.

Rajesh_1229
Hi Florian,
 
Many Thanks for your reply.We are using Orbeon XForms with Struts.So,we gave submission using the following:-
 
<xforms:submission id="worksheetFormSubmit" method="post" ref="instance('clientinstance')" action="../Worksheet/updateSheetAction.do" replace="all"/>

after that,we are redirecting to the same page.Yes,after save/reload,it should show old+new remarks,and i'm using the following technique for appending:-
 
My First HTMLArea(since i want it reaonly,i used xforms:output)

<

xforms:output ref="RemarksBuffer" id="HTMLRemarks" mediatype="text/html" class="htmltextareadiv"></xforms:output>

My Second HTMLArea for entering present remarks,

<xforms:textarea ref="AddRemarks" mediatype="text/html" class="htmltextarea"></xforms:textarea>

Button for Appending old with new remarks,

<xforms:trigger>

<xforms:label>Add Remarks</xforms:label>

<xforms:action ev:event="DOMActivate" if="/client/AddRemarks !='' ">

<xforms:setvalue ref="/client/RemarksString" value="concat(/client/Seperator,/client/HTMLLineBreak,/client/UWActivityLabel,' : ',/client/UWActivity,/client/HTMLLineBreak,/client/LoginIDLabel,' : ',/client/LoginID,' ',/client/CurDateTime,/client/HTMLLineBreak,/client/Seperator)"/>

<xforms:setvalue ref="/client/RemarksBuffer" value="concat(/client/RemarksBuffer,/client/HTMLLineBreak,/client/RemarksString,/client/HTMLLineBreak,/client/AddRemarks)"/>

<xforms:setvalue ref="instance('clientinstance')/AddRemarks" value="/client/Blank"/>

</xforms:action>

</xforms:trigger>
The Actual output we want is
 
************************************************************ (value of /client/Seperator )
Activity(/client/UWActivityLabel) : First UW' (/client/UWActivity)
LoginID(/client/LoginIDLabel) : icmadmin(/client/LoginID) 2009-03-18T19:30:30.297+05:30(/client/CurDateTime)
************************************************************ 
remarks old
************************************************************
Activity : First UW
LoginID : icmadmin 2009-03-18T19:30:39.359+05:30
************************************************************
remarks new
 
For /client/HTMLLineBreak,i'm using "<HTMLLineBreak>&lt;br/></HTMLLineBreak>"
For /client/HTMLLineBreak,i'm using "<Blank></Blank>"
 
and after appending,i'm clearing the present html remarks and set to blank.Is the code contains any errors.
 
Once again thanks for ur reply.
 
Rajesh.

 
On Wed, Mar 18, 2009 at 6:40 PM, Florian Schmitt <[hidden email]> wrote:
Hi Rajesh,

> But actual problem is when the page loads,user enters his remarks and
> saves his work.the page is redirected to same page with updated data.All
> fields are working and updated fine but First Remarks which we are
> keeping for displaying remarks,is not updating.

after save/reload, it should display the old remarks with the new
remarks appended, right? So, which mechanism do you use to append the
new data to the old one?

Did you check how the submitted / saved instance looks like before
saving - does it contain the new remarks? How does the instance look
like after reload - maybe it's a sort of HTML problem; just
concatenating the old and the new content may lead to invalid data?

HTH
florian



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Issue Regarding HTML Rich Text.Desperately need your help.

Alessandro Vernet
Administrator
Rajesh,

Rajesh_1229 wrote
Many Thanks for your reply.We are using Orbeon XForms with Struts.So,we gave
submission using the following:-
[...]
It is hard to recreate a mental image of what your code is doing based on a few snippets, and then imagine what could go wrong. Could you instead post a simple example that reproduces the problem? (Also see: http://www.orbeon.com/ops/doc/home-faq#reporting-issues)

Alex