Re: EventLinks and their handlers

2011-11-09 Thread Taha Hafeez Siddiqi
Hi

EventLinks have event handlers of the form

on'EventName'

and the event name defaults to the component id. 

'FromComponent' is not going to work as the event is triggered in the container 
without reference to the component triggering it. This allows shorter url

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/EventLink.html

regards
Taha

On Nov 10, 2011, at 3:43 AM, bogdan_cm wrote:

> I am stuck on a rather silly operation. I have an eventLink in the tml and
> it's event handler in the class like so:
> 
> tml ->< a t:id='postConversationLink'>click the link < / a >
> 
> class -> 
> 
>@Component(parameters = {"event=postConversationEvent"})
>   private EventLink postConversationLink;
>   
> @OnEvent(value="postConversationEvent", 
> component="postConversationLink")
> void valueChosen()
> {
>   System.out.println("annotated version");
> }
> 
> void onPostConversationEventFromPostConversationLink()
> {
> System.out.println("convention version");  
> }
> 
> 
> To me both the annotated version and the convetion version look correct.
> However, for both i get the error: Request event 'postconversationevent' ...
> was not handled. 
> From the message it looks like the link is actually generating the event,
> but somehow it cannot be matched to any of the two handlers. 
> 
> Thank you, 
> Bogdan. 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/EventLinks-and-their-handlers-tp4979300p4979300.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



Re: Rendering Informal Parameters

2011-11-09 Thread Michael Prescott
That didn't seem to make a difference, but it sounds prudent.

On 9 November 2011 17:09, Lenny Primak  wrote:

> AfterRender, not afterRenderBody and beginRender and it should work.
>
>
>
> On Nov 9, 2011, at 4:58 PM, Michael Prescott 
> wrote:
>
> > I had tried those instructions, but I guess I was a bit too rote (not
> being
> > familiar with these events, most of my components have templates); I need
> > to close the element in afterRenderBody().  Thanks for the encouragement
> to
> > continue puzzling it out.
> >
> > Michael
> >
> > On 9 November 2011 16:28, Lenny Primak  wrote:
> >
> >> You have to have beginRender/afterRender(MarkupWriter) methods
> >> in your page, and then write the root element in them, and then it
> should
> >> work.
> >> I followed the InformalParameter documentation page and it worked.
> >>
> >> On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote:
> >>
> >>> How do you render informal parameters if your component has a template
> >>> file?  I've tried using the RenderInformals mixin, but (somewhat
> >> bizarrely)
> >>> it puts the informal parameters on the parent element!
> >>
> >>
> >> -
> >> 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
>
>


EventLinks and their handlers

2011-11-09 Thread bogdan_cm
I am stuck on a rather silly operation. I have an eventLink in the tml and
it's event handler in the class like so:

tml ->< a t:id='postConversationLink'>click the link < / a >

class -> 

@Component(parameters = {"event=postConversationEvent"})
private EventLink postConversationLink;

  @OnEvent(value="postConversationEvent", 
component="postConversationLink")
  void valueChosen()
  {
System.out.println("annotated version");
  }
  
  void onPostConversationEventFromPostConversationLink()
  {
  System.out.println("convention version");  
  }


To me both the annotated version and the convetion version look correct.
However, for both i get the error: Request event 'postconversationevent' ...
was not handled. 
>From the message it looks like the link is actually generating the event,
but somehow it cannot be matched to any of the two handlers. 

Thank you, 
Bogdan. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/EventLinks-and-their-handlers-tp4979300p4979300.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Rendering Informal Parameters

2011-11-09 Thread Lenny Primak
AfterRender, not afterRenderBody and beginRender and it should work. 



On Nov 9, 2011, at 4:58 PM, Michael Prescott  
wrote:

> I had tried those instructions, but I guess I was a bit too rote (not being
> familiar with these events, most of my components have templates); I need
> to close the element in afterRenderBody().  Thanks for the encouragement to
> continue puzzling it out.
> 
> Michael
> 
> On 9 November 2011 16:28, Lenny Primak  wrote:
> 
>> You have to have beginRender/afterRender(MarkupWriter) methods
>> in your page, and then write the root element in them, and then it should
>> work.
>> I followed the InformalParameter documentation page and it worked.
>> 
>> On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote:
>> 
>>> How do you render informal parameters if your component has a template
>>> file?  I've tried using the RenderInformals mixin, but (somewhat
>> bizarrely)
>>> it puts the informal parameters on the parent element!
>> 
>> 
>> -
>> 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: Rendering Informal Parameters

2011-11-09 Thread Michael Prescott
I had tried those instructions, but I guess I was a bit too rote (not being
familiar with these events, most of my components have templates); I need
to close the element in afterRenderBody().  Thanks for the encouragement to
continue puzzling it out.

Michael

On 9 November 2011 16:28, Lenny Primak  wrote:

> You have to have beginRender/afterRender(MarkupWriter) methods
> in your page, and then write the root element in them, and then it should
> work.
> I followed the InformalParameter documentation page and it worked.
>
> On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote:
>
> > How do you render informal parameters if your component has a template
> > file?  I've tried using the RenderInformals mixin, but (somewhat
> bizarrely)
> > it puts the informal parameters on the parent element!
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Rendering Informal Parameters

2011-11-09 Thread Lenny Primak
You have to have beginRender/afterRender(MarkupWriter) methods
in your page, and then write the root element in them, and then it should work.
I followed the InformalParameter documentation page and it worked.

On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote:

> How do you render informal parameters if your component has a template
> file?  I've tried using the RenderInformals mixin, but (somewhat bizarrely)
> it puts the informal parameters on the parent element!


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



Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Igor Drobiazko
Yep

On Wed, Nov 9, 2011 at 9:10 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 09 Nov 2011 17:49:07 -0200, Igor Drobiazko <
> igor.drobia...@gmail.com> wrote:
>
>  Just inject ApplicationStateManager into the contribution method. The
>> service provides access to SSOs. Note that injecting into TypeCoercer's
>> contribute method is special; you need to use @InjectService annotation.
>>
>
> Is this for avoiding 'service x depends on itself' errors? :)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>



-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 Nov 2011 17:49:07 -0200, Igor Drobiazko  
 wrote:



Just inject ApplicationStateManager into the contribution method. The
service provides access to SSOs. Note that injecting into TypeCoercer's
contribute method is special; you need to use @InjectService annotation.


Is this for avoiding 'service x depends on itself' errors? :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread trsvax
Get the ApplicationStateManager in the appmodule method call and from there
you can get  any session state.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-get-a-SessionState-object-in-AppModule-contributeTypeCoercer-tp4978877p4978897.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Igor Drobiazko
Just inject ApplicationStateManager into the contribution method. The
service provides access to SSOs. Note that injecting into TypeCoercer's
contribute method is special; you need to use @InjectService annotation.

On Wed, Nov 9, 2011 at 8:43 PM, Tim  wrote:

> I'm contributing a type coercer for one of my classes called
> SearchCriteria in my AppModule.**contributeTypeCoercer method.
>  SearchCriteria is a class that holds search information for when someone
> does a search on the website, and I'm passing it around with onActivate and
> onPassivate.  It is the activation context.  That part works well.
>
> However, to personalize the search, I really need more of the user's
> details, which I keep in a SessionState object conveniently called
> UserDetails.  It would be really handy for me to get the UserDetails
> session state inside the AppModule.**contributeTypeCoercer method, so I
> can give it to SearchCriteria when it is created there.
>
> I hope that makes sense.  Anyone have a nifty line of code that can let me
> do this?
>
> Thanks a lot.
>
> --
> Tim
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


How to get a SessionState object in AppModule.contributeTypeCoercer ?

2011-11-09 Thread Tim
I'm contributing a type coercer for one of my classes called 
SearchCriteria in my AppModule.contributeTypeCoercer method.  
SearchCriteria is a class that holds search information for when someone 
does a search on the website, and I'm passing it around with onActivate 
and onPassivate.  It is the activation context.  That part works well.


However, to personalize the search, I really need more of the user's 
details, which I keep in a SessionState object conveniently called 
UserDetails.  It would be really handy for me to get the UserDetails 
session state inside the AppModule.contributeTypeCoercer method, so I 
can give it to SearchCriteria when it is created there.


I hope that makes sense.  Anyone have a nifty line of code that can let 
me do this?


Thanks a lot.

--
Tim

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



RE: Beaneditform with two submit buttons?

2011-11-09 Thread TG
When you said Done, do you mean you have provided the source somewhere else?
Would you mind sharing the URL? Wiki or otherwise? Thanks!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Beaneditform-with-two-submit-buttons-tp4967644p4978709.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Changes in the tml and components are not reflecting

2011-11-09 Thread David Canteros
Yes you are right Thiago, it's only my habit :)... Maven Jetty plugin
always worked well for me, but configure jetty with any eclipse pluging was
too difficult..

--
David Germán Canteros


2011/11/9 Thiago H. de Paula Figueiredo 

> On Wed, 09 Nov 2011 11:13:39 -0200, David Canteros <
> davidcanteros@gmail.com> wrote:
>
>  A tip: when I started with tapestry and Eclipse-Jetty,  I found more
>> useful executing jetty with maven pluging, directly from command line
>> writing "mvn jetty:run".
>>
>
> Or you can create a Maven/m2eclipse run/debug configuration that invokes
> jetty:run. ;)
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>


Re: Fwd: Event after completion Tapestry 5 Autocompleter

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 Nov 2011 11:25:29 -0200, Peter Stavrinides  
 wrote:



Hi Thiago,


Have you tried adding the function as a JSONLiteral? And why are you
returning a function instead of having this function declared somewhere
else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the  
configuration or am I missing something?


I think we are not on the same page. I didn't quite understand your  
comment...  Tapestry's Autocompleter if recollection serves is based on  
the underlying Scriptaculous autocompleter, right?


Yes.

So the Scriptaculous autocompleter has some hooks (updateElement &  
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's  
implementation doesn't support these hooks, correct?


I guess so.


So how do I then enable these hooks without hacking it?


I'm sorry, I made a huge confusion in my last message.

From other posts, and past experience I recall adding a function  
somewhere and just passing the parameters didn't work (though it really  
should).


Examples please. :)

So far as I know only by overriding the mixin, or fudging the parameters  
you can trigger these hooks, something like the following which extends  
the mixin and rewires it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new  
JSONRaw("onSelectFromAutocomplete"));

...
   }


I guess this should work, but I don't know about the client-side part. And  
JSONLiteral already does what your proposed JSONRaw does.


Anyway, you can file a JIRA for this being added to Autocomplete itself.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Setup methods are called twice while requesting a page.

2011-11-09 Thread pradeepchy
Thanks Christian-
I have spotted the problem with the help of your trick to know the exact
cause of it. 
Thanks for your help.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Setup-methods-are-called-twice-while-requesting-a-page-tp4975888p4977710.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Fwd: Event after completion Tapestry 5 Autocompleter

2011-11-09 Thread Peter Stavrinides
Hi Thiago,

> Have you tried adding the function as a JSONLiteral? And why are you  
> returning a function instead of having this function declared somewhere  
> else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the 
configuration or am I missing something?

I think we are not on the same page. I didn't quite understand your comment...  
Tapestry's Autocompleter if recollection serves is based on the underlying 
Scriptaculous autocompleter, right? 
So the Scriptaculous autocompleter has some hooks (updateElement & 
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's 
implementation doesn't support these hooks, correct?
So how do I then enable these hooks without hacking it? 

>From other posts, and past experience I recall adding a function somewhere and 
>just passing the parameters didn't work (though it really should). So far as I 
>know only by overriding the mixin, or fudging the parameters you can trigger 
>these hooks, something like the following which extends the mixin and rewires 
>it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new 
JSONRaw("onSelectFromAutocomplete"));
...

}

private class JSONRaw {
...
}
}

Kind regards,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry Mailing List" , "P Stavrinides" 

Sent: Tuesday, 8 November, 2011 17:48:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

On Tue, 08 Nov 2011 12:13:38 -0200,  wrote:

> Hi All,

Hi!

>> The scriptaculous Ajax.Autocompleter does support
>> updateElement and afterUpdateElement methods, but as far as I can tell
>> you can't get them into the configuration because the JSONObject
>> quotes its attributes (making the function into a string).

Have you tried adding the function as a JSONLiteral? And why are you  
returning a function instead of having this function declared somewhere  
else and just passing parameters to it in the JSONObject?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


- Forwarded Message -
From: "P Stavrinides" 
To: "Thiago H. de Paula Figueiredo" 
Cc: "Tapestry Mailing List" 
Sent: Wednesday, 9 November, 2011 11:13:22 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

Hi Thiago,

> Have you tried adding the function as a JSONLiteral? And why are you  
> returning a function instead of having this function declared somewhere  
> else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the 
configuration or am I missing something?

I think we are not on the same page. I didn't quite understand your comment...  
Tapestry's Autocompleter if recollection serves is based on the underlying 
Scriptaculous autocompleter, right? 
So the Scriptaculous autocompleter has some hooks (updateElement & 
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's 
implementation doesn't support these hooks, correct?
So how do I then enable these hooks without hacking it? 

>From other posts, and past experience I recall adding a function somewhere and 
>just passing the parameters didn't work (though it really should). So far as I 
>know only by overriding the mixin, or fudging the parameters you can trigger 
>these hooks, something like the following which extends the mixin and rewires 
>it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new 
JSONRaw("onSelectFromAutocomplete"));
...

}

private class JSONRaw {
...
}
}

Kind regards,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry Mailing List" , "P Stavrinides" 

Sent: Tuesday, 8 November, 2011 17:48:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

On Tue, 08 Nov 2011 12:13:38 -0200,  wrote:

> Hi All,

Hi!

>> The scriptaculous Ajax.Autocompleter does support
>> updateElement and afterUpdateElement methods, but as far as I can tell
>> you can't get them into the configuration because the JSONObject
>> quotes its attributes (making the function into a string).

Have you tried adding the function as a JSONLiteral? And why are you  
returning a function instead of having this 

Re: Changes in the tml and components are not reflecting

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 Nov 2011 11:13:39 -0200, David Canteros  
 wrote:


A tip: when I started with tapestry and Eclipse-Jetty,  I found more  
useful executing jetty with maven pluging, directly from command line  
writing "mvn jetty:run".


Or you can create a Maven/m2eclipse run/debug configuration that invokes  
jetty:run. ;)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Changes in the tml and components are not reflecting

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 Nov 2011 10:56:21 -0200, ramakanthreddy.t  
 wrote:


got the turotial example from the apache site built using the commands  
given and then I have created the resources required for the exlipse to  
work and then imported the project into eclipse into maven as existing  
maven project. I have downloaded the jetty plugin for my eclipse and I  
have created the
instance of my application on the Jetty instance and I am running.  
m2eclipse I could not install and It was already there in the eclipse my  
Eclipse

version is 3.7 Indigo.


Again, check the source folders configuration of your project.  
src/main/resources most probably is set as exclude **. Remove this exclude  
** and it will work.


Summary: your environment isn't configured properly. Tapestry live class  
and template reloading works, but you have to make your changes copied to  
the classpath. ;)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Changes in the tml and components are not reflecting

2011-11-09 Thread David Canteros
A tip: when I started with tapestry and Eclipse-Jetty,  I found more useful
executing jetty with maven pluging, directly from command line writing "mvn
jetty:run".



--
David Germán Canteros


2011/11/9 ramakanthreddy.t 

> got the turotial example from the apache site built using the commands
> given
> and then I have created the resources required for the exlipse to work and
> then imported the project into eclipse into maven as existing maven
> project.
> I have downloaded the jetty plugin for my eclipse and I have created the
> instance of my application on the Jetty instance and I am running.
> m2eclipse
> I could not install and It was already there in the eclipse my Eclipse
> version is 3.7 Indigo.
> ramakanthreddy.t wrote:
> >
> > I am working on simple examples that are there in the Tapestry site and
> > for each change I am not seeing the changes with out restarting the Jetty
> > server. I have used -Dorg.apache.tapestry.disable-caching=true but with
> > out any use the changes are not reflecting with out restarting the
> server.
> > Please tell me what I have to configure so that the changes automatically
> > get reflected in the Jetty server.
> >
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Changes-in-the-tml-and-components-are-not-reflecting-tp4974308p4977598.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Changes in the tml and components are not reflecting

2011-11-09 Thread ramakanthreddy.t
got the turotial example from the apache site built using the commands given
and then I have created the resources required for the exlipse to work and
then imported the project into eclipse into maven as existing maven project.
I have downloaded the jetty plugin for my eclipse and I have created the
instance of my application on the Jetty instance and I am running. m2eclipse
I could not install and It was already there in the eclipse my Eclipse
version is 3.7 Indigo. 
ramakanthreddy.t wrote:
> 
> I am working on simple examples that are there in the Tapestry site and
> for each change I am not seeing the changes with out restarting the Jetty
> server. I have used -Dorg.apache.tapestry.disable-caching=true but with
> out any use the changes are not reflecting with out restarting the server.
> Please tell me what I have to configure so that the changes automatically
> get reflected in the Jetty server.
> 


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Changes-in-the-tml-and-components-are-not-reflecting-tp4974308p4977598.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Changes in the tml and components are not reflecting

2011-11-09 Thread Thiago H. de Paula Figueiredo
On Tue, 08 Nov 2011 11:49:33 -0200, ramakanthreddy.t  
 wrote:


I am working on simple examples that are there in the Tapestry site and  
for each change I am not seeing the changes with out restarting the Jetty
server. I have used -Dorg.apache.tapestry.disable-caching=true but with  
out any use the changes are not reflecting with out restarting the  
server.

Please tell me what I have to configure so that the changes automatically
get reflected in the Jetty server.


What's your project setup? Are you sure changed files are copied to the  
webapp classpath? m2eclipse, for example, configures the Eclipse project  
in a way that resources are *not* copied automatically to the classpath.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Barry Books
I often use Amazon CloudFront (or Google for jQuery) to serve
CSS/Javascript on websites so the Tapestry @Include is only useful in
development for me and currently there does not seem to be a generic
way to turn off all the defaults. It would be OK (perhaps better) if
there was a default include service I could override. The API seems to
indicate that might be the case but in reality adding of defaults
seems a bit ad hoc and you have to look at the source to figure out
how to get rid of each one individually or I guess you could rewrite
the DOM after it's rendered.

I understand why defaults are important to get things going but I
suspect many people override all of the default CSS. I would also
guess I'm not the only one to use a CDN to serve css/javascript. The
current way defaults are added is at best magic but closer to
mysterious.

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



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Ville
Thanks for the input again, live and learn :)

In case anyone comes looking, the easiest way is to set a class "c" to body
and prepend all your styles with .c.

 - Ville

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977487.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Ville
Hmm, 

I might then have done an error by mistakenly took for granted that the Tap5
stylesheet comes before mine. Thanks for the specificity link, that clears
it up nicely. 

Well, now I have to go write all my css again that overrides Tap 5 styles ;)

 - Ville

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977439.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



CSS Stacks

2011-11-09 Thread Luke Wilson-Mawer
Hi,

Are relative URLs in CSS the only reason that combining CSS files in stacks 
isn't supported? Or are there other issues?

Basically, I want to serve a combined stack for each 'product' in our multi 
product application. Products contain many CSS files.

I'm looking now at how to add CSS support to stacks, perhaps by advising 
JavaScriptSupport service and overriding JavaScriptStackPathConstructor. Can 
anyone see any problems with this approach? Or would you go about it in another 
way?

Thanks,

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



Re: Insert Stylesheet to the Head top

2011-11-09 Thread Peter Stavrinides
Great explanation Robert!

Thanks,
Peter
- Original Message -
From: "Eugene Zhulkov" 
To: users@tapestry.apache.org
Sent: Wednesday, 2 November, 2011 14:30:19 GMT +02:00 Athens, Bucharest, 
Istanbul
Subject: Re: Insert Stylesheet to the Head top

It works! Thank you all very much!

Code:



Overall processing time for main page of http://kindershopping.ru hasn't
changed:
before - min 149ms, mean 165ms, max 195ms
after - min 144ms, mean 163ms, max 365ms
 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Insert-Stylesheet-to-the-Head-top-tp4952484p4957961.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
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: Event after completion Tapestry 5 Autocompleter

2011-11-09 Thread P . Stavrinides
Hi Thiago,

> Have you tried adding the function as a JSONLiteral? And why are you  
> returning a function instead of having this function declared somewhere  
> else and just passing parameters to it in the JSONObject?
I am not, Tapestry is responsible for these hooks, we simply pass the 
configuration or am I missing something?

I think we are not on the same page. I didn't quite understand your comment...  
Tapestry's Autocompleter if recollection serves is based on the underlying 
Scriptaculous autocompleter, right? 
So the Scriptaculous autocompleter has some hooks (updateElement & 
afterUpdateElement) to trigger 'aftercompletion' events, but Tapestry's 
implementation doesn't support these hooks, correct?
So how do I then enable these hooks without hacking it? 

>From other posts, and past experience I recall adding a function somewhere and 
>just passing the parameters didn't work (though it really should). So far as I 
>know only by overriding the mixin, or fudging the parameters you can trigger 
>these hooks, something like the following which extends the mixin and rewires 
>it a little:


public class ExtendedAutocomplete extends Autocomplete {

@Override
protected void configure(JSONObject config)
{
config.put("afterUpdateElement", new 
JSONRaw("onSelectFromAutocomplete"));
...

}

private class JSONRaw {
...
}
}

Kind regards,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry Mailing List" , "P Stavrinides" 

Sent: Tuesday, 8 November, 2011 17:48:25 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Event after completion Tapestry 5 Autocompleter

On Tue, 08 Nov 2011 12:13:38 -0200,  wrote:

> Hi All,

Hi!

>> The scriptaculous Ajax.Autocompleter does support
>> updateElement and afterUpdateElement methods, but as far as I can tell
>> you can't get them into the configuration because the JSONObject
>> quotes its attributes (making the function into a string).

Have you tried adding the function as a JSONLiteral? And why are you  
returning a function instead of having this function declared somewhere  
else and just passing parameters to it in the JSONObject?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Joost Schouten (mailing lists)
I might be missing something here but why do you not solve the problem with css 
specificity [1]? Css should never care about the order in which you load your 
css files IMHO.

Cheers,
Joost

[1]: http://www.htmldog.com/guides/cssadvanced/specificity/


On Nov 9, 2011, at 9:19 AM, Ville wrote:

> To clarify why the ordering IS important, if my css is included before
> Tapestry's default, then I can't override T5's default styles. (And the
> second picture in my earlier post demonstrates this..)
> 
> The proposed fix that I then exclude the T5 defaults altogether is not imho
> the most elegant fix.
> 
> - Ville
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977069.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Ville
To clarify why the ordering IS important, if my css is included before
Tapestry's default, then I can't override T5's default styles. (And the
second picture in my earlier post demonstrates this..)

The proposed fix that I then exclude the T5 defaults altogether is not imho
the most elegant fix.

 - Ville

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977069.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5.3 rc3 ordering of css

2011-11-09 Thread Ville
So the fix is to exclude all css files that third party libs include, then
copy the css from those jars, modify it and include it yourself?

I don't get how the ordering is not important, as the order dictates how the
styles are applied, and what overrides what?

 - Ville

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977047.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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