Re: T5: 5.0.14 Bizarre ClassNotFoundException

2008-09-26 Thread Ben Gidley
Russell,
Are you using a main class to start your app?

If so  you need the line

 // Remove slf4j from list of classes not exposed to webapp
webapp.setServerClasses(new String[]
{-org.mortbay.jetty.plus.jaas., org.mortbay.jetty.});


In your class - see http://wiki.apache.org/tapestry/Tapestry5RunViaMain.

The reason is Jetty thinks slf4j is a 'server' class and in line with
the J2EE specification is stops it 'leaking' into web application
classloaders. This line tells it to let it through.

THis only effects T5 pages/components when you are using the
runViaMain method. It won't effect your non T5 classes as they are
loaded in the system classloader. Whereas the enhanced T5
pages/components load in the web class loader.

Thanks

Ben


On Thu, Sep 25, 2008 at 5:05 PM, Russell Brown [EMAIL PROTECTED] wrote:

 Hi Toby,
 Thanks for that. I have suspicion I have a maven nightmare on my hands. I 
 have used maven's exlusion to exclude SLF4j from being included by Tapestry 
 as we want to control the version. I can see that the Pages and Components 
 use a different class loader, I guess they have to for all that run time 
 transformation that is going on but they _should_ be able to load classes 
 that their parents can in my humble opinion.

 I've just had a double, triple check and there is only one SLF4j jar on the 
 classpath, the one I intended to have there. The one that my Struts actions 
 can access.

 I'll keep digging for now. Thanks for the help, it does confirm that my main 
 problem is probably maven/dependancy based but exacerbated by Tapestry's 
 class loading.

 Cheers

 Russell


 -Original Message-
 From: Toby Hobson [mailto:[EMAIL PROTECTED]
 Sent: Thu 9/25/2008 5:00 PM
 To: Tapestry users
 Subject: Re: T5: 5.0.14 Bizarre ClassNotFoundException

 Hi Russel,

 Just a thought but it might be worth checking your classpath. T5 will pull
 SLF4 into the classpath anyway so you could have included it twice. Because
 T5 uses a separate classloader for Pages and Components it may be getting
 confused. I've run into similar problems before.

 Cheers

 Toby

 2008/9/25 Russell Brown [EMAIL PROTECTED]

  Hi,
  Not sure if this is totally a T5 issue but I am just seeing if anyone has
  seen this. I have a page that uses the Form component but when I call the
  page I get a ClassNotFoundException for org.slf4j.Logger. Now I know that
  the class is on the classpath as I have Struts app running in the same
  container and Calling Class.forName(org.slf4j.Logger, true,
  this.getClass().getClassLoader()) in a struts action yields a class but the
  toClass method in
  org.apache.tapestry5.internal.services.InternalClassTransformationImpl
  throws a ClassNotFoundException.
 
  If I change the code in that class to use the parent of the parent class
  loader then the class is found.
 
  Any ideas? Is this a bug, is there some way to make Tapestry's class loader
  aware of the Class?
 
  Cheers
 
  Russell
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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

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



RE: T5: 5.0.14 Bizarre ClassNotFoundException

2008-09-26 Thread Russell Brown
Thanks. I think that is the second time you have told me.

I'll remember this time, I'm sure.

Cheers

Russell


-Original Message-
From: Ben Gidley [mailto:[EMAIL PROTECTED]
Sent: Fri 9/26/2008 8:03 AM
To: Tapestry users
Subject: Re: T5: 5.0.14 Bizarre ClassNotFoundException
 
Russell,
Are you using a main class to start your app?

If so  you need the line

 // Remove slf4j from list of classes not exposed to webapp
webapp.setServerClasses(new String[]
{-org.mortbay.jetty.plus.jaas., org.mortbay.jetty.});


In your class - see http://wiki.apache.org/tapestry/Tapestry5RunViaMain.

The reason is Jetty thinks slf4j is a 'server' class and in line with
the J2EE specification is stops it 'leaking' into web application
classloaders. This line tells it to let it through.

THis only effects T5 pages/components when you are using the
runViaMain method. It won't effect your non T5 classes as they are
loaded in the system classloader. Whereas the enhanced T5
pages/components load in the web class loader.

Thanks

Ben


On Thu, Sep 25, 2008 at 5:05 PM, Russell Brown [EMAIL PROTECTED] wrote:

 Hi Toby,
 Thanks for that. I have suspicion I have a maven nightmare on my hands. I 
 have used maven's exlusion to exclude SLF4j from being included by Tapestry 
 as we want to control the version. I can see that the Pages and Components 
 use a different class loader, I guess they have to for all that run time 
 transformation that is going on but they _should_ be able to load classes 
 that their parents can in my humble opinion.

 I've just had a double, triple check and there is only one SLF4j jar on the 
 classpath, the one I intended to have there. The one that my Struts actions 
 can access.

 I'll keep digging for now. Thanks for the help, it does confirm that my main 
 problem is probably maven/dependancy based but exacerbated by Tapestry's 
 class loading.

 Cheers

 Russell


 -Original Message-
 From: Toby Hobson [mailto:[EMAIL PROTECTED]
 Sent: Thu 9/25/2008 5:00 PM
 To: Tapestry users
 Subject: Re: T5: 5.0.14 Bizarre ClassNotFoundException

 Hi Russel,

 Just a thought but it might be worth checking your classpath. T5 will pull
 SLF4 into the classpath anyway so you could have included it twice. Because
 T5 uses a separate classloader for Pages and Components it may be getting
 confused. I've run into similar problems before.

 Cheers

 Toby

 2008/9/25 Russell Brown [EMAIL PROTECTED]

  Hi,
  Not sure if this is totally a T5 issue but I am just seeing if anyone has
  seen this. I have a page that uses the Form component but when I call the
  page I get a ClassNotFoundException for org.slf4j.Logger. Now I know that
  the class is on the classpath as I have Struts app running in the same
  container and Calling Class.forName(org.slf4j.Logger, true,
  this.getClass().getClassLoader()) in a struts action yields a class but the
  toClass method in
  org.apache.tapestry5.internal.services.InternalClassTransformationImpl
  throws a ClassNotFoundException.
 
  If I change the code in that class to use the parent of the parent class
  loader then the class is found.
 
  Any ideas? Is this a bug, is there some way to make Tapestry's class loader
  aware of the Class?
 
  Cheers
 
  Russell
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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

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



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

Previewable image component

2008-09-26 Thread Borut Bolčina
Hello,

is this:
http://wiki.apache.org/tapestry/Tapestry5ImageComponent

the preferred and only way of having previewable images?

Cheers,
Borut


Re: [T5] AJAX and partial updates of forms ? [Zone AjaxFormLoop FormInjector FormFragment and the like]

2008-09-26 Thread Francois Armand

Francois Armand wrote:

Hello guys,
[..]
[1] Ex of what I want :
t:form

t:actionlink zone=myzoneUpdate info/t:actionlink  // in real 
life, I whould like to use a mixin for that, trigger on some action on 
a field

...
t:zone t:id=myzone
[here goes a lot of stuff with fields and components and the like]
/t:zone

/t:form



Nobody to that ?

--
Francois Armand
Etudes  Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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



Anchor problem: other components being affected

2008-09-26 Thread Daniel Alonso Sanchez

Well, i must confess i really didn't know how to title this post, so... my
apologizes for the name.

The thing is that I have an anchor that looks like this:


h3Subtitle3/h3

A first glance to this code made me think that everthing will we ok, but my
surprise after the rendering of the tml was that the previous code finally
looks in this way:

h3 Subtitle3 /h3

Despite of the shape=rect that i don't know yet how to hide, the thing is
that i really don't know why the h3 element is surrounded with the  
element... 

Is there anyway to change this behavior? Thanks a lot in advance
-- 
View this message in context: 
http://www.nabble.com/Anchor-problem%3A-other-components-being-affected-tp19684509p19684509.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: Creating inner components on the fly in a form custom component

2008-09-26 Thread Kristian Marinkovic
hi,

you cannot create T5 components dynamically  but you can simulate it 
:)

you can define Blocks with any (nested) T5 components and HTML fragments 
that can be re-used multiple times to render a page.

take a closer (source code) look at the BeanEditor. it creates input 
fields
for every property of a given bean. it has a loop with a delegate in it 
which 
is able to render any block that was determined for the current property.
eg. for every String property it will render a block with a TextField 
component
for every Date property it will render a block containing the DateField 
compoinent
...

i hope this helped

g,
kris




Edouard sur edouardmercier.fr [EMAIL PROTECTED] 
Gesendet von: [EMAIL PROTECTED]
25.09.2008 18:50
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
users@tapestry.apache.org
Kopie

Thema
Creating inner components on the fly in a form custom component







Hello.

I've been digging the web with no success, but I'm a Tapestry 5 newbie
(running the v5.0.15), thus maybe I missed something.

I'm currently attempting to develop a custom Tapestry component that
aims at inserting HTML select/checkbox/textfield tags into an
existing HTML form. Let's say that I have a .tml which contains a
t:form, in which I have my t:myCustomComponent element.

This myCustomComponent component is supposed to render multiple HTML
select/checkbox/textfield elements, depending on its main Tapestry
parameter. But, instead of writing plain HTML via the traditional
beginRender/afterRender() methods, I'd prefer to re-user the
built-in Select/CheckBox/TextField Tapestry classes, and add
instances of those classes as inner components of my myCustomComponent
component.

The idea is, on the enclosing form submission, to be able to retrieve
the values of those various HTML form sub elements. I do not know
whether this is feasible. Is it possible to add components on-the-fly
to an existing component during its rendering process (or at another
relevant moment)? I do not even know where to start with. Could
someone, please give me a hint on how to achieve that?

Thank you for your help and time. Cheers,
Édouard

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




Re: Anchor problem: other components being affected

2008-09-26 Thread Ulrich Stärk
First, you have to use a mail client (nabble isn't one) or escape your
code correctly, i.e. use html entities. Otherwise your code won't reach us
because nabble messes it up and we can't help you.

Uli

Am Fr, 26.09.2008, 10:37, schrieb Daniel Alonso Sanchez:

 Well, i must confess i really didn't know how to title this post, so... my
 apologizes for the name.

 The thing is that I have an anchor that looks like this:


 h3Subtitle3/h3

 A first glance to this code made me think that everthing will we ok, but
 my
 surprise after the rendering of the tml was that the previous code finally
 looks in this way:

 h3 Subtitle3 /h3

 Despite of the shape=rect that i don't know yet how to hide, the thing
 is
 that i really don't know why the h3 element is surrounded with the
 element...

 Is there anyway to change this behavior? Thanks a lot in advance
 --
 View this message in context:
 http://www.nabble.com/Anchor-problem%3A-other-components-being-affected-tp19684509p19684509.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]





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



Re: Anchor problem: other components being affected

2008-09-26 Thread Daniel Alonso Sanchez

ooops, my apologizes for that, i have no idea of that. I will try
immediately. Thanks a lot ;D
-- 
View this message in context: 
http://www.nabble.com/Anchor-problem%3A-other-components-being-affected-tp19684509p19684919.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]



Rm: Anchor problem: other components being affected

2008-09-26 Thread Daniel_ Alonso Sanchez
Sorry for the previous post, I hope this will be ok :(.

Well, i must confess i really didn't know how to title this post, so... my 
apologizes for the name.

The thing is that I have an anchor that looks like this:

a name=family1/
h3Subtitle3/h3

A first glance to this code made me think that everthing will we ok, but 
my surprise after the rendering of the tml was that the previous code 
finally looks in this way:

a name=family1 shape=rect/ah3a name=family1 
shape=rectSubtitle3/a/h3

Despite of the shape=rect that i don't know yet how to hide, the thing 
is that i really don't know why the h3 element is surrounded with the a 
element... 

Is there anyway to change this behavior? Thanks a lot in advance

Re: Anchor problem: other components being affected

2008-09-26 Thread Daniel_ Alonso Sanchez
Sorry for the previous post, I hope this will be ok :(.

Well, i must confess i really didn't know how to title this post, so... my 
apologizes for the name.

The thing is that I have an anchor that looks like this:

a name=family1/
h3Subtitle3/h3

A first glance to this code made me think that everthing will we ok, but 
my surprise after the rendering of the tml was that the previous code 
finally looks in this way:

a name=family1 shape=rect/ah3a name=family1 
shape=rectSubtitle3/a/h3

Despite of the shape=rect that i don't know yet how to hide, the thing 
is that i really don't know why the h3 element is surrounded with the a 
element... 

Is there anyway to change this behavior? Thanks a lot in advance

T5 + Acegi .. how to get user on Page?

2008-09-26 Thread spamglik

HI

I have a problem accesing logged in user on a page. I tried to use ASO but
have no idea how to create ASO in UserDetailService implementation. 

I saw some previous disscussions on forum but still it doesn't ring a bell. 

Maybe somebody have some example? or any tips?


kind regards
Mateusz
-- 
View this message in context: 
http://www.nabble.com/T5-%2B-Acegi-..-how-to-get-user-on-Page--tp19685415p19685415.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 + Acegi .. how to get user on Page?

2008-09-26 Thread spamglik

Cool it helps thx.

m

HugoPalma wrote:
 
 You can get the logged user like this:
 
 @Inject
 private RequestGlobals requestGlobals;
 ...
 ...
 requestGlobals.getHTTPServletRequest().getUserPrincipal();
 
 Then if you need to get more information about the user you just inject 
 the UserDetailsService into you component / page and use it to retrieve 
 whatever information you need.
 
 spamglik wrote:
 HI

 I have a problem accesing logged in user on a page. I tried to use ASO
 but
 have no idea how to create ASO in UserDetailService implementation. 

 I saw some previous disscussions on forum but still it doesn't ring a
 bell. 

 Maybe somebody have some example? or any tips?


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

-- 
View this message in context: 
http://www.nabble.com/T5-%2B-Acegi-..-how-to-get-user-on-Page--tp19685415p19685660.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: Anchor problem: other components being affected

2008-09-26 Thread Filip S. Adamsen

Hi,

For what you're trying to do, it's a lot easier to put an id on the h3 
and just refer to that as your anchor.


-Filip

On 2008-09-26 11:11, Daniel_ Alonso Sanchez wrote:

Sorry for the previous post, I hope this will be ok :(.

Well, i must confess i really didn't know how to title this post, so... my 
apologizes for the name.


The thing is that I have an anchor that looks like this:

a name=family1/
h3Subtitle3/h3

A first glance to this code made me think that everthing will we ok, but 
my surprise after the rendering of the tml was that the previous code 
finally looks in this way:


a name=family1 shape=rect/ah3a name=family1 
shape=rectSubtitle3/a/h3


Despite of the shape=rect that i don't know yet how to hide, the thing 
is that i really don't know why the h3 element is surrounded with the a 
element... 


Is there anyway to change this behavior? Thanks a lot in advance


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



Re: [T5] Select component: howto create a SelectModel out of ListString

2008-09-26 Thread Filip S. Adamsen

Hi,

Just implement org.apache.tapestry5.SelectModel. You can extend 
org.apache.tapestry5.util.AbstractSelectModel when you do.


-Filip

On 2008-09-26 12:20, Andy Pahne wrote:


I have a simple list of Strings that should be the source of a 
SelectModel. How do I create one?


I had a look at
   http://wiki.apache.org/tapestry/Tapestry5SelectObject
but it's outdated (before the T5 package name refactoring) and just 
looks to complicated for my simple purpose. Also I am not a great fan of 
forking core lib components and keeping them in touch with the current 
development.


There must be an easier way, I think.


Andy


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



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



Re: Previewable image component

2008-09-26 Thread Grigoris Ioannou
Borut,

I believe this is what you're looking for:
http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/ThumbNail.html

I hope it works for you,
Grigoris

On Fri, Sep 26, 2008 at 11:05 AM, Borut Bolčina [EMAIL PROTECTED]wrote:

 Hello,

 is this:
 http://wiki.apache.org/tapestry/Tapestry5ImageComponent

 the preferred and only way of having previewable images?

 Cheers,
 Borut



Re: [T5] Select component: howto create a SelectModel out of ListString

2008-09-26 Thread Ulrich Stärk
If you want to use it with the select component then there is no need to
write your own selectmodel. Just provide an array of strings to the model
parameter, e.g. t:select model=literal:foo,bar,baz... or t:select
model=strings... where strings is an array or list in your page class.

Uli

Am Fr, 26.09.2008, 12:32, schrieb Filip S. Adamsen:
 Hi,

 Just implement org.apache.tapestry5.SelectModel. You can extend
 org.apache.tapestry5.util.AbstractSelectModel when you do.

 -Filip

 On 2008-09-26 12:20, Andy Pahne wrote:

 I have a simple list of Strings that should be the source of a
 SelectModel. How do I create one?

 I had a look at
http://wiki.apache.org/tapestry/Tapestry5SelectObject
 but it's outdated (before the T5 package name refactoring) and just
 looks to complicated for my simple purpose. Also I am not a great fan of
 forking core lib components and keeping them in touch with the current
 development.

 There must be an easier way, I think.


 Andy


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


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





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



Development Environment

2008-09-26 Thread Borut Bolčina
Hello,

since JettyLauncher is not working with Eclipse Ganymede, this should be
mentioned at
http://tapestry.apache.org/tapestry5/tutorial1/env.html

I looked at http://code.google.com/p/run-jetty-run/ but some posts suggest
that it is not working with m2eclipse plugin.But I will try it out...

It would be a great time saver if tutorial at the above link would describe
some different scenarios how developers can set up their environments to
benefit from live class reloading. Reading the mailing list there seems to
be great confussion.

Cheers,
Borut


Re: Previewable image component

2008-09-26 Thread Borut Bolčina
Hi Grigoris,

thanks for the link, but no, I am looking for previewability for designers,
so they can see how the page will look like.

-Borut

2008/9/26 Grigoris Ioannou [EMAIL PROTECTED]

 Borut,

 I believe this is what you're looking for:

 http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/ThumbNail.html

 I hope it works for you,
 Grigoris

 On Fri, Sep 26, 2008 at 11:05 AM, Borut Bolčina [EMAIL PROTECTED]
 wrote:

  Hello,
 
  is this:
  http://wiki.apache.org/tapestry/Tapestry5ImageComponent
 
  the preferred and only way of having previewable images?
 
  Cheers,
  Borut
 



T5: return Index.class problem

2008-09-26 Thread photos

Hi,

I am implementing an access controller as specified in the Wiki HOW-TOs

http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess


On a logout ActionLink I do:

return Index.class;



In the past this has been working fine. Today I tried using the link  
and I get an exception:


[ERROR] TapestryModule.RequestExceptionHandler Processing of request  
failed with uncaught exception: Parameter pageName was null or  
contained only whitespace.
java.lang.IllegalArgumentException: Parameter pageName was null or  
contained only whitespace.



It appears that returning Index.class is now giving the URL / rather  
than /Index and the code in AccessController.checkAccess() effectively  
calls Component page = componentSource.getPage(/);


Any ideas on why this behaviour might have changed (the only thing  
I've been working on has been adding Spring bean injection and changes  
to web.xml as specified in the Wiki HOW-TO.


Thanks!



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



Re: T5: return Index.class problem

2008-09-26 Thread Filip S. Adamsen

Hi,

This was changed between 5.0.14 and 5.0.15 and subsequently reverted in 
5.0.16. See https://issues.apache.org/jira/browse/TAPESTRY-2675.


-Filip

On 2008-09-26 13:05, [EMAIL PROTECTED] wrote:

Hi,

I am implementing an access controller as specified in the Wiki HOW-TOs

http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess


On a logout ActionLink I do:

return Index.class;



In the past this has been working fine. Today I tried using the link and 
I get an exception:


[ERROR] TapestryModule.RequestExceptionHandler Processing of request 
failed with uncaught exception: Parameter pageName was null or contained 
only whitespace.
java.lang.IllegalArgumentException: Parameter pageName was null or 
contained only whitespace.



It appears that returning Index.class is now giving the URL / rather 
than /Index and the code in AccessController.checkAccess() effectively 
calls Component page = componentSource.getPage(/);


Any ideas on why this behaviour might have changed (the only thing I've 
been working on has been adding Spring bean injection and changes to 
web.xml as specified in the Wiki HOW-TO.


Thanks!



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



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



Re: [T5] Select component: howto create a SelectModel out of ListString

2008-09-26 Thread Andy Pahne

Ulrich Stärk schrieb:

If you want to use it with the select component then there is no need to
write your own selectmodel. Just provide an array of strings to the model
parameter, e.g. t:select model=literal:foo,bar,baz... or t:select
model=strings... where strings is an array or list in your page class.

Uli




That's the easier way I thought of, thanks. I was tricked by the 
component reference, which states that the type of the parameter is 
SelectModel.


Andy

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



Re: T5: return Index.class problem

2008-09-26 Thread photos

Quoting Filip S. Adamsen [EMAIL PROTECTED]:


Hi,

This was changed between 5.0.14 and 5.0.15 and subsequently reverted in
5.0.16. See https://issues.apache.org/jira/browse/TAPESTRY-2675.

-Filip



Ok, thanks.  That will be why.

cheers,
p.




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



Re: [T5] Select component: howto create a SelectModel out of ListString

2008-09-26 Thread Thiago H. de Paula Figueiredo

Em Fri, 26 Sep 2008 08:35:11 -0300, Andy Pahne [EMAIL PROTECTED] escreveu:

That's the easier way I thought of, thanks. I was tricked by the  
component reference, which states that the type of the parameter is  
SelectModel.


The parameter type *is* SelectModel, but Tapestry has coercions:  
conversions from one type to another. There must be a String -  
SelectModel coercer somewhere in Tapestry's code.


That's the same case with Grid's source parameter: its type is  
GridDataSource, but you can pass a List to it. ;)


Thiago

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



Re: append checkbox to grid list

2008-09-26 Thread Marcelo Lotif
wesley,
Considering that your onSubmitFromMy and onActionFromCheckPage methods
are switched with each other and you used a non-existent model in your
tml, your code has no problems. I ran exactly the same lines you put
here and everything went fine. I change you Pt.pt with
System.out.println and the submit printed all my changes perfectly.

Which version of tapestry are you using?

On Thu, Sep 25, 2008 at 10:47 PM, wesley [EMAIL PROTECTED] wrote:


 hi there,

 i implemented the onPrepare method and tried to print all the value out
 from
 the testPojoList, but all the checkbox still returned me false even i
 enabled some of it. am i doing wrong? how's the standard of implementing
 it?
 any short sample around?

 regards,
 wesley


 Jonathan Barker wrote:
 
 
  If you look at the Form documentation, you will see that the Submit event
  fires at the end of the submission - after any values from form fields
  have
  been put into your TestPojo's.  Therefore, you are wiping out any changes
  at
  the end of your submit.
 
  You could set up the list in onPrepare().  Just make sure not to
  re-initialized it unless that's what you really want.
 
  Jonathan
 
  -Original Message-
  From: wesley [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 25, 2008 13:02
  To: users@tapestry.apache.org
  Subject: Re: append checkbox to grid list
 
 
  hi Marcelo,
 
  1.below is my simple.tml page:
  //simple.tml
  ---
  t:form t:id=my
   input type=submit value=submit/
   br/
   t:grid t:id=simplegrid t:source=testPojoList
  row=tp model=model
   t:parameter name=subsCell
   t:checkbox t:id=subs
  t:value=tp.subs/
   /t:parameter
   /t:grid
   t:actionLink t:id=checkPageNext/t:actionLink
  /t:form
 
  2.This is Simple.java
  -
  public class Simple {
   @Persist
   private ListTestPojo testPojoList;
   @Persist
   private TestPojo tp;
 
   public ListTestPojo getTestPojoList() {
   return testPojoList;
   }
 
   public void setTestPojoList(ListTestPojo testPojoList) {
   this.testPojoList = testPojoList;
   }
 
   Object onSubmitFromMy(){
   testPojoList = new ArrayListTestPojo();
   for(int i = 0; i  10; i++){
   TestPojo tp = new TestPojo();
   tp.setId([+i+]);
   tp.setName(Name+i);
   tp.setDescription(description+i);
   testPojoList.add(tp);
   }
   return null;
   }
 
   Object onActionFromCheckPage(){
   for(int i = 0; i  testPojoList.size(); i++){
   TestPojo tps = testPojoList.get(i);
   Pt.pt(id +tps.getId()+ check +tps.isSubs());
   }
   return null;
   }
 
   public TestPojo getTp() {
   return tp;
   }
 
   public void setTp(TestPojo tp) {
   this.tp = tp;
   }
  }
 
  3. Lastly, the pojo class within the list
  --
  public class TestPojo {
   private String id;
   private String name;
   private String description;
   private boolean subs;
 
   public boolean isSubs() {
   return subs;
   }
   public void setSubs(boolean subs) {
   this.subs = subs;
   }
   public String getId() {
   return id;
   }
   public void setId(String id) {
   this.id = id;
   }
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name = name;
   }
   public String getDescription() {
   return description;
   }
   public void setDescription(String description) {
   this.description = description;
   }
  }
 
  **the submit button is to get the list of TestPojo object
  **the actionlink is to call the actionmethod and loop through the list
  and
  print out the subs boolean property. but all false even if i checked
  enabled
  the checkbox.
 
  hope to receive your advise soon. thanks
 
  wesley
 
 
 
  Marcelo Lotif wrote:
  
   Can you attach your source code?Just to be sure, check if you are
  binding
   it
   to a valid boolean property and if this property is also marked with
   @Persist - at least flash.
  
   On Thu, Sep 25, 2008 at 7:28 AM, wesley [EMAIL PROTECTED]
 wrote:
  
  
   hi all,
  
   i'm having a difficulties to append additional column in grid. when i
   append
   the extra column within the grid model as a checkbox, the class
 behind
  it
   couldn't track the checkbox's state (check or unchecked).
  
   Is there a special way to implement this? hope to have a pointer and
   advise
   

Re: append checkbox to grid list

2008-09-26 Thread wesley

hi Marcelo,

thanks with the feedback, the version of Tapestry that i'm using is 5.0.14. 
based on your comment, the switched method, non existing model and the
println method; does it make difference? perhaps i should use the latest T5
library? 


Marcelo Lotif wrote:
 
 wesley,
 Considering that your onSubmitFromMy and onActionFromCheckPage methods
 are switched with each other and you used a non-existent model in your
 tml, your code has no problems. I ran exactly the same lines you put
 here and everything went fine. I change you Pt.pt with
 System.out.println and the submit printed all my changes perfectly.
 
 Which version of tapestry are you using?
 
 On Thu, Sep 25, 2008 at 10:47 PM, wesley [EMAIL PROTECTED] wrote:
 

 hi there,

 i implemented the onPrepare method and tried to print all the value out
 from
 the testPojoList, but all the checkbox still returned me false even i
 enabled some of it. am i doing wrong? how's the standard of implementing
 it?
 any short sample around?

 regards,
 wesley


 Jonathan Barker wrote:
 
 
  If you look at the Form documentation, you will see that the Submit
 event
  fires at the end of the submission - after any values from form fields
  have
  been put into your TestPojo's.  Therefore, you are wiping out any
 changes
  at
  the end of your submit.
 
  You could set up the list in onPrepare().  Just make sure not to
  re-initialized it unless that's what you really want.
 
  Jonathan
 
  -Original Message-
  From: wesley [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 25, 2008 13:02
  To: users@tapestry.apache.org
  Subject: Re: append checkbox to grid list
 
 
  hi Marcelo,
 
  1.below is my simple.tml page:
  //simple.tml
  ---
  t:form t:id=my
   input type=submit value=submit/
   br/
   t:grid t:id=simplegrid t:source=testPojoList
  row=tp model=model
   t:parameter name=subsCell
   t:checkbox t:id=subs
  t:value=tp.subs/
   /t:parameter
   /t:grid
   t:actionLink t:id=checkPageNext/t:actionLink
  /t:form
 
  2.This is Simple.java
  -
  public class Simple {
   @Persist
   private ListTestPojo testPojoList;
   @Persist
   private TestPojo tp;
 
   public ListTestPojo getTestPojoList() {
   return testPojoList;
   }
 
   public void setTestPojoList(ListTestPojo testPojoList) {
   this.testPojoList = testPojoList;
   }
 
   Object onSubmitFromMy(){
   testPojoList = new ArrayListTestPojo();
   for(int i = 0; i  10; i++){
   TestPojo tp = new TestPojo();
   tp.setId([+i+]);
   tp.setName(Name+i);
   tp.setDescription(description+i);
   testPojoList.add(tp);
   }
   return null;
   }
 
   Object onActionFromCheckPage(){
   for(int i = 0; i  testPojoList.size(); i++){
   TestPojo tps = testPojoList.get(i);
   Pt.pt(id +tps.getId()+ check +tps.isSubs());
   }
   return null;
   }
 
   public TestPojo getTp() {
   return tp;
   }
 
   public void setTp(TestPojo tp) {
   this.tp = tp;
   }
  }
 
  3. Lastly, the pojo class within the list
  --
  public class TestPojo {
   private String id;
   private String name;
   private String description;
   private boolean subs;
 
   public boolean isSubs() {
   return subs;
   }
   public void setSubs(boolean subs) {
   this.subs = subs;
   }
   public String getId() {
   return id;
   }
   public void setId(String id) {
   this.id = id;
   }
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name = name;
   }
   public String getDescription() {
   return description;
   }
   public void setDescription(String description) {
   this.description = description;
   }
  }
 
  **the submit button is to get the list of TestPojo object
  **the actionlink is to call the actionmethod and loop through the list
  and
  print out the subs boolean property. but all false even if i checked
  enabled
  the checkbox.
 
  hope to receive your advise soon. thanks
 
  wesley
 
 
 
  Marcelo Lotif wrote:
  
   Can you attach your source code?Just to be sure, check if you are
  binding
   it
   to a valid boolean property and if this property is also marked with
   @Persist - at least flash.
  
   On Thu, Sep 25, 2008 at 7:28 AM, wesley [EMAIL PROTECTED]
 wrote:
  
  
   hi all,
  
   i'm having a difficulties 

access @Border in subfolder of web-inf

2008-09-26 Thread michael lim
i access my page like this

http://localhost:8080/TestApp/app?service=pagepage=test/index


i have Border.html and Border.page inside /web-inf/test/* folder.. inside my
index.html file. how do i define the border ?

span jwcid=@test/Border title=   //this doesnt  work


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



Re: append checkbox to grid list

2008-09-26 Thread Marcelo Lotif
On Fri, Sep 26, 2008 at 11:40 AM, wesley [EMAIL PROTECTED] wrote:


 hi Marcelo,

 thanks with the feedback, the version of Tapestry that i'm using is
 5.0.14.


I'm using 5.0.14 too.

http://5.0.14.
 based on your comment, the switched method, non existing model and the
 println method; does it make difference? perhaps i should use the latest T5
 library?


Of course it does. Without switching, the action link will print the list
and the submit will clear it. With the model, the page does not even appear.
I put the println because I don't know what is the Pt object.

I was re-reading your post and I saw your mistake: you are trying to
submit with an action link. When you click in the link, the values on the
list are not updated just because you did not submit it. And your submit is
clearing the list and adding new objects to it, so the values are lost.

Just try to print the list on your submit method before you clear it, and
you will get my point. :)




 Marcelo Lotif wrote:
 
  wesley,
  Considering that your onSubmitFromMy and onActionFromCheckPage methods
  are switched with each other and you used a non-existent model in your
  tml, your code has no problems. I ran exactly the same lines you put
  here and everything went fine. I change you Pt.pt with
  System.out.println and the submit printed all my changes perfectly.
 
  Which version of tapestry are you using?
 
  On Thu, Sep 25, 2008 at 10:47 PM, wesley [EMAIL PROTECTED] wrote:
 
 
  hi there,
 
  i implemented the onPrepare method and tried to print all the value out
  from
  the testPojoList, but all the checkbox still returned me false even i
  enabled some of it. am i doing wrong? how's the standard of implementing
  it?
  any short sample around?
 
  regards,
  wesley
 
 
  Jonathan Barker wrote:
  
  
   If you look at the Form documentation, you will see that the Submit
  event
   fires at the end of the submission - after any values from form fields
   have
   been put into your TestPojo's.  Therefore, you are wiping out any
  changes
   at
   the end of your submit.
  
   You could set up the list in onPrepare().  Just make sure not to
   re-initialized it unless that's what you really want.
  
   Jonathan
  
   -Original Message-
   From: wesley [mailto:[EMAIL PROTECTED]
   Sent: Thursday, September 25, 2008 13:02
   To: users@tapestry.apache.org
   Subject: Re: append checkbox to grid list
  
  
   hi Marcelo,
  
   1.below is my simple.tml page:
   //simple.tml
   ---
   t:form t:id=my
input type=submit value=submit/
br/
t:grid t:id=simplegrid
 t:source=testPojoList
   row=tp model=model
t:parameter name=subsCell
t:checkbox t:id=subs
   t:value=tp.subs/
/t:parameter
/t:grid
t:actionLink t:id=checkPageNext/t:actionLink
   /t:form
  
   2.This is Simple.java
   -
   public class Simple {
@Persist
private ListTestPojo testPojoList;
@Persist
private TestPojo tp;
  
public ListTestPojo getTestPojoList() {
return testPojoList;
}
  
public void setTestPojoList(ListTestPojo testPojoList) {
this.testPojoList = testPojoList;
}
  
Object onSubmitFromMy(){
testPojoList = new ArrayListTestPojo();
for(int i = 0; i  10; i++){
TestPojo tp = new TestPojo();
tp.setId([+i+]);
tp.setName(Name+i);
tp.setDescription(description+i);
testPojoList.add(tp);
}
return null;
}
  
Object onActionFromCheckPage(){
for(int i = 0; i  testPojoList.size(); i++){
TestPojo tps = testPojoList.get(i);
Pt.pt(id +tps.getId()+ check +tps.isSubs());
}
return null;
}
  
public TestPojo getTp() {
return tp;
}
  
public void setTp(TestPojo tp) {
this.tp = tp;
}
   }
  
   3. Lastly, the pojo class within the list
   --
   public class TestPojo {
private String id;
private String name;
private String description;
private boolean subs;
  
public boolean isSubs() {
return subs;
}
public void setSubs(boolean subs) {
this.subs = subs;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {

Re: Development Environment

2008-09-26 Thread Kevin Menard
Hi Borut,

Please file JIRA issues for these ideas, otherwise they're bound to be lost.

-- 
Kevin



On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina [EMAIL PROTECTED] wrote:
 Hello,

 since JettyLauncher is not working with Eclipse Ganymede, this should be
 mentioned at
 http://tapestry.apache.org/tapestry5/tutorial1/env.html

 I looked at http://code.google.com/p/run-jetty-run/ but some posts suggest
 that it is not working with m2eclipse plugin.But I will try it out...

 It would be a great time saver if tutorial at the above link would describe
 some different scenarios how developers can set up their environments to
 benefit from live class reloading. Reading the mailing list there seems to
 be great confussion.

 Cheers,
 Borut



Re: access @Border in subfolder of web-inf

2008-09-26 Thread Andreas Andreou
you need a Border.jwc file cause it's a component not a page

On Fri, Sep 26, 2008 at 5:33 PM, michael lim [EMAIL PROTECTED] wrote:
 i access my page like this

 http://localhost:8080/TestApp/app?service=pagepage=test/index


 i have Border.html and Border.page inside /web-inf/test/* folder.. inside my
 index.html file. how do i define the border ?

 span jwcid=@test/Border title=   //this doesnt  work


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





-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



RE: Development Environment

2008-09-26 Thread Jonathan Barker

I was recently cast out of the Garden of Eden for eating the forbidden
fruit: m2eclipse (updated).

I was running the old JettyLauncher with the old (and rather limited)
m2eclipse, on Eclipse 3.3 / MyEclipse 6.0.  Life was good.  Easy debugging,
hot reloading.  I had JettyPlus configured so I could take my war file
straight from my development system and drop it into a JBoss server for
deployment and take advantage of pre-configured DataSources.

Alas, the updated and mainly superior m2eclipse removes PluginDependencies
from your classpath in order to make the execution within Eclipse be
virtually identical to what it would be from command-line Maven.

That breaks JettyLauncher and Run-Jetty-Run because you need the plugins on
the classpath. Other than that, it does avoid some odd situations where
things work in Eclipse but not when deployed elsewhere.

I think I've figured out my usable alternative with external mvn
hightide:run (hightide is a derivative of Jetty, and there is a hightide
maven plugin).  It's not as convenient, but it is workable.

Jonathan

 -Original Message-
 From: Kevin Menard [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 26, 2008 13:59
 To: Tapestry users
 Subject: Re: Development Environment
 
 Hi Borut,
 
 Please file JIRA issues for these ideas, otherwise they're bound to be
 lost.
 
 --
 Kevin
 
 
 
 On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina [EMAIL PROTECTED]
 wrote:
  Hello,
 
  since JettyLauncher is not working with Eclipse Ganymede, this should be
  mentioned at
  http://tapestry.apache.org/tapestry5/tutorial1/env.html
 
  I looked at http://code.google.com/p/run-jetty-run/ but some posts
 suggest
  that it is not working with m2eclipse plugin.But I will try it out...
 
  It would be a great time saver if tutorial at the above link would
 describe
  some different scenarios how developers can set up their environments to
  benefit from live class reloading. Reading the mailing list there seems
 to
  be great confussion.
 
  Cheers,
  Borut
 


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



Re: access @Border in subfolder of web-inf

2008-09-26 Thread michael lim
yes, i have Border.jwc file

span jwcid=@Border title=  //this will access Border.html in
/web-inf/Border.html with no problem

span jwcid=@test/Border title=  // can this be used to access
/web-inf/test/Border.html ?




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



Re: Development Environment

2008-09-26 Thread Luther Baker
For what its worth, I've had no trouble running Tomcat 6 with Eclipse WTP
with MAVEN m2 plugins.

I have NOT had to customize the tomcat instance at all.

-Luther



2008/9/26 Jonathan Barker [EMAIL PROTECTED]


 I was recently cast out of the Garden of Eden for eating the forbidden
 fruit: m2eclipse (updated).

 I was running the old JettyLauncher with the old (and rather limited)
 m2eclipse, on Eclipse 3.3 / MyEclipse 6.0.  Life was good.  Easy debugging,
 hot reloading.  I had JettyPlus configured so I could take my war file
 straight from my development system and drop it into a JBoss server for
 deployment and take advantage of pre-configured DataSources.

 Alas, the updated and mainly superior m2eclipse removes PluginDependencies
 from your classpath in order to make the execution within Eclipse be
 virtually identical to what it would be from command-line Maven.

 That breaks JettyLauncher and Run-Jetty-Run because you need the plugins on
 the classpath. Other than that, it does avoid some odd situations where
 things work in Eclipse but not when deployed elsewhere.

 I think I've figured out my usable alternative with external mvn
 hightide:run (hightide is a derivative of Jetty, and there is a hightide
 maven plugin).  It's not as convenient, but it is workable.

 Jonathan

  -Original Message-
  From: Kevin Menard [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 26, 2008 13:59
  To: Tapestry users
  Subject: Re: Development Environment
 
  Hi Borut,
 
  Please file JIRA issues for these ideas, otherwise they're bound to be
  lost.
 
  --
  Kevin
 
 
 
  On Fri, Sep 26, 2008 at 6:53 AM, Borut Bolčina [EMAIL PROTECTED]
  wrote:
   Hello,
  
   since JettyLauncher is not working with Eclipse Ganymede, this should
 be
   mentioned at
   http://tapestry.apache.org/tapestry5/tutorial1/env.html
  
   I looked at http://code.google.com/p/run-jetty-run/ but some posts
  suggest
   that it is not working with m2eclipse plugin.But I will try it out...
  
   It would be a great time saver if tutorial at the above link would
  describe
   some different scenarios how developers can set up their environments
 to
   benefit from live class reloading. Reading the mailing list there seems
  to
   be great confussion.
  
   Cheers,
   Borut
  


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




[T5] How to dynamically render a set of checkboxes

2008-09-26 Thread Eric Ma

I am using T5 5.0.11.  What I want to achieve is the following:

I have 2 lists, one with all possible options, and the other pre-selected
options.  I want to dynamically create a group of checkboxes that correspond
to all the possible options, with the ones matching the pres-selected values
checked.  I have gotten so far as:

t:loop source=availableRoles value=availableRole
t:checkbox t:id=selectedRoles t:value=prop:availableRole.id
t:label=prop:availableRole.name/
t:label for=selectedRoles${availableRole.name}/t:label
/t:loop

What I am struggling with are:

1. In the generated HTML, there is no value field in the input tag.  The
t:value part in the tml is ignored.
2. All checkboxs are checked - how do I pass my pre-selected list to the
loop component?

Thanks,

Eric
-- 
View this message in context: 
http://www.nabble.com/-T5--How-to-dynamically-render-a-set-of-checkboxes-tp19696667p19696667.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: T4 AJAX Timer Updates Problems

2008-09-26 Thread Andreas Andreou
try

document.timer = function() {
   tapestry.form.submitAsync(update);
   setTimeout(document.timer, 5000);
}
setTimeout(document.timer, 5000);

On Sat, Sep 27, 2008 at 1:58 AM, Norman Franke [EMAIL PROTECTED] wrote:
 I'm using Tapestry 4.1.2 and I'm attempting to get a JavaScript timer to
 periodically refresh a block on my page. This is that block:

 Page load time: span jwcid=@Insert value=ognl:valueValue/span

 form jwcid=[EMAIL PROTECTED] updateComponents=updateDiv async=true

 div jwcid=[EMAIL PROTECTED]
Refreshed time: span jwcid=@Insert value=ognl:valueValue/span
 /div

 input jwcid=@Submit value=Update/
 /form
 SCRIPT language=JavaScript
 dojo.require(tapestry.form);

 function timer() {
tapestry.form.submitAsync(update);
setTimeout(timer(), 5000);
 }
 setTimeout(timer(), 5000);
 /SCRIPT

 The problem is this doesn't work. It gets an error this.forms[formId] is
 undefined. I tried a few other things, which resulted in recursion errors
 (Firefox 3).

 How can I do this?

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



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





-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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