You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by buckofive <kl...@yahoo.com> on 2009/01/23 06:52:45 UTC

T5.0.18: Component Event Handler is not called in a nested page for SWFUpload component

Hi all,

I'm working on a SWFUpload component (based on http://www.swfupload.org/ for
multiple file uploads at once) which works great if the component is used
inside the root Index page but if the component is used in a nested page it
no longer works.  

During the rendering of the component I create an event handler to process
the uploaded files.  This handler is used as the "upload_url" which the
SWFUpload API requires. This URL (event handler) should be that of the
component in its containing page which I am generating like so:

.tml:
  <t:SWFUpload t:id="uploadVideos"/>


SWFUpload.java:
  public void beginRender(){
  String uploadUrl =
resources.createEventLink("SWFUpload",this.context).toAbsoluteURI();
  uploadUrl += ";jsessionid="+getSessionId();

  ... The rest of the rendering code ...

  }

  public Object onSWFUpload(Object [] context)
  {
    UploadedFile file = decoder.getFileUpload("Filedata");
    ComponentResultProcessorWrapper callback = new  
ComponentResultProcessorWrapper(componentEventResultProcessor);
    Object []finalContext = ArrayUtils.add(context, file); 
    resources.triggerEvent("fileUploaded", finalContext, callback);		
  }


The component url when inside the start page equates to:
     "/index.uploadvideos:SWFUpload;jsessionid=1sm95xnojfehs"

The component url when inside a nested page:
    
"/school/skilledit.uploadvideos:SWFUpload;jsessionid=1sm95xnojfehs?t:ac=25"

What I have noticed is that when the component is in the index page the
event handler is called and the default tapestry installed TimingFilter is
not but when the component is in a nested page the event handler is NOT
called and the TimingFilter is.  The timing filters shows a request for a
page called:
      "/school/skilledit.uploadvideos:SWFUpload"

I have also tried using the full url with the same results.
"http://localhost:8080/mycontext/school/skilledit.uploadvideos:SWFUpload;jsessionid=1sm95xnojfehs?t:ac=25"

Does anyone have any idea why this is or what I maybe missing?  I don't
quite understand why my event handler isn't being called in nested pages.

thanks,
B





-- 
View this message in context: http://www.nabble.com/T5.0.18%3A-Component-Event-Handler-is-not-called-in-a-nested-page-for-SWFUpload-component-tp21617939p21617939.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