You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Gundersen <R....@salford.ac.uk> on 2009/07/07 16:08:41 UTC

Ajax Basics

Hi

 

I'm trying to get the datetimepicker working in my app. It's Struts 2
but it's totally non-AJAX at the moment. I also don't know anything
about AJAX to make matters worse. 

 

Please could someone tell me 

 

a)       what extra jars (dojo/json etc) do I need to pop into WEB-INF?
I don't mind which provider I use (Dojo, Prototype etc) as long as it
works.

b)      any other config to add to struts.xml?

c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
and <s:url

 

I've read quite a few articles saying how easy it is, but they all do
things slightly differently. If someone could tell me how to get the
basics configured, so that my datetimepicker works, I'd be grateful. 

 

Thanks


RE: Ajax Basics

Posted by Richard Gundersen <R....@salford.ac.uk>.
Cheers Martin

At the moment I'm not using any plugin for JQuery (although I noticed there are struts plugins for JSON etc). I'm just using the included javascript/css files.

I'm an Ajax noob, but would love to use it more. Could you tell me what extra functionality the plugin version would give me please?

Thanks
Richard

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: 08 July 2009 15:13
To: Struts Users Mailing List
Subject: RE: Ajax Basics


good to hear..I have a build environment for that plugin in case you need it

Cheers, 
Martin 
GMT+5 (this week)
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Subject: RE: Ajax Basics
> Date: Wed, 8 Jul 2009 14:15:48 +0100
> From: R.Gundersen@salford.ac.uk
> To: user@struts.apache.org
> 
> Thanks Dusty, and Martin
> 
> I'm happily using JQuery now - and it looks great! 
> 
> Cheers
> 
> Richard
> 
> 
> -----Original Message-----
> From: dusty [mailto:dustin_pearce@yahoo.com] 
> Sent: 08 July 2009 05:06
> To: user@struts.apache.org
> Subject: Re: Ajax Basics
> 
> 
> So I think straight JQuery is pretty easy, although I have not tried the
> new
> JQuery plugin(s).  Just download JQuery and JQuery UI and include them
> on
> your page.  
> 
>     <script type="text/javascript" src="<c:url
> value="/scripts/jquery/jquery-1.2.6.js"/>"></script>
>     <script type="text/javascript" src="<c:url
> value="/scripts/jquery/jquery.ui.all.js"/>"></script>
> 
> Then pick a JQuery UI Theme, download it and include it as well:
> 
>     <link type="text/css" href="<c:url
> value="/scripts/jquery/theme/ui.theme.css"/>" rel="stylesheet" />
> 
> You are almost all set:
>      Include the following javascript:
> 
> $(document).ready(function(){
>     $(".datefield").datepicker();
> });
> 
> I usually do this in a .js file that included on all pages.
> 
> Now create a struts text field and include the cssStyle 'datefield'.  
> <s:textfield name="mydate" cssStyle="datefield"/>
> 
> Viola!
> 
> You will likely want to create a Date converter.  You can find lots of
> posts
> and discussions about Type Conversion and date converters.
> 
> 
> 
> Richard Gundersen-2 wrote:
> > 
> > Hi
> > 
> >  
> > 
> > I'm trying to get the datetimepicker working in my app. It's Struts 2
> > but it's totally non-AJAX at the moment. I also don't know anything
> > about AJAX to make matters worse. 
> > 
> >  
> > 
> > Please could someone tell me 
> > 
> >  
> > 
> > a)       what extra jars (dojo/json etc) do I need to pop into
> WEB-INF?
> > I don't mind which provider I use (Dojo, Prototype etc) as long as it
> > works.
> > 
> > b)      any other config to add to struts.xml?
> > 
> > c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> > and <s:url
> > 
> >  
> > 
> > I've read quite a few articles saying how easy it is, but they all do
> > things slightly differently. If someone could tell me how to get the
> > basics configured, so that my datetimepicker works, I'd be grateful. 
> > 
> >  
> > 
> > Thanks
> > 
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Ajax-Basics-tp24374017p24384966.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Ajax Basics

Posted by Martin Gainty <mg...@hotmail.com>.
good to hear..I have a build environment for that plugin in case you need it

Cheers, 
Martin 
GMT+5 (this week)
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Subject: RE: Ajax Basics
> Date: Wed, 8 Jul 2009 14:15:48 +0100
> From: R.Gundersen@salford.ac.uk
> To: user@struts.apache.org
> 
> Thanks Dusty, and Martin
> 
> I'm happily using JQuery now - and it looks great! 
> 
> Cheers
> 
> Richard
> 
> 
> -----Original Message-----
> From: dusty [mailto:dustin_pearce@yahoo.com] 
> Sent: 08 July 2009 05:06
> To: user@struts.apache.org
> Subject: Re: Ajax Basics
> 
> 
> So I think straight JQuery is pretty easy, although I have not tried the
> new
> JQuery plugin(s).  Just download JQuery and JQuery UI and include them
> on
> your page.  
> 
>     <script type="text/javascript" src="<c:url
> value="/scripts/jquery/jquery-1.2.6.js"/>"></script>
>     <script type="text/javascript" src="<c:url
> value="/scripts/jquery/jquery.ui.all.js"/>"></script>
> 
> Then pick a JQuery UI Theme, download it and include it as well:
> 
>     <link type="text/css" href="<c:url
> value="/scripts/jquery/theme/ui.theme.css"/>" rel="stylesheet" />
> 
> You are almost all set:
>      Include the following javascript:
> 
> $(document).ready(function(){
>     $(".datefield").datepicker();
> });
> 
> I usually do this in a .js file that included on all pages.
> 
> Now create a struts text field and include the cssStyle 'datefield'.  
> <s:textfield name="mydate" cssStyle="datefield"/>
> 
> Viola!
> 
> You will likely want to create a Date converter.  You can find lots of
> posts
> and discussions about Type Conversion and date converters.
> 
> 
> 
> Richard Gundersen-2 wrote:
> > 
> > Hi
> > 
> >  
> > 
> > I'm trying to get the datetimepicker working in my app. It's Struts 2
> > but it's totally non-AJAX at the moment. I also don't know anything
> > about AJAX to make matters worse. 
> > 
> >  
> > 
> > Please could someone tell me 
> > 
> >  
> > 
> > a)       what extra jars (dojo/json etc) do I need to pop into
> WEB-INF?
> > I don't mind which provider I use (Dojo, Prototype etc) as long as it
> > works.
> > 
> > b)      any other config to add to struts.xml?
> > 
> > c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> > and <s:url
> > 
> >  
> > 
> > I've read quite a few articles saying how easy it is, but they all do
> > things slightly differently. If someone could tell me how to get the
> > basics configured, so that my datetimepicker works, I'd be grateful. 
> > 
> >  
> > 
> > Thanks
> > 
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Ajax-Basics-tp24374017p24384966.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

RE: Ajax Basics

Posted by Richard Gundersen <R....@salford.ac.uk>.
Thanks Dusty, and Martin

I'm happily using JQuery now - and it looks great! 

Cheers

Richard


-----Original Message-----
From: dusty [mailto:dustin_pearce@yahoo.com] 
Sent: 08 July 2009 05:06
To: user@struts.apache.org
Subject: Re: Ajax Basics


So I think straight JQuery is pretty easy, although I have not tried the
new
JQuery plugin(s).  Just download JQuery and JQuery UI and include them
on
your page.  

    <script type="text/javascript" src="<c:url
value="/scripts/jquery/jquery-1.2.6.js"/>"></script>
    <script type="text/javascript" src="<c:url
value="/scripts/jquery/jquery.ui.all.js"/>"></script>

Then pick a JQuery UI Theme, download it and include it as well:

    <link type="text/css" href="<c:url
value="/scripts/jquery/theme/ui.theme.css"/>" rel="stylesheet" />

You are almost all set:
     Include the following javascript:

$(document).ready(function(){
    $(".datefield").datepicker();
});

I usually do this in a .js file that included on all pages.

Now create a struts text field and include the cssStyle 'datefield'.  
<s:textfield name="mydate" cssStyle="datefield"/>

Viola!

You will likely want to create a Date converter.  You can find lots of
posts
and discussions about Type Conversion and date converters.



Richard Gundersen-2 wrote:
> 
> Hi
> 
>  
> 
> I'm trying to get the datetimepicker working in my app. It's Struts 2
> but it's totally non-AJAX at the moment. I also don't know anything
> about AJAX to make matters worse. 
> 
>  
> 
> Please could someone tell me 
> 
>  
> 
> a)       what extra jars (dojo/json etc) do I need to pop into
WEB-INF?
> I don't mind which provider I use (Dojo, Prototype etc) as long as it
> works.
> 
> b)      any other config to add to struts.xml?
> 
> c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> and <s:url
> 
>  
> 
> I've read quite a few articles saying how easy it is, but they all do
> things slightly differently. If someone could tell me how to get the
> basics configured, so that my datetimepicker works, I'd be grateful. 
> 
>  
> 
> Thanks
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Ajax-Basics-tp24374017p24384966.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Ajax Basics

Posted by dusty <du...@yahoo.com>.
So I think straight JQuery is pretty easy, although I have not tried the new
JQuery plugin(s).  Just download JQuery and JQuery UI and include them on
your page.  

    <script type="text/javascript" src="<c:url
value="/scripts/jquery/jquery-1.2.6.js"/>"></script>
    <script type="text/javascript" src="<c:url
value="/scripts/jquery/jquery.ui.all.js"/>"></script>

Then pick a JQuery UI Theme, download it and include it as well:

    <link type="text/css" href="<c:url
value="/scripts/jquery/theme/ui.theme.css"/>" rel="stylesheet" />

You are almost all set:
     Include the following javascript:

$(document).ready(function(){
    $(".datefield").datepicker();
});

I usually do this in a .js file that included on all pages.

Now create a struts text field and include the cssStyle 'datefield'.  
<s:textfield name="mydate" cssStyle="datefield"/>

Viola!

You will likely want to create a Date converter.  You can find lots of posts
and discussions about Type Conversion and date converters.



Richard Gundersen-2 wrote:
> 
> Hi
> 
>  
> 
> I'm trying to get the datetimepicker working in my app. It's Struts 2
> but it's totally non-AJAX at the moment. I also don't know anything
> about AJAX to make matters worse. 
> 
>  
> 
> Please could someone tell me 
> 
>  
> 
> a)       what extra jars (dojo/json etc) do I need to pop into WEB-INF?
> I don't mind which provider I use (Dojo, Prototype etc) as long as it
> works.
> 
> b)      any other config to add to struts.xml?
> 
> c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> and <s:url
> 
>  
> 
> I've read quite a few articles saying how easy it is, but they all do
> things slightly differently. If someone could tell me how to get the
> basics configured, so that my datetimepicker works, I'd be grateful. 
> 
>  
> 
> Thanks
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Ajax-Basics-tp24374017p24384966.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Ajax Basics

Posted by Richard Gundersen <R....@salford.ac.uk>.
Thanks Martin, I'll give it a go!

Richard


-----Original Message-----
From: Martin Uhlir [mailto:stoupa91devel@seznam.cz]
Sent: Tue 07/07/2009 17:11
To: Struts Users Mailing List
Subject: Re: Ajax Basics
 
Hi,

have a look at this plugin for Struts2 
http://code.google.com/p/struts2-jquery/wiki/DatePickerTag
Just drop the the jar into WEB-INF/lib and you are ready to go.

Martin



Richard Gundersen wrote:
> Hi
>
>  
>
> I'm trying to get the datetimepicker working in my app. It's Struts 2
> but it's totally non-AJAX at the moment. I also don't know anything
> about AJAX to make matters worse. 
>
>  
>
> Please could someone tell me 
>
>  
>
> a)       what extra jars (dojo/json etc) do I need to pop into WEB-INF?
> I don't mind which provider I use (Dojo, Prototype etc) as long as it
> works.
>
> b)      any other config to add to struts.xml?
>
> c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> and <s:url
>
>  
>
> I've read quite a few articles saying how easy it is, but they all do
> things slightly differently. If someone could tell me how to get the
> basics configured, so that my datetimepicker works, I'd be grateful. 
>
>  
>
> Thanks
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




Re: Ajax Basics

Posted by Martin Uhlir <st...@seznam.cz>.
Hi,

have a look at this plugin for Struts2 
http://code.google.com/p/struts2-jquery/wiki/DatePickerTag
Just drop the the jar into WEB-INF/lib and you are ready to go.

Martin



Richard Gundersen wrote:
> Hi
>
>  
>
> I'm trying to get the datetimepicker working in my app. It's Struts 2
> but it's totally non-AJAX at the moment. I also don't know anything
> about AJAX to make matters worse. 
>
>  
>
> Please could someone tell me 
>
>  
>
> a)       what extra jars (dojo/json etc) do I need to pop into WEB-INF?
> I don't mind which provider I use (Dojo, Prototype etc) as long as it
> works.
>
> b)      any other config to add to struts.xml?
>
> c)       JSP tags (in addition to <s:datetimepicker>) such as <s:head
> and <s:url
>
>  
>
> I've read quite a few articles saying how easy it is, but they all do
> things slightly differently. If someone could tell me how to get the
> basics configured, so that my datetimepicker works, I'd be grateful. 
>
>  
>
> Thanks
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org