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
 
s:select + ajax issue

s:select + ajax issue

2007-10-01       - By Pablo V?zquez Bl?zquez

 Back
Well, I have found the solution (at least, my solution).

I must destroy topics before publishing it.


Pablo V?zquez Bl?zquez escribi?:
> I want to call RefreshTree whenever I change the option in the select
> menu. So, I?m simulating a submit with an onchange event (or that?s
> what I would like to).
>
> What?s wrong?
>
>
> Dave Newton escribi?:
>> --- Pablo V?zquez Bl?zquez <pvazquez@(protected)>
>> wrote:
>>  
>>> Anyone knows why this code results in an increasing
>>> number of threads to "RefreshTree" action when I use
>>>    
>>
>>  
>>> the selector??
>>>    
>>
>> Because your submit button listens to the published
>> topic of the select?
>>
>>  
>>> <script type="text/javascript">
>>>    dojo.event.topic.subscribe("/submitSelectorForm",
>>> function(data, type, e) {
>>>         if (type=="before") {
>>>             //do something before the form is
>>> submitted
>>>             if (document.forms.length > 1) {
>>>                dojo.event.topic.publish("/refreshContent");
>>>             }
>>>         }
>>>         if (type=="load") {
>>>             //do something after the form is
>>> submitted
>>>         }
>>>     });
>>> </script>
>>>
>>>
>>> <div id="selector">
>>>     <c:if test="${!empty currentProject.projects or
>>> !empty projects}">            <s:form id="selectProject"
>>> name="selectProject" action="RefreshTree">
>>>             <s:select name="projectId"
>>>                 list="projects"
>>>                 listKey="reference"
>>>                 listValue="name"
>>>                 required="true"
>>>                 headerKey="-1"
>>>                 headerValue="-- select --"
>>>                 value="-1"
>>>              
>>>    
>> onchange="dojo.event.topic.publish('/changeProject');"/>
>>  
>>>                             <s:submit cssStyle="display:none"
>>> theme="ajax" targets="treeAndSelector"
>>>                 listenTopics="/changeProject"
>>> notifyTopics="/submitSelectorForm"
>>>                 executeScripts="true" loadingText="
>>> "/>
>>>                     </s:form>            </c:if>
>>> </div>
>>>    
>>
>>
>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>  
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


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


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