Tables in the Rich Text Area

23 views
Skip to first unread message

Sarosh Mathew Koshy

unread,
Dec 13, 2016, 3:31:20 AM12/13/16
to AribaWeb (aribaweb.org)
Dear All

I need to get some information from my database formatted into a table in a Rich Text Area, that is made available to the user to edit and then save.

I've tried the following:

I've tried outputting the information in the HTML table format and also in RTF's table construct, but the control isn't rendering the table. The text embedded in the html content is being rendered as plain text, on a single line.

e.g.,

<table border=1>
    <tr>
        <td> col 11 </td>
        <td> col 12 </td>
        <td> col 13 </td>
    </tr>
    <tr>
        <td> col 21 </td>
        <td> col 22 </td>
        <td> col 23 </td>
    </tr>
</table>


renders as

col11 col12 col13 col21 col22 col23

I then looked at xinha's documentation on the net and found that the control required data in Entized format (http://xinha.webfactional.com/wiki/Entize)

I tried this too and found that when the RichTextArea control is in editable state (editable=$true binding), the raw html is rendered by the control, when in non-editable state (editable=$false), the table boundaries are rendered.

Is there some way to get the control to render table boundaries even in the editable mode?

Thanks in advance!
Sarosh

Frantisek Kolar

unread,
Dec 13, 2016, 12:08:54 PM12/13/16
to arib...@googlegroups.com
Hi Sarosh, 

I am not still sure what you are trying to do ;-I Do you have the design what you are trying to achive?   What is your code you have so far? 

For AW in order to render data in the Table format we are using AWTDatatable. But you are free to pass in any widget you want for each Column like you can see it in the:
aribaweb-5.2/examples/Demo/gallery/table


Thanks, 
-Fk




--
You received this message because you are subscribed to the Google Groups "AribaWeb (aribaweb.org)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+u...@googlegroups.com.
To post to this group, send email to arib...@googlegroups.com.
Visit this group at https://groups.google.com/group/aribaweb.
For more options, visit https://groups.google.com/d/optout.

Sarosh Mathew Koshy

unread,
Dec 14, 2016, 12:35:29 AM12/14/16
to arib...@googlegroups.com
Hi Frantisek,

Really good to hear from you!

Let me retry with a bit more of context!

Our application is a hospital management system and deals with patient's medical records and medical history. The screen I'm working on is part of the discharge process, where the user needs a consolidated view of the treatment that the patient has received during the current inpatient admission.

The content includes: the diagnosis, doctor's notes, medication details, lab investigations etc.,

At the point of discharge, the application produces a formatted discharge summary in a RichTextArea control by extracting data from multiple tables. The users need the ability to edit this summary, save it and print it for the patient.

A lot of this content is text, and we are able to format it programmatically in the RichTextArea control. But some of the content needs to be output in tabular format into the RichTextArea control, so that it is readable. E.g.

LAB INVESTIGATIONS

TEST                          RESULT                    NORMAL RANGE
----------------------------- ------------------------- -----------------
Haemoglobin                   12.7                      14.0 - 17.4
Glucose in Blood              153 mg/dL                 60 - 140
Leukocytes in Blood           15900 10*3/uL             4 - 11

My attempts to format the data into a tabular format in the RichTextArea is not yielding the desired output.

The HTML <table> tags that I'm producing is being ignored by the RichTextArea control and the content of the table is being rendered onto a single line instead.

Is there something wrong in what I'm doing?

Sarosh


To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+unsubscribe@googlegroups.com.

To post to this group, send email to arib...@googlegroups.com.
Visit this group at https://groups.google.com/group/aribaweb.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "AribaWeb (aribaweb.org)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aribaweb/Jmt32QVILKA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to aribaweb+unsubscribe@googlegroups.com.

Frantisek Kolar

unread,
Dec 15, 2016, 10:25:54 AM12/15/16
to arib...@googlegroups.com
HI Sarosh, 

I would use AWTDatatable as I mentioned in my previous emial which will read data from DB and inside each column you can insert any component you want to render those values. RichTextArea is using 3th party library xinha which is using allot of JS code to render it + all this generated code is based on hml tables and I cant tell if there are some probelms when you wrap it only with simple html tag TABLE and it conficts with this lib. 

The safe is to wrap this text area with AW Comonent. 

-FK


To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+u...@googlegroups.com.

Sarosh Mathew Koshy

unread,
Dec 15, 2016, 7:20:28 PM12/15/16
to arib...@googlegroups.com
Thanks Frantisek! I'll review and modify the design - a HTML table in the RichTextArea component seems like a closed door at this point!
Reply all
Reply to author
Forward
0 new messages