Re: FormInjector example problem

2012-12-27 Thread bhorvat
I think I have found the way to trigger the call using jquery plugin. It is
using 

$('#injector').tapestryFormInjector("trigger");

However my next problem is how can I get the id of the FormInjector
component

I have tried 

@Component
private FormInjector injectImages;
String clientId = injectImages.getClientId();

But I get null for client id.

My idea is that once ajaxupload is triggered I will run a javascript
function that will trigger the form injector to inject new form elements. So
I need the client id of the component. Any suggestions?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/FormInjector-example-problem-tp5719031p5719035.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



FormInjector example problem

2012-12-27 Thread bhorvat
Hi all,

I want to be able to use a zone to add fields in my form and from what I can
tell I need to use FormInjector. However I am having hard time trying to
figure how to use it. 

I have create a small example that I am trying to run it, before I start
working on the real form. 

My tml is 

  




Name







Description







Click
me!


   

In page header I have

  


in order to trigger the injection

My .java class is

@Inject
private Block formFieldsBlock;

@OnEvent(component = "injector")
Block loadExtraFormFields() {
return this.formFieldsBlock;
}
@Property
private String name;
@Property
private String description;

For some reason I can seem to trigger the injection. I get js error 

TypeError: Cannot read property 'type' of undefined
[http://localhost:8080/assets/feaaffaed17053ca/jquery/jquery_core/jquery-1.7.2.js:3111]

I think that what the problem is 

I am using tapestry5-jquery if that matters.

Thank you.

Cheers



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/FormInjector-example-problem-tp5719031.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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