You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by abhilash <so...@gmail.com> on 2008/04/17 17:09:45 UTC

@EventListener Issue

Hi all,
i am using tapestry4.1.5
My eventListener is not getting called.This is my code.
<div jwcid="@Any" id="updateParts">
		<div jwcid="myDialog@Dialog" bgColor="white"
			bgOpacity="0.5" hidden="ognl:dlHidden">
			<form jwcid="ListForm@Form" class="dialog" 
delegate="ognl:validationDelegate"  updateComponents="ognl:{'updateParts'}"
clientValidationEnabled="false">
			
           
		<fieldset>
		 <legend></legend>
		 Choose  Type :  
		 
			        		
	      <div jwcid="@Any" id="selectedType">
		  
		
		   <div jwcid = "@EditDetail"/>
		       
				 <div align="right">
				 <input  class="button" type="submit" value="Save" name="save"
jwcid="@Submit" action="listener:saveDialog"/>
				  
				 <input type="button" class="button" value="Cancel"
onclick="closeDialog();return false;"/>&nbsp;&nbsp;				 
			</div>
			 
		  </div>
		  
		</fieldset>
		</form>
		
			</div>
			</div>   
my @EventListenerMethos is		
@EventListener(targets = "typeChanged", events = "onchange", submitForm =
"ListForm")
	public void watchText(IRequestCycle cycle)
	{
		//
                //
		cycle.getResponseBuilder().updateComponent("selectedType");
		
	}	

typeField is a propertyselectionmodel.My Dialog is coming up properly with
propertyselectionmodel.But when onchange occures the eventlistener is not
getting called.I dont know whats wrong in my code.Please help me out

-- 
View this message in context: http://www.nabble.com/%40EventListener-Issue-tp16744255p16744255.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @EventListener Issue

Posted by DR_GLoPeL_BouCa <ta...@gmail.com>.
Hi, a don't see "typeChanged" element in your code, and javascript code
("tapestry.cleanConnect("yypeChanged", "onchange", "formEvent2604279"); ")
has error, don't see yypeChanged element. Put all your code and use Target
instead of Element, and put, if you have, a response when you use a Target
in @EventListener.

-- 
View this message in context: http://www.nabble.com/%40EventListener-Issue-tp16744255p16763402.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @EventListener Issue

Posted by abhilash <so...@gmail.com>.
correction:
i replaced targets with elements.I am getting 'Error: bad srcObj for
srcFunc: onchange' when calling method: [nsIDOMEventListener::handleEvent]"
error .My ajax response has this
        

            dojo.widget.byId("MyDialog").show();
 tapestry.cleanConnect("yypeChanged", "onchange", "formEvent2604279");
                tapestry.formEvent2604279=function(e){
                   var content={beventname:"onchange"};
                    tapestry.event.buildEventProperties(e, content,
arguments);
                    if (!content["beventtarget.id"])
content["beventtarget.id"]="typeChanged"
                    var
validateState=tapestry.form.forms["ListForm"].validateForm;
                   var validateForm=false;
                   tapestry.form.setFormValidating("ListForm",
validateForm);
                   tapestry.form.submit("ListForm");
                   tapestry.form.setFormValidating("LisForm",
validateState);
                  };

                tapestry.connect("typeChanged", "onchange",
"formEvent2604279");

any ideas/


abhilash wrote:
> 
> No,still not working
> 
> 
> Andy Pahne-3 wrote:
>> 
>> 
>> Try
>> 
>>     <div jwcid="updateParts@Any">
>> 
>> instead of
>> 
>>     <div jwcid="@Any" id="updateParts">
>> 
>> 
>> 
>> Because you use the parameter "targets" in your @EventListener, you have 
>> to use a component id.
>> 
>> 
>> Andy
>> 
>> 
>> 
>> 
>> 
>> abhilash schrieb:
>>> Hi all,
>>> i am using tapestry4.1.5
>>> My eventListener is not getting called.This is my code.
>>> <div jwcid="@Any" id="updateParts">
>>> 		<div jwcid="myDialog@Dialog" bgColor="white"
>>> 			bgOpacity="0.5" hidden="ognl:dlHidden">
>>> 			<form jwcid="ListForm@Form" class="dialog" 
>>> delegate="ognl:validationDelegate" 
>>> updateComponents="ognl:{'updateParts'}"
>>> clientValidationEnabled="false">
>>> 			
>>>            
>>> 		<fieldset>
>>> 		 <legend></legend>
>>> 		 Choose  Type :  
>>> 		 
>>> 			        		
>>> 	      <div jwcid="@Any" id="selectedType">
>>> 		  
>>> 		
>>> 		   <div jwcid = "@EditDetail"/>
>>> 		       
>>> 				 <div align="right">
>>> 				 <input  class="button" type="submit" value="Save" name="save"
>>> jwcid="@Submit" action="listener:saveDialog"/>
>>> 				  
>>> 				 <input type="button" class="button" value="Cancel"
>>> onclick="closeDialog();return false;"/>&nbsp;&nbsp;				 
>>> 			</div>
>>> 			 
>>> 		  </div>
>>> 		  
>>> 		</fieldset>
>>> 		</form>
>>> 		
>>> 			</div>
>>> 			</div>   
>>> my @EventListenerMethos is		
>>> @EventListener(targets = "typeChanged", events = "onchange", submitForm
>>> =
>>> "ListForm")
>>> 	public void watchText(IRequestCycle cycle)
>>> 	{
>>> 		//
>>>                 //
>>> 		cycle.getResponseBuilder().updateComponent("selectedType");
>>> 		
>>> 	}	
>>> 
>>> typeField is a propertyselectionmodel.My Dialog is coming up properly
>>> with
>>> propertyselectionmodel.But when onchange occures the eventlistener is
>>> not
>>> getting called.I dont know whats wrong in my code.Please help me out
>>> 
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%40EventListener-Issue-tp16744255p16759702.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @EventListener Issue

Posted by abhilash <so...@gmail.com>.
No,still not working


Andy Pahne-3 wrote:
> 
> 
> Try
> 
>     <div jwcid="updateParts@Any">
> 
> instead of
> 
>     <div jwcid="@Any" id="updateParts">
> 
> 
> 
> Because you use the parameter "targets" in your @EventListener, you have 
> to use a component id.
> 
> 
> Andy
> 
> 
> 
> 
> 
> abhilash schrieb:
>> Hi all,
>> i am using tapestry4.1.5
>> My eventListener is not getting called.This is my code.
>> <div jwcid="@Any" id="updateParts">
>> 		<div jwcid="myDialog@Dialog" bgColor="white"
>> 			bgOpacity="0.5" hidden="ognl:dlHidden">
>> 			<form jwcid="ListForm@Form" class="dialog" 
>> delegate="ognl:validationDelegate" 
>> updateComponents="ognl:{'updateParts'}"
>> clientValidationEnabled="false">
>> 			
>>            
>> 		<fieldset>
>> 		 <legend></legend>
>> 		 Choose  Type :  
>> 		 
>> 			        		
>> 	      <div jwcid="@Any" id="selectedType">
>> 		  
>> 		
>> 		   <div jwcid = "@EditDetail"/>
>> 		       
>> 				 <div align="right">
>> 				 <input  class="button" type="submit" value="Save" name="save"
>> jwcid="@Submit" action="listener:saveDialog"/>
>> 				  
>> 				 <input type="button" class="button" value="Cancel"
>> onclick="closeDialog();return false;"/>&nbsp;&nbsp;				 
>> 			</div>
>> 			 
>> 		  </div>
>> 		  
>> 		</fieldset>
>> 		</form>
>> 		
>> 			</div>
>> 			</div>   
>> my @EventListenerMethos is		
>> @EventListener(targets = "typeChanged", events = "onchange", submitForm =
>> "ListForm")
>> 	public void watchText(IRequestCycle cycle)
>> 	{
>> 		//
>>                 //
>> 		cycle.getResponseBuilder().updateComponent("selectedType");
>> 		
>> 	}	
>> 
>> typeField is a propertyselectionmodel.My Dialog is coming up properly
>> with
>> propertyselectionmodel.But when onchange occures the eventlistener is not
>> getting called.I dont know whats wrong in my code.Please help me out
>> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%40EventListener-Issue-tp16744255p16758980.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @EventListener Issue

Posted by Andy Pahne <ap...@net22.de>.
Try

    <div jwcid="updateParts@Any">

instead of

    <div jwcid="@Any" id="updateParts">



Because you use the parameter "targets" in your @EventListener, you have 
to use a component id.


Andy





abhilash schrieb:
> Hi all,
> i am using tapestry4.1.5
> My eventListener is not getting called.This is my code.
> <div jwcid="@Any" id="updateParts">
> 		<div jwcid="myDialog@Dialog" bgColor="white"
> 			bgOpacity="0.5" hidden="ognl:dlHidden">
> 			<form jwcid="ListForm@Form" class="dialog" 
> delegate="ognl:validationDelegate"  updateComponents="ognl:{'updateParts'}"
> clientValidationEnabled="false">
> 			
>            
> 		<fieldset>
> 		 <legend></legend>
> 		 Choose  Type :  
> 		 
> 			        		
> 	      <div jwcid="@Any" id="selectedType">
> 		  
> 		
> 		   <div jwcid = "@EditDetail"/>
> 		       
> 				 <div align="right">
> 				 <input  class="button" type="submit" value="Save" name="save"
> jwcid="@Submit" action="listener:saveDialog"/>
> 				  
> 				 <input type="button" class="button" value="Cancel"
> onclick="closeDialog();return false;"/>&nbsp;&nbsp;				 
> 			</div>
> 			 
> 		  </div>
> 		  
> 		</fieldset>
> 		</form>
> 		
> 			</div>
> 			</div>   
> my @EventListenerMethos is		
> @EventListener(targets = "typeChanged", events = "onchange", submitForm =
> "ListForm")
> 	public void watchText(IRequestCycle cycle)
> 	{
> 		//
>                 //
> 		cycle.getResponseBuilder().updateComponent("selectedType");
> 		
> 	}	
> 
> typeField is a propertyselectionmodel.My Dialog is coming up properly with
> propertyselectionmodel.But when onchange occures the eventlistener is not
> getting called.I dont know whats wrong in my code.Please help me out
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org