You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dick_hu <di...@gmail.com> on 2012/06/28 10:00:19 UTC

Can not get the Upload's value in ajax submit

public class UploadPage{

	@Property
	private UploadedFile file;

	@InjectComponent
	private Zone zone;

	Object onSuccess() {
		System.err.println(file);
		return zone;
	}
}

<t:form zone="zone">
  <t:upload t:value="file" />
  <input type="submit" value="OK"/>
</t:form>


when I click the submit button,I can't get the property file.

then I change the form l get the property file.
<t:form>
  <t:upload t:value="file" />
  <input type="submit" value="OK"/>
</t:form>


I want to submit the form by ajax like the first way.
Is there any way to get the upload  value by return a zone.

Can anyone help me ?  thanks a lot.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Can-not-get-the-Upload-s-value-in-ajax-submit-tp5714138.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: Can not get the Upload's value in ajax submit

Posted by Taha Siddiqi <ta...@gmail.com>.
Hi

Tapestry upload component does not support ajax. Take a look at http://tapestry5-jquery.com/components/docsajaxupload 

regards
Taha

On Jun 28, 2012, at 1:30 PM, dick_hu wrote:

> 
> public class UploadPage{
> 
> 	@Property
> 	private UploadedFile file;
> 
> 	@InjectComponent
> 	private Zone zone;
> 
> 	Object onSuccess() {
> 		System.err.println(file);
> 		return zone;
> 	}
> }
> 
> <t:form zone="zone">
>  <t:upload t:value="file" />
>  <input type="submit" value="OK"/>
> </t:form>
> 
> 
> when I click the submit button,I can't get the property file.
> 
> then I change the form l get the property file.
> <t:form>
>  <t:upload t:value="file" />
>  <input type="submit" value="OK"/>
> </t:form>
> 
> 
> I want to submit the form by ajax like the first way.
> Is there any way to get the upload  value by return a zone.
> 
> Can anyone help me ?  thanks a lot.
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Can-not-get-the-Upload-s-value-in-ajax-submit-tp5714138.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
>