Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Ashish Kulkarni
hi
I have a website which is developed using struts, I am
looking to convert some of it to AJAX and working on
different approaches, 
In my current application, i have a common Action
class which has all the common functions like getting
the information stored in ServletContext, or Session
or getting the connection from JNDI
I am using Ibatis SQL mapping to run SQL querries,
with SqlMapClient stored in ServletContext.
What would be the best way to start converting to DWR,
in DWR i can just define simple java beans (POJO).
I can get access to servlet request, etc using 
WebContext ctx = WebContextFactory.get();
req = ctx.getHttpServletRequest();

This is what i am planning, using Action class and
ActionForm to load initial data on jsp, and then use
DWR to update information on this screen jsp after
user does some funtions.

Is this the right approach?
Can i access this form bean (in request scope in java
bean class)

What are other possible ways to do so

Ashish

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Greg Ludington
You may want to ask this on the DWR users list; in version 1.1 there
is some support for accessing form beans directly from DWR.  The base
documentation page for DWR/Struts is here:

http://getahead.ltd.uk/dwr/server/struts

On 4/4/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> hi
> I have a website which is developed using struts, I am
> looking to convert some of it to AJAX and working on
> different approaches,
> In my current application, i have a common Action
> class which has all the common functions like getting
> the information stored in ServletContext, or Session
> or getting the connection from JNDI
> I am using Ibatis SQL mapping to run SQL querries,
> with SqlMapClient stored in ServletContext.
> What would be the best way to start converting to DWR,
> in DWR i can just define simple java beans (POJO).
> I can get access to servlet request, etc using
> WebContext ctx = WebContextFactory.get();
> req = ctx.getHttpServletRequest();
>
> This is what i am planning, using Action class and
> ActionForm to load initial data on jsp, and then use
> DWR to update information on this screen jsp after
> user does some funtions.
>
> Is this the right approach?
> Can i access this form bean (in request scope in java
> bean class)
>
> What are other possible ways to do so
>
> Ashish
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Has anyone intregrated DWR with AJAX?

2006-04-04 Thread Joe Germuska

At 11:31 AM -0700 4/4/06, Ashish Kulkarni wrote:

hi
I have a website which is developed using struts, I am
looking to convert some of it to AJAX and working on
different approaches,
In my current application, i have a common Action
class which has all the common functions like getting
the information stored in ServletContext, or Session
or getting the connection from JNDI
I am using Ibatis SQL mapping to run SQL querries,
with SqlMapClient stored in ServletContext.
What would be the best way to start converting to DWR,
in DWR i can just define simple java beans (POJO).
I can get access to servlet request, etc using
WebContext ctx = WebContextFactory.get();
req = ctx.getHttpServletRequest();

This is what i am planning, using Action class and
ActionForm to load initial data on jsp, and then use
DWR to update information on this screen jsp after
user does some funtions.

Is this the right approach?
Can i access this form bean (in request scope in java
bean class)


see http://getahead.ltd.uk/dwr/server/struts

Personally, I don't think there's much point to trying to use Struts 
objects in your DWR code.  As noted on that page, you may be just as 
well off refactoring your code to a more general model which can be 
used both by the action and by the object you expose remotely via DWR.


Joe

--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com


"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
-- Robert Moog