Re: What's the easiest way to implement two dependent select lists ?

2008-12-06 Thread thermus

I'm a Tapestry novice, but you may want to have a look at 
http://code.google.com/p/tapestry5-components/ t5components .  It allows you
to add a mixin to components to respond to an OnChange event with AJAX (see: 
http://87.193.218.134:8080/t5c-demo/oneventpage this  and 
http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html
this  for details).  You could then change the data model for the other
select component with a tiny bit of JavaScript in the onCompleteCallback
function.  

I'm curious how a Tapestry expert would handle it.


HugoPalma wrote:
> 
> I have a very usual use where in a form i have two selects, and when the
> user selects a value on one the values on the second should be filtered
> accordingly.
> As the Select component doesn't support ajax out-of.the-box i see myself
> forced to implement a lot of plumbing and javascript stuff.
> 
> Still, i feel that this kind of use case should be much easier to
> implement.
> Maybe i'm missing something.
> I'd like to hear some ideas about how u would handle this.
> 
> Thanks.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/What%27s-the-easiest-way-to-implement-two-dependent-select-lists---tp20859735p20877559.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



tapestry-spring-security: using custom AuthenticationProcessingFilter

2008-12-06 Thread rs1050

I am trying to use my custom implementation of
org.springframework.security.ui.webapp.AuthenticationProcessingFilter with
tapestry-spring-security. 

By looking at the source of tapestry-spring-security i see this in
SecurityModule:

public static void contributeHttpServletRequestHandler(
OrderedConfiguration configuration,
@InjectService("AuthenticationProcessingFilter")
HttpServletRequestFilter authenticationProcessingFilter,
...)

How can I tell tapestry-spring-security to use my own implementation of
AuthenticationProcessingFilter without modifying tapestry-spring-security
code?

Thank you.
R.

-- 
View this message in context: 
http://www.nabble.com/tapestry-spring-security%3A-using-custom-AuthenticationProcessingFilter-tp20877071p20877071.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: dojo 1.2.2 and tapestry integration

2008-12-06 Thread issoax


Shaowei Mao-2 wrote:
> 
> 
> Is there way i can replace current dojo packaged in tapestry jar with dojo
> 1.2.2 and add dijit?
> -- 
> View this message in context:
> http://n2.nabble.com/dojo-1.2.2-and-tapestry-integration-tp1588280p1588280.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

I'm tring to make some dijit examples working (for a generated with appfuse
project) but no success yet :-(( 
as far as i read dojoSource and dojoPath should be set on the  Shell
component http://tapestry.apache.org/tapestry4.1/components/Shell.html but
still doesnt work and get warnings like 
WARN [http-8080-2] Asset.service(241) | Classpath resource
'/dojo-0.4.3/parser.js' does not exist.
obviously im missing something and will be very happy if someone show us how
this should be done

-- 
View this message in context: 
http://www.nabble.com/dojo-1.2.2-and-tapestry-integration-tp20730469p20874306.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: tapestry-spring-security: how to set ASO on successful login?

2008-12-06 Thread rs1050

Thank you.

"You could work with the ASO in the relevant onSuccess method." - i wish i
could - my onSuccess method for my Login page is *not* being called b/c
tapestry-spring-security filter hijacks the request to that url. Once
spring-security's filter (and it is not a Tapestry's filter) start
processing the request, i need to be able to do something with the ASO. 

Currently I am planning to subclass
org.springframework.security.ui.webapp.AuthenticationProcessingFilter and
overwrite onSuccessfulAuthentication method to create ASO. In order to do
that I need reference to ApplicationStateManager. However, i can't figure
out a way of how to get it except for a very ugly one:

1. I create a TapestryExposer eager service, which on construction,
remembers ApplicationStateManager passed to the constructor and set itself
into a Spring-defined bean called 'TapestryExposerHolder'
2. in my custom spring-security filter's (non-tapestry filter)
onSuccessfulAuthentication method I lookup TapestryExposerHolder, and from
it get TapestryExposer, and from that I get ApplicationStateManager.
ugr.

I anyone can come up with a cleaner way of doing something with ASO after
successful authentication by spring security, it is really appreciated.

R.
-- 
View this message in context: 
http://www.nabble.com/tapestry-spring-security%3A-how-to-set-ASO-on-successful-login--tp20865863p20874204.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Ajax polling using zone

2008-12-06 Thread mad7777

Hi!

Still finding little problems upgrading from 5.0.11 to 5.0.17.  Here is my
latest issue:

I was using prototype's Ajax.PeriodicalUpdater to do polling by refreshing a
zone.  My code goes like this:

component tml:

Poll

 ${gameId} 

component java:

@Inject
private Block pollResultsBlock;

@OnEvent(component = "pollLink")
Block poll() {
return pollResultsBlock;
}

public int getGameId() {
return this.gameId;
}

I inject this javascript:

var url = $("pollLink").href;
var updater = new Ajax.PeriodicalUpdater('pollResults', url, {
asynchronous:true,
frequency:2,
evalJS:true,
onLoaded: function(transport) {
$("pollResults").style.display = "none";
var result = $("pollResults").innerHTML;
eval("gameId = " + result + "['content']");
// do some stuff with gameId
}
});


All this used to word in 5.0.11, but in 5.0.17, although the ActionLink
works if I click it manually, the PeriodicUpdate now fails.  Instead of
putting gameId in the block, I get the entire contents of the page.  In
fact, the poll() method is never even invoked unless I click the link
manually.

Moreover, I'd like to know if there is some right way to do polling via
Ajax.  Notwithstanding the fact that it no longer works, my method seems
like a horrible hack...

Thanks again,
Marc

-- 
View this message in context: 
http://www.nabble.com/Ajax-polling-using-zone-tp20873920p20873920.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: PageRenderSupport deprecated?

2008-12-06 Thread Howard Lewis Ship
You could try reading the very detailed upgrade notes before spamming the list.

On Sat, Dec 6, 2008 at 4:56 AM, Martijn Brinkers <[EMAIL PROTECTED]> wrote:
> I think it has been renamed to RenderSupport
>
> Martijn Brinkers
>
> On Sat, 2008-12-06 at 04:51 -0800, mad wrote:
>> Hi again,
>>
>> I recently upgraded an app from 5.0.11 to 5.0.17, and now it can no longer
>> find PageRenderSupport, which I was using to inject some javascript, like
>> this:
>>
>>   @Inject
>>   @Path("scripts/injected.js")
>>   private Asset injectedJsAsset;
>>
>>   @Inject
>>   private PageRenderSupport pageRenderSupport;
>>
>>   void setupRender() {
>>   pageRenderSupport.addScriptLink(injectedJsAsset);
>>   }
>>
>> This no longer compiles in 5.0.17, due to the fact that PageRenderSupport
>> seems to have disappeared.
>>
>> What is the proper way to do this now?
>>
>> Thanks in advance,
>> Marc
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: PageRenderSupport deprecated?

2008-12-06 Thread Martijn Brinkers
I think it has been renamed to RenderSupport

Martijn Brinkers

On Sat, 2008-12-06 at 04:51 -0800, mad wrote:
> Hi again,
> 
> I recently upgraded an app from 5.0.11 to 5.0.17, and now it can no longer
> find PageRenderSupport, which I was using to inject some javascript, like
> this:
> 
>   @Inject
>   @Path("scripts/injected.js")
>   private Asset injectedJsAsset;
> 
>   @Inject
>   private PageRenderSupport pageRenderSupport;
> 
>   void setupRender() {
>   pageRenderSupport.addScriptLink(injectedJsAsset);
>   }
> 
> This no longer compiles in 5.0.17, due to the fact that PageRenderSupport
> seems to have disappeared.
> 
> What is the proper way to do this now?
> 
> Thanks in advance,
> Marc
> 


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



PageRenderSupport deprecated?

2008-12-06 Thread mad7777

Hi again,

I recently upgraded an app from 5.0.11 to 5.0.17, and now it can no longer
find PageRenderSupport, which I was using to inject some javascript, like
this:

@Inject
@Path("scripts/injected.js")
private Asset injectedJsAsset;

@Inject
private PageRenderSupport pageRenderSupport;

void setupRender() {
pageRenderSupport.addScriptLink(injectedJsAsset);
}

This no longer compiles in 5.0.17, due to the fact that PageRenderSupport
seems to have disappeared.

What is the proper way to do this now?

Thanks in advance,
Marc

-- 
View this message in context: 
http://www.nabble.com/PageRenderSupport-deprecated--tp20869794p20869794.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-06 Thread Ben Gidley
Russell,
I you look at YUI's event model I belive it handles this better.

YUI Event - http://developer.yahoo.com/yui/event/ will allow you define
events before DOM Ready and queues them until after.

This should be a good way to solve this problem.

Ben

On Fri, Dec 5, 2008 at 4:42 PM, Russell Brown <[EMAIL PROTECTED]>wrote:

> Is Ok. I read the results at
> https://issues.apache.org/jira/browse/TAP5-1. I guess we will have to
> roll our own. Can't have users clicking once and waiting and then going
> "uh...did I click that"... I think it is better if there is either some
> feedback or a way of trapping the event and replaying it when the page
> has loaded.
>
> Cheers
> Russell
>
> -Original Message-
> From: Russell Brown [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2008 14:59
> To: Tapestry users
> Subject: RE: T5: Clicking on actionLonk with a zone parameter before
> page loads
>
> Can you tell me what happens now? Is the link just dead until the page
> loads, is there some sort of feed back? Is It invisible? Just want to
> know as we were about to roll our own solution.
>
> Many thanks
>
> Russell
>
> -Original Message-
> From: Inge Solvoll [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2008 14:52
> To: Tapestry users
> Subject: Re: T5: Clicking on actionLonk with a zone parameter before
> page loads
>
> Last version of T5 has a fix for this. Works for me now.
>
> On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
> <[EMAIL PROTECTED]>wrote:
>
> > Hi,
> >
> > I have some AJAX calls from actionLinks. If a user clicks on the
> > actionLink before the page is fully loaded I get the exception
> >
> >
> >
> > A component event handler method returned the value
> > [EMAIL PROTECTED] Return type
> > org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
> > Configured return types are java.lang.Class, java.lang.String,
> > java.net.URL, org.apache.tapestry5.Link,
> > org.apache.tapestry5.StreamResponse,
> > org.apache.tapestry5.runtime.Component.
> >
> >
> >
> >
> >
> > Is this something to do with javascript setting up the zones on load?
> >
> >
> >
> > Is there a work around or a planned fix for this? We use ajax calls
> all
> > over the site and everyone can cause this kind of explosion if we have
> a
> > fast clicker.
> >
> >
> >
> > Cheers
> >
> >
> >
> > Russell
> >
> >
>
> -
> 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]
>
>