Re: Form with a Zone -> ComponentEventException

2008-03-29 Thread petros

I found what is causing the error. Is the way I am displaying the the
UserPicker page. I am trying to display it by using the Modalbox
(http://www.wildbit.com/labs/modalbox/)

However, this works fine as an Ajax call by returning a Block when the
UserPicker form is submitted
  Assign Supervisor 

BUT THIS FAILS
 
  Assign Supervisor



Throws the exception that A component event handler method returned the
value [EMAIL PROTECTED] Return type
org.apache.internal.structure.BlockImpl can not be handled. Configured
return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component. 

Why the use of modal box appears to interfear with the way tapestry works
internally ?

Petros



petros wrote:
> 
> Sorry about the second post but this problem is killing me :)
> I tried this example that works fine online and I am getting the same
> exception as my previous post
> http://lombok.demon.co.uk/tapestry5Demo/test/core/zonedemoone
> 
> In the example a Block is returned from an onAction or onSuccess methods
> but in my case I am getting the exception that I am not allowed to return
> a Block object. 
> 
> Is there any configuration I need to do ? I am using 5.0.11
> 
> Thanks, 
> Petros
> 
> 
> 
> petros wrote:
>> 
>> When the userSearchForm of the code below is submitted I am getting the
>> following exception
>> 
>> A component event handler method returned the value
>> [EMAIL PROTECTED] Return type
>> org.apache.internal.structure.BlockImpl can not be handled. Configured
>> return types are java.lang.Class, java.lang.String, java.net.URL,
>> org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
>> org.apache.tapestry.runtime.Component. 
>> 
>> I am trying to update the search results table when the form is submited
>> as an Ajax call. Any ideas ?
>> 
>> UserPicker.java
>> @Inject
>> private Block searchResultsBlock;
>> 
>> Object onSuccessFromUserSearchForm()
>> {
>>foundUsers = userManager.findUsers(...);
>>return searchResultsBlock;
>> }
>> 
>> UserPicker.tml
>> ...
>> 
>>
>>
>>...
>>
>>
>> 
>>
>> 
>>
>>
>>
>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Form-with-a-Zone--%3E-ComponentEventException-tp16346150p16378608.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: Tap 5.0.9: Why can't Grid column header has blank label

2008-03-29 Thread Thiago HP
On 2/2/08, Shing Hing Man <[EMAIL PROTECTED]> wrote:
>   beanModel.add("rowNo", null).label(" ");
>
>  This resulted in the following exception.
>  I could use css to make the label non-visible.
>  Is there a more elegant way of having a blank column
>  header.

Adding the following to your app.properties will do the trick:
rowNo=

Not quite elegant, but at least you don't have to use CSS.

-- 
Thiago

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



RE: T5: Problem with login form with Acegi

2008-03-29 Thread Jonathan Barker
@Secured({"ROLE1","ROLE2","ROLE3"})

> -Original Message-
> From: Mahen Perera [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2008 9:29 PM
> To: Tapestry users
> Subject: RE: T5: Problem with login form with Acegi
> 
> Thanks Guys, this thread benefitted me as well :)
> 
> One more Q:
> How can I give multiple roles access to a page
> 
> @Secured("RLE-DEFAULT-ROLE  using commas,, or else, how can I do it?>")
> Public class Blah{
> 
> Thanks
> 
> 
> -Original Message-
> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
> Sent: 29 March 2008 16:32
> To: users@tapestry.apache.org
> Subject: RE: T5: Problem with login form with Acegi
> 
> 
> Thanks Jonathan, that did the trick!
> Cheers,
> Jacob
> 
> 
> Jonathan Barker wrote:
> >
> >
> > I should have pasted a little more code before.  You need the
> following
> > line
> > in your onSuccess method:
> >
> >
> > SecurityContextHolder.getContext().setAuthentication(authResult);
> >
> >
> > Acegi expects to do everything through the SecurityContext.
> >
> >
> >
> >
> >> -Original Message-
> >> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
> >> Sent: Friday, March 28, 2008 9:57 PM
> >> To: users@tapestry.apache.org
> >> Subject: Re: T5: Problem with login form with Acegi
> >>
> >>
> >> Hi again,
> >> I had an error in my code when I compared the Set
> with
> >> a
> >> String value... I changed that so the Set takes a String as input
> >> instead.
> >> Now it goes into the first if statement and try to call page Secure
> and I
> >> get the same error as I posted in my previous posting...
> >>
> >> in the end the error states:
> >> Caused by: org.acegisecurity.AccessDeniedException: Access is denied
> >> at
> >>
> org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68)
> >> at
> >>
> $AccessDecisionManager_118f7af2115.decide($AccessDecisionManager_118f7af
> 21
> >> 15.java)
> >> at
> >>
> org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation
> (A
> >> bstractSecurityInterceptor.java:323)
> >> at
> >>
> nu.localhost.tapestry.acegi.services.internal.StaticSecurityChecker.chec
> kB
> >> efore(StaticSecurityChecker.java:43)
> >> at
> >>
> $SecurityChecker_118f7af20ce.checkBefore($SecurityChecker_118f7af20ce.ja
> va
> >> )
> >> at com.bergoo.webshop.pages.Secure.beginRender(Secure.java)
> >> at
> >>
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run
> (C
> >> omponentPageElementImpl.java:338)
> >> at
> >>
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(C
> om
> >> ponentPageElementImpl.java:874)
> >> ... 98 more
> >>
> >> I don't see the reason why I get the Access denied.
> >> Thanks for any help...
> >> Jacob
> >> --
> >> View this message in context:
> http://www.nabble.com/T5%3A-Problem-with-
> >> login-form-with-Acegi-tp16364295p16365723.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]
> >
> >
> >
> 
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Problem-with-login-form-with-Acegi-tp1636429
> 5p16371816.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]
> 
> The information contained in this email is strictly confidential and for
> the use of the addressee only, unless otherwise indicated. If you are not
> the intended recipient, please do not read, copy, use or disclose to
> others this message or any attachment. Please also notify the sender by
> replying to this email or by telephone (+44 (0)20 7896 0011) and then
> delete the email and any copies of it. Opinions, conclusions (etc.) that
> do not relate to the official business of this company shall be understood
> as neither given nor endorsed by it. IG Index plc is a company registered
> in England and Wales under number 01190902. VAT registration number 761
> 2978 07. Registered Office: Friars House, 157-168 Blackfriars Road, London
> SE1 8EZ. Authorised and regulated by the Financial Services Authority. FSA
> Register number 114059.
> 
> -
> 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] Tapestry evaluation + questions

2008-03-29 Thread Jonathan Barker
Angelo,

I find that there will usually be a page or two that I want to play with to
get the look right for the whole app.  I'm always using a Layout / Border
component, so I like to repeat the Border design on those pages and then
play with the CSS.

With the new project design, my templates will be under
src/main/resources/ca/itstrategic/client/app/pages and then CSS will be
under
src/main/webapp/css.

I like the organization, but referring to that path for WYSIWYG and
injecting it for runtime is a pain.  And there doesn't seem to be anything
as easy as $content$ and $remove$.

I usually use t:type rather than the short form to keep some level of
viewability.

I don't usually have to pass off to a designer (Frankly, most of what I do
doesn't have to be pretty.  It has to be fast and rock-solid.) I am now
doing more that needs to look good so I can see it being more of an issue in
the future.  I also see it being an issue for adoption in larger shops where
there is a separation of roles.

Jonathan

> -Original Message-
> From: Angelo Chen [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2008 6:37 PM
> To: users@tapestry.apache.org
> Subject: RE: [T5] Tapestry evaluation + questions
> 
> 
> Hi Jonathan,
> 
> Initially I use dreamweaver to design the page, and make it a point to use
> regular tags like:
> my Link , this will make it easier for me to go back to dreamweaver for
> page
> update, but later I found out that I started to write my
> link and not coming back any more to dreamweaver, I fire up
> FireBug, change the layout in the fly, and then update the t5 template and
> try again, it works quite well with me, but this will not work well if the
> pages have to be maintained by a html designer, is this what you are doing
> too? thanks.
> 
> Angelo
> 
> 
> Jonathan Barker wrote:
> >
> >
> > HTML, CSS and a browser and focus on appearances.  With T5, it's easier
> > just
> > to run your app and tweak on the fly.
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/-T5--Tapestry-
> evaluation-%2B-questions-tp16368331p16375682.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: T5: Problem with login form with Acegi

2008-03-29 Thread Mahen Perera
Thanks Guys, this thread benefitted me as well :)

One more Q:
How can I give multiple roles access to a page

@Secured("RLE-DEFAULT-ROLE ")
Public class Blah{

Thanks


-Original Message-
From: Jacob Bergoo [mailto:[EMAIL PROTECTED] 
Sent: 29 March 2008 16:32
To: users@tapestry.apache.org
Subject: RE: T5: Problem with login form with Acegi


Thanks Jonathan, that did the trick!
Cheers,
Jacob


Jonathan Barker wrote:
> 
> 
> I should have pasted a little more code before.  You need the
following
> line
> in your onSuccess method:
> 
>   
> SecurityContextHolder.getContext().setAuthentication(authResult);
> 
> 
> Acegi expects to do everything through the SecurityContext.
> 
> 
> 
> 
>> -Original Message-
>> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
>> Sent: Friday, March 28, 2008 9:57 PM
>> To: users@tapestry.apache.org
>> Subject: Re: T5: Problem with login form with Acegi
>> 
>> 
>> Hi again,
>> I had an error in my code when I compared the Set
with
>> a
>> String value... I changed that so the Set takes a String as input
>> instead.
>> Now it goes into the first if statement and try to call page Secure
and I
>> get the same error as I posted in my previous posting...
>> 
>> in the end the error states:
>> Caused by: org.acegisecurity.AccessDeniedException: Access is denied
>> at
>>
org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68)
>> at
>>
$AccessDecisionManager_118f7af2115.decide($AccessDecisionManager_118f7af
21
>> 15.java)
>> at
>>
org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation
(A
>> bstractSecurityInterceptor.java:323)
>> at
>>
nu.localhost.tapestry.acegi.services.internal.StaticSecurityChecker.chec
kB
>> efore(StaticSecurityChecker.java:43)
>> at
>>
$SecurityChecker_118f7af20ce.checkBefore($SecurityChecker_118f7af20ce.ja
va
>> )
>> at com.bergoo.webshop.pages.Secure.beginRender(Secure.java)
>> at
>>
org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run
(C
>> omponentPageElementImpl.java:338)
>> at
>>
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(C
om
>> ponentPageElementImpl.java:874)
>> ... 98 more
>> 
>> I don't see the reason why I get the Access denied.
>> Thanks for any help...
>> Jacob
>> --
>> View this message in context:
http://www.nabble.com/T5%3A-Problem-with-
>> login-form-with-Acegi-tp16364295p16365723.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]
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/T5%3A-Problem-with-login-form-with-Acegi-tp1636429
5p16371816.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]

The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index plc is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

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



Re: Javascript error in datefield component

2008-03-29 Thread Ektschn

Hi Yura,

as far as I know this is fixed in t5.0.11

Best, Florian


Yura Tkachenko wrote:
> 
> Hi,
> 
> I'm getting Javascript error when trying to use datefield component on my
> form. This component works properly in Firefox but it doesn't work with
> IE7.
> I'm getting js error: "Object doesn't support this property or method" on
> the line 87 in file: /assets/tapestry/corelib/components/datefield.js
> .
> 85: this.datePicker = new DatePicker();
> 86:
> 87: this.popup = this.datePicker.create().hide().absolutize();
> ...
> 
> In IE7 method hide() is undefined.
> 
> I'm using Tapestry 5.0.10. Does anyone else have this problem?
> 
> Thanks,
> Yura.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Javascript-error-in-datefield-component-tp16245060p16376547.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] Tapestry evaluation + questions

2008-03-29 Thread Ektschn


Andy Blower wrote:
> 
> 2) How easy is it to add custom AJAX interactions? I'm thinking of
> interactions like checking a checkbox to mark a search result, return
> success and visually change the appearance.
> 

For this I would advise you to use t5components - an ajax-enabled component
package.

The onEvent-mixin can be added to any other components, and on defined
events such as blur, change, click, dblclick, error, focus, keydown,
keypress keyup, load, mousedown, mousemove, mouseout, mouseover, mouseup,
reset, select, submit and unload  it will call a java-function.

template code:


java event code:
@OnEvent(component = "mytextfield", value = 'blur')
public StreamResponse onBlurEvent(String value)
{
return new TextStreamResponse("text/html", value);
}

See http://213.160.23.119:8080/t5c-demo/oneventpage.


-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16376510.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] Tapestry evaluation + questions

2008-03-29 Thread Angelo Chen

Hi Fernando,

I think so, if you want to be wisiwig, use regular tags, but programmers
turn to use the component tags for that as it is easier to read, so that's
really a 'policy' issue, if it's a team work i think regular tags are
better.

Angelo


Fernando Padilla wrote:
> 
> I am actually using this syntax, so that I should get the best of both 
> worlds.
> 
>   
> 
> 
> Angelo Chen wrote:
>> Hi Jonathan,
>> 
>> Initially I use dreamweaver to design the page, and make it a point to
>> use
>> regular tags like:
>> my Link , this will make it easier for me to go back to dreamweaver for
>> page
>> update, but later I found out that I started to write my
>> link and not coming back any more to dreamweaver, I fire
>> up
>> FireBug, change the layout in the fly, and then update the t5 template
>> and
>> try again, it works quite well with me, but this will not work well if
>> the
>> pages have to be maintained by a html designer, is this what you are
>> doing
>> too? thanks.
>> 
>> Angelo
>> 
>> 
>> Jonathan Barker wrote:
>>>
>>> HTML, CSS and a browser and focus on appearances.  With T5, it's easier
>>> just
>>> to run your app and tweak on the fly.
>>>
>>>
>> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16376111.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] Tapestry evaluation + questions

2008-03-29 Thread Fernando Padilla
I am actually using this syntax, so that I should get the best of both 
worlds.





Angelo Chen wrote:

Hi Jonathan,

Initially I use dreamweaver to design the page, and make it a point to use
regular tags like:
my Link , this will make it easier for me to go back to dreamweaver for page
update, but later I found out that I started to write my
link and not coming back any more to dreamweaver, I fire up
FireBug, change the layout in the fly, and then update the t5 template and
try again, it works quite well with me, but this will not work well if the
pages have to be maintained by a html designer, is this what you are doing
too? thanks.

Angelo


Jonathan Barker wrote:


HTML, CSS and a browser and focus on appearances.  With T5, it's easier
just
to run your app and tweak on the fly.






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



RE: [T5] Tapestry evaluation + questions

2008-03-29 Thread Angelo Chen

Hi Jonathan,

Initially I use dreamweaver to design the page, and make it a point to use
regular tags like:
my Link , this will make it easier for me to go back to dreamweaver for page
update, but later I found out that I started to write my
link and not coming back any more to dreamweaver, I fire up
FireBug, change the layout in the fly, and then update the t5 template and
try again, it works quite well with me, but this will not work well if the
pages have to be maintained by a html designer, is this what you are doing
too? thanks.

Angelo


Jonathan Barker wrote:
> 
> 
> HTML, CSS and a browser and focus on appearances.  With T5, it's easier
> just
> to run your app and tweak on the fly.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16375682.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 Nested Link components and their urls

2008-03-29 Thread Janko Muzykant

hi Howard,
actually I don't care about url itself, but i would really like to have
event handler of enclosed "header" in a enclosing "report". So I figured out
that if I'll be able to generate url like:
reportUsers.report.header/parameter it will solve my problem ("@OnEvent(
component="header")" annotated method in report class would be enough in
this case) . Now my url is: reportUsers.header/parameter and unfortunately I
have no idea how to catch its click-event in "report" component. is there
any way easier way do achieve that?

thanks,
jm.



Howard Lewis Ship wrote:
> 
> I really have to ask ... why would you care?
> 
> And the issue here is enclosure vs. containment.  Containment is the
> concrete structure of the components, it really is the component
> hierarchy.  Enclosure is largely a factor in how the templates are
> laid out ("report" encloses "header"), but can be much more dynamic
> (witness the jumping around that BeanEditForm accomplishes, literally
> pulling chunks of other pages into the mix).
> 
> On Fri, Mar 28, 2008 at 2:01 PM, Janko Muzykant <[EMAIL PROTECTED]> wrote:
>>
>>  hi, i have a following problem with urls generated by nested links
>> components
>>  - lets say, we have a reportUsers page and something like this inside:
>>
>>  
>> 
>>
>>  header is my component that creates ActionLink with parameter given in
>>  'column' attribute. Generated url looks like this:
>>  http://myhost:port/context/path/reportUsers.header/username. pretty
>> cool,
>>  but it's not what I would like to achieve. As 'header' component is
>> nested
>>  inside 'report' I would expect the url to look like:
>>  .../path/reportUsers.report.header/username. Could you give me a hint
>> how to
>>  get it?
>>
>>  thanks,
>>  jm.
>>
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/T5-Nested-Link-components-and-their-urls-tp16362062p16362062.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]
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5-Nested-Link-components-and-their-urls-tp16362062p16374411.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: Problems with Tapestry5-Acegi

2008-03-29 Thread Robin Helgelin
On Thu, Mar 27, 2008 at 7:34 PM, Jonathan Barker
<[EMAIL PROTECTED]> wrote:
>
>  This is currently listed on the TODO list:
>
>  http://www.localhost.nu/java/tapestry5-acegi/todo.html

There is initial support for secure methods in 1.0.4-SNAPSHOT
available from http://www.localhost.nu/java/mvn-snapshot.

I'm not using it, so I haven't been able to give it that much testing.

-- 
 regards,
 Robin

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



RE: T5: Problem with login form with Acegi

2008-03-29 Thread Jacob Bergoo

Thanks Jonathan, that did the trick!
Cheers,
Jacob


Jonathan Barker wrote:
> 
> 
> I should have pasted a little more code before.  You need the following
> line
> in your onSuccess method:
> 
>   
> SecurityContextHolder.getContext().setAuthentication(authResult);
> 
> 
> Acegi expects to do everything through the SecurityContext.
> 
> 
> 
> 
>> -Original Message-
>> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
>> Sent: Friday, March 28, 2008 9:57 PM
>> To: users@tapestry.apache.org
>> Subject: Re: T5: Problem with login form with Acegi
>> 
>> 
>> Hi again,
>> I had an error in my code when I compared the Set with
>> a
>> String value... I changed that so the Set takes a String as input
>> instead.
>> Now it goes into the first if statement and try to call page Secure and I
>> get the same error as I posted in my previous posting...
>> 
>> in the end the error states:
>> Caused by: org.acegisecurity.AccessDeniedException: Access is denied
>> at
>> org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68)
>> at
>> $AccessDecisionManager_118f7af2115.decide($AccessDecisionManager_118f7af21
>> 15.java)
>> at
>> org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(A
>> bstractSecurityInterceptor.java:323)
>> at
>> nu.localhost.tapestry.acegi.services.internal.StaticSecurityChecker.checkB
>> efore(StaticSecurityChecker.java:43)
>> at
>> $SecurityChecker_118f7af20ce.checkBefore($SecurityChecker_118f7af20ce.java
>> )
>> at com.bergoo.webshop.pages.Secure.beginRender(Secure.java)
>> at
>> org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run(C
>> omponentPageElementImpl.java:338)
>> at
>> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(Com
>> ponentPageElementImpl.java:874)
>> ... 98 more
>> 
>> I don't see the reason why I get the Access denied.
>> Thanks for any help...
>> Jacob
>> --
>> View this message in context: http://www.nabble.com/T5%3A-Problem-with-
>> login-form-with-Acegi-tp16364295p16365723.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Problem-with-login-form-with-Acegi-tp16364295p16371816.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] Tapestry evaluation + questions

2008-03-29 Thread Jonathan Barker

Other posts have handled your specifics well.

Evaluate T5.  I started active development on T4.0.  I have since migrated a
few of the smaller applications from T4 -> T5 and I am doing all new work in
T5.

In the T4->T5 migrations, I found I was deleting lots of code and cleaning
up my templates.

Also, the hot reloading of changes is amazing.  With the largest of my T4
applications it was getting painful to be doing restarts after simple fixes.
It was great having the time to get coffee, but productivity suffered. T5 is
just go-go-go.

The one place where T4 was better than T5 (I found) was WYSIWYG templates. I
think it was easier for shops where you had both designers and programmers.
There were times where I would take off my coding hat and just work with
HTML, CSS and a browser and focus on appearances.  With T5, it's easier just
to run your app and tweak on the fly.


Jonathan


> -Original Message-
> From: Andy Blower [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2008 5:45 AM
> To: users@tapestry.apache.org
> Subject: [T5] Tapestry evaluation + questions
> 
> 
> Hi there, I'm evaluating Tapestry (among others) for the web framework
> we'll
> use at my company for the next 5 years or so. We've used Struts 1 for the
> last 5-6 years and it's served us well, even if it was higher maintenance
> than was first apparent. I have spent over two days reading about Tapestry
> history and general thoughts about past and future which has proved rather
> distracting. I'm really not sure whether I should evaluate 4.1 or 5
> because
> the documentation and intro/tutorial material isn't ready yet for 5 and
> I'm
> completely new to component oriented frameworks. If I evaluated 4.1, would
> that be valid for us still to go on to use 5? It's really hard to get a
> handle on the differences of two things you don't yet understand!
> 
> I have three (more specific) questions:
> 
> 1) What methods are known for implementing webpage templates in Tapestry
> (e.g. banner, nav, sidebar, content, footer) and is there one considered
> 'best practice'?
> 
> 2) How easy is it to add custom AJAX interactions? I'm thinking of
> interactions like checking a checkbox to mark a search result, return
> success and visually change the appearance.
> 
> 3) Is it practical to have base classes containing common functionality,
> which are extended by very terse page classes along with actual page
> templates or am I thinking about this wrong?
> 
> With the only T5 examples being so trivial, it's really hard to get a
> bigger
> picture view at the moment, but I am very intrigued.
> --
> View this message in context: http://www.nabble.com/-T5--Tapestry-
> evaluation-%2B-questions-tp16368331p16368331.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: T5: Problem with login form with Acegi

2008-03-29 Thread Jonathan Barker

I should have pasted a little more code before.  You need the following line
in your onSuccess method:


SecurityContextHolder.getContext().setAuthentication(authResult);


Acegi expects to do everything through the SecurityContext.




> -Original Message-
> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 28, 2008 9:57 PM
> To: users@tapestry.apache.org
> Subject: Re: T5: Problem with login form with Acegi
> 
> 
> Hi again,
> I had an error in my code when I compared the Set with a
> String value... I changed that so the Set takes a String as input instead.
> Now it goes into the first if statement and try to call page Secure and I
> get the same error as I posted in my previous posting...
> 
> in the end the error states:
> Caused by: org.acegisecurity.AccessDeniedException: Access is denied
> at
> org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68)
> at
> $AccessDecisionManager_118f7af2115.decide($AccessDecisionManager_118f7af21
> 15.java)
> at
> org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(A
> bstractSecurityInterceptor.java:323)
> at
> nu.localhost.tapestry.acegi.services.internal.StaticSecurityChecker.checkB
> efore(StaticSecurityChecker.java:43)
> at
> $SecurityChecker_118f7af20ce.checkBefore($SecurityChecker_118f7af20ce.java
> )
> at com.bergoo.webshop.pages.Secure.beginRender(Secure.java)
> at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run(C
> omponentPageElementImpl.java:338)
> at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(Com
> ponentPageElementImpl.java:874)
> ... 98 more
> 
> I don't see the reason why I get the Access denied.
> Thanks for any help...
> Jacob
> --
> View this message in context: http://www.nabble.com/T5%3A-Problem-with-
> login-form-with-Acegi-tp16364295p16365723.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: Tap 5.0.9: Why can't Grid column header has blank label

2008-03-29 Thread ryanskow


It can be useful, however, to have a blank heading for columns which may be
icons such as edit/delete.  It doesn't hurt to have a heading for such
columns, but sometimes it is nice to be able to save some horizontal
real-estate by utilizing an icon to replace the text.  


Howard Lewis Ship wrote:
> 
> The label is also used by BeanEditor and individual fields when
> composing error messages.
> 
> On Feb 2, 2008 12:16 PM, Shing Hing Man <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>>   In the Grid component, I added a custom column with
>> a
>> blank label.
>>
>>   beanModel.add("rowNo", null).label(" ");
>>
>> This resulted in the following exception.
>> I could use css to make the label non-visible.
>> Is there a more elegant way of having a blank column
>> header.
>>
>> Thanks in advance for any assistance !
>>
>> Shing
>>
>> java.lang.IllegalArgumentException
>> Parameter label was null or contained only whitespace.
>>
>> Stack trace
>>
>> *
>> org.apache.tapestry.ioc.internal.util.Defense.notBlank(Defense.java:59)
>> *
>> org.apache.tapestry.internal.beaneditor.PropertyModelImpl.label(PropertyModelImpl.java:87)
>> *
>> net.sf.gridDemo.pages.AccessGrid.getBeanModel(AccessGrid.java:110)
>> *
>> org.apache.tapestry.internal.bindings.PropBinding.get(PropBinding.java:54)
>> *
>> org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:209)
>>
>> Home page : http://www.lombok.demon.co.uk/
>>
>>
>>
>>   __
>> Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tap-5.0.9%3A-Why-can%27t-Grid-column-header-has-blank-label-tp15246759p16371478.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] Tapestry evaluation + questions

2008-03-29 Thread Howard Lewis Ship
On Sat, Mar 29, 2008 at 2:44 AM, Andy Blower <[EMAIL PROTECTED]> wrote:
>
>  Hi there, I'm evaluating Tapestry (among others) for the web framework we'll
>  use at my company for the next 5 years or so. We've used Struts 1 for the
>  last 5-6 years and it's served us well, even if it was higher maintenance
>  than was first apparent. I have spent over two days reading about Tapestry
>  history and general thoughts about past and future which has proved rather
>  distracting. I'm really not sure whether I should evaluate 4.1 or 5 because
>  the documentation and intro/tutorial material isn't ready yet for 5 and I'm
>  completely new to component oriented frameworks. If I evaluated 4.1, would
>  that be valid for us still to go on to use 5? It's really hard to get a
>  handle on the differences of two things you don't yet understand!
>
>  I have three (more specific) questions:
>
>  1) What methods are known for implementing webpage templates in Tapestry
>  (e.g. banner, nav, sidebar, content, footer) and is there one considered
>  'best practice'?
>

The layout pattern is the best way to approach this class of problems:

http://tapestry.apache.org/tapestry5/tapestry-core/guide/layout.html

These kinds of layout components can be very smart and highly
adaptable via templates and other techniques.

>  2) How easy is it to add custom AJAX interactions? I'm thinking of
>  interactions like checking a checkbox to mark a search result, return
>  success and visually change the appearance.

Very easy, because Tapestry's makes it very easy to create a URL that
triggers an event within a specific component.  The component can
respond to the event via an event handler method,
and can easily communicate a response back to the client by returning
a stream, a JSON Object, or some rendered markup.

>
>  3) Is it practical to have base classes containing common functionality,
>  which are extended by very terse page classes along with actual page
>  templates or am I thinking about this wrong?

Yes, and Tapestry even has some support for JDK Generics for this
purpose.  However, I would caution not to go overboard with base
classes, when injection is *so* easy;  Common behavior can be factored
into IoC (Inversion of Control) services that can be injected directly
into component fields.  A relatively flat (1 - 2) level inheritance
hiearchy, with common code in injectable services, is much easier to
maintain.

>
>  With the only T5 examples being so trivial, it's really hard to get a bigger
>  picture view at the moment, but I am very intrigued.

And I here you, but the community is stepping up; please check the T5
home page and wiki with links to prototype applications, tutorials and
other examples.  And some very useful component libraries.

>  --
>  View this message in context: 
> http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16368331.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]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re : Re : [T5] How to add JavaScript in a component used in a layout

2008-03-29 Thread Julien HENRY
Hi Mike,

Thanks you very much for your help. I was trying to show you how to reproduce 
the bug when I accidentaly found the real problem. You can't put the 
t:type="layout" on your  tag. It works on the  tag and it works on 
a  tag. But not on the . I have opened a bug: 
https://issues.apache.org/jira/browse/TAPESTRY-2314 because I don't think it is 
the same as your own (and I didn't find it BTW).

Best regards,

Julien

- Message d'origine 
De : Michael Lake <[EMAIL PROTECTED]>
À : Tapestry users 
Envoyé le : Samedi, 29 Mars 2008, 18h50mn 33s
Objet : Re: Re : [T5] How to add JavaScript in a component used in a layout


Are you sure that the page you're outputting has proper  tags? I've been burned by forgetting my  tags  
which I believe are needed for tapestry to add scripts, but tapestry  
doesn't give you any warning that the scripts haven't been added. I  
think I made a Jira for this a couple months ago.

-mike


On Mar 29, 2008, at 6:03 AM, Julien HENRY wrote:

> In fact, it could be a bug. I tried to add a beaneditform component  
> in the Start page, and I have JavaScript (for client side  
> validation). Just put the beaneditform in the Layout.tml instead and  
> there is no more Javascript.
>
> Should I open a bug in JIRA?
>
> Regards
>
> - Message d'origine 
> De : Julien HENRY <[EMAIL PROTECTED]>
> À : users@tapestry.apache.org
> Envoyé le : Samedi, 29 Mars 2008, 15h23mn 34s
> Objet : [T5] How to add JavaScript in a component used in a layout
>
> Hi,
>
> I'm using a custom JAR-packaged component in a template. When I use  
> the component directly in a page (Start.tml) I have both JavaScript  
> and CSS file included in the HTML. But when I try to put the  
> component in my application layout (Layout.tml), there is only the  
> CSS file. No JavaScript.
> In my component, I have also the following method:
>
> @IncludeJavaScriptLibrary("${path}/component.js")
> @IncludeStylesheet("${path}/component.css")
> public class MyComponent {
>
> 
>
> void beginRender(MarkupWriter writer) {
>
>_pageRenderSupport.addScript("setup();");
>
>writer.cdata("Foo Bar");
> }
>
>
> On my finale page, I have the text "Foo Bar" displayed but no  
> 

Re: [T5] Tapestry evaluation + questions

2008-03-29 Thread Michael Lake


Andy, you should take a look at tapestry jumpstart by geoff callender: 
http://files.doublenegative.com.au/jumpstart/

I only wish there were a demo server of this somewhere because the  
webapp itself will show its template + class in the browser.


-mike


On Mar 29, 2008, at 5:44 AM, Andy Blower wrote:



Hi there, I'm evaluating Tapestry (among others) for the web  
framework we'll
use at my company for the next 5 years or so. We've used Struts 1  
for the
last 5-6 years and it's served us well, even if it was higher  
maintenance
than was first apparent. I have spent over two days reading about  
Tapestry
history and general thoughts about past and future which has proved  
rather
distracting. I'm really not sure whether I should evaluate 4.1 or 5  
because
the documentation and intro/tutorial material isn't ready yet for 5  
and I'm
completely new to component oriented frameworks. If I evaluated 4.1,  
would
that be valid for us still to go on to use 5? It's really hard to  
get a

handle on the differences of two things you don't yet understand!

I have three (more specific) questions:

1) What methods are known for implementing webpage templates in  
Tapestry
(e.g. banner, nav, sidebar, content, footer) and is there one  
considered

'best practice'?

2) How easy is it to add custom AJAX interactions? I'm thinking of
interactions like checking a checkbox to mark a search result, return
success and visually change the appearance.

3) Is it practical to have base classes containing common  
functionality,

which are extended by very terse page classes along with actual page
templates or am I thinking about this wrong?

With the only T5 examples being so trivial, it's really hard to get  
a bigger

picture view at the moment, but I am very intrigued.
--
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16368331.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: Re : [T5] How to add JavaScript in a component used in a layout

2008-03-29 Thread Michael Lake


Are you sure that the page you're outputting has proper body> tags? I've been burned by forgetting my  tags  
which I believe are needed for tapestry to add scripts, but tapestry  
doesn't give you any warning that the scripts haven't been added. I  
think I made a Jira for this a couple months ago.


-mike


On Mar 29, 2008, at 6:03 AM, Julien HENRY wrote:

In fact, it could be a bug. I tried to add a beaneditform component  
in the Start page, and I have JavaScript (for client side  
validation). Just put the beaneditform in the Layout.tml instead and  
there is no more Javascript.


Should I open a bug in JIRA?

Regards

- Message d'origine 
De : Julien HENRY <[EMAIL PROTECTED]>
À : users@tapestry.apache.org
Envoyé le : Samedi, 29 Mars 2008, 15h23mn 34s
Objet : [T5] How to add JavaScript in a component used in a layout

Hi,

I'm using a custom JAR-packaged component in a template. When I use  
the component directly in a page (Start.tml) I have both JavaScript  
and CSS file included in the HTML. But when I try to put the  
component in my application layout (Layout.tml), there is only the  
CSS file. No JavaScript.

In my component, I have also the following method:

@IncludeJavaScriptLibrary("${path}/component.js")
@IncludeStylesheet("${path}/component.css")
public class MyComponent {



void beginRender(MarkupWriter writer) {

   _pageRenderSupport.addScript("setup();");

   writer.cdata("Foo Bar");
}


On my finale page, I have the text "Foo Bar" displayed but no  

Re: [T5] FormFragment doesn't work on IE6

2008-03-29 Thread Adam Zimowski
I'd file JIRA for this.

On Fri, Mar 28, 2008 at 3:14 PM, Zheng, Xiahong <[EMAIL PROTECTED]> wrote:
> I had a look at the tapestry.js. The following function is used to
>  connect the checkbox with the fragment.
>
> // Links a FormFragment to a checkbox, such that changing the
>  checkbox will hide
> // or show the FormFragment. Care should be taken to render the page
>  with the
> // checkbox and the FormFragment('s visibility) in agreement.
>
> linkCheckboxToFormFragment : function(checkbox, element)
> {
> checkbox = $(checkbox);
>
> checkbox.observe("change", function()
> {
> $(element).formFragment.setVisible(checkbox.checked);
> });
> },
>
>  I am not familiar with javascript function. But it seems to me that the
>  checkbox onchange event only toggles the visibility of the fragment.
>  There should be another line that toggels the hidden field value as
>  well.
>
>
>  -Original Message-
>  From: Adam Zimowski [mailto:[EMAIL PROTECTED]
>
>
> Sent: Thursday, March 27, 2008 4:10 PM
>  To: Tapestry users
>  Subject: Re: [T5] FormFragment doesn't work on IE6
>
>  I recently posted e-mail to this list on this exact same topic. Here
>  is that post:
>
>  Per documentation, FormFragment decides if its content should be
>  submitted based on the hidden field [formfragmentname]:hidden:
>
>  // this is the relevant code from FormFragment source: void
>  beginRender(..)
>writer.element("input",
>
>   "type", "hidden",
>
>   "name", _controlName,
>
>   "id", _clientId + ":hidden",
>
>   "value", String.valueOf(_visible));
>writer.end();
>
>
>  However, that field being generated at render time is fairly static,
>  which defeats the very purpose of dynamic behavior provided by
>  Tapestry.ElementEffect sidedown/slideup functions. The problem is that
>  when the silide function is invoked on the client (triggered by click
>  on the checkbox), that inherently means that FormFragment should be
>  submitted, but it won't be if the hidden field was generated with
>  false value.
>
>  The solution to this problem should be Tapestry dynamically changing
>  hidden field's value to true/false based on the client side state of
>  the checkbox tied to the FormFragment. For those who need a
>  workaround, I can share mine. In onclick of submit button one can
>  execute the following function:
>
>  function setupFragment(fragment, checkbox) {
>   var checked = document.getElementById(checkbox).value;
>   var advanced = (checked == 'on');
>   document.getElementById(fragment + ':hidden').value=advanced;
>  }
>
>
>onclick="setupFragment('advancedFragment','advancedCheckbox');"
>  type="submit" t:type="submit" value="Submit"/>
>
>  I believe this should be one of those "plumbing" tasks that Tapestry
>  should do for us. Should this be a JIRA improvement, or am I missing
>  something?
>
>  -adam
>  Reply
>
>  Forward
>
>
>  Howard Lewis Ship
>  The code is already in place to set the hidden field to the correct
>  value whe...
>
>  Howard's Reply was:
>
>  "The code is already in place to set the hidden field to the correct
>  value when the form is submitted."
>
>  In fact, that code is already present in deepVisible stuff inside
>  tapestry.js
>
>  -adam
>
>
>
>
>  On Thu, Mar 27, 2008 at 3:02 PM, Zheng, Xiahong <[EMAIL PROTECTED]>
>  wrote:
>  > I found a workaround. It seems tapestry is not linking the checkbox
>  >  event with the hidden field in this case
>  >
>  >  addPositionFragment:hidden
>  >
>  >  This value of this hidden field is used on the server side to
>  determine
>  >  if binding of the fragment fields should happen. If I manually add a
>  >  onchange event on the checkbox that toggles the value of the above
>  >  field, it starts to work
>  >
>  >
>  >>
>  onclick="document.getElementById('addPositionFragment:hidden').value=tru
>  >  e"
>  >  fragment="addPositionFragment"/>
>  >
>  >  Is this a bug or by design?
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Zheng, Xiahong
>  >  Sent: Thursday, March 27, 2008 2:24 PM
>  >  To: Tapestry users
>  >
>  >
>  > Subject: RE: [T5] FormFragment doesn't work on IE6
>  >
>  >  I am not sure why it is not working for me. Here is my simple test
>  page,
>  >
>  >  NewPosition.tml
>  >
>  >  http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  >
>  >  
>  >
>  >  
>  >   >  fragment="addPositionFragment"/>
>  > Add Position ?
>  >   >  visible="addPosition">
>  > 
>  > 
>  > 
>  > Symbol
>  > 
>  > 
>  > Shares
>  > 
>  > 
>  > Price
>  > 
>  > 
>  > 

Re: [T5] Tapestry evaluation + questions

2008-03-29 Thread Angelo Chen

Hi Andy,

Definately you should go Teaptesry 5, not 4.x. with 6 years experience you
should have no problem trying out the tutorials for a few days and see if
Tapestry 5 works for you, tutorials are trivial but you can always find a
use case to test Tapestry 5's features to see if it suits your needs. 

Some answers to your specific questions:

1) What methods are known for implementing webpage templates in Tapestry
(e.g. banner, nav, sidebar, content, footer) and is there one considered
'best practice'?

T5 has this layout pattern that just works as Tiles in Struts, I don't want
to compare the two but it just can do whatever Tiles can do.

2) How easy is it to add custom AJAX interactions? I'm thinking of
interactions like checking a checkbox to mark a search result, return
success and visually change the appearance.

This can be done with actionlink with zone/block, not sure it can be
attached to a checkbox, but I'd say it looks more logical for a link to
trigger an action instead of a checkbox.

3) Is it practical to have base classes containing common functionality,
which are extended by very terse page classes along with actual page
templates or am I thinking about this wrong?

I'd say this is a good approach, I use it sometimes, but there are times
that I'd prefer to just use a POJO without any base class, as you code very
less in t5, a few more lines in code might save more time in tracing the
inheritance, well, just my idea, nothing to do with t5 which allows you to
do whatever you like, quite a fun development platform.

A.C.


Andy Blower wrote:
> 
> Hi there, I'm evaluating Tapestry (among others) for the web framework
> we'll use at my company for the next 5 years or so. We've used Struts 1
> for the last 5-6 years and it's served us well, even if it was higher
> maintenance than was first apparent. I have 


-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16368467.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] How to add JavaScript in a component used in a layout

2008-03-29 Thread Julien HENRY
In fact, it could be a bug. I tried to add a beaneditform component in the 
Start page, and I have JavaScript (for client side validation). Just put the 
beaneditform in the Layout.tml instead and there is no more Javascript.

Should I open a bug in JIRA?

Regards

- Message d'origine 
De : Julien HENRY <[EMAIL PROTECTED]>
À : users@tapestry.apache.org
Envoyé le : Samedi, 29 Mars 2008, 15h23mn 34s
Objet : [T5] How to add JavaScript in a component used in a layout

Hi,

I'm using a custom JAR-packaged component in a template. When I use the 
component directly in a page (Start.tml) I have both JavaScript and CSS file 
included in the HTML. But when I try to put the component in my application 
layout (Layout.tml), there is only the CSS file. No JavaScript.
In my component, I have also the following method:

@IncludeJavaScriptLibrary("${path}/component.js")
@IncludeStylesheet("${path}/component.css")
public class MyComponent {



void beginRender(MarkupWriter writer) {

_pageRenderSupport.addScript("setup();");

writer.cdata("Foo Bar");
}


On my finale page, I have the text "Foo Bar" displayed but no 

[T5] How to add JavaScript in a component used in a layout

2008-03-29 Thread Julien HENRY
Hi,

I'm using a custom JAR-packaged component in a template. When I use the 
component directly in a page (Start.tml) I have both JavaScript and CSS file 
included in the HTML. But when I try to put the component in my application 
layout (Layout.tml), there is only the CSS file. No JavaScript.
In my component, I have also the following method:

@IncludeJavaScriptLibrary("${path}/component.js")
@IncludeStylesheet("${path}/component.css")
public class MyComponent {



void beginRender(MarkupWriter writer) {

_pageRenderSupport.addScript("setup();");

writer.cdata("Foo Bar");
}


On my finale page, I have the text "Foo Bar" displayed but no 

[T5] Tapestry evaluation + questions

2008-03-29 Thread Andy Blower

Hi there, I'm evaluating Tapestry (among others) for the web framework we'll
use at my company for the next 5 years or so. We've used Struts 1 for the
last 5-6 years and it's served us well, even if it was higher maintenance
than was first apparent. I have spent over two days reading about Tapestry
history and general thoughts about past and future which has proved rather
distracting. I'm really not sure whether I should evaluate 4.1 or 5 because
the documentation and intro/tutorial material isn't ready yet for 5 and I'm
completely new to component oriented frameworks. If I evaluated 4.1, would
that be valid for us still to go on to use 5? It's really hard to get a
handle on the differences of two things you don't yet understand!

I have three (more specific) questions:

1) What methods are known for implementing webpage templates in Tapestry
(e.g. banner, nav, sidebar, content, footer) and is there one considered
'best practice'?

2) How easy is it to add custom AJAX interactions? I'm thinking of
interactions like checking a checkbox to mark a search result, return
success and visually change the appearance.

3) Is it practical to have base classes containing common functionality,
which are extended by very terse page classes along with actual page
templates or am I thinking about this wrong?

With the only T5 examples being so trivial, it's really hard to get a bigger
picture view at the moment, but I am very intrigued.
-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry-evaluation-%2B-questions-tp16368331p16368331.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]