Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-08-14       - By Clement, Steve

 Back
I am working with Struts2 within a tabbed panel in an ajax theme. In one
of the divs, I am using the <s:texarea > in a form that uses the ajax
theme. The problem is that the content of the textarea does not submit
the new content if I have the notifyTopics attribute set in the submit
tag.

This problem only occurs in IE. In Firefox, the submit action changes
the textarea WYSIWYG text area (provided by Dojo in Struts 2) into a
regular html  textarea right before submitting. The changed (or new)
content is then sent to the action.

In IE7, however, only the originally populated content is sent, not the
changes.

If I don't turn on the notifyTopics property, then the textarea content
is submitted, but the div does not refresh, so there is no way the user
can be sure that the submission has completed.

Here are the relevant code snippets:

Main Index Page:
<s:tabbedPanel id="menu" >
  <s:div
      id="home"
      key="index.tab.user.label.home"
      theme="ajax"
      labelposition="top"
      >
    <br/>
    <s:text name="index.salutation">
      <s:param>${user.firstName}</s:param>
      <s:param>${user.lastName}</s:param>
    </s:text>
   
  </s:div>
  <s:div
      id="emergency"
      key="index.tab.user.label.emergency"
      theme="ajax"
      href="%{adminEmergency}"
      listenTopics="update"
      refreshOnShow="true"
      >
  </s:div>
</s:tabbedPanel>

Edit Page:
<s:form
  id="frmPressReleaseDetail"
  action="releaseSave"
  method="post"
  theme="ajax"
  >
<s:hidden id="id" name="id" value="${pressRelease.id}"></s:hidden>
<s:hidden id="emergencyId" name="emergencyId"
value="${emergency.id}"></s:hidden>
<s:checkbox id="active" label="Is Active" name="active"
value="${pressRelease.active}" fieldValue="true" ></s:checkbox>
<s:textfield id="headline" name="headline" label="Headline"
value="${pressRelease.headline }"></s:textfield>
<s:textarea  id="content"  name="content" label="Content" rows="30"
cols="50" value="${pressRelease.content }"></s:textarea>
<s:textfield id="creationDate" name="creationDate" label="Creation Date"
disabled="true" value="${cDate }"></s:textfield>
<s:submit theme="ajax" notifyTopics="update"  ></s:submit>
</s:form>

All changes to the checkbox and textfield tags are properly sent to the
releaseSave action. Only the textarea tag refuses to send the modified
content in IE7.

So either I lose the WYSIWYG editor widget that I get when the form is
in ajax theme, I lose the user experience of refreshing the "emergency"
div, or I lose the changes made to the content textarea. None of these
options sits well.

Any suggestions?

Steve Clement




-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.