Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Michael Gerzabek
You could implement your own SymbolProvider [1] that reads a properties 
file with all your runtime-stuff. You can implement a reloadable 
mechanism so that the values can be altered at runtime (or not).


In your Module you contribute this provider to the SymbolSource service. 
You can even decide at what position (there's a hirarchie of 
SymbolProviders) you want your provider at.


To retrieve configs in your services and pages you just inject 
SymbolSource and voila global access to all config info should be in place.


Total time to implement a first draft for a rather unexperienced 
programmer (like me) 10 minutes.


Regards,
Michael

[1] 
http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ioc/services/SymbolProvider.html



Patrick Moore schrieb:

Hi there --

I am looking to move from T4 to T5.

In T4/hivemind  configuration configuration was in xml files. This was great
because:

   1. is easily modifiable by non-Java programmers.
   2. By only allowing non-java types to change xml files, there was limited
   ways that damage could be done.
   3. Config changes did not require a rebuild/retest/redeploy cycle.
   4. non-programmer types could alter how modules were hooked together.

Moving to T5,

   1. some inner plumbing modules do make better sense to be hidden away
   from non-programmer type's fingers.
   2. For other modules, we want to allow things like directory paths and
   other text configuration to be exposed.  (properties file??)
   3. Other modules we do want to continue to leave "exposed" ala T4

Obviously, we do not want to be "fighting" T5 conventions. So what are
people's suggestions?

Is there a way to hook hivemind into T5?

Is there a standard way to read properties files and match property names to
java bean getter/setters?

Something I missed?

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Put your front window on your website"
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog




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



Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
Hi --

For most things, I agree that the java-based configuration approach is best.
For us the exception is that we DO want some stuff exposed in a way that
does not involve editing java code. Changing java code requires a full
build/test/verification process, which should not be necessary for something
like configuration changes.

Sysadmins / product managers should be able to change configurations without
needing an IDE or a java developer. ( output directories, which background
tasks are enabled )

Everything else... absolutely hands-off!

While chenille-hivemind is a good intermediate step, we obviously would like
a pure T5 solution at some point.

P.S. before someone suggests system properties... No! system properties are
only used for temporary changes not permanent decisions. ( + does not work
for random multi-line text )

On Wed, Sep 30, 2009 at 4:00 PM, Kalle Korhonen
wrote:

> Yes, Hivemind had great concepts but tapestry-ioc provides all of the
> same in a much simplified package (building pipelines comes to mind as
> one of the good examples). But this integration offers a very nice way
> to transition at your own pace.
>
> Kalle
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Kalle Korhonen
Yes, Hivemind had great concepts but tapestry-ioc provides all of the
same in a much simplified package (building pipelines comes to mind as
one of the good examples). But this integration offers a very nice way
to transition at your own pace.

Kalle


On Wed, Sep 30, 2009 at 3:26 PM, Patrick Moore  wrote:
> Oh sweet!
>
> This is an EXCELLENT intermediate solution...
>
> obviously we will use this as transition.
>
> equally obviously, we would like to get rid of hivemind.
>
> Patrick Moore
> Amplafi
> http://amplafi.com
> 650-207-9792
> "Amplafi enables businesses, professional organizations, bands, and other
> organizations to replicate their joint marketing efforts on the internet."
> corp blog : http://amplafi.com/blog
> personal blog : http://www.sworddance.com/blog
>
>
> On Wed, Sep 30, 2009 at 3:21 PM, Kalle Korhonen
> wrote:
>
>> http://chenillekit.codehaus.org/chenillekit-hivemind/index.html
>>
>> Kalle
>>
>>
>> On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore 
>> wrote:
>> > Hi there --
>> >
>> > I am looking to move from T4 to T5.
>> >
>> > In T4/hivemind  configuration configuration was in xml files. This was
>> great
>> > because:
>> >
>> >   1. is easily modifiable by non-Java programmers.
>> >   2. By only allowing non-java types to change xml files, there was
>> limited
>> >   ways that damage could be done.
>> >   3. Config changes did not require a rebuild/retest/redeploy cycle.
>> >   4. non-programmer types could alter how modules were hooked together.
>> >
>> > Moving to T5,
>> >
>> >   1. some inner plumbing modules do make better sense to be hidden away
>> >   from non-programmer type's fingers.
>> >   2. For other modules, we want to allow things like directory paths and
>> >   other text configuration to be exposed.  (properties file??)
>> >   3. Other modules we do want to continue to leave "exposed" ala T4
>> >
>> > Obviously, we do not want to be "fighting" T5 conventions. So what are
>> > people's suggestions?
>> >
>> > Is there a way to hook hivemind into T5?
>> >
>> > Is there a standard way to read properties files and match property names
>> to
>> > java bean getter/setters?
>> >
>> > Something I missed?
>> >
>> > Patrick Moore
>> > Amplafi
>> > http://amplafi.com
>> > 650-207-9792
>> > "Put your front window on your website"
>> > corp blog : http://amplafi.com/blog
>> > personal blog : http://www.sworddance.com/blog
>> >
>>
>> -
>> 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: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
On Wed, Sep 30, 2009 at 3:35 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

>
>
>2. For other modules, we want to allow things like directory paths and
>>   other text configuration to be exposed.  (properties file??)
>>
>
>
> Nothing prevents you to have some service pull configuration data from a
> file or any other source.


Ah the curse of open-source

I was asking if there was a standard *existing* T5 mechanism.

>
>
>  Is there a standard way to read properties files and match property names
>> to java bean getter/setters?
>>
>
> There's no such thing out-of-the-box, in Tapestry, but this can be easily
> implemented with reflection or, better yet, Tapestry's PropertyConduits. :)
>


But I guess not

Thanks for the reference to PropertyConduits ... seems to have no
documentation but from the name PropertyConduit does sound promising.



> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Sep 2009 19:09:49 -0300, Patrick Moore   
escreveu:



Hi there --


Hi!


   1. some inner plumbing modules do make better sense to be hidden away
   from non-programmer type's fingers.


I would say that the almost everyting regarding plumbing should be only  
touched by programmers.



   2. For other modules, we want to allow things like directory paths and
   other text configuration to be exposed.  (properties file??)


Nothing prevents you to have some service pull configuration data from a  
file or any other source.


Is there a standard way to read properties files and match property  
names to java bean getter/setters?


There's no such thing out-of-the-box, in Tapestry, but this can be easily  
implemented with reflection or, better yet, Tapestry's PropertyConduits. :)


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
Oh sweet!

This is an EXCELLENT intermediate solution...

obviously we will use this as transition.

equally obviously, we would like to get rid of hivemind.

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Amplafi enables businesses, professional organizations, bands, and other
organizations to replicate their joint marketing efforts on the internet."
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog


On Wed, Sep 30, 2009 at 3:21 PM, Kalle Korhonen
wrote:

> http://chenillekit.codehaus.org/chenillekit-hivemind/index.html
>
> Kalle
>
>
> On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore 
> wrote:
> > Hi there --
> >
> > I am looking to move from T4 to T5.
> >
> > In T4/hivemind  configuration configuration was in xml files. This was
> great
> > because:
> >
> >   1. is easily modifiable by non-Java programmers.
> >   2. By only allowing non-java types to change xml files, there was
> limited
> >   ways that damage could be done.
> >   3. Config changes did not require a rebuild/retest/redeploy cycle.
> >   4. non-programmer types could alter how modules were hooked together.
> >
> > Moving to T5,
> >
> >   1. some inner plumbing modules do make better sense to be hidden away
> >   from non-programmer type's fingers.
> >   2. For other modules, we want to allow things like directory paths and
> >   other text configuration to be exposed.  (properties file??)
> >   3. Other modules we do want to continue to leave "exposed" ala T4
> >
> > Obviously, we do not want to be "fighting" T5 conventions. So what are
> > people's suggestions?
> >
> > Is there a way to hook hivemind into T5?
> >
> > Is there a standard way to read properties files and match property names
> to
> > java bean getter/setters?
> >
> > Something I missed?
> >
> > Patrick Moore
> > Amplafi
> > http://amplafi.com
> > 650-207-9792
> > "Put your front window on your website"
> > corp blog : http://amplafi.com/blog
> > personal blog : http://www.sworddance.com/blog
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Kalle Korhonen
http://chenillekit.codehaus.org/chenillekit-hivemind/index.html

Kalle


On Wed, Sep 30, 2009 at 3:09 PM, Patrick Moore  wrote:
> Hi there --
>
> I am looking to move from T4 to T5.
>
> In T4/hivemind  configuration configuration was in xml files. This was great
> because:
>
>   1. is easily modifiable by non-Java programmers.
>   2. By only allowing non-java types to change xml files, there was limited
>   ways that damage could be done.
>   3. Config changes did not require a rebuild/retest/redeploy cycle.
>   4. non-programmer types could alter how modules were hooked together.
>
> Moving to T5,
>
>   1. some inner plumbing modules do make better sense to be hidden away
>   from non-programmer type's fingers.
>   2. For other modules, we want to allow things like directory paths and
>   other text configuration to be exposed.  (properties file??)
>   3. Other modules we do want to continue to leave "exposed" ala T4
>
> Obviously, we do not want to be "fighting" T5 conventions. So what are
> people's suggestions?
>
> Is there a way to hook hivemind into T5?
>
> Is there a standard way to read properties files and match property names to
> java bean getter/setters?
>
> Something I missed?
>
> Patrick Moore
> Amplafi
> http://amplafi.com
> 650-207-9792
> "Put your front window on your website"
> corp blog : http://amplafi.com/blog
> personal blog : http://www.sworddance.com/blog
>

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



Non-java External configuration in T5 -- can it be done?

2009-09-30 Thread Patrick Moore
Hi there --

I am looking to move from T4 to T5.

In T4/hivemind  configuration configuration was in xml files. This was great
because:

   1. is easily modifiable by non-Java programmers.
   2. By only allowing non-java types to change xml files, there was limited
   ways that damage could be done.
   3. Config changes did not require a rebuild/retest/redeploy cycle.
   4. non-programmer types could alter how modules were hooked together.

Moving to T5,

   1. some inner plumbing modules do make better sense to be hidden away
   from non-programmer type's fingers.
   2. For other modules, we want to allow things like directory paths and
   other text configuration to be exposed.  (properties file??)
   3. Other modules we do want to continue to leave "exposed" ala T4

Obviously, we do not want to be "fighting" T5 conventions. So what are
people's suggestions?

Is there a way to hook hivemind into T5?

Is there a standard way to read properties files and match property names to
java bean getter/setters?

Something I missed?

Patrick Moore
Amplafi
http://amplafi.com
650-207-9792
"Put your front window on your website"
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog


Re: Strange java applet behavior with T5

2009-09-30 Thread Martin Strand

On Wed, 30 Sep 2009 22:32:50 +0200, shymon  wrote:

My template is as follows:

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
  xmlns:p="tapestry:parameter">
  

  

  
  


and activation context methods:

 void onActivate(String eid) {
setEid(eid);
  }

  List onPassivate() {
List params = new Vector();
params.add(getEid());
return params;
  }



There's nothing wrong with your tapestry code, your applet is simply trying to fetch 
something from /META-INF/* - causing an extra page render request. 
See this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215746

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



Re: Strange java applet behavior with T5

2009-09-30 Thread shymon


Thiago H. de Paula Figueiredo wrote:
> 
> Em Wed, 30 Sep 2009 13:24:40 -0300, shymon   
> escreveu:
> 
>> Hi,
> 
> Hi!
> 
>> Moreover, during the second pass my activation context variable has
>> unexpected value. eg.:
> 
> Make sure you use ${asset:...} or absolute paths to reference any files  
> inside your templates.
> 
> 

My template is as follows:

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
  xmlns:p="tapestry:parameter">
  

  

  
  


and activation context methods:

 void onActivate(String eid) {
setEid(eid);
  }

  List onPassivate() {
List params = new Vector();
params.add(getEid());
return params;
  }


-- 
View this message in context: 
http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25688483.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: About stateless applications

2009-09-30 Thread Andrey Larionov
thanks, but its requires to create such code on every page

On Wed, Sep 30, 2009 at 19:38, Sergey Didenko  wrote:
> is to pass page activation context as action
> context, then initialize and  return component as AJAX response:
>
> The code may require some cleanup, but the idea is the following:

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



Reading context-params in T5

2009-09-30 Thread Benny Law
Hello,

I define the application version along with some other things as
context-params in web.xml. What is the best way to read these parameters in
T5? Thanks.

Benny


Re: Strange java applet behavior with T5

2009-09-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Sep 2009 13:24:40 -0300, shymon   
escreveu:



Hi,


Hi!


Moreover, during the second pass my activation context variable has
unexpected value. eg.:


Make sure you use ${asset:...} or absolute paths to reference any files  
inside your templates.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: How to implement a user tracker in T5 ....

2009-09-30 Thread Olle Hallin
Also good to know is that @SessionStateObjects (was:
@ApplicationStateObject) are stored in the HTTP session with the key "sso:"
+ MySessionStateObject.class.getName() (Tapestry 5.1)

Olle Hallin
Senior Java Developer and Architect
olle.hal...@crisp.se
www.crisp.se




2009/9/30 cordenier christophe 

> If you choose to use a servlet session listener, keep in mind that the
> Tapestry Registry can be obtained from the application context under this
> key "TapestryFilter.REGISTRY_CONTEXT_NAME".
>
> Then you can have access to all Tapestry 5 services including the
> ApplicationStateManager.
>
> 2009/9/30 Gunnar Eketrapp 
>
> > Hi !
> >
> > I am porting a huge jsp/spring kludge to T5. (And love it ...)
> >
> > I have now come across a UserTracker implementation that tracks currently
> > logged in users.
> >
> > How is this best done in T5 anyone?
> >
> > I could perhaps stick with the old servlet but I am not sure of how T5
> > creaets/destoys sessions and
> > adds/removes attributes.
> >
> > You know now I have a state ASO where the user object is stored within.
> >
> > Thanks in advance,
> > Gunnar Eketrapp,
> > Stockholm, Sweden
> >
> >
> >
> >
> > 
> > Current User tracker implementaon using HttpSessionListener +
> > HttpSessionAttributeListener
> > 
> >
> > public class UserTracker implements HttpSessionListener,
> > HttpSessionAttributeListener {
> >private static final Logger logger =
> > Logger.getLogger(UserTracker.class.getName());
> >private static UserTracker instance;
> >
> >public static UserTracker getInstance() {
> >return instance;
> >}
> >
> >public UserTracker() {
> >instance = this;
> >}
> >
> >private SortedSet current = new
> > TreeSet();
> >
> >public SortedSet getCurrent() {
> >SortedSet result = new
> > TreeSet();
> >synchronized (current) {
> >result.addAll(current);
> >}
> >return result;
> >}
> >
> >public SortedSet getCurrentUsernames() {
> >SortedSet result = new TreeSet();
> >synchronized (current) {
> >for( UserTrackerEntry en : current ) {
> >result.add(en.getUsername());
> >}
> >}
> >return result;
> >}
> >
> >public void attributeAdded(HttpSessionBindingEvent e) {
> >if( "user".equals(e.getName()) ) {
> >User user = (User) e.getValue();
> >synchronized (current) {
> >String sessionId = e.getSession().getId();
> >current.add(new
> > UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> > Date()));
> >}
> >}
> >}
> >
> >public void attributeRemoved(HttpSessionBindingEvent e) {
> >if( "user".equals(e.getName()) ) {
> >User user = (User) e.getValue();
> >synchronized (current) {
> >String sessionId = e.getSession().getId();
> >current.remove(new
> > UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> > Date()));
> >}
> >}
> >}
> >
> >public void attributeReplaced(HttpSessionBindingEvent arg0) {
> >// ignore
> >}
> >
> >public void sessionCreated(HttpSessionEvent e) {
> >User user = (User) e.getSession().getAttribute("user");
> >if( user != null ) {
> >synchronized (current) {
> >String sessionId = e.getSession().getId();
> >current.add(new
> > UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> > Date()));
> >}
> >}
> >}
> >
> >public void sessionDestroyed(HttpSessionEvent e) {
> >User user = (User) e.getSession().getAttribute("user");
> >if( user != null ) {
> >synchronized (current) {
> >String sessionId = e.getSession().getId();
> >current.remove(new
> > UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> > Date()));
> >}
> >}
> >}
> >
> > }
> >
>


Strange java applet behavior with T5

2009-09-30 Thread shymon

Hi,

I have simple page. Just  and few 's
After adding java applet to it I noticed that single request in browser
causes tapestry to render this page 2 times. (at least beginRender method
ist executed 2 times - and only one time when there is no applet on page).

Moreover, during the second pass my activation context variable has
unexpected value. eg.:

pass 1:
---
ACTIVATE: 36971
PAGE BEGINRENDER
PASSIVATE: 36971
PASSIVATE: 36971  (good value)

pass 2:
---
ACTIVATE: META-INF
PAGE BEGINRENDER
PASSIVATE: META-INF
PASSIVATE: META-INF

I don't know where META-INF comes from.

What could be the problem?
How should I embed java applets in tapestry page?

thx for any help,
Shymon
-- 
View this message in context: 
http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25684505.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: About stateless applications

2009-09-30 Thread Sergey Didenko
Another alternative is to pass page activation context as action
context, then initialize and  return component as AJAX response:

The code may require some cleanup, but the idea is the following:

tml:


...

java:

@Parameter
private long someId

@Component
private TestComponent testComponent;

protected void setupRender() {
// that is called during page request
testComponent.set( getSomeIdFromPageActivationContext() );
}

Object onSubmitFromForm1( long someId ) {
// setupRender is not called for AJAX request
// so we pass someId as action context here
if ( request.isXHR() ) {
testComponent.set( someId );
return testComponent;
} else {
return null;
}
}


On Wed, Sep 30, 2009 at 3:41 PM, cordenier christophe
 wrote:
> It also exists @Persist("client") to store the information directly in link
> URLs
>
> And have a look at this, this is the topic i was talking about
>
> http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+onactivate+component#query:list%3Aorg.apache.tapestry.users%20onactivate%20component+page:1+mid:mqs3srsveutjt4mu+state:results
>
> 2009/9/30 Andrey Larionov 
>
>> But Pages is Components. As i understand there are no distinction. Or i'm
>> wrong.
>>
>> So there no so simple way to drop persistence?
>>
>> On Wed, Sep 30, 2009 at 16:30, cordenier christophe
>>  wrote:
>> > Keep in mind that onActivate and onPassivate are called on pages not
>> > components.
>> > I you are trying to activate/passivate components , I think there is
>> current
>> > post on the user mailing list.
>> >
>> > 2009/9/30 Andrey Larionov 
>> >
>> >> Also i have two components which works like described on page
>> >> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
>> >> in section "component event requests / Persistent Data".
>> >> On components sets data in another. Can i replace persistency in this
>> >> place by onActivate/onPassivate?
>> >> I implement this methods, but they never called.
>> >>
>> >> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
>> >>  wrote:
>> >> > Hello
>> >> >
>> >> > Have a look at the LinkCreationListener which can be used to add
>> custom
>> >> > parameters.
>> >> > If you couple this to a Per-thread service you can achieve to pass
>> data
>> >> from
>> >> > one request to another.
>> >> >
>> >> > 2009/9/30 Andrey Larionov 
>> >> >
>> >> >> I want to create stateless application. Which aproach i should use.
>> >> >>
>> >> >> For example i have an some pagination component similar to GridPager,
>> >> >> but less coupled to paginating component. In Tapestry current page is
>> >> >> stored in  Persist field. WHat is alternative solution? Can i use
>> >> >> onActivate/onPassivate to store value across requests produced by
>> >> >> clicking on a page link?
>> >> >>
>> >> >> Thank
>> >> >>
>> >> >> PS. Sorry for my english. Please ask questions if something is
>> >> >> ununderstandable, i'll try to explain it broader.
>> >> >>
>> >> >> -
>> >> >> 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
>> >>
>> >>
>> >
>>
>> -
>> 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: AjaxformLoop with Pager?

2009-09-30 Thread cordenier christophe
Maybe you can use a client side pagination to minimize conflicts with the
AjaxFormLoop.

2009/9/30 Stefan 

> I think i can build something for me, should not be a large problem.
> Fortunately I did not take JSF ;)
>
>
> Am 30.09.2009 um 17:15 schrieb cordenier christophe:
>
>
>  Then i don't know any component for That. Sorry.
>>
>>
>> 2009/9/30 Stefan 
>>
>>  I have build a "Constraint composing page"
>>> With the loop you can add/remove rows of constraints:
>>> Each row contains a set of ajax-enabled, chained selects.
>>> It works very well, but to enable an unlimited amount of rows i need to
>>> have it pageable.
>>>
>>>
>>> Am 30.09.2009 um 17:03 schrieb cordenier christophe:
>>>
>>>
>>> What are you trying to do with AjaxFormLoop ? Actually, the Grid
>>> component
>>>
 supports pagination, inplace update and allow to work with forms on
 multiple
 entries using the encoder parameter.

 2009/9/30 Stefan Schütz 

 Hi folks,

>
> is it somehow possible to getting an AjaxFormloop pageable?
> Found nothing; neither in mailing lists nor on other sites.
>
> Greets,
> Stefan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
>
>
>>>
>


Re: How to implement a user tracker in T5 ....

2009-09-30 Thread cordenier christophe
If you choose to use a servlet session listener, keep in mind that the
Tapestry Registry can be obtained from the application context under this
key "TapestryFilter.REGISTRY_CONTEXT_NAME".

Then you can have access to all Tapestry 5 services including the
ApplicationStateManager.

2009/9/30 Gunnar Eketrapp 

> Hi !
>
> I am porting a huge jsp/spring kludge to T5. (And love it ...)
>
> I have now come across a UserTracker implementation that tracks currently
> logged in users.
>
> How is this best done in T5 anyone?
>
> I could perhaps stick with the old servlet but I am not sure of how T5
> creaets/destoys sessions and
> adds/removes attributes.
>
> You know now I have a state ASO where the user object is stored within.
>
> Thanks in advance,
> Gunnar Eketrapp,
> Stockholm, Sweden
>
>
>
>
> 
> Current User tracker implementaon using HttpSessionListener +
> HttpSessionAttributeListener
> 
>
> public class UserTracker implements HttpSessionListener,
> HttpSessionAttributeListener {
>private static final Logger logger =
> Logger.getLogger(UserTracker.class.getName());
>private static UserTracker instance;
>
>public static UserTracker getInstance() {
>return instance;
>}
>
>public UserTracker() {
>instance = this;
>}
>
>private SortedSet current = new
> TreeSet();
>
>public SortedSet getCurrent() {
>SortedSet result = new
> TreeSet();
>synchronized (current) {
>result.addAll(current);
>}
>return result;
>}
>
>public SortedSet getCurrentUsernames() {
>SortedSet result = new TreeSet();
>synchronized (current) {
>for( UserTrackerEntry en : current ) {
>result.add(en.getUsername());
>}
>}
>return result;
>}
>
>public void attributeAdded(HttpSessionBindingEvent e) {
>if( "user".equals(e.getName()) ) {
>User user = (User) e.getValue();
>synchronized (current) {
>String sessionId = e.getSession().getId();
>current.add(new
> UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> Date()));
>}
>}
>}
>
>public void attributeRemoved(HttpSessionBindingEvent e) {
>if( "user".equals(e.getName()) ) {
>User user = (User) e.getValue();
>synchronized (current) {
>String sessionId = e.getSession().getId();
>current.remove(new
> UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> Date()));
>}
>}
>}
>
>public void attributeReplaced(HttpSessionBindingEvent arg0) {
>// ignore
>}
>
>public void sessionCreated(HttpSessionEvent e) {
>User user = (User) e.getSession().getAttribute("user");
>if( user != null ) {
>synchronized (current) {
>String sessionId = e.getSession().getId();
>current.add(new
> UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> Date()));
>}
>}
>}
>
>public void sessionDestroyed(HttpSessionEvent e) {
>User user = (User) e.getSession().getAttribute("user");
>if( user != null ) {
>synchronized (current) {
>String sessionId = e.getSession().getId();
>current.remove(new
> UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
> Date()));
>}
>}
>}
>
> }
>


Re: AjaxformLoop with Pager?

2009-09-30 Thread Stefan

I think i can build something for me, should not be a large problem.
Fortunately I did not take JSF ;)


Am 30.09.2009 um 17:15 schrieb cordenier christophe:


Then i don't know any component for That. Sorry.


2009/9/30 Stefan 


I have build a "Constraint composing page"
With the loop you can add/remove rows of constraints:
Each row contains a set of ajax-enabled, chained selects.
It works very well, but to enable an unlimited amount of rows i  
need to

have it pageable.


Am 30.09.2009 um 17:03 schrieb cordenier christophe:


What are you trying to do with AjaxFormLoop ? Actually, the Grid  
component

supports pagination, inplace update and allow to work with forms on
multiple
entries using the encoder parameter.

2009/9/30 Stefan Schütz 

Hi folks,


is it somehow possible to getting an AjaxFormloop pageable?
Found nothing; neither in mailing lists nor on other sites.

Greets,
Stefan

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









smime.p7s
Description: S/MIME cryptographic signature


How to implement a user tracker in T5 ....

2009-09-30 Thread Gunnar Eketrapp
Hi !

I am porting a huge jsp/spring kludge to T5. (And love it ...)

I have now come across a UserTracker implementation that tracks currently
logged in users.

How is this best done in T5 anyone?

I could perhaps stick with the old servlet but I am not sure of how T5
creaets/destoys sessions and
adds/removes attributes.

You know now I have a state ASO where the user object is stored within.

Thanks in advance,
Gunnar Eketrapp,
Stockholm, Sweden





Current User tracker implementaon using HttpSessionListener +
HttpSessionAttributeListener


public class UserTracker implements HttpSessionListener,
HttpSessionAttributeListener {
private static final Logger logger =
Logger.getLogger(UserTracker.class.getName());
private static UserTracker instance;

public static UserTracker getInstance() {
return instance;
}

public UserTracker() {
instance = this;
}

private SortedSet current = new
TreeSet();

public SortedSet getCurrent() {
SortedSet result = new
TreeSet();
synchronized (current) {
result.addAll(current);
}
return result;
}

public SortedSet getCurrentUsernames() {
SortedSet result = new TreeSet();
synchronized (current) {
for( UserTrackerEntry en : current ) {
result.add(en.getUsername());
}
}
return result;
}

public void attributeAdded(HttpSessionBindingEvent e) {
if( "user".equals(e.getName()) ) {
User user = (User) e.getValue();
synchronized (current) {
String sessionId = e.getSession().getId();
current.add(new
UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
Date()));
}
}
}

public void attributeRemoved(HttpSessionBindingEvent e) {
if( "user".equals(e.getName()) ) {
User user = (User) e.getValue();
synchronized (current) {
String sessionId = e.getSession().getId();
current.remove(new
UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
Date()));
}
}
}

public void attributeReplaced(HttpSessionBindingEvent arg0) {
// ignore
}

public void sessionCreated(HttpSessionEvent e) {
User user = (User) e.getSession().getAttribute("user");
if( user != null ) {
synchronized (current) {
String sessionId = e.getSession().getId();
current.add(new
UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
Date()));
}
}
}

public void sessionDestroyed(HttpSessionEvent e) {
User user = (User) e.getSession().getAttribute("user");
if( user != null ) {
synchronized (current) {
String sessionId = e.getSession().getId();
current.remove(new
UserTrackerEntry(user.getUsername(),user.getFullName(),sessionId,new
Date()));
}
}
}

}


Re: AjaxformLoop with Pager?

2009-09-30 Thread cordenier christophe
Then i don't know any component for That. Sorry.


2009/9/30 Stefan 

> I have build a "Constraint composing page"
> With the loop you can add/remove rows of constraints:
> Each row contains a set of ajax-enabled, chained selects.
> It works very well, but to enable an unlimited amount of rows i need to
> have it pageable.
>
>
> Am 30.09.2009 um 17:03 schrieb cordenier christophe:
>
>
>  What are you trying to do with AjaxFormLoop ? Actually, the Grid component
>> supports pagination, inplace update and allow to work with forms on
>> multiple
>> entries using the encoder parameter.
>>
>> 2009/9/30 Stefan Schütz 
>>
>>  Hi folks,
>>>
>>> is it somehow possible to getting an AjaxFormloop pageable?
>>> Found nothing; neither in mailing lists nor on other sites.
>>>
>>> Greets,
>>> Stefan
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>


Re: After Clicking on table columns table( contrib:TableView) doesn't display doesn't display rows

2009-09-30 Thread Norman Franke
I've had that happen. Query parameters either weren't @Persist-ed or  
otherwise not part of the activation context, so when clicking the  
sort links, it forgot what it was querying. Which does bring up an  
interesting point: allowing a different activation context for tables  
to keep the persisted data to a minimum, since there are limits to the  
amount of data that an activation context can hold due to URL limits.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Sep 30, 2009, at 7:00 AM, Andreas Andreou wrote:


You understand correctly that the rows are fetched from getUsers
method for the first
time - BUT when clicking on the columns it will NOT sort the rows  
based on

earlier fetched rows...

It needs to call getUsers again (and then do the sorting) - is there
any logic in that
method that makes it return empty list? Perhaps you need to persist  
something in

the session to make the subsequent getUsers() calls work correctly.

On Wed, Sep 30, 2009 at 9:14 AM, seshu babu   
wrote:

Hi,

I am newly learning tapestry.

The Rendered rows vanish if I click on the columns (for sorting of
rows).here is the .page file
--

- P R O P E R T I E S
 -->
 
 
 
 
 
   
   
   
   
   
 
--

I understand that the rows are fetched from getUsers method for the  
first

time & further clicking on the columns it will sort the rows based on
earlier fetched rows.
What's causing these rows to get lost once feteched into table?

I use tapesty 4.1. In the above page common/Table is custom table  
component

of type contrib:TableView.

Thanks for your help,
Seshu





--
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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





Re: AjaxformLoop with Pager?

2009-09-30 Thread Stefan

I have build a "Constraint composing page"
With the loop you can add/remove rows of constraints:
Each row contains a set of ajax-enabled, chained selects.
It works very well, but to enable an unlimited amount of rows i need  
to have it pageable.



Am 30.09.2009 um 17:03 schrieb cordenier christophe:

What are you trying to do with AjaxFormLoop ? Actually, the Grid  
component
supports pagination, inplace update and allow to work with forms on  
multiple

entries using the encoder parameter.

2009/9/30 Stefan Schütz 


Hi folks,

is it somehow possible to getting an AjaxFormloop pageable?
Found nothing; neither in mailing lists nor on other sites.

Greets,
Stefan

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






smime.p7s
Description: S/MIME cryptographic signature


Re: AjaxformLoop with Pager?

2009-09-30 Thread cordenier christophe
What are you trying to do with AjaxFormLoop ? Actually, the Grid component
supports pagination, inplace update and allow to work with forms on multiple
entries using the encoder parameter.

2009/9/30 Stefan Schütz 

> Hi folks,
>
> is it somehow possible to getting an AjaxFormloop pageable?
> Found nothing; neither in mailing lists nor on other sites.
>
> Greets,
> Stefan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


AjaxformLoop with Pager?

2009-09-30 Thread Stefan Schütz

Hi folks,

is it somehow possible to getting an AjaxFormloop pageable?
Found nothing; neither in mailing lists nor on other sites.

Greets,
Stefan

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



Re: About stateless applications

2009-09-30 Thread Massimo Lusetti
On Wed, Sep 30, 2009 at 3:52 PM, Thiago H. de Paula Figueiredo
 wrote:

> Of course, we could implement that too. Any implementation hints? :D

I'm sorry i don't go that further :)

-- 
Massimo
http://meridio.blogspot.com

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



Re: About stateless applications

2009-09-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Sep 2009 10:49:52 -0300, Massimo Lusetti   
escreveu:



We definitely should rise a vote for a configuration symbol:
tapestry.make-my-life-easier to be set default to true :)


Tapestry already does that, no? :)
Of course, we could implement that too. Any implementation hints? :D

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: About stateless applications

2009-09-30 Thread Massimo Lusetti
On Wed, Sep 30, 2009 at 3:46 PM, Thiago H. de Paula Figueiredo
 wrote:

> Em Wed, 30 Sep 2009 10:32:53 -0300, Andrey Larionov 
> escreveu:
>
>> Thanks, but my interest not only in pager, but in creating complex
>> stateless apllications easy
>
> It's not documented, but there is a configuration symbol
> (tapestry.persistence-strategy, SymbolConstants.PERSISTENCE_STRATEGY), that
> defines the persistency strategy for fields annotated with @Persist (without
> specifying a strategy like flash or session). Maybe you could use it to make
> Tapestry use client persistence by default. I haven't tested this, though.

We definitely should rise a vote for a configuration symbol:
tapestry.make-my-life-easier to be set default to true :)

-- 
Massimo
http://meridio.blogspot.com

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



Re: About stateless applications

2009-09-30 Thread Thiago H. de Paula Figueiredo
Em Wed, 30 Sep 2009 10:32:53 -0300, Andrey Larionov   
escreveu:



Thanks, but my interest not only in pager, but in creating complex
stateless apllications easy


It's not documented, but there is a configuration symbol  
(tapestry.persistence-strategy, SymbolConstants.PERSISTENCE_STRATEGY),  
that defines the persistency strategy for fields annotated with @Persist  
(without specifying a strategy like flash or session). Maybe you could use  
it to make Tapestry use client persistence by default. I haven't tested  
this, though.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: About stateless applications

2009-09-30 Thread Andrey Larionov
Thanks, but my interest not only in pager, but in creating complex
stateless apllications easy

On Wed, Sep 30, 2009 at 17:20, Jack Nuzbit  wrote:
> rote a paging component that I think would do what you want. The
> component takes a PageSource implementation which acquires the paged list of
> items for display and also constructs the page activation context for any
> paging links - so there's no need for any @Persist annotations.

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



Re: About stateless applications

2009-09-30 Thread Jack Nuzbit
I wrote a paging component that I think would do what you want. The
component takes a PageSource implementation which acquires the paged list of
items for display and also constructs the page activation context for any
paging links - so there's no need for any @Persist annotations.

Here's my blog post if you want to take a look: tapestry paging
component

Cheers,

Jack



On Wed, Sep 30, 2009 at 1:41 PM, cordenier christophe <
christophe.corden...@gmail.com> wrote:

> It also exists @Persist("client") to store the information directly in link
> URLs
>
> And have a look at this, this is the topic i was talking about
>
>
> http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+onactivate+component#query:list%3Aorg.apache.tapestry.users%20onactivate%20component+page:1+mid:mqs3srsveutjt4mu+state:results
>
> 2009/9/30 Andrey Larionov 
>
> > But Pages is Components. As i understand there are no distinction. Or i'm
> > wrong.
> >
> > So there no so simple way to drop persistence?
> >
> > On Wed, Sep 30, 2009 at 16:30, cordenier christophe
> >  wrote:
> > > Keep in mind that onActivate and onPassivate are called on pages not
> > > components.
> > > I you are trying to activate/passivate components , I think there is
> > current
> > > post on the user mailing list.
> > >
> > > 2009/9/30 Andrey Larionov 
> > >
> > >> Also i have two components which works like described on page
> > >> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
> > >> in section "component event requests / Persistent Data".
> > >> On components sets data in another. Can i replace persistency in this
> > >> place by onActivate/onPassivate?
> > >> I implement this methods, but they never called.
> > >>
> > >> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
> > >>  wrote:
> > >> > Hello
> > >> >
> > >> > Have a look at the LinkCreationListener which can be used to add
> > custom
> > >> > parameters.
> > >> > If you couple this to a Per-thread service you can achieve to pass
> > data
> > >> from
> > >> > one request to another.
> > >> >
> > >> > 2009/9/30 Andrey Larionov 
> > >> >
> > >> >> I want to create stateless application. Which aproach i should use.
> > >> >>
> > >> >> For example i have an some pagination component similar to
> GridPager,
> > >> >> but less coupled to paginating component. In Tapestry current page
> is
> > >> >> stored in  Persist field. WHat is alternative solution? Can i use
> > >> >> onActivate/onPassivate to store value across requests produced by
> > >> >> clicking on a page link?
> > >> >>
> > >> >> Thank
> > >> >>
> > >> >> PS. Sorry for my english. Please ask questions if something is
> > >> >> ununderstandable, i'll try to explain it broader.
> > >> >>
> > >> >>
> -
> > >> >> 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
> > >>
> > >>
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: About stateless applications

2009-09-30 Thread cordenier christophe
You're welcome, hope this helps you to choose the good solution for your
needs.

2009/9/30 Andrey Larionov 

> Thanks.
>
> On Wed, Sep 30, 2009 at 16:41, cordenier christophe
>  wrote:
> > It also exists @Persist("client") to store the information directly in
> link
> > URLs
> >
> > And have a look at this, this is the topic i was talking about
> >
> >
> http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+onactivate+component#query:list%3Aorg.apache.tapestry.users%20onactivate%20component+page:1+mid:mqs3srsveutjt4mu+state:results
> >
> > 2009/9/30 Andrey Larionov 
> >
> >> But Pages is Components. As i understand there are no distinction. Or
> i'm
> >> wrong.
> >>
> >> So there no so simple way to drop persistence?
> >>
> >> On Wed, Sep 30, 2009 at 16:30, cordenier christophe
> >>  wrote:
> >> > Keep in mind that onActivate and onPassivate are called on pages not
> >> > components.
> >> > I you are trying to activate/passivate components , I think there is
> >> current
> >> > post on the user mailing list.
> >> >
> >> > 2009/9/30 Andrey Larionov 
> >> >
> >> >> Also i have two components which works like described on page
> >> >> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
> >> >> in section "component event requests / Persistent Data".
> >> >> On components sets data in another. Can i replace persistency in this
> >> >> place by onActivate/onPassivate?
> >> >> I implement this methods, but they never called.
> >> >>
> >> >> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
> >> >>  wrote:
> >> >> > Hello
> >> >> >
> >> >> > Have a look at the LinkCreationListener which can be used to add
> >> custom
> >> >> > parameters.
> >> >> > If you couple this to a Per-thread service you can achieve to pass
> >> data
> >> >> from
> >> >> > one request to another.
> >> >> >
> >> >> > 2009/9/30 Andrey Larionov 
> >> >> >
> >> >> >> I want to create stateless application. Which aproach i should
> use.
> >> >> >>
> >> >> >> For example i have an some pagination component similar to
> GridPager,
> >> >> >> but less coupled to paginating component. In Tapestry current page
> is
> >> >> >> stored in  Persist field. WHat is alternative solution? Can i use
> >> >> >> onActivate/onPassivate to store value across requests produced by
> >> >> >> clicking on a page link?
> >> >> >>
> >> >> >> Thank
> >> >> >>
> >> >> >> PS. Sorry for my english. Please ask questions if something is
> >> >> >> ununderstandable, i'll try to explain it broader.
> >> >> >>
> >> >> >>
> -
> >> >> >> 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
> >> >>
> >> >>
> >> >
> >>
> >> -
> >> 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: About stateless applications

2009-09-30 Thread Andrey Larionov
Thanks.

On Wed, Sep 30, 2009 at 16:41, cordenier christophe
 wrote:
> It also exists @Persist("client") to store the information directly in link
> URLs
>
> And have a look at this, this is the topic i was talking about
>
> http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+onactivate+component#query:list%3Aorg.apache.tapestry.users%20onactivate%20component+page:1+mid:mqs3srsveutjt4mu+state:results
>
> 2009/9/30 Andrey Larionov 
>
>> But Pages is Components. As i understand there are no distinction. Or i'm
>> wrong.
>>
>> So there no so simple way to drop persistence?
>>
>> On Wed, Sep 30, 2009 at 16:30, cordenier christophe
>>  wrote:
>> > Keep in mind that onActivate and onPassivate are called on pages not
>> > components.
>> > I you are trying to activate/passivate components , I think there is
>> current
>> > post on the user mailing list.
>> >
>> > 2009/9/30 Andrey Larionov 
>> >
>> >> Also i have two components which works like described on page
>> >> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
>> >> in section "component event requests / Persistent Data".
>> >> On components sets data in another. Can i replace persistency in this
>> >> place by onActivate/onPassivate?
>> >> I implement this methods, but they never called.
>> >>
>> >> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
>> >>  wrote:
>> >> > Hello
>> >> >
>> >> > Have a look at the LinkCreationListener which can be used to add
>> custom
>> >> > parameters.
>> >> > If you couple this to a Per-thread service you can achieve to pass
>> data
>> >> from
>> >> > one request to another.
>> >> >
>> >> > 2009/9/30 Andrey Larionov 
>> >> >
>> >> >> I want to create stateless application. Which aproach i should use.
>> >> >>
>> >> >> For example i have an some pagination component similar to GridPager,
>> >> >> but less coupled to paginating component. In Tapestry current page is
>> >> >> stored in  Persist field. WHat is alternative solution? Can i use
>> >> >> onActivate/onPassivate to store value across requests produced by
>> >> >> clicking on a page link?
>> >> >>
>> >> >> Thank
>> >> >>
>> >> >> PS. Sorry for my english. Please ask questions if something is
>> >> >> ununderstandable, i'll try to explain it broader.
>> >> >>
>> >> >> -
>> >> >> 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
>> >>
>> >>
>> >
>>
>> -
>> 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: About stateless applications

2009-09-30 Thread cordenier christophe
It also exists @Persist("client") to store the information directly in link
URLs

And have a look at this, this is the topic i was talking about

http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+onactivate+component#query:list%3Aorg.apache.tapestry.users%20onactivate%20component+page:1+mid:mqs3srsveutjt4mu+state:results

2009/9/30 Andrey Larionov 

> But Pages is Components. As i understand there are no distinction. Or i'm
> wrong.
>
> So there no so simple way to drop persistence?
>
> On Wed, Sep 30, 2009 at 16:30, cordenier christophe
>  wrote:
> > Keep in mind that onActivate and onPassivate are called on pages not
> > components.
> > I you are trying to activate/passivate components , I think there is
> current
> > post on the user mailing list.
> >
> > 2009/9/30 Andrey Larionov 
> >
> >> Also i have two components which works like described on page
> >> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
> >> in section "component event requests / Persistent Data".
> >> On components sets data in another. Can i replace persistency in this
> >> place by onActivate/onPassivate?
> >> I implement this methods, but they never called.
> >>
> >> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
> >>  wrote:
> >> > Hello
> >> >
> >> > Have a look at the LinkCreationListener which can be used to add
> custom
> >> > parameters.
> >> > If you couple this to a Per-thread service you can achieve to pass
> data
> >> from
> >> > one request to another.
> >> >
> >> > 2009/9/30 Andrey Larionov 
> >> >
> >> >> I want to create stateless application. Which aproach i should use.
> >> >>
> >> >> For example i have an some pagination component similar to GridPager,
> >> >> but less coupled to paginating component. In Tapestry current page is
> >> >> stored in  Persist field. WHat is alternative solution? Can i use
> >> >> onActivate/onPassivate to store value across requests produced by
> >> >> clicking on a page link?
> >> >>
> >> >> Thank
> >> >>
> >> >> PS. Sorry for my english. Please ask questions if something is
> >> >> ununderstandable, i'll try to explain it broader.
> >> >>
> >> >> -
> >> >> 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
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: About stateless applications

2009-09-30 Thread Andrey Larionov
But Pages is Components. As i understand there are no distinction. Or i'm wrong.

So there no so simple way to drop persistence?

On Wed, Sep 30, 2009 at 16:30, cordenier christophe
 wrote:
> Keep in mind that onActivate and onPassivate are called on pages not
> components.
> I you are trying to activate/passivate components , I think there is current
> post on the user mailing list.
>
> 2009/9/30 Andrey Larionov 
>
>> Also i have two components which works like described on page
>> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
>> in section "component event requests / Persistent Data".
>> On components sets data in another. Can i replace persistency in this
>> place by onActivate/onPassivate?
>> I implement this methods, but they never called.
>>
>> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
>>  wrote:
>> > Hello
>> >
>> > Have a look at the LinkCreationListener which can be used to add custom
>> > parameters.
>> > If you couple this to a Per-thread service you can achieve to pass data
>> from
>> > one request to another.
>> >
>> > 2009/9/30 Andrey Larionov 
>> >
>> >> I want to create stateless application. Which aproach i should use.
>> >>
>> >> For example i have an some pagination component similar to GridPager,
>> >> but less coupled to paginating component. In Tapestry current page is
>> >> stored in  Persist field. WHat is alternative solution? Can i use
>> >> onActivate/onPassivate to store value across requests produced by
>> >> clicking on a page link?
>> >>
>> >> Thank
>> >>
>> >> PS. Sorry for my english. Please ask questions if something is
>> >> ununderstandable, i'll try to explain it broader.
>> >>
>> >> -
>> >> 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
>>
>>
>

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



Re: About stateless applications

2009-09-30 Thread cordenier christophe
Keep in mind that onActivate and onPassivate are called on pages not
components.
I you are trying to activate/passivate components , I think there is current
post on the user mailing list.

2009/9/30 Andrey Larionov 

> Also i have two components which works like described on page
> http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
> in section "component event requests / Persistent Data".
> On components sets data in another. Can i replace persistency in this
> place by onActivate/onPassivate?
> I implement this methods, but they never called.
>
> On Wed, Sep 30, 2009 at 14:52, cordenier christophe
>  wrote:
> > Hello
> >
> > Have a look at the LinkCreationListener which can be used to add custom
> > parameters.
> > If you couple this to a Per-thread service you can achieve to pass data
> from
> > one request to another.
> >
> > 2009/9/30 Andrey Larionov 
> >
> >> I want to create stateless application. Which aproach i should use.
> >>
> >> For example i have an some pagination component similar to GridPager,
> >> but less coupled to paginating component. In Tapestry current page is
> >> stored in  Persist field. WHat is alternative solution? Can i use
> >> onActivate/onPassivate to store value across requests produced by
> >> clicking on a page link?
> >>
> >> Thank
> >>
> >> PS. Sorry for my english. Please ask questions if something is
> >> ununderstandable, i'll try to explain it broader.
> >>
> >> -
> >> 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: About stateless applications

2009-09-30 Thread Andrey Larionov
Also i have two components which works like described on page
http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
in section "component event requests / Persistent Data".
On components sets data in another. Can i replace persistency in this
place by onActivate/onPassivate?
I implement this methods, but they never called.

On Wed, Sep 30, 2009 at 14:52, cordenier christophe
 wrote:
> Hello
>
> Have a look at the LinkCreationListener which can be used to add custom
> parameters.
> If you couple this to a Per-thread service you can achieve to pass data from
> one request to another.
>
> 2009/9/30 Andrey Larionov 
>
>> I want to create stateless application. Which aproach i should use.
>>
>> For example i have an some pagination component similar to GridPager,
>> but less coupled to paginating component. In Tapestry current page is
>> stored in  Persist field. WHat is alternative solution? Can i use
>> onActivate/onPassivate to store value across requests produced by
>> clicking on a page link?
>>
>> Thank
>>
>> PS. Sorry for my english. Please ask questions if something is
>> ununderstandable, i'll try to explain it broader.
>>
>> -
>> 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 bubbling - how to implement a top level catch-all target

2009-09-30 Thread Massimo Lusetti
On Tue, Sep 29, 2009 at 11:24 PM, Andreas Pardeike  wrote:

> How can I make sure that information from component construction time will
> survive so it can be used when the ajax event is processed?

That's how things works, currently. It's a task for your "service" to
provide that.

Cheers
-- 
Massimo
http://meridio.blogspot.com

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



Re: XHTML and form element name attribute

2009-09-30 Thread cordenier christophe
Tapestry Form components adds name attribute directly name attribute via
MarkupWriter.

A workaround is maybe to create MarkupWriterListener that listens to node
creation and use forceAttributes to remove the name attribute from form
elements. If you set name to 'null' it must be removed. Here is an extract
of Javadoc for the forceAttributes method.


Forces changes to a number of attributes. The new attributes
overwrite previous values. Overriding an
attribute's value to null will remove the attribute entirely.



2009/9/30 Daniel Jones 

>
> Hi Ian,
>
> Did you find a solution for this?
>
> Cheers,
> Daniel
>
>
> Ian Fieldhouse wrote:
> >
> > When using a form component in my template with the following markup
> >  the rendered html includes a 'name' attribute
> > for the form element. I'm trying to author my pages in 'XHTML
> > Strict' (having included the relevant DOCTYPE in my page template) so
> > the name attribute is not valid. I read on the form component
> > reference page that:
> >
> >> Form Ids
> >> ...
> >> These ids propogate down to the client side as element names and/or
> >> ids...
> >> ...
> >
> > I don't suppose anyone can point me in the right direction to some
> > documentation that shows you how to disable the propagation of the id
> > to an element name while still preserving the id?
> >
> > Thanks in advance.
> >
> > Cheers,
> >
> > Ian
> >
> > --
> > The University of Edinburgh is a charitable body, registered in
> > Scotland, with registration number SC005336.
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/XHTML-and-form-element-name-attribute-tp21724379p25679085.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: XHTML and form element name attribute

2009-09-30 Thread Daniel Jones

Hi Ian,

Did you find a solution for this?

Cheers,
Daniel


Ian Fieldhouse wrote:
> 
> When using a form component in my template with the following markup  
>  the rendered html includes a 'name' attribute  
> for the form element. I'm trying to author my pages in 'XHTML  
> Strict' (having included the relevant DOCTYPE in my page template) so  
> the name attribute is not valid. I read on the form component  
> reference page that:
> 
>> Form Ids
>> ...
>> These ids propogate down to the client side as element names and/or  
>> ids...
>> ...
> 
> I don't suppose anyone can point me in the right direction to some  
> documentation that shows you how to disable the propagation of the id  
> to an element name while still preserving the id?
> 
> Thanks in advance.
> 
> Cheers,
> 
> Ian
> 
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/XHTML-and-form-element-name-attribute-tp21724379p25679085.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: After Clicking on table columns table( contrib:TableView) doesn't display doesn't display rows

2009-09-30 Thread Andreas Andreou
You understand correctly that the rows are fetched from getUsers
method for the first
time - BUT when clicking on the columns it will NOT sort the rows based on
earlier fetched rows...

It needs to call getUsers again (and then do the sorting) - is there
any logic in that
method that makes it return empty list? Perhaps you need to persist something in
the session to make the subsequent getUsers() calls work correctly.

On Wed, Sep 30, 2009 at 9:14 AM, seshu babu  wrote:
> Hi,
>
> I am newly learning tapestry.
>
> The Rendered rows vanish if I click on the columns (for sorting of
> rows).here is the .page file
> --
>
>     - P R O P E R T I E S
>      -->
>  
>  
>  
>  
>  
>    
>    
>    
>    
>    
>  
> --
>
> I understand that the rows are fetched from getUsers method for the first
> time & further clicking on the columns it will sort the rows based on
> earlier fetched rows.
> What's causing these rows to get lost once feteched into table?
>
> I use tapesty 4.1. In the above page common/Table is custom table component
> of type contrib:TableView.
>
> Thanks for your help,
> Seshu
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



Re: About stateless applications

2009-09-30 Thread cordenier christophe
Hello

Have a look at the LinkCreationListener which can be used to add custom
parameters.
If you couple this to a Per-thread service you can achieve to pass data from
one request to another.

2009/9/30 Andrey Larionov 

> I want to create stateless application. Which aproach i should use.
>
> For example i have an some pagination component similar to GridPager,
> but less coupled to paginating component. In Tapestry current page is
> stored in  Persist field. WHat is alternative solution? Can i use
> onActivate/onPassivate to store value across requests produced by
> clicking on a page link?
>
> Thank
>
> PS. Sorry for my english. Please ask questions if something is
> ununderstandable, i'll try to explain it broader.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: About stateless applications

2009-09-30 Thread Robin Komiwes
Storing the value using onActivate/onPassivate should effectively work. But
you will need to implement a new grid pager.

On Wed, Sep 30, 2009 at 12:45 PM, Andrey Larionov wrote:

> I want to create stateless application. Which aproach i should use.
>
> For example i have an some pagination component similar to GridPager,
> but less coupled to paginating component. In Tapestry current page is
> stored in  Persist field. WHat is alternative solution? Can i use
> onActivate/onPassivate to store value across requests produced by
> clicking on a page link?
>
> Thank
>
> PS. Sorry for my english. Please ask questions if something is
> ununderstandable, i'll try to explain it broader.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


About stateless applications

2009-09-30 Thread Andrey Larionov
I want to create stateless application. Which aproach i should use.

For example i have an some pagination component similar to GridPager,
but less coupled to paginating component. In Tapestry current page is
stored in  Persist field. WHat is alternative solution? Can i use
onActivate/onPassivate to store value across requests produced by
clicking on a page link?

Thank

PS. Sorry for my english. Please ask questions if something is
ununderstandable, i'll try to explain it broader.

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



Re: Page alias & Guice integration

2009-09-30 Thread Timo Westkämper

Hi Paul.

Thanks a lot for the pointer. The presented approach seems easy.

Thanks also for the other responses to my questions.

Br,
Timo.

Paul Field wrote:

Hi Timo,

You may be interested in this issue in the Tap5 issue tracking system:
https://issues.apache.org/jira/browse/TAP5-633

Look in the comments as there is some discussion about how to achieve the 
"page" class prefix.


- Paul

"Thiago H. de Paula Figueiredo"  wrote on 29/09/2009 
22:20:26:


  
Em Tue, 29 Sep 2009 17:47:13 -0300, Timo Westkämper 
 escreveu:


I am fairly new to Tapestry 5 and I have a few questions.

* Is there a way to declare a pagename alias for the URL generation 
  
e.g. 
  
"article" for ArticlePage class or do I need to to do URL rewriting 
  
like 
  

described here :

http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html
  
You can also decorate or advise the ComponentSource and 
ComponentEventLinkEncoder services to do that.





---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.
  



--
Timo Westkämper 
Mysema Ltd, Vilhonkatu 5 A, 00100 Helsinki, Finland
Mob. +358 (0)40 591 2172 
Internet: http://www.mysema.com



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



Re: Page alias & Guice integration

2009-09-30 Thread Paul Field
Hi Timo,

You may be interested in this issue in the Tap5 issue tracking system:
https://issues.apache.org/jira/browse/TAP5-633

Look in the comments as there is some discussion about how to achieve the 
"page" class prefix.

- Paul

"Thiago H. de Paula Figueiredo"  wrote on 29/09/2009 
22:20:26:

> Em Tue, 29 Sep 2009 17:47:13 -0300, Timo Westkämper 
>  escreveu:
> > I am fairly new to Tapestry 5 and I have a few questions.
> >
> > * Is there a way to declare a pagename alias for the URL generation 
e.g. 
> > "article" for ArticlePage class or do I need to to do URL rewriting 
like 
> > described here :
> >
> > http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html
> 
> You can also decorate or advise the ComponentSource and 
> ComponentEventLinkEncoder services to do that.



---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-30 Thread cordenier christophe
If your purpose is to secure your bean property, i think you should create
an intermediate bean for your User creation.
Tapestry Form properties are mapped to bean properties, and properties are
set simply via accessors.
Tapestry requires an empty constructor to your bean, and this is how
Tapestry instantiate an object for the form.

I might be wrong, but i think that if you do not want to modify your user
'model' (and add an setter) then you should use a specific bean for form
interaction and create the complete User Entity (using constructor) in the
success phase.


When will tapestry upgrade to prototype.js version 1.6.1 for IE8 compliance

2009-09-30 Thread MattFish

The latest version of tapestry still comes with version 1.6.0 of the
prototype javascript framework. It isn't until version 1.6.1 that this is
compliant with IE8 and a lot of the problems with the old version and IE8
have been fixed. Does anyone have any idea when the updated library will be
included in tapestry core?
-- 
View this message in context: 
http://www.nabble.com/When-will-tapestry-upgrade-to-prototype.js-version-1.6.1-for-IE8-compliance-tp25676288p25676288.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