Integrating RichText in Struts/jsp tags for texarea.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: Integrating RichText in Struts/jsp tags for texarea.

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    36

    Integrating RichText in Struts/jsp tags for texarea.

    Hi Experts,

    I am in a need of providing the richtext box in our application for the textarea(which is developed with Struts html tags.) which is already there. When I google I heard that we can use the NicEdit(http://nicedit.com/demos.php).
    I have implemented the same but it is not saving the content which entered in the area. The would store in xml data in DB.

    Please help on this to have the content updated with enter by the user or suggest me any other way to implement the same in struts application.

    sample struts tags code:
    Code:
     <tr><td bgcolor="336699" width="151"><div align="right"><b><font face="Arial, Helvetica, sans-serif" size="2" color="#FFFFFF">Cause of Problem / Describe problem: </font></b></div></td>
    <td bgcolor="F5F5DC"> <html:textarea name="qForm" property="eop.q.proDes" cols="80" rows="5"/>
                <font face="Arial, Helvetica, sans-serif" size="2" color="#FF0000">*</font></td>
     </tr>
    Thanks in Advance!!
    -Jee

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    What code are you using to save it back to the DB (that isn't working)?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Nov 2008
    Posts
    8
    Check it well. I'm using NiceEdit in my java web apps (Struts and Tapestry), never had a problem. Check if the parameter is sent in request. If not it's a js problem, try to use the most generic version/configuration of NE. If it's there then you know what to do

  4. #4
    Join Date
    Jan 2009
    Posts
    1
    Hello,

    I am using nicEdit with jsp. Text area takes too much time to load. Browser I am using is IE 6.

    Please help me to reduce this loading time.

    Thanks,
    anamika

  5. #5
    Join Date
    Aug 2008
    Posts
    36
    I failed to integrate with nicEdit then,

    I migrated to tinyMCE and looks it is ok as of now, still we are in testing environment.

    will post details when it moved to prod env....


    Thanks,
    -Jee

  6. #6
    Join Date
    Aug 2008
    Posts
    36
    Hi,

    Thanks, for your quick response.!!

    Iam using the code "eop.q.proDes" which uses the JAXB to marshal/unmarshal then store to DB as xml type. This is format of JAXB generated classes structure.
    Iam not able to get the richtext value even in js function when i try to display in alert by using getElementById('eop.q.proDes') function.

    Hence it is not recognising the textarea or not taking the value from used textarea.

    Please give me idea to work with nicEdit.

    Thanks,
    -Jee

  7. #7
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Do you mean this?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  8. #8
    Join Date
    Nov 2008
    Posts
    8
    Quote Originally Posted by Hack View Post
    Do you mean this?
    - yep

    2 ug4jee:
    I'm not sure how you have NE textarea set in your JSP. I am not even sure you have any JSPs. The NE is a classical js text editor. It has its own issues with some browsers, but runs pretty well in most of them including Firefox, Safari, Opera and IE. If you say you can't get a js function to execute, that means you have a js error somewhere, or you wrote this function wrong. Please pass the source and rendered variants of the page where the textarea is. It's too difficult to guess, especially when frameworks are involved.

  9. #9
    Join Date
    Aug 2008
    Posts
    36
    Hi Xeel,

    Thank you for your response.

    here is the code that I am using jsp.

    Code:
    <td bgcolor="F5F5DC"><html:textarea name="faqForm" property="eop.q.proDes" cols="80" rows="5"/>
                <font face="Arial, Helvetica, sans-serif" size="2" color="#FF0000">*</font></td>
    where eop.q.proDes would be processed by JAXB objects(this was working fine when I dont use the nicEdit code).
    When I use the nicEdit the above mentioned textarea becacme the richtext area, but when I try to enter content and save the content, it is not taking in.

    Please suggest me on this, and let me know if more details required.

    Thanks,
    -Jee

Similar Threads

  1. Replies: 0
    Last Post: 10-28-2005, 04:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center