Re: Progress on Tapestry 5 Book

2012-07-26 Thread Alessio Gambi
Oops too late 

:$

Sorry for the comments in the email.

Still the content remains valid: Small and frequent publications are cheaper 
for the readers, and more convenient for the authors. Furthermore, waiting too 
long (almost two years?) for a book on a technology that evolves fast, such as 
Tapestry, will benefit no one.

Of course, Igor can always put all his contributions together and release THE 
Book.


Last but not least, I think we should form a kind of editorial board or a 
reviewing committee or something else to help authors that want to share their 
findings/ideas/works about Tapestry. Basically is like writing code and 
committers.

We can use the same technologies and processes adopted for managing scientific 
publications.

What you think?


-- Alessio

On 26-lug-2012, at 23:12, Igor Drobiazko  wrote:

> I'm very sorry for the delay. Unfortunately I learned to late that
> Kickstarter is for US citizens only, so I was investigating the
> alternatives: Indiegogo, RocketHub and Peerbackers
> 
> One of these platforms with be used to provide an early access to the book.
> Once the book is finished and printed, it will be available probably
> through Lulu.
> 
> If someone of you had already some experience with any of crowd funding
> platforms mentioned above, please drop me a line.
> 
> On Thu, Jul 26, 2012 at 10:23 PM, Chris Collins  wrote:
> 
>> IC, its for permanent residents != citizens but probably the outcome is
>> the same for him.
>> 
>> What about LULU?
>> 
>> http://www.lulu.com/us/en
>> 
>> I assume there wouldnt be very much money left after that model though.
>> 
>> C
>> On Jul 26, 2012, at 1:16 PM, Onno Scheffers  wrote:
>> 
>>> Igor probably can't get to the money if he uses Kickstarter, so he's
>>> looking for an alternative:
>>> https://twitter.com/drobiazko/status/225857836217954304
>>> 
>>> 
>>> 
>>> On Thu, Jul 26, 2012 at 9:01 PM, Chris Collins  wrote:
>>> 
 Whats happening with this?  Igor mentions in the next few days it would
>> be
 on kickstarter.  I feel like a kid waiting for christmas and they moved
>> it
 to chinese new year :-}
 
 C
 On Jul 4, 2012, at 2:59 PM, Stephan Windmüller 
 wrote:
 
> On 04.07.2012 17:09, Igor Drobiazko wrote:
> 
>> i wrote a blog post about the progress on the Tapestry 5 book:
>> 
 
>> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
> 
> Could you please announce the start of the Kickstarter campaign here
> once it has started?
> 
> Regards
> Stephan
> 
 
 
 -
 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
>> 
>> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de
> http://twitter.com/drobiazko

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



Re: Is it possible to obtain page instances programmatically by name?

2012-07-26 Thread wout86
Thanks Bryan, that's actually what I was looking for!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-obtain-page-instances-programmatically-by-name-tp5714794p5714824.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: Progress on Tapestry 5 Book

2012-07-26 Thread Chris Collins
There is this note:

http://www.quora.com/Kickstarter/Is-it-possible-to-use-Kickstarter-com-as-a-non-US-resident

C
On Jul 26, 2012, at 2:12 PM, Igor Drobiazko  wrote:

> I'm very sorry for the delay. Unfortunately I learned to late that
> Kickstarter is for US citizens only, so I was investigating the
> alternatives: Indiegogo, RocketHub and Peerbackers
> 
> One of these platforms with be used to provide an early access to the book.
> Once the book is finished and printed, it will be available probably
> through Lulu.
> 
> If someone of you had already some experience with any of crowd funding
> platforms mentioned above, please drop me a line.
> 
> On Thu, Jul 26, 2012 at 10:23 PM, Chris Collins  wrote:
> 
>> IC, its for permanent residents != citizens but probably the outcome is
>> the same for him.
>> 
>> What about LULU?
>> 
>> http://www.lulu.com/us/en
>> 
>> I assume there wouldnt be very much money left after that model though.
>> 
>> C
>> On Jul 26, 2012, at 1:16 PM, Onno Scheffers  wrote:
>> 
>>> Igor probably can't get to the money if he uses Kickstarter, so he's
>>> looking for an alternative:
>>> https://twitter.com/drobiazko/status/225857836217954304
>>> 
>>> 
>>> 
>>> On Thu, Jul 26, 2012 at 9:01 PM, Chris Collins  wrote:
>>> 
 Whats happening with this?  Igor mentions in the next few days it would
>> be
 on kickstarter.  I feel like a kid waiting for christmas and they moved
>> it
 to chinese new year :-}
 
 C
 On Jul 4, 2012, at 2:59 PM, Stephan Windmüller 
 wrote:
 
> On 04.07.2012 17:09, Igor Drobiazko wrote:
> 
>> i wrote a blog post about the progress on the Tapestry 5 book:
>> 
 
>> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
> 
> Could you please announce the start of the Kickstarter campaign here
> once it has started?
> 
> Regards
> Stephan
> 
 
 
 -
 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
>> 
>> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de
> http://twitter.com/drobiazko


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



json support in template

2012-07-26 Thread Angelo C.
Hi,

you have this in the code,

public JSONObject getJS() { 
   JSONObject js = new JSONObject(); 
   js.put("name1","123"); 
   return js; 
}

then in the template:
${js.get('name1')} 

considering json objects are used often nowadays, possible to have a direct
support in template? maybe some other prefix like:
#{js.name1}

what do you think?

Angelo







--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.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: Preferred jQuery integration?

2012-07-26 Thread George Ludwig
Thanks guys! Wasn't sure if they were the same thing or not.

As far as application requirements, have a few use cases however none are
specific to jQuery; jQuery is simply a well-known library so I thought I'd
start there.

I'm working in the Twitter ecosystem, so replicating basic tweet
functionality like retweets and replies, with the ability to track these
actions on the server side, is the sort of thing I'm going for.

Also, another basic use case is in dealing with long lists of tweets that
would be grouped by hashtag. I want to show my user a list of hashtags, and
when they click on the tag, it reveals a list of tweets. Clicking on a
different hashtag would close any open list, and open the list they just
clicked on.

I just learned that Twitter Bootstrap has some level of Tapestry
integration, and I nee to look in to it.

Best,

George

On Tue, Jul 24, 2012 at 12:25 AM, Emmanuel DEMEY
wrote:

> Hi
>
> The best documentations is our website :   http://tapestry5-jquery.com/.
> or the src/test app of the project :
> https://github.com/got5/tapestry5-jquery
>
> You can also ask your Tapestry5-jQuery relative question on your mailing
> list :  tapestry5-jqu...@googlegroups.com and I will reply to them asap.
>
> What are your needs for your Tapestry5-jQuery based application ?
>
> Manu
>
>
> 2012/7/24 Lenny Primak 
>
> > They are the same thing.
> >
> >
> >
> > On Jul 23, 2012, at 8:40 PM, George Ludwig 
> wrote:
> >
> > > I need to use the cool jQuery stuff with Tapestry 5.3.4. I've found at
> > > least 2 integrations: https://github.com/got5/tapestry5-jquery and
> > > http://tapestry5-jquery.com/.
> > >
> > > Is tHere a preferred implementation? Does one or the other have better
> > > end-user documentation?
> > >
> > > Also, are there any good tutorials for using these?
> > >
> > > Best,
> > >
> > > George
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr/
>
> Twitter : @EmmanuelDemey
>


Tapestry Spring Security for 5.4-SNAPSHOT

2012-07-26 Thread Daniel Jue
I forked lltyk's latest version and made some changes, as I wanted to use
T5.4 for a project I am rewriting.

Uses Tapestry 5.4-SNAPSHOT
Uses Spring 3.1.1-RELEASE
Removed most of the deprecation.

https://github.com/danieljue/tapestry-spring-security

Enjoy.


Deprecation I didn't overcome:
AnonymousAuthenticationFilter.setUserAttribute(UserAttribute a) is
deprecated, but I didn't see a way to set it in a constructor.


Re: Progress on Tapestry 5 Book

2012-07-26 Thread Igor Drobiazko
I'm very sorry for the delay. Unfortunately I learned to late that
Kickstarter is for US citizens only, so I was investigating the
alternatives: Indiegogo, RocketHub and Peerbackers

One of these platforms with be used to provide an early access to the book.
Once the book is finished and printed, it will be available probably
through Lulu.

If someone of you had already some experience with any of crowd funding
platforms mentioned above, please drop me a line.

On Thu, Jul 26, 2012 at 10:23 PM, Chris Collins  wrote:

> IC, its for permanent residents != citizens but probably the outcome is
> the same for him.
>
> What about LULU?
>
> http://www.lulu.com/us/en
>
> I assume there wouldnt be very much money left after that model though.
>
> C
> On Jul 26, 2012, at 1:16 PM, Onno Scheffers  wrote:
>
> > Igor probably can't get to the money if he uses Kickstarter, so he's
> > looking for an alternative:
> > https://twitter.com/drobiazko/status/225857836217954304
> >
> >
> >
> > On Thu, Jul 26, 2012 at 9:01 PM, Chris Collins  wrote:
> >
> >> Whats happening with this?  Igor mentions in the next few days it would
> be
> >> on kickstarter.  I feel like a kid waiting for christmas and they moved
> it
> >> to chinese new year :-}
> >>
> >> C
> >> On Jul 4, 2012, at 2:59 PM, Stephan Windmüller 
> >> wrote:
> >>
> >>> On 04.07.2012 17:09, Igor Drobiazko wrote:
> >>>
>  i wrote a blog post about the progress on the Tapestry 5 book:
> 
> >>
> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
> >>>
> >>> Could you please announce the start of the Kickstarter campaign here
> >>> once it has started?
> >>>
> >>> Regards
> >>> Stephan
> >>>
> >>
> >>
> >> -
> >> 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
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de
http://twitter.com/drobiazko


Re: How to get a page's html to send it as an email?

2012-07-26 Thread trsvax
I just use 

InputStream is = new URL("tapestry url").openStream().

This works for pretty much anything. If you need more control the URL class
has methods for setting headers etc.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-get-a-page-s-html-to-send-it-as-an-email-tp2399000p5714815.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: Progress on Tapestry 5 Book

2012-07-26 Thread Chris Collins
IC, its for permanent residents != citizens but probably the outcome is the 
same for him.

What about LULU?

http://www.lulu.com/us/en

I assume there wouldnt be very much money left after that model though.

C
On Jul 26, 2012, at 1:16 PM, Onno Scheffers  wrote:

> Igor probably can't get to the money if he uses Kickstarter, so he's
> looking for an alternative:
> https://twitter.com/drobiazko/status/225857836217954304
> 
> 
> 
> On Thu, Jul 26, 2012 at 9:01 PM, Chris Collins  wrote:
> 
>> Whats happening with this?  Igor mentions in the next few days it would be
>> on kickstarter.  I feel like a kid waiting for christmas and they moved it
>> to chinese new year :-}
>> 
>> C
>> On Jul 4, 2012, at 2:59 PM, Stephan Windmüller 
>> wrote:
>> 
>>> On 04.07.2012 17:09, Igor Drobiazko wrote:
>>> 
 i wrote a blog post about the progress on the Tapestry 5 book:
 
>> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
>>> 
>>> Could you please announce the start of the Kickstarter campaign here
>>> once it has started?
>>> 
>>> Regards
>>> Stephan
>>> 
>> 
>> 
>> -
>> 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: Progress on Tapestry 5 Book

2012-07-26 Thread Onno Scheffers
Igor probably can't get to the money if he uses Kickstarter, so he's
looking for an alternative:
https://twitter.com/drobiazko/status/225857836217954304



On Thu, Jul 26, 2012 at 9:01 PM, Chris Collins  wrote:

> Whats happening with this?  Igor mentions in the next few days it would be
> on kickstarter.  I feel like a kid waiting for christmas and they moved it
> to chinese new year :-}
>
> C
> On Jul 4, 2012, at 2:59 PM, Stephan Windmüller 
> wrote:
>
> > On 04.07.2012 17:09, Igor Drobiazko wrote:
> >
> >> i wrote a blog post about the progress on the Tapestry 5 book:
> >>
> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
> >
> > Could you please announce the start of the Kickstarter campaign here
> > once it has started?
> >
> > Regards
> > Stephan
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Progress on Tapestry 5 Book

2012-07-26 Thread Chris Collins
Whats happening with this?  Igor mentions in the next few days it would be on 
kickstarter.  I feel like a kid waiting for christmas and they moved it to 
chinese new year :-}

C
On Jul 4, 2012, at 2:59 PM, Stephan Windmüller  wrote:

> On 04.07.2012 17:09, Igor Drobiazko wrote:
> 
>> i wrote a blog post about the progress on the Tapestry 5 book:
>> http://blog.tapestry5.de/index.php/2012/07/04/progress-on-tapestry-5-book/
> 
> Could you please announce the start of the Kickstarter campaign here
> once it has started?
> 
> Regards
> Stephan
> 


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



Re: How to get a page's html to send it as an email?

2012-07-26 Thread arterzatij
Hi Luna,


luna_guo wrote
> 
> 
> 
> 1)In the first version of this service(t5.0.14?),you must save the
> activate context to a @Persist property. In Tapestry 5.1.0,i did a little
> test.It works well without this problem.
> 
> 
> luna
> 
How does this can be done? 
Do you have an example?


Thanks in advance!






--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-get-a-page-s-html-to-send-it-as-an-email-tp2399000p5714809.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: relative page links in components

2012-07-26 Thread Howard Lewis Ship
This will not work, at least, not always. It certainly won't understand about 
page activation context.

Sent from my iPad

On Jul 26, 2012, at 9:37 AM, Alex Kotchnev  wrote:

> Ozkan - just an idea - it seems that you might be able to do something like
> this :
> 
> @Inject
> private ComponentResources compResources
> 
> @Property
> String editPath
> 
> page = compResources.getPage()
> editPath =
> page.getComponentResources().getBaseResource().forPath("edit").getPath()
> 
> then, in your component, you'd use something like this :
> Edit
> 
> And of course, this is totally not tested or guaranteed to work - I'm just
> looking at the API (
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ComponentResources.html
> ).
> 
> Cheers,
> 
> Alex K
> 
> On Thu, Jul 26, 2012 at 8:12 AM, ZKN __  wrote:
> 
>> 
>> Hi,
>> I have a component that's to be included in different pages. Inside the
>> component I have page links that need to be relative to the current page.
>> Something like this:
>> 
>> 
>> ${message:edit}
>>
>> The page link should point to different pages according to the current
>> page.
>> Is that possible?
>> 
>> 
>> Thanks,
>> Özkan
>> 
>> -
>> 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: Nullpointer with Inject in Timer run()

2012-07-26 Thread Cezary Biernacki
Hi Daniel,
Tapestry does not process objects created using new. You can however try to
use ObjectLocator service. For example:

public class MyPage {

 @Inject private ObjectLocator locator;



 inside some method ...

Timer timer = new Timer("MyTimer");
OurTimerTask timerTask = locator.autobuild(OurTimerTask.class);
timer.schedule(timerTask, 100,100);

}

Alternatively, you can implement a factory service that would just create
OurTimerTask instances and provide them with a reference to OurService.

Cezary
On Thu, Jul 26, 2012 at 5:24 PM, Stammler, Daniel
wrote:

> Hello,
>
> we have some problems with the periodical execution of a function. We're
> using tapestry version 5.2.6. Since we don't want to update the tapestry
> version right now, we can not use the tapestry timer and have to use the
> Java Timer.
>
> Our timertask looks like:
>
> public class OurTimerTask extends TimerTask {
> @Inject
> OurService ourService;
>
> @Override
> public void run() {
> ourService.execute();
>
> }
> }
>
> And the service that starts the timer:
>
> Timer timer = new Timer("MyTimer");
> OurTimerTask timerTask = new OurTimerTask();
>
> // its the date of the first execution. It should be in
> the night of the
> // current day
>
> timer.schedule(timerTask, 100,100);
>
> The problem now is that the Inject in our TimerTask doesn't work. We tried
> this in many ways but the object ourService is always null if the run()
> function gets called. Without the Timer it works. Is it even possible to
> Inject a service for the timer? We hope that anyone can help us.
>
> Kind regards
> Daniel
>
>


Re: Is it possible to obtain page instances programmatically by name?

2012-07-26 Thread Bryan Lewis
I've been doing:

@Inject private ComponentSource componentSource;

public MyBasePage getPage(String pageName)
{
return (MyBasePage) componentSource.getPage(pageName);
}



On Thu, Jul 26, 2012 at 10:12 AM, Christian Riedel
wrote:

> You could inject the ComponentResources into your component and call
> getPage():
>
> /**
>  * Returns the page that contains this component. Technically, the
> page itself is an internal object in Tapestry and
>  * this returns the root component of the actual page, but from an
> application developer point of view, this is the
>  * page.
>  */
> Component getPage();
>
>
> Am 26.07.2012 um 10:27 schrieb wout86:
>
> > Hi,
> >
> > We all know Tapestry page instances can be obtained by "injecting" them
> in a
> > variable using its type or its name, e.g., as follows:
> >
> > @InjectPage private HomePage home;
> >
> > or
> >
> > @InjectPage("HomePage") private Object home;
> >
> > However, this method only allows pages to be injected whose names are
> known
> > at compile-time.
> >
> > I was wondering whether there's a way to obtain a page instance through
> some
> > sort of getter method, such that the page name doesn't have to be known
> at
> > compile-time? E.g., as follows:
> >
> > Object home = Global.getPage("HomePage");
> >
> > Thanks in advance, and best regards,
> > Wouter
> >
> >
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-obtain-page-instances-programmatically-by-name-tp5714794.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: relative page links in components

2012-07-26 Thread Alex Kotchnev
Ozkan - just an idea - it seems that you might be able to do something like
this :

@Inject
private ComponentResources compResources

@Property
String editPath

page = compResources.getPage()
editPath =
page.getComponentResources().getBaseResource().forPath("edit").getPath()

then, in your component, you'd use something like this :
Edit

And of course, this is totally not tested or guaranteed to work - I'm just
looking at the API (
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ComponentResources.html
 ).

Cheers,

Alex K

On Thu, Jul 26, 2012 at 8:12 AM, ZKN __  wrote:

>
> Hi,
> I have a component that's to be included in different pages. Inside the
> component I have page links that need to be relative to the current page.
> Something like this:
> 
>
> ${message:edit}
> 
> The page link should point to different pages according to the current
> page.
> Is that possible?
>
>
> Thanks,
> Özkan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Shared @SessionState???

2012-07-26 Thread Taha Siddiqi
If you are using applicationStateManager then I don't think you need PerThread 
service


On Jul 26, 2012, at 9:41 PM, Matías Blasi wrote:

> Thank all of you!
> 
> That was the problem.
> It worked by asking for my SessionState object to the
> AplicationStateManager and setting my service as Threaded.
> 
> Thank you very much.
> 
> Regards!
> Matias.
> 
> 
> On Thu, Jul 26, 2012 at 10:10 AM, Matías Blasi wrote:
> 
>> Hi all,
>> 
>> I'm facing the following issue:
>> 
>> I have a @SessionState object for a custom type.
>> 
>> As far as I understand that would be handled individually for each "user
>> session", but I am seeing that the value is shared across all my user
>> sessions... It shouldn't be possible, in fact, if it works like that we
>> couldn't implement a shopping cart with this mechanism and I had a
>> shopping cart working fine in my application!
>> 
>> Do you imagine what could be wrong to get this behaiviour? I cant imagine
>> how implement a cross-SessionState without external persistence...
>> 
>> Here is my code:
>> 
>> public class CalificadosMessagesServiceImpl implements
>> CalificadosMessagesService {
>> 
>> @SessionState(create=true)
>> private CalificadosMessagesBag messagesBag;
>> ...
>> ...
>> 
>> @Override
>> public List getSessoinMessages() {
>> return this.messagesBag.getMessages();
>> }
>> 
>> @Override
>> public void recordSessionMessage(CalificadosMessage message) {
>> this.messagesBag.addMessage(message);
>> }
>> ...
>> ...
>> }
>> 
>> All the logged users (from different browsers), get the same messages!
>> 
>> Am I loosing something obvious?
>> 
>> 
>> Regards,
>> Matias.
>> 


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



Re: Shared @SessionState???

2012-07-26 Thread Matías Blasi
Thank all of you!

That was the problem.
It worked by asking for my SessionState object to the
AplicationStateManager and setting my service as Threaded.

Thank you very much.

Regards!
Matias.


On Thu, Jul 26, 2012 at 10:10 AM, Matías Blasi wrote:

> Hi all,
>
> I'm facing the following issue:
>
> I have a @SessionState object for a custom type.
>
> As far as I understand that would be handled individually for each "user
> session", but I am seeing that the value is shared across all my user
> sessions... It shouldn't be possible, in fact, if it works like that we
> couldn't implement a shopping cart with this mechanism and I had a
> shopping cart working fine in my application!
>
> Do you imagine what could be wrong to get this behaiviour? I cant imagine
> how implement a cross-SessionState without external persistence...
>
> Here is my code:
>
> public class CalificadosMessagesServiceImpl implements
> CalificadosMessagesService {
>
> @SessionState(create=true)
> private CalificadosMessagesBag messagesBag;
> ...
> ...
>
> @Override
> public List getSessoinMessages() {
>  return this.messagesBag.getMessages();
> }
>
> @Override
>  public void recordSessionMessage(CalificadosMessage message) {
> this.messagesBag.addMessage(message);
>  }
> ...
> ...
> }
>
> All the logged users (from different browsers), get the same messages!
>
> Am I loosing something obvious?
>
>
> Regards,
> Matias.
>


Re: Shared @SessionState???

2012-07-26 Thread Taha Siddiqi
Hi Matias

@SessionState works for pages/mixins/components and not for service injection. 
If you want to use session object in a service, you can use 
ApplicationStateManager(get and set)

regards
Taha


On Jul 26, 2012, at 6:40 PM, Matías Blasi wrote:

> Hi all,
> 
> I'm facing the following issue:
> 
> I have a @SessionState object for a custom type.
> 
> As far as I understand that would be handled individually for each "user
> session", but I am seeing that the value is shared across all my user
> sessions... It shouldn't be possible, in fact, if it works like that we
> couldn't implement a shopping cart with this mechanism and I had a
> shopping cart working fine in my application!
> 
> Do you imagine what could be wrong to get this behaiviour? I cant imagine
> how implement a cross-SessionState without external persistence...
> 
> Here is my code:
> 
> public class CalificadosMessagesServiceImpl implements
> CalificadosMessagesService {
> 
> @SessionState(create=true)
> private CalificadosMessagesBag messagesBag;
> ...
> ...
> 
> @Override
> public List getSessoinMessages() {
> return this.messagesBag.getMessages();
> }
> 
> @Override
> public void recordSessionMessage(CalificadosMessage message) {
> this.messagesBag.addMessage(message);
> }
> ...
> ...
> }
> 
> All the logged users (from different browsers), get the same messages!
> 
> Am I loosing something obvious?
> 
> 
> Regards,
> Matias.


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



Re: Nullpointer with Inject in Timer run()

2012-07-26 Thread Lenny Primak
You can only @Inject tapestry services into other tapestry controlled objects. 
Your timer task isn't one. 
You will need to pass the service into your timer object's constrictor or some 
other method.  



On Jul 26, 2012, at 11:24 AM, "Stammler, Daniel"  
wrote:

> Hello,
> 
> we have some problems with the periodical execution of a function. We're 
> using tapestry version 5.2.6. Since we don't want to update the tapestry 
> version right now, we can not use the tapestry timer and have to use the Java 
> Timer.
> 
> Our timertask looks like:
> 
> public class OurTimerTask extends TimerTask {
> @Inject
> OurService ourService;
> 
>@Override
>public void run() {
>ourService.execute();
> 
>}
> }
> 
> And the service that starts the timer:
> 
> Timer timer = new Timer("MyTimer");
> OurTimerTask timerTask = new OurTimerTask();
> 
>// its the date of the first execution. It should be in the 
> night of the
>// current day
> 
> timer.schedule(timerTask, 100,100);
> 
> The problem now is that the Inject in our TimerTask doesn't work. We tried 
> this in many ways but the object ourService is always null if the run() 
> function gets called. Without the Timer it works. Is it even possible to 
> Inject a service for the timer? We hope that anyone can help us.
> 
> Kind regards
> Daniel
> 

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



Nullpointer with Inject in Timer run()

2012-07-26 Thread Stammler, Daniel
Hello,

we have some problems with the periodical execution of a function. We're using 
tapestry version 5.2.6. Since we don't want to update the tapestry version 
right now, we can not use the tapestry timer and have to use the Java Timer.

Our timertask looks like:

public class OurTimerTask extends TimerTask {
@Inject
OurService ourService;

@Override
public void run() {
ourService.execute();

}
}

And the service that starts the timer:

Timer timer = new Timer("MyTimer");
OurTimerTask timerTask = new OurTimerTask();

// its the date of the first execution. It should be in the 
night of the
// current day

timer.schedule(timerTask, 100,100);

The problem now is that the Inject in our TimerTask doesn't work. We tried this 
in many ways but the object ourService is always null if the run() function 
gets called. Without the Timer it works. Is it even possible to Inject a 
service for the timer? We hope that anyone can help us.

Kind regards
Daniel



Re: Shared @SessionState???

2012-07-26 Thread Christian Riedel
Hi,

A service is a singleton by default. If you store a session-state object as a 
singleton service's member, every user will see the session state of the user 
who triggered your service for the first time.
Either change your service to PerThread scope [1] or better yet inject your 
session state object only in pages/components/mixins. Members of components are 
always per thread scoped.

[1] http://tapestry.apache.org/defining-tapestry-ioc-services.html


Cheers,
Christian


Am 26.07.2012 um 15:10 schrieb Matías Blasi:

> Hi all,
> 
> I'm facing the following issue:
> 
> I have a @SessionState object for a custom type.
> 
> As far as I understand that would be handled individually for each "user
> session", but I am seeing that the value is shared across all my user
> sessions... It shouldn't be possible, in fact, if it works like that we
> couldn't implement a shopping cart with this mechanism and I had a
> shopping cart working fine in my application!
> 
> Do you imagine what could be wrong to get this behaiviour? I cant imagine
> how implement a cross-SessionState without external persistence...
> 
> Here is my code:
> 
> public class CalificadosMessagesServiceImpl implements
> CalificadosMessagesService {
> 
> @SessionState(create=true)
> private CalificadosMessagesBag messagesBag;
> ...
> ...
> 
> @Override
> public List getSessoinMessages() {
> return this.messagesBag.getMessages();
> }
> 
> @Override
> public void recordSessionMessage(CalificadosMessage message) {
> this.messagesBag.addMessage(message);
> }
> ...
> ...
> }
> 
> All the logged users (from different browsers), get the same messages!
> 
> Am I loosing something obvious?
> 
> 
> Regards,
> Matias.


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



Re: Is it possible to obtain page instances programmatically by name?

2012-07-26 Thread Christian Riedel
You could inject the ComponentResources into your component and call getPage():

/**
 * Returns the page that contains this component. Technically, the page 
itself is an internal object in Tapestry and
 * this returns the root component of the actual page, but from an 
application developer point of view, this is the
 * page.
 */
Component getPage();


Am 26.07.2012 um 10:27 schrieb wout86:

> Hi,
> 
> We all know Tapestry page instances can be obtained by "injecting" them in a
> variable using its type or its name, e.g., as follows:
> 
> @InjectPage private HomePage home;
> 
> or
> 
> @InjectPage("HomePage") private Object home;
> 
> However, this method only allows pages to be injected whose names are known
> at compile-time. 
> 
> I was wondering whether there's a way to obtain a page instance through some
> sort of getter method, such that the page name doesn't have to be known at
> compile-time? E.g., as follows:
> 
> Object home = Global.getPage("HomePage");
> 
> Thanks in advance, and best regards,
> Wouter
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-obtain-page-instances-programmatically-by-name-tp5714794.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



Is it possible to obtain page instances programmatically by name?

2012-07-26 Thread wout86
Hi,

We all know Tapestry page instances can be obtained by "injecting" them in a
variable using its type or its name, e.g., as follows:

@InjectPage private HomePage home;

or

@InjectPage("HomePage") private Object home;

However, this method only allows pages to be injected whose names are known
at compile-time. 

I was wondering whether there's a way to obtain a page instance through some
sort of getter method, such that the page name doesn't have to be known at
compile-time? E.g., as follows:

Object home = Global.getPage("HomePage");

Thanks in advance, and best regards,
Wouter



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-obtain-page-instances-programmatically-by-name-tp5714794.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



relative page links in components

2012-07-26 Thread ZKN __

Hi,
I have a component that's to be included in different pages. Inside the 
component I have page links that need to be relative to the current page.
Something like this:


${message:edit}

The page link should point to different pages according to the current page.
Is that possible?


Thanks,
Özkan

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



Re: Lightweight TapestryTools update site

2012-07-26 Thread jqzone
I just installed Tapestry Tools on Juno EE version.
Installs fine.
Green icon for .tml files works fine.
Suggestion for variable expansion  in tml file *does not* works fine...

On Tue, Jul 24, 2012 at 8:23 AM, Chris Mylonas  wrote:

> Hi Gavin,
>
> I just installed Tapestry Tools on Juno EE version.
> Installs fine.
> Green icon for .tml files works fine.
> Suggestion for variable expansion (ctrl space) in tml file works fine.
>
> Haven't tested anything else.
> OSX 10.6 Juno EE
>
> Great work!
>
> Cheers
> Chris
>
> On 24/07/2012, at 1:45 AM, Nicolas Barrera wrote:
>
> > Hi Gavin,
> >
> > I 've just tested with a clean new installation of juno *CLASSIC* and It
> > works like a charm,
> >
> > last time I was testing with Juno for Java developers. So I think that
> was
> > the problem.., stick to Eclipse Classic!
> >
> > thanks again and sorry for the inconvenience,
> >
> > cheers!
> >
> > Nicolás.-
> >
> >
> > On Mon, Jul 23, 2012 at 6:09 AM, Gavin Lei 
> wrote:
> >
> >> Hi Nicolas,
> >>
> >> I have not UBuntu environment, but it works well in Mac. I want to
> >> confirm what your problem is:
> >> 1. Can not see auto-complete panel in TML editor at all.
> >> 2. Can see auto-complete panel, but can not find Tapestry components in
> it.
> >>
> >> If it is problem 1, you should find out how to pop up auto-complete
> >> panel in your Eclipse.
> >>
> >> Thanks
> >>
> >> 2012/7/18 Nicolas Barrera :
> >>> I 'm running Ubuntu 12.04 LTS
> >>>
> >>> so it's woking for you in your environment :S, I 'm afraid I 'm doing
> >>> something wrong...
> >>>
> >>> perhaps someone else has already test it in a linux environment and can
> >>> tell us,
> >>>
> >>> well If you get to know about an issue and fix it please send an
> >>> announcement here.
> >>>
> >>> thanks, and cheers
> >>>
> >>> Nicolás.-
> >>>
> >>>
> >>> On Wed, Jul 18, 2012 at 12:16 PM, Gavin Lei 
> >> wrote:
> >>>
>  Thanks for your work, Nicolas :-)
> 
>  You are in Windows or Mac? I will double check this issue. In my test
>  of Eclipse Juno in Win 7, everything works well. If it appears here, i
>  will fix it soon.
> 
>  2012/7/18 Nicolas Barrera :
> > Hi Gavin,
> >
> > thanks for the quick
> >
> > As I told you I 'm using maven and I was careful that *through maven*
> > tapestry-core*.jar was included as a dependency.
> >
> > Anyway as you told me to double check that, I 've manually added in
> >> build
> > path configuration the tapestry-core*.jar and the behaviour is still
> >> the
> > same... no auto-complete.
> >
> > I thought that perhaps maven was bringing in some trouble so I
> >> decided to
> > start a new java web project, added tapetsry-core*.jar to the java
> >> build
> > path library configuration, created a page using tapestrytools'
> >> wizard,
> > added a
> > @Property
> > String hello;
> > variable to the .java class... but that property isn't auto-completed
> > within the tml editor when hitting ${ctrl+space, nor are tapestry
> core
> > components when hitting  >
> > In TML Editor if I click on "design" view it says:
> > The document is empty. Right mouse click here to insert content.
> >
> > But, right clicking does nothing... and above that when switching to
>  source
> > I see that the document is NOT empty but has this content:
> >
> >> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd
> >> ">
> >> 
> >>
> >> 
> >> 
> >>
> >
> > Hope I 'm helping with some clues...
> >
> > regards,
> >
> > Nicolás.-
> >
> >
> > On Wed, Jul 18, 2012 at 10:47 AM, Gavin Lei 
>  wrote:
> >
> >> Hi Nicolas,
> >>
> >> Thank you for your feedback, TapestryTools' auto-complete feature
> >> need
> >> tapestry-core-*.jar which contains
> >> "org.apache.tapestry5.corelib.components" in your eclipse project
> >> build path.
> >>
> >> I think this is not a Juno version issue, please check your build
> >> path. Right click project -> properties -> Java build path ->
> >> Libraries.
> >>
> >> 2012/7/18 Nicolas Barrera :
> >>> Hi Gavin,
> >>>
> >>> I wanted to ask this prior to open a new issue...
> >>>
> >>> I 'm testing TapestryTools 1.0.0.201207172033 with Eclipse Juno
>  Version:
> >>> Juno Release / Build id: 20120614-1722
> >>>
> >>> and although tapestrytools seems to be working fine, auto-complete
> >> features
> >>> aren't popping out when writing  >>> ctrl+space, alt+/
> >>>
> >>> I 'm using this maven archetype to generate the project where I 'm
> >>> exercising this test (groupId=org.apache.tapestry;
>  artifactId=quickstart;
> >>> version=5.1.0.5) which depends on tapestry-core-5.1.0.5.jar I can
> >> see
> >> that
> >>> dependency right inside the "Maven Dependencies" Library of the
>  project.
> >>>
> >>>
> 

Shared @SessionState???

2012-07-26 Thread Matías Blasi
Hi all,

I'm facing the following issue:

I have a @SessionState object for a custom type.

As far as I understand that would be handled individually for each "user
session", but I am seeing that the value is shared across all my user
sessions... It shouldn't be possible, in fact, if it works like that we
couldn't implement a shopping cart with this mechanism and I had a
shopping cart working fine in my application!

Do you imagine what could be wrong to get this behaiviour? I cant imagine
how implement a cross-SessionState without external persistence...

Here is my code:

public class CalificadosMessagesServiceImpl implements
CalificadosMessagesService {

@SessionState(create=true)
private CalificadosMessagesBag messagesBag;
...
...

@Override
public List getSessoinMessages() {
return this.messagesBag.getMessages();
}

@Override
public void recordSessionMessage(CalificadosMessage message) {
this.messagesBag.addMessage(message);
}
...
...
}

All the logged users (from different browsers), get the same messages!

Am I loosing something obvious?


Regards,
Matias.