You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by eleanorltd <el...@gmail.com> on 2012/03/21 19:12:35 UTC

jQuery and Submit button - Tapestry 5 problem

Hello people,

I have big problem with jQuery and Submit button in Tapestry 5. When jQuery
is loaded and "prototype.js" disabled "submit" button in .tml page where is
some form didn't work. Next case is when jQuery disabled and "prototype.js"
enabled button work. And last case is when both (jQuery and "prototype.js")
is disabled, button work.
Where is the problem?
 I need jQuery to be activated/loaded becouse i have other things on
template which use jQuery.

Thanks very much and best regards,

Marko Perovic 

-----------------------------------------

17 posts
	
Hi

Do you have any JavaScript errors ? It looks like a conflict between the
"$" of jQuery and Prototype. Did you add a jQuery.noConflict(); ?

You can also use the Tapestry5-jQuery project, which provide an easy way to
create a jQuery+Prototype application :  http://tapestry5-jquery.com/

Manu

-----------------------------------------

I try with tapestry5-jquery with no success, i try with jQuery.noConflict(),
then things which use jQuery didn't work but submit button work.

:( 


-----------------------------------------

Is there anyone who can help me? :)

Best regards,

Marko Perovic

--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5583697.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <de...@gmail.com>.
I have just tested your Application with Tapestry5-jQuery 3.2.0, and
SUPPRESS_PROTOTYPE=true.
And your problem comes from wl_Forms.js !!

At the same time, do not include jquery.js a,d jQuery.noConflict() by
yourself. Tapestry5-jQuery will do it for you.

Manu

2012/3/22 eleanorltd <el...@gmail.com>

> No this is not problem with script.js.
>
> When i set jQuery.noConflict(); T button submit work - jQuery don't work:
> Here is project:
> http://tapestry.1045711.n5.nabble.com/file/n5587140/ISNENewSWork.zip
> ISNENewSWork.zip
>
> when i delete jQuery.noConflict(); T button submit DON'T work - jQuery
> work:
> here is project:
> http://tapestry.1045711.n5.nabble.com/file/n5587140/ISNENewSDontWork.zip
> ISNENewSDontWork.zip
>
> Now i am using Tapestry 5.2.6 and tapestry5-jQuery 2.1.1 version!
>
> This is very funny!
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5587140.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
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
No this is not problem with script.js.

When i set jQuery.noConflict(); T button submit work - jQuery don't work:
Here is project: 
http://tapestry.1045711.n5.nabble.com/file/n5587140/ISNENewSWork.zip
ISNENewSWork.zip 

when i delete jQuery.noConflict(); T button submit DON'T work - jQuery work:
here is project: 
http://tapestry.1045711.n5.nabble.com/file/n5587140/ISNENewSDontWork.zip
ISNENewSDontWork.zip 

Now i am using Tapestry 5.2.6 and tapestry5-jQuery 2.1.1 version!

This is very funny!


--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5587140.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <de...@gmail.com>.
I will prefer still using Tapestry5-jQuery, because without this project,
your will have conflict problem !!

So if I keep the dependency to Tapestry5-jQuery, Please add this annotation
into to your Contact page :
@ImportJQueryUI({"jquery.ui.accordion", "jquery.ui.tabs"})

This annotation will add the JavaScript files(jquery.ui.accordion.js and
jquery.ui.tabs.js) for the tabs and accordion components. Now it should
work. These 2 files are packaged in the Tapestry5-jQuery project.

In fact, your problem is coming from your script.js. you call jQuery
widget, without including them into your page.

2012/3/22 eleanorltd <el...@gmail.com>

> Everything work fine on original template without tapestry. Maybe it is
> becouse i forgot to load jQuery UI Script. I uploaded project with loaded
> jQuery UI script and jQuery, and i delete Tapestry5-jQuery. With that
> config
> Submit button work but jQuery things didn't.
> http://tapestry.1045711.n5.nabble.com/file/n5586816/ISNENew.zipISNENew.zip
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586816.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
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
Everything work fine on original template without tapestry. Maybe it is
becouse i forgot to load jQuery UI Script. I uploaded project with loaded
jQuery UI script and jQuery, and i delete Tapestry5-jQuery. With that config
Submit button work but jQuery things didn't.
http://tapestry.1045711.n5.nabble.com/file/n5586816/ISNENew.zip ISNENew.zip 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586816.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <de...@gmail.com>.
YOu have a JavaScript error messages ! Uncaught TypeError: Object [object
Object] has no method 'accordion' in script.js

Please check if the JavaScript file of the Accordion jQuery UI widget is
loaded.

Manu

2012/3/22 eleanorltd <el...@gmail.com>

> path to Contact page is localhost:8080/isneNew/Contact
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586524.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
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Twitter : @gillespie59

Re: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
path to Contact page is localhost:8080/isneNew/Contact


--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586524.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: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
In contact page you have Tapestry submit button, and on general template on
left side where is the Other button when you click on it, it's must slide
down like some menu which dont't work.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586508.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <em...@atos.net>.
I have just tested the  increment (via
Ajax)<http://localhost:7979/isneNew/index.incrementajax>
 ]  link, and the update works.
What I have to test ?

2012/3/22 eleanorltd <el...@gmail.com>

> No i don't have any JS errors. I try everything, SUPRESS_PROTOTYPE
> true/false, jQuery.noConflict() and now i am without any idea what to try
> next. :)
> I upload new clean project which have that problem. If you have time please
> download them. Thank you!
> http://tapestry.1045711.n5.nabble.com/file/n5586298/ISNENew.zipISNENew.zip
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586298.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: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
No i don't have any JS errors. I try everything, SUPRESS_PROTOTYPE
true/false, jQuery.noConflict() and now i am without any idea what to try
next. :)
I upload new clean project which have that problem. If you have time please
download them. Thank you!
http://tapestry.1045711.n5.nabble.com/file/n5586298/ISNENew.zip ISNENew.zip 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5586298.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <em...@atos.net>.
If you set the SUPPRESS_PROTOTYPE to true, jQuery code should work! DO you
have any JavaScript error ?


2012/3/22 eleanorltd <el...@gmail.com>

> I use Tapestry 5.3.2 version and Tapestry5-jQuery 3.0.0 version.
>
>
> Demey Emmanuel wrote
> >
> > Which version of Tapestry and Tapestry5-jQuery do you use ?
> >
> > 2012/3/22 eleanorltd &lt;eleanorltd@&gt;
> >
> >> When i set SUPRESS_PROTOTYPE to "true" button works but jQuery didn't.
> >> I upload my layout and page where is submit button implemented.
> >>
> >> http://tapestry.1045711.n5.nabble.com/file/n5585017/Template.tml
> >> Template.tml
> >>
> http://tapestry.1045711.n5.nabble.com/file/n5585017/Contact.tmlContact.tml
> >>
> >> --
> >> View this message in context:
> >>
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585017.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@.apache
> >> For additional commands, e-mail: users-help@.apache
> >>
> >>
> >
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585999.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: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
I use Tapestry 5.3.2 version and Tapestry5-jQuery 3.0.0 version.


Demey Emmanuel wrote
> 
> Which version of Tapestry and Tapestry5-jQuery do you use ?
> 
> 2012/3/22 eleanorltd &lt;eleanorltd@&gt;
> 
>> When i set SUPRESS_PROTOTYPE to "true" button works but jQuery didn't.
>> I upload my layout and page where is submit button implemented.
>>
>> http://tapestry.1045711.n5.nabble.com/file/n5585017/Template.tml
>> Template.tml
>> http://tapestry.1045711.n5.nabble.com/file/n5585017/Contact.tmlContact.tml
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585017.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>>
>>
> 


--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585999.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <em...@atos.net>.
Which version of Tapestry and Tapestry5-jQuery do you use ?

2012/3/22 eleanorltd <el...@gmail.com>

> When i set SUPRESS_PROTOTYPE to "true" button works but jQuery didn't.
> I upload my layout and page where is submit button implemented.
>
> http://tapestry.1045711.n5.nabble.com/file/n5585017/Template.tml
> Template.tml
> http://tapestry.1045711.n5.nabble.com/file/n5585017/Contact.tmlContact.tml
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585017.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: jQuery and Submit button - Tapestry 5 problem

Posted by eleanorltd <el...@gmail.com>.
When i set SUPRESS_PROTOTYPE to "true" button works but jQuery didn't.
I upload my layout and page where is submit button implemented.

http://tapestry.1045711.n5.nabble.com/file/n5585017/Template.tml
Template.tml 
http://tapestry.1045711.n5.nabble.com/file/n5585017/Contact.tml Contact.tml 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5585017.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: jQuery and Submit button - Tapestry 5 problem

Posted by Emmanuel DEMEY <em...@atos.net>.
you should set this constant in the contributeApplicationDefaults method
(instead of  contributeFactoryDefaults).

2012/3/21 ksrijith <ks...@gmail.com>

> When using Tapestry5-jquery you would need to add the following to the
> AppModule.contributeFactoryDefaults method to completely suppress
> Prototype:
> configuration.override(JQuerySymbolConstants.SUPPRESS_PROTOTYPE,
>  "true");
>
> If you could provide the tml file where this issue it happening, maybe the
> cause is something completely different.
>
> -----
> --
> Don't Forget to Rate
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5584201.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: jQuery and Submit button - Tapestry 5 problem

Posted by ksrijith <ks...@gmail.com>.
When using Tapestry5-jquery you would need to add the following to the
AppModule.contributeFactoryDefaults method to completely suppress Prototype:
configuration.override(JQuerySymbolConstants.SUPPRESS_PROTOTYPE,	"true");

If you could provide the tml file where this issue it happening, maybe the
cause is something completely different.

-----
--
Don't Forget to Rate
--
View this message in context: http://tapestry.1045711.n5.nabble.com/jQuery-and-Submit-button-Tapestry-5-problem-tp5583697p5584201.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