Re: Access to HttpSessions

2008-10-18 Thread Jecki
You can try to create an HttpSessionListener
(http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html)
and upon creation of the HttpSession instance you can store inside a
'registry' (can be in the servlet context) and then later on you can
get the session from that registry.

Regards,
Jecki

On Sun, Oct 19, 2008 at 6:23 AM, Christoph Jäger
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a Tapestry5 application. On an administrator page, I want to show all
> active sessions (people have to log in to use the application), and make it
> possible to terminate sessions / view user details and session details
> (login time, idle time, ...). How can I get access to these sessions? I know
> how to get my own session, but I can not find how to get a list of all
> sessions.
>
> Thanks,
>
> Christoph

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



Access to HttpSessions

2008-10-18 Thread Christoph Jäger

Hi,

I have a Tapestry5 application. On an administrator page, I want to  
show all active sessions (people have to log in to use the  
application), and make it possible to terminate sessions / view user  
details and session details (login time, idle time, ...). How can I  
get access to these sessions? I know how to get my own session, but I  
can not find how to get a list of all sessions.


Thanks,

Christoph



T5 - Can't get the tapestry 5 quickstart maven archetype to resolve

2008-10-18 Thread BarryDev

I was able to get the tapestry 5 quickstart archetype to download
successfully a few days ago but now when I run the command I'm getting the
following output:

$ mvn archetype:create   -DarchetypeGroupId=org.apache.tapestry 
-DarchetypeArtifactId=quickstart  -DgroupId=org.apache.tapestry  -Dartifac
tId=tutorial1  -DpackageName=org.apache.tapestry5.tutorial
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]

[INFO] Building Maven Default Project
[INFO]task-segment: [archetype:create] (aggregator-style)
[INFO]

[WARNING] Attempting to build MavenProject instance for Artifact
(org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5-20081013.1916
7-3) of type: maven-plugin; constructing POM artifact instead.
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: org.apache.tapestry
ArtifactId: quickstart
Version: RELEASE

Reason: Unable to determine the release version

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.tapestry
-DartifactId=quickstart -Dversion=RELEASE -Dpackaging=jar
-Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=org.apache.tapestry
-DartifactId=quickstart -Dversion=RELEASE -Dpackaging=jar
-Dfile=/path/to/file -Du
l=[url] -DrepositoryId=[id]


  org.apache.tapestry:quickstart:jar:RELEASE

I've tried adding the people.apache.org repo to my maven settings to no
avail.  I don't think that's the problem seeing as I was able to get it to
work a few days ago without any tinkering in my settings.  Is something
wrong with the current release of the archetype or have I managed to bugger
up my maven?
-- 
View this message in context: 
http://www.nabble.com/T5---Can%27t-get-the-tapestry-5-quickstart-maven-archetype-to-resolve-tp20050232p20050232.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: How to integrate spring with tapestry (How to inject a service in to tapestry page)

2008-10-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Oct 2008 11:26:01 -0300, Sonu bhavsar <[EMAIL PROTECTED]>  
escreveu:


I had created a service class and I need to inject it into the tapestry  
page

Please tell me the steps.


They're here: http://tapestry.apache.org/tapestry5/tapestry-spring/.

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

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



Re: [T5] Page naigation using submit

2008-10-18 Thread Ville Virtanen

Always nice to re-invent the wheel eh? :D

My implementation uses zero javascript. Does the Equanda component use js to
submit? Also my component works with the normal T5 form, so no other
components are required. (Noticed the "This component only works when
embedded in a "equanda/FormSupport" component which is correctly
intergrated. Otherwise it does nothing." disclaimer.)

 - Ville


Joachim Van der Auwera wrote:
> 
> equanda-tapestry5 includes a link component which submits the page to 
> assure the entered state is not lost.
> 
> http://equanda.org/equanda-tapestry5
> 
> Kind regards,
> Joachim
> 
> Ville Virtanen wrote:
>> Hi,
>>
>> This must be discussed before, but I could not find anything using search
>> and I seem to be having total brain freeze here so:
>>
>> I have a case where I have to let user enter rows to a view and there
>> must
>> be an "Edit" function at the end of each of these rows. The edit
>> functionality MUST SUBMIT before redirecting to detail edit as every row
>> in
>> the view are editable, and user may edit the rows, after which she/he/it
>> clicks the edit button to edit the details of a row.
>>
>> So, how can I use submit to redirect to the detail page. As this is a
>> component, I cannot do the normal "onSuccess" redirect, as my component
>> does
>> not define form and hence it doesn't receive the on submit event.
>>
>> I think it is pretty standard to have a button to redirect to another
>> page
>> after submit. 
>>
>> Am I missing something totally obvious?
>>
>>  - Ville
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20047888.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] Page naigation using submit

2008-10-18 Thread Joachim Van der Auwera (PROGS bvba)
equanda-tapestry5 includes a link component which submits the page to 
assure the entered state is not lost.


http://equanda.org/equanda-tapestry5

Kind regards,
Joachim

Ville Virtanen wrote:

Hi,

This must be discussed before, but I could not find anything using search
and I seem to be having total brain freeze here so:

I have a case where I have to let user enter rows to a view and there must
be an "Edit" function at the end of each of these rows. The edit
functionality MUST SUBMIT before redirecting to detail edit as every row in
the view are editable, and user may edit the rows, after which she/he/it
clicks the edit button to edit the details of a row.

So, how can I use submit to redirect to the detail page. As this is a
component, I cannot do the normal "onSuccess" redirect, as my component does
not define form and hence it doesn't receive the on submit event.

I think it is pretty standard to have a button to redirect to another page
after submit. 


Am I missing something totally obvious?

 - Ville
  



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



How to integrate spring with tapestry (How to inject a service in to tapestry page)

2008-10-18 Thread Sonu bhavsar

I had created a service class and I need to inject it into the tapestry page
Please tell me the steps.
I had used
@Inject
@Service("userManager")
IUserManager usermanager;
-- 
View this message in context: 
http://www.nabble.com/How-to-integrate-spring-with-tapestry-%28How-to-inject-a-service-in-to-tapestry-page%29-tp20047364p20047364.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



[HOWTO] Context and page navigation aware submit button

2008-10-18 Thread Ville Virtanen

Dear list,

I got fed up trying to find solution how to redirect after post, but
couldn't find satisfying solution. (Use case wasn't the easiest..)

So I extended the context submit button to enable the event handler method
to return any of the page navigational objects listed here:
http://tapestry.apache.org/tapestry5/guide/pagenav.html.

I also made the context optional, so now you can satisfy all your submitting
needs with one button :)

Enjoy! (And remember to tell of any bugs etc..)

 - Ville
-- 
View this message in context: 
http://www.nabble.com/-HOWTO--Context-and-page-navigation-aware-submit-button-tp20046076p20046076.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] Page naigation using submit

2008-10-18 Thread Ville Virtanen

Yes, but if you think the Tapestry 5 provided component TextField, you have
exactly the same situation. The component does _not_ rely on any code on the
page, only requirement is that it is enclosed in a form.

I want that same thing, but I just need to do a redirect after submit if
user presses a button in the component. And that, in my opinion, is too hard
on T5 now. I can do it with action link, but then the submit part is missing
and user is very likely to lose data.

And the component cannot contain the form, as it is part of larger structure
that must be inside the same form. Also, I cannot know which page will
contain the component. (It can be configured in database.)

 - Ville

Ps. I resolved this by extending the submit context component
(http://wiki.apache.org/tapestry/Tapestry5SubmitContextComponent) that I
earlier modified to work with 5.0.12. Now developer can return onSelected
any of the navigational return values listed here:
http://tapestry.apache.org/tapestry5/guide/pagenav.html. You can find the
how-to wiki here:
http://wiki.apache.org/tapestry/Tapestry5SubmitContextWithNavigationComponent


dhning-2 wrote:
> 
> You don't want the component rely on page, but you do (rely on outer form,
> right?), so if you want your component handle event independently, set the
> form in the component is a must.
> 
> btw, onSelect's signature should only be Void type.
> 
> DH
> 
> 2008/10/17 Ville Virtanen <[EMAIL PROTECTED]>
> 
>>
>> Yep, that's exactly the case.
>>
>> The component can't rely on any code in the page, so solution number 1 is
>> out of the question.
>>
>> Solution number 2 throws exception:
>> Event 'selected' from FinancePlan:dynamicfromcont. received an event
>> handler method return value of
>> [EMAIL PROTECTED] This type of event does
>> not
>> support return values from event handler methods.
>>
>>  - Ville
>>
>>
>> dhning-2 wrote:
>> >
>> > From your  former mail, my understanding on your case (correct me if I
>> am
>> > wrong): your page has a form, and the form contains your component, and
>> > your component template has multiple submit buttons (it must be submit
>> > component if you want to handle select event).
>> >
>> > I think there are two ways:
>> > 1. Inside the page java, handle the onAction/onSuccess event. (You can
>> not
>> > see the onSelect event here)
>> > 2. Inside your component java, handle the onSelect event (I am not sure
>> > whether it is right, I haven't tried before)
>> >
>> > Thanks!
>> >
>> > DH
>> > - Original Message -
>> > From: "Ville Virtanen" <[EMAIL PROTECTED]>
>> > To: 
>> > Sent: Friday, October 17, 2008 8:08 PM
>> > Subject: Re: [T5] Page naigation using submit
>> >
>> >
>> >>
>> >> Yes it must be, otherwise it won't work.
>> >>
>> >> The submit event that is triggered by the form in the page does not
>> >> bubble
>> >> to my component and I can't use the selected event triggered by the
>> >> button
>> >> in my component because that event does not support return type of
>> page
>> >> class.
>> >>
>> >> - Ville
>> >>
>> >>
>> >> dhning-2 wrote:
>> >>>
>> >>> But your component must be enclosed by an outer form component,
>> right?
>> >>> Or
>> >>> else, how can you put textfield in your component?
>> >>>
>> >>> Thanks!
>> >>>
>> >>> DH
>> >>>
>> >>>
>> >>> - Original Message -
>> >>> From: "Ville Virtanen" <[EMAIL PROTECTED]>
>> >>> To: 
>> >>> Sent: Friday, October 17, 2008 7:01 PM
>> >>> Subject: [T5] Page naigation using submit
>> >>>
>> >>>
>> 
>>  Hi,
>> 
>>  This must be discussed before, but I could not find anything using
>>  search
>>  and I seem to be having total brain freeze here so:
>> 
>>  I have a case where I have to let user enter rows to a view and
>> there
>>  must
>>  be an "Edit" function at the end of each of these rows. The edit
>>  functionality MUST SUBMIT before redirecting to detail edit as every
>>  row
>>  in
>>  the view are editable, and user may edit the rows, after which
>>  she/he/it
>>  clicks the edit button to edit the details of a row.
>> 
>>  So, how can I use submit to redirect to the detail page. As this is
>> a
>>  component, I cannot do the normal "onSuccess" redirect, as my
>> component
>>  does
>>  not define form and hence it doesn't receive the on submit event.
>> 
>>  I think it is pretty standard to have a button to redirect to
>> another
>>  page
>>  after submit.
>> 
>>  Am I missing something totally obvious?
>> 
>>  - Ville
>>  --
>>  View this message in context:
>> 
>> http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20031177.html
>>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> 
>> 
>> -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> >>>

Re: t5: using jetty

2008-10-18 Thread Angelo Chen

This works very well, thanks!!!


Lutz Hühnken wrote:
> 
> In your pom.xml, add a context handler to the jetty plugin:
> 
> 
> org.mortbay.jetty
> jetty-maven-plugin
> 
> /
> 
>  implementation="org.mortbay.jetty.handler.ContextHandler">
> /myimages
>
> /the/path/to/myimages
>  implementation="org.mortbay.jetty.handler.ResourceHandler">
> 
> 
> 
> 
> 
> You will have to change resourceBase to your real path, of course.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-using-jetty-tp19938977p20045848.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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