Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-12 Thread Gerald Schöffel

Yippee !

Thank you for this link ! Now I understood the concept and encapsulated 
the plain dojo-widgets (like SortableTable, Dialog etc.) with 
'Tapestry-widgets' and everything is running like intended ... that's 
really cool !


Together with the IDirect interface I found in your code it got even 
better :-)


So Ben was right: when using targets=... with an 'encapsulated' widget 
the rendering will be dojo.widget.byId(...).


So it is possible to get those AOP style events from dojo. Fine !!

Thanks again for helping my out there :)

Bye,
Gary


if you have a component that extends or implements IWidget tapestry will
resolve the client side code using dojo.widget.byId...(It'll also 
parse your

widget for you inline so your whole app isn't bogged down by needless
parsing of the entire dom tree).

Look at Autocompleter in the svn source for a good example.

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/ 



On 9/11/06, Gerald Schöffel [EMAIL PROTECTED] wrote:


Hi Ben,

thank you for your reply ! I tried it right away ...

Would be too cool if this will work ... but for me it does not :(

When using targets=..: tapestry is looking for a component like in
[EMAIL PROTECTED] ... but internally Tapestry is again connecting via
dojo.event.connect(dojo.byId(...),...)  by resolving the assigned ID of
the component.

Omitting the ID will not work, because Tapestry will render one with the
name of the component by default.

Being tricky naming all IDs the same will fail because of the 'wrong'
dojo.byId().

Hmmm ... Jesse ... how about something like
'element=widget:addressTable' or 'widget=addressTable' to get a
connection with dojo.widget.byId(...) ??

Or is there something included already ?

Worth an JIRA-entry ?

Thanks again for helping !!

Bye,
Gary

 Gary,

 If you change
 @EventListener(events=onSelect, elements=addressTable)
 to
 @EventListener(events=onSelect, targets=addressTable)

 then Tapestry will render the event script using dojo.widget.ByID
 (elements hooks to html elements, targets hooks to components/widgets)

 Hope that helps
 regards,
 Ben

 -Original Message-
 From: Gerald Schöffel [mailto:[EMAIL PROTECTED]
 Sent: Monday, 11 September 2006 2:10 PM
 To: Tapestry users
 Subject: Re: Is it possible to connect a dojo SortableTable to 
Tapestry

 4.1.1 ?

 Ok, me again ... could not give up on this ...

 So I cleaned up my code and learned how to use the @Script-tag ...cool
thing
 :-)

 When connecting manually, the following code will work:

 dojo.event.connect(dojo.widget.byId(tableWidget), onSelect, 
window,

 addressDisplay_selectAlert) ;

 This will display an alert whenever I click on a row.

 Tapestry will render the following when using @EventListener:

 dojo.event.connect(dojo.byId(addressTable), onSelect, tapestry,
 event327750702);

 When using this syntax to connect the event by hand like

 dojo.event.connect(dojo.byId(addressTable), onSelect, window,
 addressDisplay_selectAlert);

 it will NOT work.

 Hmmm ... is there a way to get this working with @EventListener ?

 The second possibility would be to do the 'eventhandling' (onSelect 
is a
 function-call, no event at all) with js and send another 'real' 
event to

 Tapestry. But as the first possibility ... I do not know, how to to so
:(

 Any help on this is really  desired :)

 Thank you !

 Bye,
 Gary


 Hi Jesse !

 Thank you for your quick reply !

 But I already use

 binding name=parseWidgets value=ognl:true / in my
 shell component. So the widget is created and functional (clicking on
 a header sorts the table and so on).

 The only 'issue' I have is binding the call to onSelect to an event
 with @EventListener. There is just no request happening when clicking
 and selecting table-rows (using firebug to do the 'debugging').

 Other events are working fine ... but this one is driving me nuts ...

 For today I will give up on this :(

 Tomorrow I will try to bind an event to a js-funtion with
 dojo.event.connect manually to narrow this down.

 In the meantime: if anyone has an idea ... please let me know. :-)

 Bye
 Gary


 The table won't be parsed into a dojo widget by default. (Tapestry
 turns this off..)

 You can probably add a single line of js to parse it out though:

 dojo.widget.createWidget(dojo.byId(addressTable));

 On 9/10/06, Gerald Schöffel [EMAIL PROTECTED] wrote:

 Hi there !

 I am trying to connect a dojo SortableTable via the @EventListener
 annotation to Tapestry (4.1.1, latest build from svn).

 In my component html file I have something like this:

table id=addressTable dojoType=SortableTable
 widgetId=tableWidget headClass=fixedHeader
 tbodyClass=scrollContent
enableMultipleSelect=false enableAlternateRows=true
 rowAlternateClass=alternateRow cellpadding=0 cellspacing=0
 border=0

...

/table

 Inside my component I have the following annotation:

 @EventListener(events=onSelect, elements

Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-10 Thread Gerald Schöffel

Hi there !

I am trying to connect a dojo SortableTable via the @EventListener 
annotation to Tapestry (4.1.1, latest build from svn).


In my component html file I have something like this:

   table id=addressTable dojoType=SortableTable 
widgetId=tableWidget headClass=fixedHeader tbodyClass=scrollContent
   enableMultipleSelect=false enableAlternateRows=true 
rowAlternateClass=alternateRow cellpadding=0 cellspacing=0 border=0


   ...

   /table

Inside my component I have the following annotation:

@EventListener(events=onSelect, elements=addressTable)

So now I am trying to get an event to Tapestry when a row is clicked 
(firing 'onSelect' inside the SortableTable-Widget) - or even better - 
when a row is double clicked, passing a parameter (getValue) to the 
listener 


I think I have tested every combination of html-code/eventlistener etc. 
(like doing table jwcid=[EMAIL PROTECTED] element=table id=, 
changing elements=addressTable to targets=addressTable etc.).


I trying to do so the whole evening - without effort :(

So is it possible to connect a plain dojo-widget to Tapestry this way ? 
Or am I totally wrong ?


Would by great to get some response  :)

Thank you in advance !

Bye,
Gary




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



Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-10 Thread Gerald Schöffel

Sorry for this one :-)

Should be: '... with much effort but no success ... ' :-)

I trying to do so the whole evening - without effort :(

Bye,
Gary


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



Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-10 Thread Gerald Schöffel

Hi Jesse !

Thank you for your quick reply !

But I already use

binding name=parseWidgets value=ognl:true / 

in my shell component. So the widget is created and functional (clicking 
on a header sorts the table and so on).


The only 'issue' I have is binding the call to onSelect to an event with 
@EventListener. There is just no request happening when clicking and 
selecting table-rows (using firebug to do the 'debugging').


Other events are working fine ... but this one is driving me nuts ...

For today I will give up on this :(

Tomorrow I will try to bind an event to a js-funtion with 
dojo.event.connect manually to narrow this down.


In the meantime: if anyone has an idea ... please let me know. :-)

Bye
Gary


The table won't be parsed into a dojo widget by default. (Tapestry turns
this off..)

You can probably add a single line of js to parse it out though:

dojo.widget.createWidget(dojo.byId(addressTable));

On 9/10/06, Gerald Schöffel [EMAIL PROTECTED] wrote:


Hi there !

I am trying to connect a dojo SortableTable via the @EventListener 
annotation to Tapestry (4.1.1, latest build from svn).


In my component html file I have something like this:

   table id=addressTable dojoType=SortableTable 
widgetId=tableWidget headClass=fixedHeader 
tbodyClass=scrollContent
   enableMultipleSelect=false enableAlternateRows=true 
rowAlternateClass=alternateRow cellpadding=0 cellspacing=0 
border=0


   ...

   /table

Inside my component I have the following annotation:

@EventListener(events=onSelect, elements=addressTable)

So now I am trying to get an event to Tapestry when a row is clicked 
(firing 'onSelect' inside the SortableTable-Widget) - or even better 
- when a row is double clicked, passing a parameter (getValue) to the 
listener 


I think I have tested every combination of html-code/eventlistener 
etc. (like doing table jwcid=[EMAIL PROTECTED] element=table 
id=, changing elements=addressTable to targets=addressTable 
etc.).


I trying to do so the whole evening - without effort :(

So is it possible to connect a plain dojo-widget to Tapestry this way 
? Or am I totally wrong ?


Would by great to get some response  :)

Thank you in advance !

Bye,
Gary




-
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: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-10 Thread Gerald Schöffel

Ok, me again ... could not give up on this ...

So I cleaned up my code and learned how to use the @Script-tag ...cool 
thing :-)


When connecting manually, the following code will work:

dojo.event.connect(dojo.widget.byId(tableWidget), onSelect, window, 
addressDisplay_selectAlert) ;


This will display an alert whenever I click on a row.

Tapestry will render the following when using @EventListener:

dojo.event.connect(dojo.byId(addressTable), onSelect, tapestry, 
event327750702);


When using this syntax to connect the event by hand like

dojo.event.connect(dojo.byId(addressTable), onSelect, window, 
addressDisplay_selectAlert);


it will NOT work.

Hmmm ... is there a way to get this working with @EventListener ?

The second possibility would be to do the 'eventhandling' (onSelect is a 
function-call, no event at all) with js and send another 'real' event to 
Tapestry. But as the first possibility ... I do not know, how to to so :(


Any help on this is really  desired :)

Thank you !

Bye,
Gary


Hi Jesse !

Thank you for your quick reply !

But I already use

binding name=parseWidgets value=ognl:true /
in my shell component. So the widget is created and functional 
(clicking on a header sorts the table and so on).


The only 'issue' I have is binding the call to onSelect to an event 
with @EventListener. There is just no request happening when clicking 
and selecting table-rows (using firebug to do the 'debugging').


Other events are working fine ... but this one is driving me nuts ...

For today I will give up on this :(

Tomorrow I will try to bind an event to a js-funtion with 
dojo.event.connect manually to narrow this down.


In the meantime: if anyone has an idea ... please let me know. :-)

Bye
Gary


The table won't be parsed into a dojo widget by default. (Tapestry turns
this off..)

You can probably add a single line of js to parse it out though:

dojo.widget.createWidget(dojo.byId(addressTable));

On 9/10/06, Gerald Schöffel [EMAIL PROTECTED] wrote:


Hi there !

I am trying to connect a dojo SortableTable via the @EventListener 
annotation to Tapestry (4.1.1, latest build from svn).


In my component html file I have something like this:

   table id=addressTable dojoType=SortableTable 
widgetId=tableWidget headClass=fixedHeader 
tbodyClass=scrollContent
   enableMultipleSelect=false enableAlternateRows=true 
rowAlternateClass=alternateRow cellpadding=0 cellspacing=0 
border=0


   ...

   /table

Inside my component I have the following annotation:

@EventListener(events=onSelect, elements=addressTable)

So now I am trying to get an event to Tapestry when a row is clicked 
(firing 'onSelect' inside the SortableTable-Widget) - or even better 
- when a row is double clicked, passing a parameter (getValue) to 
the listener 


I think I have tested every combination of html-code/eventlistener 
etc. (like doing table jwcid=[EMAIL PROTECTED] element=table 
id=, changing elements=addressTable to targets=addressTable 
etc.).


I trying to do so the whole evening - without effort :(

So is it possible to connect a plain dojo-widget to Tapestry this 
way ? Or am I totally wrong ?


Would by great to get some response  :)

Thank you in advance !

Bye,
Gary




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



Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?

2006-09-10 Thread Gerald Schöffel

Hi Ben,

thank you for your reply ! I tried it right away ...

Would be too cool if this will work ... but for me it does not :(

When using targets=..: tapestry is looking for a component like in 
[EMAIL PROTECTED] ... but internally Tapestry is again connecting via 
dojo.event.connect(dojo.byId(...),...)  by resolving the assigned ID of 
the component.


Omitting the ID will not work, because Tapestry will render one with the 
name of the component by default.


Being tricky naming all IDs the same will fail because of the 'wrong' 
dojo.byId().


Hmmm ... Jesse ... how about something like 
'element=widget:addressTable' or 'widget=addressTable' to get a 
connection with dojo.widget.byId(...) ??


Or is there something included already ?

Worth an JIRA-entry ?

Thanks again for helping !!

Bye,
Gary


Gary,

If you change 
@EventListener(events=onSelect, elements=addressTable)

to
@EventListener(events=onSelect, targets=addressTable)

then Tapestry will render the event script using dojo.widget.ByID
(elements hooks to html elements, targets hooks to components/widgets)

Hope that helps
regards,
Ben
 
-Original Message-
From: Gerald Schöffel [mailto:[EMAIL PROTECTED] 
Sent: Monday, 11 September 2006 2:10 PM

To: Tapestry users
Subject: Re: Is it possible to connect a dojo SortableTable to Tapestry
4.1.1 ?

Ok, me again ... could not give up on this ...

So I cleaned up my code and learned how to use the @Script-tag ...cool thing
:-)

When connecting manually, the following code will work:

dojo.event.connect(dojo.widget.byId(tableWidget), onSelect, window,
addressDisplay_selectAlert) ;

This will display an alert whenever I click on a row.

Tapestry will render the following when using @EventListener:

dojo.event.connect(dojo.byId(addressTable), onSelect, tapestry,
event327750702);

When using this syntax to connect the event by hand like

dojo.event.connect(dojo.byId(addressTable), onSelect, window,
addressDisplay_selectAlert);

it will NOT work.

Hmmm ... is there a way to get this working with @EventListener ?

The second possibility would be to do the 'eventhandling' (onSelect is a
function-call, no event at all) with js and send another 'real' event to
Tapestry. But as the first possibility ... I do not know, how to to so :(

Any help on this is really  desired :)

Thank you !

Bye,
Gary

  

Hi Jesse !

Thank you for your quick reply !

But I already use

binding name=parseWidgets value=ognl:true / in my 
shell component. So the widget is created and functional (clicking on 
a header sorts the table and so on).


The only 'issue' I have is binding the call to onSelect to an event 
with @EventListener. There is just no request happening when clicking 
and selecting table-rows (using firebug to do the 'debugging').


Other events are working fine ... but this one is driving me nuts ...

For today I will give up on this :(

Tomorrow I will try to bind an event to a js-funtion with 
dojo.event.connect manually to narrow this down.


In the meantime: if anyone has an idea ... please let me know. :-)

Bye
Gary


The table won't be parsed into a dojo widget by default. (Tapestry 
turns this off..)


You can probably add a single line of js to parse it out though:

dojo.widget.createWidget(dojo.byId(addressTable));

On 9/10/06, Gerald Schöffel [EMAIL PROTECTED] wrote:
  

Hi there !

I am trying to connect a dojo SortableTable via the @EventListener 
annotation to Tapestry (4.1.1, latest build from svn).


In my component html file I have something like this:

   table id=addressTable dojoType=SortableTable 
widgetId=tableWidget headClass=fixedHeader 
tbodyClass=scrollContent
   enableMultipleSelect=false enableAlternateRows=true 
rowAlternateClass=alternateRow cellpadding=0 cellspacing=0 
border=0


   ...

   /table

Inside my component I have the following annotation:

@EventListener(events=onSelect, elements=addressTable)

So now I am trying to get an event to Tapestry when a row is clicked 
(firing 'onSelect' inside the SortableTable-Widget) - or even better
- when a row is double clicked, passing a parameter (getValue) to 
the listener 


I think I have tested every combination of html-code/eventlistener 
etc. (like doing table jwcid=[EMAIL PROTECTED] element=table
id=, changing elements=addressTable to targets=addressTable 
etc.).


I trying to do so the whole evening - without effort :(

So is it possible to connect a plain dojo-widget to Tapestry this 
way ? Or am I totally wrong ?


Would by great to get some response  :)

Thank you in advance !

Bye,
Gary




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



http/https jsessionid - issue with Apache/Tomcat

2006-06-02 Thread Gerald Schöffel
Hi !

I have the following problem:

Inside the direct link listener of my login page (scheme https) I validate the 
user input and create an visit ASO an success.

So a session is created and stored via a cookie on the browser.

When leaving the https scheme, the jsessionid is lost, because the cookie is 
marked as https-only.

While I understand this behaviour (security reasons) I do not wan't to disable 
session-cookies in apache. I want to keep the url tidy :)

So is there a way to tell Apache (forwaring to Tomcat via JKMount) to treat 
https sessionid as 'unsafe' and store them in an http-readable cookie ?

I take care of the sessionid-hijacking for myself - so there is no need for 
Apache todo so.

Thank you in advance ! 

Gerald

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



AW: http/https jsessionid - issue with Apache/Tomcat

2006-06-02 Thread Gerald Schöffel
Sorry, late at night :)

Naturally I wan't to reconfigure Tomcat ... not Apache ...

Hi !

I have the following problem:

Inside the direct link listener of my login page (scheme https) I validate the 
user input and create an visit ASO an success.

So a session is created and stored via a cookie on the browser.

When leaving the https scheme, the jsessionid is lost, because the cookie is 
marked as https-only.

While I understand this behaviour (security reasons) I do not wan't to disable 
session-cookies in apache. I want to keep the url tidy :)

So is there a way to tell Apache (forwaring to Tomcat via JKMount) to treat 
https sessionid as 'unsafe' and store them in an http-readable cookie ?

I take care of the sessionid-hijacking for myself - so there is no need for 
Apache todo so.

Thank you in advance ! 

Gerald


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



Re: How to implement a 'application property with persistence strategy client:app' ?

2006-05-31 Thread Gerald Schöffel

Well, this is bad news :(

I redesigned a part of my application to use only one 'flag' and 
implemented a strategy which is able to persist this flag in application 
scope (adding a simple '?myflag=myvalue' key/value pair to the url).


I can control the lifecycle of the flag from inside the strategy - so 
for my problem I am currently done ... *happy*


But seeing a solution mentioned in your JIRA issue in 4.1 would be 
really really cool ...


Thanks,
Gerald

Henri Dupre wrote:

I asked here long ago and Howard answered that in Tapestry 4 this is not
possible due to some internal design.
I opened an JIRA issue http://issues.apache.org/jira/browse/TAPESTRY-729.
Is there any chance for this to make it for tapestry 4.1?

Henri.


On 5/30/06, Gerald Schöffel [EMAIL PROTECTED] wrote:


Hi Norbert,

thank you for your quick reply !

The problem with client:app is, that it stores the property of the
page in a application scope.

So every time I browse to this page the property is set to the persisted
value.

I need exactly this behaviour independent of a page, so every page with
a @Persist(mystrategy:app) annotation gets the associated property set.

When  looking at ClientPropertyPersistenceStrategy in every method there
is a parameter 'pageName' :(

Anyone an idea, how to get rid of it ? :)

Thanks
Gerald

Norbert Sándor wrote:
 What about the strategy client:app?
 If not then check out ClientPropertyPersistenceStrategy and the related
 classes for reference (eg. how to add a value into every URL).

 Regards,
 Norbi

 Gerald Schöffel wrote:
 Hi there !

 I need to persist a application-scope property on the client side,
 without using of a session and/or an ASO and without a reference to a
 specific page.

 In fact I need to be able to compare a value stored in a visit-ASO
 with the persisted property send from the client.

 This property should by added to every url until a condition is met to
 erase the state from the client.

 But I have no idea, how to do so :(

 Every example and/or the docs I've found so far are dealing with
 page-properties and therefor the code is very page-centric.

 Could I just omit the pageName in those examples and I am done ?

 Thank you in advance,
 Gerald




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



Re: How to implement a 'application property with persistence strategy client:app' ?

2006-05-30 Thread Gerald Schöffel

Hi Norbert,

thank you for your quick reply !

The problem with client:app is, that it stores the property of the 
page in a application scope.


So every time I browse to this page the property is set to the persisted 
value.


I need exactly this behaviour independent of a page, so every page with 
a @Persist(mystrategy:app) annotation gets the associated property set.


When  looking at ClientPropertyPersistenceStrategy in every method there 
 is a parameter 'pageName' :(


Anyone an idea, how to get rid of it ? :)

Thanks
Gerald

Norbert Sándor wrote:

What about the strategy client:app?
If not then check out ClientPropertyPersistenceStrategy and the related 
classes for reference (eg. how to add a value into every URL).


Regards,
Norbi

Gerald Schöffel wrote:

Hi there !

I need to persist a application-scope property on the client side, 
without using of a session and/or an ASO and without a reference to a 
specific page.


In fact I need to be able to compare a value stored in a visit-ASO 
with the persisted property send from the client.


This property should by added to every url until a condition is met to 
erase the state from the client.


But I have no idea, how to do so :(

Every example and/or the docs I've found so far are dealing with 
page-properties and therefor the code is very page-centric.


Could I just omit the pageName in those examples and I am done ?

Thank you in advance,
Gerald




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