Re: T5: DWR Integration

2009-02-21 Thread Andy Pahne



Sounds like a clean solution to bundle dwr also inside component libs. 
Just drop it in and use it! Nice.





Stephane Decleire schrieb:

I've come up with this idea :

String context = request.getContextPath();
renderSupport.addScriptLink(context + "/dwr/engine.js");

and the DWR servlet mapping could be passed as a parameter to my
component to be fully customized ...

  


I think you mean sth like:

renderSupport.addScriptLink(context + "/${dwrServletMapping}/engine.js");





What do you think about it ?

Stephane


Andy Pahne a écrit :
  

I don't know if that's possible.

You - as a library provider - and the consumer at least need to find a
convention about how the dwr servlet is mapped. /dwr/ is kind of
standard, but not granted. That's the first problem.

Next problem: Do the Tapestry facilities (@IncludeScriptLibrary...)
support your use case? I guess not.

When I integrated dwr, I did not even think that far, because I did
not have to bundle it as a component lib. So I ended up using the same
script-tags that you used.

Andy







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



Re: T5: DWR Integration

2009-02-20 Thread Stephane Decleire
I've come up with this idea :

String context = request.getContextPath();
renderSupport.addScriptLink(context + "/dwr/engine.js");

and the DWR servlet mapping could be passed as a parameter to my
component to be fully customized ...

What do you think about it ?

Stephane


Andy Pahne a écrit :
>
> I don't know if that's possible.
>
> You - as a library provider - and the consumer at least need to find a
> convention about how the dwr servlet is mapped. /dwr/ is kind of
> standard, but not granted. That's the first problem.
>
> Next problem: Do the Tapestry facilities (@IncludeScriptLibrary...)
> support your use case? I guess not.
>
> When I integrated dwr, I did not even think that far, because I did
> not have to bundle it as a component lib. So I ended up using the same
> script-tags that you used.
>
> Andy
>
>
>
>
>
>
> Stephane Decleire schrieb:
>> Thanks Andy,
>>
>> But i've already done this. It works great on the DWR side but that
>> doesn't help on the way to integrate the DWR javascript files in my
>> Tapestry components ... does it ?
>>
>> Stephane
>>
>> Andy Pahne a écrit :
>>  
>>> Stephane Decleire schrieb:
>>>
 Hi all,

 I've tried to integrate DWR with Tapestry and the both frameworks seem
 to work great together (perhaps because they don't do the same work
 ;-)
 and are not so integrated). [...]
 
>>> +1. Works like a charm.
>>>
>>>
>>>
 Is there a way to tell Tapestry to get the file from another
 servlet or
 not to check the file existence when the application starts ?
 Or should i dig into tapestry code and develop a "dwr:" prefix like
 the
 "context:" and "classpath:" ones (i haven't give a look at that and
 don't know if it's even possible ...)

 
>>> In deed, there is a way, exactly for your use case.
>>>
>>> See the "Configuring Tapestry",
>>>http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
>>> esp. the section on "Ignored Paths".
>>>
>>>
>>> If you do it this way, you configure dwr like it's documentation says.
>>> There's no more special setup needed than contributing the ignored
>>> path.
>>>
>>>
>>> Andy
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>> 
>>
>>   
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


Re: T5: DWR Integration

2009-02-18 Thread César Lesc
Hi, i'm considering DWR for a Tapestry project, DWR has integrations
with Spring and Guice, do you known how hard could be use DWR with
Tapestry IOC?

Regards

César.

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



Re: T5: DWR Integration

2009-02-18 Thread Andy Pahne


I don't know if that's possible.

You - as a library provider - and the consumer at least need to find a 
convention about how the dwr servlet is mapped. /dwr/ is kind of 
standard, but not granted. That's the first problem.


Next problem: Do the Tapestry facilities (@IncludeScriptLibrary...) 
support your use case? I guess not.


When I integrated dwr, I did not even think that far, because I did not 
have to bundle it as a component lib. So I ended up using the same 
script-tags that you used.


Andy






Stephane Decleire schrieb:

Thanks Andy,

But i've already done this. It works great on the DWR side but that
doesn't help on the way to integrate the DWR javascript files in my
Tapestry components ... does it ?

Stephane

Andy Pahne a écrit :
  

Stephane Decleire schrieb:


Hi all,

I've tried to integrate DWR with Tapestry and the both frameworks seem
to work great together (perhaps because they don't do the same work ;-)
and are not so integrated). [...]
  
  

+1. Works like a charm.




Is there a way to tell Tapestry to get the file from another servlet or
not to check the file existence when the application starts ?
Or should i dig into tapestry code and develop a "dwr:" prefix like the
"context:" and "classpath:" ones (i haven't give a look at that and
don't know if it's even possible ...)

  
  

In deed, there is a way, exactly for your use case.

See the "Configuring Tapestry",
   http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
esp. the section on "Ignored Paths".


If you do it this way, you configure dwr like it's documentation says.
There's no more special setup needed than contributing the ignored path.


Andy



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




  



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



Re: T5: DWR Integration

2009-02-17 Thread Stephane Decleire
Thanks Andy,

But i've already done this. It works great on the DWR side but that
doesn't help on the way to integrate the DWR javascript files in my
Tapestry components ... does it ?

Stephane

Andy Pahne a écrit :
> Stephane Decleire schrieb:
>> Hi all,
>>
>> I've tried to integrate DWR with Tapestry and the both frameworks seem
>> to work great together (perhaps because they don't do the same work ;-)
>> and are not so integrated). [...]
>>   
>
>
> +1. Works like a charm.
>
>
>> Is there a way to tell Tapestry to get the file from another servlet or
>> not to check the file existence when the application starts ?
>> Or should i dig into tapestry code and develop a "dwr:" prefix like the
>> "context:" and "classpath:" ones (i haven't give a look at that and
>> don't know if it's even possible ...)
>>
>>   
>
>
> In deed, there is a way, exactly for your use case.
>
> See the "Configuring Tapestry",
>http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
> esp. the section on "Ignored Paths".
>
>
> If you do it this way, you configure dwr like it's documentation says.
> There's no more special setup needed than contributing the ignored path.
>
>
> Andy
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


Re: T5: DWR Integration

2009-02-17 Thread Andy Pahne

Stephane Decleire schrieb:

Hi all,

I've tried to integrate DWR with Tapestry and the both frameworks seem
to work great together (perhaps because they don't do the same work ;-)
and are not so integrated). [...]
  



+1. Works like a charm.



Is there a way to tell Tapestry to get the file from another servlet or
not to check the file existence when the application starts ?
Or should i dig into tapestry code and develop a "dwr:" prefix like the
"context:" and "classpath:" ones (i haven't give a look at that and
don't know if it's even possible ...)

  



In deed, there is a way, exactly for your use case.

See the "Configuring Tapestry",
   http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
esp. the section on "Ignored Paths".


If you do it this way, you configure dwr like it's documentation says. 
There's no more special setup needed than contributing the ignored path.



Andy



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



T5: DWR Integration

2009-02-17 Thread Stephane Decleire
Hi all,

I've tried to integrate DWR with Tapestry and the both frameworks seem
to work great together (perhaps because they don't do the same work ;-)
and are not so integrated). For the test, i've just put the to
javascript libraries needed by DWR directly in the XHTML code like this :



Now, in a production environment, i would like to use the Tapestry
RenderSupport possibilities :
renderSupport.addScriptLink("/myapp/dwr/engine.js");
renderSupport.addScriptLink("/myapp/dwr/util.js");

And use Assets to avoid leaving the "myapp" hardcoded !

@Inject
@Path("context:dwr/engine.js")
private Asset engine;

renderSupport.addScriptLink(engine);

but this piece of code doesn't work : Tapestry can't find the file when
the application starts. Indeed, DWR works with it's own servlet which
return the javascript files !
Is there a way to tell Tapestry to get the file from another servlet or
not to check the file existence when the application starts ?
Or should i dig into tapestry code and develop a "dwr:" prefix like the
"context:" and "classpath:" ones (i haven't give a look at that and
don't know if it's even possible ...)

Thanks in advance for any clue or advice.

Stephane



Re: T5 + DWR integration

2008-05-13 Thread Christian Riedel

I tried it out and it worked quite easy.
Spring is not a dependency of DWR as far as I know, so... ;)


Leon Derks schrieb:

I don't have that topic.

Is it easy to integrate DWR with tapestry, without Spring?

Leon

Renat Zubairov wrote:

Hi

That's an interesting topic. Actually we had discussed it once with 
Igor,

and it seems that it shouldn't be too hard.
The question is which objects from the server-side you want to access 
from

DWR? If you will answer this question
then you can just start a DWR servlet in your web application and try 
to get

the objects of interest.

Renat

2008/5/13 Leon Derks <[EMAIL PROTECTED]>:

 

How easy is it to integrate T5 with DWR?

Are there examples of how to do this?
How do I need to configure the dwr.xml file?

Leon

-
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]



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



Re: T5 + DWR integration

2008-05-13 Thread Leon Derks

I don't have that topic.

Is it easy to integrate DWR with tapestry, without Spring?

Leon

Renat Zubairov wrote:

Hi

That's an interesting topic. Actually we had discussed it once with Igor,
and it seems that it shouldn't be too hard.
The question is which objects from the server-side you want to access from
DWR? If you will answer this question
then you can just start a DWR servlet in your web application and try to get
the objects of interest.

Renat

2008/5/13 Leon Derks <[EMAIL PROTECTED]>:

  

How easy is it to integrate T5 with DWR?

Are there examples of how to do this?
How do I need to configure the dwr.xml file?

Leon

-
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: T5 + DWR integration

2008-05-13 Thread Renat Zubairov
Hi

That's an interesting topic. Actually we had discussed it once with Igor,
and it seems that it shouldn't be too hard.
The question is which objects from the server-side you want to access from
DWR? If you will answer this question
then you can just start a DWR servlet in your web application and try to get
the objects of interest.

Renat

2008/5/13 Leon Derks <[EMAIL PROTECTED]>:

> How easy is it to integrate T5 with DWR?
>
> Are there examples of how to do this?
> How do I need to configure the dwr.xml file?
>
> Leon
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Best regards,
Renat Zubairov


T5 + DWR integration

2008-05-13 Thread Leon Derks

How easy is it to integrate T5 with DWR?

Are there examples of how to do this?
How do I need to configure the dwr.xml file?

Leon

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