RE: [T5.1.0.2] / [T5.1.0.3] BlackBird Info Logging

2009-04-24 Thread Blower, Andy
> > Hiya,
> >
> > The Tapestry js object has debug, warn and error logging methods to
> > BlackBird but no info logging. Is this due to design because the
> > logging methods are only supposed to be used by Tapestry internal
> > components (and hence not yet required)? Or maybe an wee oversight?
> >
> > Personally, I'm excited at the idea of having BlackBird bundled with
> > T5 and would love to utilise it fully.
> 
> Add an issue to JIRA, or monkey-patch tapestry.js directly.
> 
> >
> > On a related note, when I send messages to BlackBird via the js
> > Tapestry.debug() method it seems to pop up the BlackBird console
> > window regardless of  whether I'm in productionMode or not. Is this
> > the desired behaviour? Or again, am I not supposed to use the
> Tapestry
> > js logging methods myself?
> 
> Any time a message, of any category, is added, Blackbird will popup (by
> design).
> 

This surprises me, I also assumed that (since it's a development/debugging 
tool) the console would be disabled in production mode. I'd be very interested 
to hear other people's opinion on this.


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



RE: Parameter publishing and informal parameters

2009-04-22 Thread Blower, Andy
Thanks Howard, that works perfectly. (and I obviously need an eye test..)

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 21 April 2009 17:00
> To: Tapestry users
> Subject: Re: Parameter publishing and informal parameters
> 
> The @Component.inheritInformalParameter annotation attribute allows
> all informal parameters of an outer component to be connected to a
> contained component.
> 
> On Tue, Apr 21, 2009 at 3:48 AM, Blower, Andy
>  wrote:
> > I've just been simplifying one of our components using parameter
> publishing, and I just realised that informal parameters are not passed
> to the inner component (loop) to render on the element which is passed
> okay. (although we're not using inherit: or publishParameters for
> element, as it didn't seem to work correctly)
> >
> > Does anyone know of a way of passing informal parameters, or is this
> an instance where we should have used inheritance instead of
> composition?
> >
> 
> 
> 
> --
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



Parameter publishing and informal parameters

2009-04-21 Thread Blower, Andy
I've just been simplifying one of our components using parameter publishing, 
and I just realised that informal parameters are not passed to the inner 
component (loop) to render on the element which is passed okay. (although we're 
not using inherit: or publishParameters for element, as it didn't seem to work 
correctly)

Does anyone know of a way of passing informal parameters, or is this an 
instance where we should have used inheritance instead of composition?


RE: T5.1.0.2 problem with TestableRequestImpl

2009-04-14 Thread Blower, Andy
I have now filed a JIRA issue (https://issues.apache.org/jira/browse/TAP5-643) 
- it seems that PageTester is using the application module defined in web.xml 
which is causing issues for me because of some dispatchers which will not work 
without external servers or the real request/response (inc. cookies) stuff.

We use PageTester to unit test the rendering of pages & components - trying to 
be dependent on as little else as possible. Please vote if this is affecting 
you too.

> -Original Message-
> From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
> Sent: 03 April 2009 10:36
> To: 'Tapestry users'
> Subject: RE: T5.1.0.2 problem with TestableRequestImpl
> 
> Thanks Massimo, I'll probably file a Jira issue about this then. Weird
> thing is I don't think all my tests that use PageTester are failing. I
> need to investigate it, but so far I've spent a week (@50%) on moving
> from 5.1.18 to 5.1.0.2 and I still don't have things working quite
> right so I don't know how much time I'll be able to dedicate to this.
> 
> > -Original Message-
> > From: Massimo Lusetti [mailto:mluse...@gmail.com]
> > Sent: 03 April 2009 10:27
> > To: Tapestry users
> > Subject: Re: T5.1.0.2 problem with TestableRequestImpl
> >
> > On Tue, Mar 31, 2009 at 3:28 PM, Blower, Andy
> >  wrote:
> >
> > > I'm in the process of migrating from T5.0.18 to T5.1 and I'm using
> > the T5.1.0.2 release currently being voted on. I've fixed all the
> > compilation errors and disabled enough of our custom stuff to get
> pages
> > rendering, although most of our javascript seems to be broken (I'll
> be
> > looking into this issue next), but I have a lot of unit tests
> failing.
> > Basically all of the tests using org.apache.tapestry5.test.PageTester
> > to do a test render are failing with the stacktrace appended to the
> > bottom of this email. This appears to be caused by the new method
> > that's been added to the Request interface but not implemented in
> > TestableRequestImpl. (well technically it is, but all it does is
> throw
> > a RuntimeException)
> > >
> > > So, has anyone else encountered this issue? Why aren't any of the
> > Tapestry tests affected? What's the best way to fix this?
> >
> > I too encountered this problem but i neglected to write about it
> cause
> > i was already migrating to using Selenium based tests but i should
> > have.
> >
> > If anyone would look there are example in the chenillekit-access
> > module which should fire the problem.
> >
> > --
> > Massimo
> > http://meridio.blogspot.com
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Blower, Andy
If you want to do the equivalent in 5.1 then you'll need to extend 
ComponentEventLinkEncoderImpl and override any methods you want to change. 
Alternatively (since the decoding is now in here rather than in the Dispatcher) 
you can use service advice which is what I did. Check out the recent thread I 
started called "T5.1 URL Rewriting", you might even find that URL Rewriting 
will do what you need.

If you do go the advice route, then you'll need something like this the code 
below in your module. This add advice to the createPageRenderLink() & 
decodePageRenderRequest() methods handled by the 
MethodAdviceCreatePageRenderLink & MethodAdviceDecodePageRenderRequest method 
advice classes I wrote. The biggest thing to note is the * at the beginning of 
the Match annotation - without this it wouldn't work, but I have no idea why. 
If anyone can tell me why I need the * I'd be very interested.

Cheers,

Andy.

@Match("*ComponentEventLinkEncoder")
public static void advisePQSiteHandling(
ComponentClassResolver componentClassResolver, 
ContextPathEncoder contextPathEncoder, 
Response response, 
MethodAdviceReceiver receiver) throws Exception
{
   Method createPageRenderLinkMethod = 
ComponentEventLinkEncoder.class.getMethod("createPageRenderLink", 
PageRenderRequestParameters.class);
   receiver.adviseMethod(createPageRenderLinkMethod, new 
MethodAdviceCreatePageRenderLink(response));

   Method decodePageRenderRequestMethod = 
ComponentEventLinkEncoder.class.getMethod("decodePageRenderRequest", 
Request.class);
   receiver.adviseMethod(decodePageRenderRequestMethod, new 
MethodAdviceDecodePageRenderRequest(componentClassResolver, 
contextPathEncoder));
}


> -Original Message-
> From: Dave Greggory [mailto:davegregg...@yahoo.com]
> Sent: 09 April 2009 19:24
> To: Tapestry users
> Subject: [t5.1.0.2] Migration problem as LinkFactory is no longer
> present
> 
> 
> We needed to contribute a custom version of LinkFactory to meet a
> business need. I realize that it was internal and was subject to
> change, but now that there is no LinkFactory present in 5.1 I would
> like some help figuring out how to implement the same functionality.
> 
> We need to be able to specify custom URLs for Tapestry pages (multiple
> URLs can go to the same Page and sometimes the same URL can go to
> different tapestry Pages). Couldn't really achieve it using activation
> context as the complete url needed to be customizable. So we
> implemented a Dispatcher to handle it, but later on found out that we
> have override the LinkFactory.createPageRenderLink(..) functionality to
> get forms working properly (action url for forms were not rendering as
> the custom url without the LinkFactory).
> 
> The change we made to LinkFactory is given below. How do we do the same
> in 5.1?
> 
>   public Link createPageRenderLink(Page page, boolean override,
> Object... pageActivationContext)
>   {
>   String logicalPageName = page.getLogicalName();
> 
>   // When override is true, we use the activation context even if
> empty.
>   Object[] context = (override || pageActivationContext.length !=
> 0)
>  ? pageActivationContext
>  :
> contextCollector.collectPageActivationContext(page);
>   InvocationTarget target = new PageRenderTarget(logicalPageName);
> 
>   // --- our change (begin) ---
> ---
>   String pageUrl = (String)
> request.getAttribute(OurConstants.PAGE_URL.id());
>   if (!StringUtils.isBlank(pageUrl))
>   {
> while (pageUrl.startsWith("/"))
> {
>   pageUrl = pageUrl.substring(1);
> }
> target = new OpaqueConstantTarget(pageUrl);
>   }
>   // --- our change (end) -
> -
> 
>   ComponentInvocation invocation = new
> ComponentInvocationImpl(contextPathEncoder, target, null, context,
> false);
>   String baseURL = requestSecurityManager.getBaseURL(page);
>   Link link = new LinkImpl(response, optimizer, baseURL,
> request.getContextPath(), invocation);
>   componentInvocationMap.store(link, invocation);
> 
>   for (LinkFactoryListener listener : listeners)
>   listener.createdPageRenderLink(link);
> 
>   return link;
>   }
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: More migration issues, 5.0.18 -> 5.1.0.2

2009-04-08 Thread Blower, Andy
> On Wed, Apr 8, 2009 at 4:21 AM, Blower, Andy
>  wrote:
> > Another day, another couple of stumbling blocks for our applications
> migration to T5.1 - I can't believe this has taken a solid week of
> effort so far. I'm starting to wonder if we jumped the gun on moving to
> T5.1 so soon? I do seem to be having more problems than most people on
> the list, so maybe it's just me / our app or something.
> 
> I'm sorry and surprised you are having so much trouble.

I'm rather surprised too, the 5.0.x migrations (post .10) were always pretty 
easy. I think I must have gotten complacent about Tapestry alpha status because 
T5.0.11+ never really felt like alpha software to me. ;-)  (oh, and some of the 
new features in 5.1 are very appealing which is probably why migrating now was 
so tempting!)
 
> > Anyway, the first issue is with our checkbox components that do an
> Ajax call when checked or unchecked. They work fine if Gzip compression
> is switched off, but if it's enabled the Ajax.Request hits the
> onException block with this error message "TypeError: response is
> null". The server event handler is being called correctly and returning
> the correct JSONObject, but the responseText is empty and responseXML,
> responseJSON, and headerJSON are all null even though the status code
> is 200. My guess that the JSONObject is being compressed and it
> shouldn't be. Should I raise a JIRA for this, or am I mistaken here?
> 
> There's an existing JIRA issue, with a workaround.
> 
> https://issues.apache.org/jira/browse/TAP5-469
> 
> This only seems to affect some people ... I suspect it may only occur
> when an Apache server is between the browser and the servlet
> container. Can you confirm?

Currently I've only been testing in Jetty on my PC with no apache server in 
sight. The workaround is probably okay until you want to release 5.1 so there's 
some time for gathering more data. I know it sounds unlikely but could it be 
OSX/XP even with the same browsers? I can ask someone to test this on OSX 
tomorrow if that would help.

> >
> > I also have a page that works fine with T5.0.18 but breaks in
> T5.1.0.2 and I have no idea why - curiously, if I have gzip compression
> I don't see the stacktrace in the browser, but I get "Content Encoding
> Error", "The page you are trying to view cannot be shown because it
> uses an invalid or unsupported form of compression." From Firefox.
> >
> > Here is the stack trace, in case anyone can make any sense of it:
> >
> > An unexpected application exception has occurred.
> 
> Someone else has seen this as well.
> 
> 
> void render(MarkupModel model, StringBuilder builder, Map String> namespaceURIToPrefix)
> {
> builder.append(" ");
> builder.append(element.toPrefixedName(namespaceURIToPrefix,
> namespace, name));
> builder.append("=");
> builder.append(model.getAttributeQuote());
> model.encodeQuoted(value, builder);  // line 69
> builder.append(model.getAttributeQuote());
> }
> 
> I think this I can chase down; something is wrong, the value should
> never be null (it can be the empty string).

Did you see TAP5-635? It demonstrates a pretty bad consequence of this problem 
and it took time to investigate so I hope it proves useful.

I think 636 might be a duplicate.

Thanks,

Andy.


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



RE: More migration issues, 5.0.18 -> 5.1.0.2

2009-04-08 Thread Blower, Andy
Thanks for this Ville it really helped me investigate this, still took 3 hours 
to track it down. I've raised TAP5-635 for this because it turned out to be 
related, but different - and also IMHO a valid use case. The stacktrace not 
appearing with compression is another issue that needs resolving, but it's 
minor.

> -Original Message-
> From: Ville Virtanen [mailto:ville.virta...@cerion.fi]
> Sent: 08 April 2009 12:33
> To: users@tapestry.apache.org
> Subject: Re: More migration issues, 5.0.18 -> 5.1.0.2
> 
> 
> Hi,
> 
> exatly the same problems we were having. I opened Jira issue because of
> this:
> 
> https://issues.apache.org/jira/browse/TAP5-623
> 
> For us the main reason was because we had
> 
> 
> 
> and then
> 
> 
>${value}
>
>   
>
> 
> 
> Now with T5.0.18 this worked fine, but now dies in 5.1.0.2 if it is
> readmode: (label gets null for parameter) - givin only some T5 internal
> stacktrace or the unsupported form of compression..
> 
>  Hope this helps,
> 
>  - Ville
> 
> 
> 
> Andy Blower wrote:
> >
> > Another day, another couple of stumbling blocks for our applications
> > migration to T5.1 - I can't believe this has taken a solid week of
> effort
> > so far. I'm starting to wonder if we jumped the gun on moving to T5.1
> so
> > soon? I do seem to be having more problems than most people on the
> list,
> > so maybe it's just me / our app or something.
> >
> > Anyway, the first issue is with our checkbox components that do an
> Ajax
> > call when checked or unchecked. They work fine if Gzip compression is
> > switched off, but if it's enabled the Ajax.Request hits the
> onException
> > block with this error message "TypeError: response is null". The
> server
> > event handler is being called correctly and returning the correct
> > JSONObject, but the responseText is empty and responseXML,
> responseJSON,
> > and headerJSON are all null even though the status code is 200. My
> guess
> > that the JSONObject is being compressed and it shouldn't be. Should I
> > raise a JIRA for this, or am I mistaken here?
> >
> > I also have a page that works fine with T5.0.18 but breaks in
> T5.1.0.2 and
> > I have no idea why - curiously, if I have gzip compression I don't
> see the
> > stacktrace in the browser, but I get "Content Encoding Error", "The
> page
> > you are trying to view cannot be shown because it uses an invalid or
> > unsupported form of compression." From Firefox.
> >
> > Here is the stack trace, in case anyone can make any sense of it:
> >
> > An unexpected application exception has occurred.
> >
> >  *   java.lang.NullPointerException
> > *
> >
> org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarku
> pModel.java:94)
> > *   org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *
> > org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> > *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> > *   org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
> > *   org.apache.tapestry5.dom.Node.toMarku

RE: More migration issues, 5.0.18 -> 5.1.0.2

2009-04-08 Thread Blower, Andy
Thanks Ulrich, I didn't see that bug when I searched even though it's plainly 
visible to me now. I appreciate the quick response!

I'll add a comment (and a vote) as well as implementing the workaround. Looks 
like Howard can't reproduce it on OSX, but I definitely get this issue in IE6, 
FF3 & Chrome2 on windows XP.

> -Original Message-
> From: Ulrich Stärk [mailto:u...@spielviel.de]
> Sent: 08 April 2009 12:30
> To: Tapestry users
> Subject: Re: More migration issues, 5.0.18 -> 5.1.0.2
> 
> Someone else already stumbled upon this but it's not yet confirmed
> what's causing it. I believe Howard posted a workaround in the issue
> comments. https://issues.apache.org/jira/browse/TAP5-469
> 
> Cheers,
> 
> Uli
> 


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



More migration issues, 5.0.18 -> 5.1.0.2

2009-04-08 Thread Blower, Andy
Another day, another couple of stumbling blocks for our applications migration 
to T5.1 - I can't believe this has taken a solid week of effort so far. I'm 
starting to wonder if we jumped the gun on moving to T5.1 so soon? I do seem to 
be having more problems than most people on the list, so maybe it's just me / 
our app or something.

Anyway, the first issue is with our checkbox components that do an Ajax call 
when checked or unchecked. They work fine if Gzip compression is switched off, 
but if it's enabled the Ajax.Request hits the onException block with this error 
message "TypeError: response is null". The server event handler is being called 
correctly and returning the correct JSONObject, but the responseText is empty 
and responseXML, responseJSON, and headerJSON are all null even though the 
status code is 200. My guess that the JSONObject is being compressed and it 
shouldn't be. Should I raise a JIRA for this, or am I mistaken here?

I also have a page that works fine with T5.0.18 but breaks in T5.1.0.2 and I 
have no idea why - curiously, if I have gzip compression I don't see the 
stacktrace in the browser, but I get "Content Encoding Error", "The page you 
are trying to view cannot be shown because it uses an invalid or unsupported 
form of compression." From Firefox.

Here is the stack trace, in case anyone can make any sense of it:

An unexpected application exception has occurred.

 *   java.lang.NullPointerException
*   
org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarkupModel.java:94)
*   org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
*   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
*   org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
*   org.apache.tapestry5.dom.Node.toMarkup(Node.java:80)
*   
org.apache.tapestry5.internal.services.MarkupWriterImpl.toMarkup(MarkupWriterImpl.java:57)
*   
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
*   
$PageResponseRenderer_12085541484.renderPageResponse($PageResponseRenderer_12085541484.java)
*   
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
*   
org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.java:1952)
*   
$PageRenderRequestHandler_12085541485.handle($PageRenderRequestHandler_12085541485.java)
*   
$PageRenderRequestHandler_12085541478.handle($PageRenderRequestHandler_12085541478.java)
*   
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
*   
$ComponentRequestHandler_1208554147e.handlePageRender($ComponentRequestHandler_1208554147e.java)
*   
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
*   $Dispatcher_12085541480.dispatch($Dispatcher_12085541480.java)
*   $Dispatcher_12085541472.dispatch($Dispatcher_12085541472.java)
*   
org.apache.tapestry5.services.TapestryModule$RequestHandler

RE: Index page URL generation

2009-04-07 Thread Blower, Andy
Thanks guys, I missed this bug because I generally look at open issues and this 
was fixed pretty swiftly.

> -Original Message-
> From: Ulrich Stärk [mailto:u...@spielviel.de]
> Sent: 07 April 2009 10:55
> To: Tapestry users
> Subject: Re: Index page URL generation
> 
> I think this has been fixed in 5.1.0.3 with
> https://issues.apache.org/jira/browse/TAP5-610
> 
> Uli
> 
> Am 07.04.2009 11:33 schrieb Blower, Andy:
> > I'm still working through the migration from 5.0.18 to 5.1.0.2 and
> the latest issue I've found is that in 5.0.18 a page link to an index
> page would be optimized to "/" whereas with 5.1 this is not happening.
> So my site's homepage is http://whatever/ and this works, but any link
> generated to the home page is "index" in the HTML and gives a URL of
> http://whatever/index which is not what I want.
> >
> > Has anyone else experienced this when upgrading to 5.1? I've searched
> the list and couldn't find anything, but I can't be the only one
> surely?
> >
> > Thanks,
> >
> > Andy.
> >
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



Index page URL generation

2009-04-07 Thread Blower, Andy
I'm still working through the migration from 5.0.18 to 5.1.0.2 and the latest 
issue I've found is that in 5.0.18 a page link to an index page would be 
optimized to "/" whereas with 5.1 this is not happening. So my site's homepage 
is http://whatever/ and this works, but any link generated to the home page is 
"index" in the HTML and gives a URL of http://whatever/index which is not what 
I want.

Has anyone else experienced this when upgrading to 5.1? I've searched the list 
and couldn't find anything, but I can't be the only one surely?

Thanks,

Andy.


RE: T5.1 URL Rewriting

2009-04-07 Thread Blower, Andy
I just want to post an update to this. When I started to do this work I 
realised that I was not going to duplicate much processing from 
ComponentEventLinkEncoderImpl if I used method advice - so that's what I've 
done. This is much nicer way of doing things and came at a much lower 
efficiency hit than I first thought it would.

The URL rewriting code was helpful as an example of creating a new LinkImpl - I 
would not have noticed so quickly that the optimizer was not necessary for the 
new Link because it will already have done its job.

> -Original Message-
> From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
> Sent: 31 March 2009 17:30
> To: 'Tapestry users'
> Subject: RE: T5.1 URL Rewriting
> 
> If you want to stay away from extending the internals then a decorator
> / advisor of the ComponentEventLinkEncoder service would be the best
> route, as Thiago suggested. You will still have a reference to LinkImpl
> which is an internal implementation since you'll need to create a new
> link. I don't want to duplicate all the processing in
> ComponentEventLinkEncoderImpl so I will extend and change it, but it's
> much better than my 5.0 version because it's all in one place and the
> service interface is public this time.
> 
> > -Original Message-
> > From: xfile80303 [mailto:l...@grokers.net]
> > Sent: 31 March 2009 17:19
> > To: users@tapestry.apache.org
> > Subject: RE: T5.1 URL Rewriting
> >
> >
> >
> >
> > Hey Levi,
> >
> > That's almost identical to what I need for my application. Sorry I
> > missed your post back in Feb, I had a two week holiday mid feb so I
> > wasn't following. You did this the same way as me by creating your
> own
> > PageRenderDispatcher and LinkFactory. My scenario is possibly a
> little
> > more complex because if there's a T5 page at /SITE/page then it uses
> > that, if not and SITE is recognised as a configured site then it's
> > moved to the end of the URL. (becoming the last context param)
> >
> > I'm now migrating to T5.1.0.2 and looking at how I should implement
> > this now. That's why I was looking at URL rewriting to see if it was
> > appropriate for this task in 5.1 - I wasn't looking at the nightly
> docs
> > though. Now I am and I can see what Thiago means but I don't think
> URL
> > rewriting is the right place to do this. I'm leaning towards a custom
> > implementation of ComponentEventLinkEncoder (possibly extending the
> > internal T5.1 impl) since the URL analysis which is going on in here
> is
> > what I need to figure out what (if anything) needs doing to the URL.
> >
> > Are there any other ways of doing this, and is this the best?
> Opinions
> > welcome.
> >
> > Thanks,
> > Andy.
> >
> >
> > Hi Andy,
> >
> > It certainly looks like we have similar ideas to re-solve with
> > 5.1.0.n>1.  ;)
> >
> > I'm in the midst of trying to understand the best approach to this
> > myself, and would like to stay away from extending Tapestry internals
> > or other "hacks" like I did previously so upgrading in the future
> does
> > not break my app, etc. However, it may be that even the most recent
> > code is not capable of being used in a way that can accomplish our
> > goals without resorting to touching the internals.
> >
> > I'll post back what my solution turns out to be.
> >
> > Best of luck,
> >
> > Levi
> > --
> > View this message in context: http://n2.nabble.com/T5.1-URL-
> Rewriting-
> > tp2557652p2563958.html
> > Sent from the Tapestry Users mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: T5.1.0.2 problem with TestableRequestImpl

2009-04-03 Thread Blower, Andy
Thanks Thiago, I managed to get sorted this out already and you're right on the 
money. It was the move of the JS includes and incompatibility with the newer 
version of prototype of one of our 3rd party JS modules. Luckily the inline JS 
we needed before (couldn't use rendersupport, it needed to be defined before 
the JS import) is no longer needed with the latest version of the 3rd party 
module.

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> Sent: 03 April 2009 13:18
> To: Tapestry users
> Subject: Re: T5.1.0.2 problem with TestableRequestImpl
> 
> > although most of our javascript seems to be broken (I'll be looking
> into this issue next)
> 
> I had a similar issue and it was caused by Tapestry now including
> Javascript in the top ( tag) instead of the end of the 
> tag. My Javascript code was referencing some tags by id, but they
> weren't declared yet (Javascript before page body). I solved this by
> RenderSupport to include this code. Maybe we could have an option to
> @IncludeJavascriptLibary to include the script in the bottom.
> 
> --
> Thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: [ANNOUNCE] Tapestry 5.1.0.2

2009-04-03 Thread Blower, Andy
So, is Maven ignoring the sha1 problem or is Ivy miscalculating this one for 
some reason?

Regarding the dependencies, I also have an issue that I'd not spotted before. 
Ivy can't find javassist-3.9.0.GA.jar in the maven2 repositories. I can't find 
it with a browser either. (e.g. 
http://repo1.maven.org/maven2/javassist/javassist/) So, that's breaking my 
build too.


> -Original Message-
> From: Massimo Lusetti [mailto:mluse...@gmail.com]
> Sent: 03 April 2009 10:18
> To: Tapestry users
> Subject: Re: [ANNOUNCE] Tapestry 5.1.0.2
> 
> On Fri, Apr 3, 2009 at 11:05 AM, Blower, Andy
>  wrote:
> 
> > I'm having two issues stopping me with 5.1.0.2, the first I mailed
> the list about a few days ago but I've had no response so far.
> (http://www.nabble.com/T5.1.0.2-problem-with-TestableRequestImpl-
> td22805378.html)
> 
> Yep... i must admit that i too have run into this, also with tests for
> the chenillekit-access module, fortunately I've switched to use
> selenium before,  but you're right, there's an issue with PageTester.
> 
> > What is this stax2 thingy and why does Tapestry 5.1 need it? Does
> anyone using maven get this problem? Is there anything we can do to fix
> this?
> 
> stax2 use new api for XML processing which 5.1 dom processing
> leverage. I don't had any issue i remember and using maven 2.0.9 here
> 
> --
> Massimo
> http://meridio.blogspot.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: T5.1.0.2 problem with TestableRequestImpl

2009-04-03 Thread Blower, Andy
Thanks Massimo, I'll probably file a Jira issue about this then. Weird thing is 
I don't think all my tests that use PageTester are failing. I need to 
investigate it, but so far I've spent a week (@50%) on moving from 5.1.18 to 
5.1.0.2 and I still don't have things working quite right so I don't know how 
much time I'll be able to dedicate to this. 

> -Original Message-
> From: Massimo Lusetti [mailto:mluse...@gmail.com]
> Sent: 03 April 2009 10:27
> To: Tapestry users
> Subject: Re: T5.1.0.2 problem with TestableRequestImpl
> 
> On Tue, Mar 31, 2009 at 3:28 PM, Blower, Andy
>  wrote:
> 
> > I'm in the process of migrating from T5.0.18 to T5.1 and I'm using
> the T5.1.0.2 release currently being voted on. I've fixed all the
> compilation errors and disabled enough of our custom stuff to get pages
> rendering, although most of our javascript seems to be broken (I'll be
> looking into this issue next), but I have a lot of unit tests failing.
> Basically all of the tests using org.apache.tapestry5.test.PageTester
> to do a test render are failing with the stacktrace appended to the
> bottom of this email. This appears to be caused by the new method
> that's been added to the Request interface but not implemented in
> TestableRequestImpl. (well technically it is, but all it does is throw
> a RuntimeException)
> >
> > So, has anyone else encountered this issue? Why aren't any of the
> Tapestry tests affected? What's the best way to fix this?
> 
> I too encountered this problem but i neglected to write about it cause
> i was already migrating to using Selenium based tests but i should
> have.
> 
> If anyone would look there are example in the chenillekit-access
> module which should fire the problem.
> 
> --
> Massimo
> http://meridio.blogspot.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: [ANNOUNCE] Tapestry 5.1.0.2

2009-04-03 Thread Blower, Andy
I'm having two issues stopping me with 5.1.0.2, the first I mailed the list 
about a few days ago but I've had no response so far. 
(http://www.nabble.com/T5.1.0.2-problem-with-TestableRequestImpl-td22805378.html)

The second issue I've not raised before because we always have problems with 
the T5 rsync repository, Ivy doesn't resolve dependencies from there so I 
always have to manually install dependencies locally until a release is pushed 
to the public maven repositories. When I was doing this I had a problem with 
the stax2 dependency finding an invalid sha1 checksum, unfortunately I'm still 
getting this now that T5.1.0.2 is being resolved and retrieved by Ivy.

[ivy:install]   public: downloading 
http://repo1.maven.org/maven2/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar.sha1
[ivy:install] .. (0kB)
[ivy:install] WARN: [FAILED ] 
org.codehaus.woodstox#stax2-api;3.0.1!stax2-api.jar: invalid sha1: 
expected=88985bfab2394cf8e56fcbd97cd44f7cac7bf8ca 
computed=12393455d7d25eab09bb9b2043b6df13406ec70d (3261ms)

What is this stax2 thingy and why does Tapestry 5.1 need it? Does anyone using 
maven get this problem? Is there anything we can do to fix this?

Thanks,

Andy

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 03 April 2009 00:42
> To: Tapestry users
> Subject: [ANNOUNCE] Tapestry 5.1.0.2
> 
> The latest alpha release of Tapestry 5.1, Tapestry 5.1.0.2, is now
> available for download and via Maven.
> 
> Please download it and give it a try; we're especially interested in
> any problems related to the upgrade from 5.0.18 to 5.1.0.2.
> 
> Big features added in 5.1.0.2 include automatic combining of
> JavaScript files, a new client-side JavaScript console based on
> Blackbird, and the ability to have a single Ajax response update
> multiple client-side Zones.
> 
> We are now stabilizing Tapestry 5.1 for a beta release and, if all
> goes according to plan, a short period until a stable 5.1 release.
> 
> --
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: T5.1 URL Rewriting

2009-03-31 Thread Blower, Andy
If you want to stay away from extending the internals then a decorator / 
advisor of the ComponentEventLinkEncoder service would be the best route, as 
Thiago suggested. You will still have a reference to LinkImpl which is an 
internal implementation since you'll need to create a new link. I don't want to 
duplicate all the processing in ComponentEventLinkEncoderImpl so I will extend 
and change it, but it's much better than my 5.0 version because it's all in one 
place and the service interface is public this time.

> -Original Message-
> From: xfile80303 [mailto:l...@grokers.net]
> Sent: 31 March 2009 17:19
> To: users@tapestry.apache.org
> Subject: RE: T5.1 URL Rewriting
> 
> 
> 
> 
> Hey Levi,
> 
> That's almost identical to what I need for my application. Sorry I
> missed your post back in Feb, I had a two week holiday mid feb so I
> wasn't following. You did this the same way as me by creating your own
> PageRenderDispatcher and LinkFactory. My scenario is possibly a little
> more complex because if there's a T5 page at /SITE/page then it uses
> that, if not and SITE is recognised as a configured site then it's
> moved to the end of the URL. (becoming the last context param)
> 
> I'm now migrating to T5.1.0.2 and looking at how I should implement
> this now. That's why I was looking at URL rewriting to see if it was
> appropriate for this task in 5.1 - I wasn't looking at the nightly docs
> though. Now I am and I can see what Thiago means but I don't think URL
> rewriting is the right place to do this. I'm leaning towards a custom
> implementation of ComponentEventLinkEncoder (possibly extending the
> internal T5.1 impl) since the URL analysis which is going on in here is
> what I need to figure out what (if anything) needs doing to the URL.
> 
> Are there any other ways of doing this, and is this the best? Opinions
> welcome.
> 
> Thanks,
> Andy.
> 
> 
> Hi Andy,
> 
> It certainly looks like we have similar ideas to re-solve with
> 5.1.0.n>1.  ;)
> 
> I'm in the midst of trying to understand the best approach to this
> myself, and would like to stay away from extending Tapestry internals
> or other "hacks" like I did previously so upgrading in the future does
> not break my app, etc. However, it may be that even the most recent
> code is not capable of being used in a way that can accomplish our
> goals without resorting to touching the internals.
> 
> I'll post back what my solution turns out to be.
> 
> Best of luck,
> 
> Levi
> --
> View this message in context: http://n2.nabble.com/T5.1-URL-Rewriting-
> tp2557652p2563958.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



T5.1.0.2 problem with TestableRequestImpl

2009-03-31 Thread Blower, Andy
I'm in the process of migrating from T5.0.18 to T5.1 and I'm using the T5.1.0.2 
release currently being voted on. I've fixed all the compilation errors and 
disabled enough of our custom stuff to get pages rendering, although most of 
our javascript seems to be broken (I'll be looking into this issue next), but I 
have a lot of unit tests failing. Basically all of the tests using 
org.apache.tapestry5.test.PageTester to do a test render are failing with the 
stacktrace appended to the bottom of this email. This appears to be caused by 
the new method that's been added to the Request interface but not implemented 
in TestableRequestImpl. (well technically it is, but all it does is throw a 
RuntimeException)

So, has anyone else encountered this issue? Why aren't any of the Tapestry 
tests affected? What's the best way to fix this?

Thanks,

Andy.


Full stacktrace example:

org.apache.tapestry5.internal.services.RenderQueueException: Render queue error 
in BeginRender[core/ExceptionReport:renderobject]: Request: method 
getServerName() not yet implemented by TestableRequestImpl. [at 
classpath:org/apache/tapestry5/corelib/pages/ExceptionReport.tml, line 24]
at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:86)
at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at 
$PageRenderQueue_1205c423f94.render($PageRenderQueue_1205c423f94.java)
at 
$PageRenderQueue_1205c423f93.render($PageRenderQueue_1205c423f93.java)
at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at 
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1752)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1733)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1715)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1701)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1682)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1663)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
org.apache.tapestry5.internal.test.CaptureRenderedDocument.renderMarkup(CaptureRenderedDocument.java:39)
at 
$MarkupRenderer_1205c423f98.renderMarkup($MarkupRenderer_1205c423f98.java)
at 
$MarkupRenderer_1205c423f92.renderMarkup($MarkupRenderer_1205c423f92.java)
at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
at 
$PageMarkupRenderer_1205c423f8e.renderPageMarkup($PageMarkupRenderer_1205c423f8e.java)
at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61)
at 
$PageResponseRenderer_1205c423f33.renderPageResponse($PageResponseRenderer_1205c423f33.java)
at 
org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:77)
at 
$RequestExceptionHandler_1205c423f27.handleRequestException($RequestExceptionHandler_1205c423f27.java)
at 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
at 
$RequestHandler_1205c423f2a.service($RequestHandler_1205c423f2a.java)
at 
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:782)
at 
$RequestHandler_1205c423f2a.service($RequestHandler_1205c423f2a.java)
at 
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:771)
at 
$RequestHandler_1205c423f2a.service($RequestHandler_1205c423f2a.java)
at 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
at 
$RequestHandler_1205c423f2a.service($RequestHandler_1205c423f2a.java)
at 
org.apache.tapestry5.internal.test.EndOfRequestCleanupFilter.service(EndOfRequestCleanupFilter.java:42)
at 
$RequestHandler_1205c423f2a.service($RequestHandler_1205c423f2a.java)

RE: T5.1 URL Rewriting

2009-03-31 Thread Blower, Andy
> > I'm leaning towards a custom implementation of
> > ComponentEventLinkEncoder (possibly extending the internal T5.1 impl)
> since the URL analysis which is going on in here is what I need to
> figure out what (if
> > anything) needs doing to the URL.
> 
> As Fernando Padilla would point out and I would agree 100% :),
> decorating services is almost always a good option. In this specific
> case, you would need to change the Link instances returned by
> ComponentEventLink methods, something that the URL rewriting support
> already does.

I can see how that would work, but as I said I'd be repeating a fair bit of the 
URL analysis that the ComponentEventLinkEncoder is already doing which is why 
I'm not planning to decorate, advise or rewrite for my use case. Thanks for the 
help anyway Thiago.


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



RE: T5.1 URL Rewriting

2009-03-31 Thread Blower, Andy
Hey Levi,

That's almost identical to what I need for my application. Sorry I missed your 
post back in Feb, I had a two week holiday mid feb so I wasn't following. You 
did this the same way as me by creating your own PageRenderDispatcher and 
LinkFactory. My scenario is possibly a little more complex because if there's a 
T5 page at /SITE/page then it uses that, if not and SITE is recognised as a 
configured site then it's moved to the end of the URL. (becoming the last 
context param)

I'm now migrating to T5.1.0.2 and looking at how I should implement this now. 
That's why I was looking at URL rewriting to see if it was appropriate for this 
task in 5.1 - I wasn't looking at the nightly docs though. Now I am and I can 
see what Thiago means but I don't think URL rewriting is the right place to do 
this. I'm leaning towards a custom implementation of ComponentEventLinkEncoder 
(possibly extending the internal T5.1 impl) since the URL analysis which is 
going on in here is what I need to figure out what (if anything) needs doing to 
the URL.

Are there any other ways of doing this, and is this the best? Opinions welcome.

Thanks,
Andy.

> -Original Message-
> From: xfile80303 [mailto:l...@grokers.net]
> Sent: 30 March 2009 23:28
> To: users@tapestry.apache.org
> Subject: Re: T5.1 URL Rewriting
> 
> Perhaps a better example is needed...
> 
> I want to insert the notion of "site" into the URL and application,
> such that I can use the same pages to render content, but these pages
> can have access to what "site" they are currently rendering and change
> behavior, look and feel, whatever.  The site parameter would need to be
> available for all pages, not just a page context parameter, so the
> application url looks something like:
> 
> http://myhost.com/SITE/page/params
> 
> Where the only difference from normal Tapestry URL is the insertion of
> the SITE before the rest of the URI, such that SITE could be anything
> (like, "partner", "foo", or "main" etc.).
> 
> So the URL Rewriting implementation does not seem to be quite a match
> since if I insert anything for SITE, as mentioned, it breaks Tapestry's
> ability to properly deal with the request for pages and page content,
> etc.  The SITE parameter needs to be "virtual" and yet still generated
> for page links.
> 
> Not to cloud the issue, but for reference:
> 
> http://n2.nabble.com/-T5--Struggling-With-Concepts-tt2324920.html
> http://n2.nabble.com/-T5--URL-Manipulation-tt2276010.html
> 
> Since those posts I was able to create a dispatcher which replaced the
> PageRender dispatcher and a LinkFactory which overrides the
> createPageRenderLink functionality to insert the "site" parameter into
> the generated URLs.
> 
> Since 5.1.0.0 there seems to have been a lot of work in this space
> (which is great!) and I was hoping to avoid overriding internal
> functionality in order to accomplish what I needed (and allow for a
> simpler upgrade path in the future).
> 
> Thanks,
> 
> Levi
> 
> 


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



T5.1 URL Rewriting

2009-03-30 Thread Blower, Andy
This is largely a question for Thiago, but feel free to chime in if you can 
help...

The URL Rewriting feature in T5.1 was added for TAP5-577 and in the comments 
Thiago said "Each rule will be applied, but each one can decide to really 
rewrite the URL/link or not. If you take a look at the tests 
(app5.services.AppModule), you see rules that only apply to incoming URL 
requests and ignore the others and rules that only apply only for generated 
links. And there is even one rule that applies to a single URL."

I've just been looking at the tests and I can't see any rules that will apply 
only to generated or incoming links. What am I missing? Can anyone clue me in?


RE: T5: onActivate called twice

2009-03-25 Thread Blower, Andy
Taken from http://tapestry.apache.org/tapestry5.1/guide/event.html and should 
answer your question I think.


Multiple Method Matches

In some cases, you may have multiple event methods match a single event.

The order is as follows:

* Base class methods before sub-class methods.
* Matching methods within a class in alphabetical order.
* For a single method name with multiple overrides, by number of 
parameters, descending.

There's only rare cases where it makes sense for more than one method to handle 
an event.

When a sub-class overrides an event handler method of a base class, the event 
handler method is only invoked once, along with any other base class methods. 
The subclass can change the implementation of the base class method via an 
override, but can't change the timing of when that method is invoked. See 
TAPESTRY-2311.


> -Original Message-
> From: Peter Kanze [mailto:peterka...@gmail.com]
> Sent: 25 March 2009 11:11
> To: Tapestry users
> Subject: T5: onActivate called twice
> 
> Hello
> I have a pagelink that point to this /products/computer/5
> 
> In my Products.java I have two onActivate methods. See below.
> When I click the pageLink I can see that both onActivate are called.
> Because this is printed to the output console:
> 
> onActivate(String categoryName, int pageNr)
> onActivate: (String categoryName)
> 
> Can somebody explain this?
> I would expect only public void onActivate(String categoryName, int
> pageNr)
> to be called, because the context has 2 parameters.
> 
> greetz,
> Peter
> 
> 
> public void onActivate(String categoryName) {
> System.out.println("onActivate: (String categoryName)");
> }
> public void onActivate(String categoryName, int pageNr) {
> System.out.println("onActivate(String categoryName, int pageNr)");
> }


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



RE: Executing javascript on ajax call return

2009-03-24 Thread Blower, Andy
Fantastic, might be worth removing the line "Currently, the partial page 
content that is rendered may not use an Environmental services. This is 
expected to change soon." from 
http://tapestry.apache.org/tapestry5.1/guide/ajax.html then.

> -Original Message-
> From: Hugo Palma [mailto:hugo.m.pa...@gmail.com]
> Sent: 24 March 2009 18:23
> To: Tapestry users
> Subject: Re: Executing javascript on ajax call return
> 
> I've just tried using renderSupport on a partial page render and it
> worked
> great. I'm using 5.1.0.2-SNASHOT.
> 
> On Tue, Mar 24, 2009 at 4:14 PM, Blower, Andy
> wrote:
> 
> > Unfortunately this doesn't work because Environmental stuff is not
> > available when doing partial page renders - well for 5.0.18 at least,
> maybe
> > it works with 5.1.0.1? This is the perfect mechanism for doing this
> though.
> > I'll be trying 5.1 later this week so I'll try it again then.
> >
> > Thanks.
> >
> > > -Original Message-
> > > From: Fernando Padilla [mailto:f...@alum.mit.edu]
> > > Sent: 24 March 2009 15:35
> > > To: Tapestry users
> > > Subject: Re: Executing javascript on ajax call return
> > >
> > > This already works.. when you do RenderSupport.addScript(), while
> > > rendering a zone/block, it will be executed when that zone is put
> into
> > > the page.  But I can't remember what version of tapestry this got
> > > turned
> > > on..
> > >
> > > Blower, Andy wrote:
> > > > I would like to be able to add javascript to the 'script' key
> section
> > > that is returned as a partial page render. Client side events are
> okay,
> > > but being able to return some JS that runs is more flexible. It's
> also
> > > partially there already and just needs exposing I think.
> > > >
> > > > At present we've resorted to returning some inline JS in the
> markup
> > > returned. Nasty, but it works. I assume we've not missed a better
> way
> > > of doing this?
> > > >
> > > >> -Original Message-
> > > >> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> > > >> Sent: 24 March 2009 00:54
> > > >> To: Tapestry users
> > > >> Subject: Re: Executing javascript on ajax call return
> > > >>
> > > >> I've been thinking for a while that there needs to be more
> client-
> > > side
> > > >> events, so that the zone element could ire
> "tapestry:zone:fetched",
> > > >> "tapestry:zone:show", etc.
> > > >>
> > > >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo
> > > >>  wrote:
> > > >>> Is therea JIRA for that so I can vote on it?
> > > >>>
> > > >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla
> > > >> 
> > > >>> escreveu:
> > > >>>
> > > >>>> Nope, there is no way to do javascript callbacks after a zone
> is
> > > >> updated.
> > > >>>>  Zones right now are missing lifecycle callbacks, that you can
> > > hook
> > > >> into.
> > > >>>>  They do have the show/update callbacks that the Effects hook
> > > into,
> > > >> but it
> > > >>>> could/should/hopefully will be expanded, eventually.. :)
> > > >>>>
> > > >>>> things like:
> > > >>>>
> > > >>>> preFetch
> > > >>>> preShow
> > > >>>> preUpdate
> > > >>>> postUpdate
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>> But if you wanted to hack up your own, then start looking at
> > > >> tapestry.js:
> > > >>>> Tapestry.ZoneManager
> > > >>>> Tapestry.Initializer.zone
> > > >>>> Tapestry.Initializer.linkZone
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>> Thiago H. de Paula Figueiredo wrote:
> > > >>>>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma
> > > >> 
> > > >>>>> escreveu:
> > > >>>>>
> > > >>>>>> Is 

RE: Executing javascript on ajax call return

2009-03-24 Thread Blower, Andy
Unfortunately this doesn't work because Environmental stuff is not available 
when doing partial page renders - well for 5.0.18 at least, maybe it works with 
5.1.0.1? This is the perfect mechanism for doing this though. I'll be trying 
5.1 later this week so I'll try it again then.

Thanks.

> -Original Message-
> From: Fernando Padilla [mailto:f...@alum.mit.edu]
> Sent: 24 March 2009 15:35
> To: Tapestry users
> Subject: Re: Executing javascript on ajax call return
> 
> This already works.. when you do RenderSupport.addScript(), while
> rendering a zone/block, it will be executed when that zone is put into
> the page.  But I can't remember what version of tapestry this got
> turned
> on..
> 
> Blower, Andy wrote:
> > I would like to be able to add javascript to the 'script' key section
> that is returned as a partial page render. Client side events are okay,
> but being able to return some JS that runs is more flexible. It's also
> partially there already and just needs exposing I think.
> >
> > At present we've resorted to returning some inline JS in the markup
> returned. Nasty, but it works. I assume we've not missed a better way
> of doing this?
> >
> >> -Original Message-
> >> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> >> Sent: 24 March 2009 00:54
> >> To: Tapestry users
> >> Subject: Re: Executing javascript on ajax call return
> >>
> >> I've been thinking for a while that there needs to be more client-
> side
> >> events, so that the zone element could ire "tapestry:zone:fetched",
> >> "tapestry:zone:show", etc.
> >>
> >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo
> >>  wrote:
> >>> Is therea JIRA for that so I can vote on it?
> >>>
> >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla
> >> 
> >>> escreveu:
> >>>
> >>>> Nope, there is no way to do javascript callbacks after a zone is
> >> updated.
> >>>>  Zones right now are missing lifecycle callbacks, that you can
> hook
> >> into.
> >>>>  They do have the show/update callbacks that the Effects hook
> into,
> >> but it
> >>>> could/should/hopefully will be expanded, eventually.. :)
> >>>>
> >>>> things like:
> >>>>
> >>>> preFetch
> >>>> preShow
> >>>> preUpdate
> >>>> postUpdate
> >>>>
> >>>>
> >>>>
> >>>> But if you wanted to hack up your own, then start looking at
> >> tapestry.js:
> >>>> Tapestry.ZoneManager
> >>>> Tapestry.Initializer.zone
> >>>> Tapestry.Initializer.linkZone
> >>>>
> >>>>
> >>>>
> >>>> Thiago H. de Paula Figueiredo wrote:
> >>>>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma
> >> 
> >>>>> escreveu:
> >>>>>
> >>>>>> Is there a way to execute some javascript right after a zone
> >> update is
> >>>>>> performed ?  I can't seem to find a place where i can register
> to
> >> listen
> >>>>>> for an ajax call return.
> >>>>>  Well, Prototype has a global way to provide these callbacks:
> >>>>> http://www.prototypejs.org/api/ajax/options. If you have more
> than
> >> one zone
> >>>>> in a single page, I don't know how you would do that.
> >>>>>
> >>>> --
> --
> >> -
> >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>>
> >>>
> >>>
> >>> --
> >>> Thiago H. de Paula Figueiredo
> >>> Independent Java consultant, developer, and instructor
> >>> Consultor, desenvolvedor e instrutor em Java
> >>> http://www.arsmachina.com.br/thiago
> >>>
> >>> ---
> --
> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Howard M. Lewis Ship
> >>
> >> Creator Apache Tapestry and Apache HiveMind
> >>
> >> 
> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: Executing javascript on ajax call return

2009-03-24 Thread Blower, Andy
I would like to be able to add javascript to the 'script' key section that is 
returned as a partial page render. Client side events are okay, but being able 
to return some JS that runs is more flexible. It's also partially there already 
and just needs exposing I think.

At present we've resorted to returning some inline JS in the markup returned. 
Nasty, but it works. I assume we've not missed a better way of doing this?

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 24 March 2009 00:54
> To: Tapestry users
> Subject: Re: Executing javascript on ajax call return
> 
> I've been thinking for a while that there needs to be more client-side
> events, so that the zone element could ire "tapestry:zone:fetched",
> "tapestry:zone:show", etc.
> 
> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo
>  wrote:
> > Is therea JIRA for that so I can vote on it?
> >
> > Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla
> 
> > escreveu:
> >
> >> Nope, there is no way to do javascript callbacks after a zone is
> updated.
> >>  Zones right now are missing lifecycle callbacks, that you can hook
> into.
> >>  They do have the show/update callbacks that the Effects hook into,
> but it
> >> could/should/hopefully will be expanded, eventually.. :)
> >>
> >> things like:
> >>
> >> preFetch
> >> preShow
> >> preUpdate
> >> postUpdate
> >>
> >>
> >>
> >> But if you wanted to hack up your own, then start looking at
> tapestry.js:
> >>
> >> Tapestry.ZoneManager
> >> Tapestry.Initializer.zone
> >> Tapestry.Initializer.linkZone
> >>
> >>
> >>
> >> Thiago H. de Paula Figueiredo wrote:
> >>>
> >>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma
> 
> >>> escreveu:
> >>>
>  Is there a way to execute some javascript right after a zone
> update is
>  performed ?  I can't seem to find a place where i can register to
> listen
>  for an ajax call return.
> >>>
> >>>  Well, Prototype has a global way to provide these callbacks:
> >>> http://www.prototypejs.org/api/ajax/options. If you have more than
> one zone
> >>> in a single page, I don't know how you would do that.
> >>>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >
> >
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java consultant, developer, and instructor
> > Consultor, desenvolvedor e instrutor em Java
> > http://www.arsmachina.com.br/thiago
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
> 
> 
> 
> --
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: t5: profiling tool for t5 app?

2009-03-23 Thread Blower, Andy
I've always been very happy with jProfiler for Java profiling. Not used it with 
T5 yet though - I will do at some point.

> -Original Message-
> From: Angelo Chen [mailto:angelochen...@yahoo.com.hk]
> Sent: 21 March 2009 01:44
> To: users@tapestry.apache.org
> Subject: t5: profiling tool for t5 app?
> 
> 
> Hi,
> 
> I need to track some heap issues, what is a good tool that you can
> recommend
> for T5 application? Thanks.
> standalone or IDEA plug in
> 
> Angelo
> --
> View this message in context: http://www.nabble.com/t5%3A-profiling-
> tool-for-t5-app--tp22631853p22631853.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



RE: Localization in Services

2009-02-06 Thread Blower, Andy
Not sure how generally useful that would be, but it would solve the problem in 
an easy way.

Thinking some more about this, would it not be easier to simply pass the 
messages from the page/component event handler method into the service method 
that's called to send the email?

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 06 February 2009 21:26
> To: Tapestry users
> Subject: Re: Localization in Services
> 
> Which Messages resource would it inject?
> 
> I suppose we could add the application's Messages object as an
> injectable value.
> 
> On Fri, Feb 6, 2009 at 1:04 PM, Blower, Andy
>  wrote:
> > I thought that it might be possible to use constructor injection to
> inject the Messages resource just like you can with Logger. I take it
> that this is not possible to provide in T5 because of
> lifecycle/reloading issues then Howard?
> >
> >> -Original Message-
> >> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> >> Sent: 06 February 2009 17:03
> >> To: Tapestry users
> >> Subject: Re: Localization in Services
> >>
> >> I would go a different route.
> >>
> >> Using the ComponentSource service, you can get any page in the
> >> application as a Component instance.
> >>
> >> From that you can get the ComponentResources and from that, the
> >> Messages object.
> >>
> >> Just be aware of the lifecycle: once you boost a Messages instance
> out
> >> of the component layer and into the services tier, you are moving it
> >> out of Tapestry's ability to reload ... in other words, acquire the
> >> Messages and use it briefly, but don't retain it for longer than a
> >> single request.
> >>
> >> On Fri, Feb 6, 2009 at 7:24 AM, Nicolas Charles
> 
> >> wrote:
> >> > Thanks for the tip Roberto, but I didn't succeed into adding the
> >> > app.properties (or just i can't get the key, i don't know)
> >> > And it feels strange to use the ValidationMessage for a standart
> >> message
> >> >
> >> > Nick
> >> >
> >> > Tapestry Infodea wrote:
> >> >>
> >> >> I've forgetten a piece of code, you must contribute the
> >> >> ValidationMessagesSource in your AppModule:
> >> >>
> >> >> public void
> >> >> contributeValidationMessagesSource(OrderedConfiguration
> >> >> configuration) {
> >> >> configuration.add("myprop", "it/infodea/app/internal/myprop");
> >> >>}
> >> >>
> >> >> and define myprop.properties in it/infodea/app/internal/
> >> >>
> >> >> Tapestry Infodea ha scritto:
> >> >>>
> >> >>> You can use the ValidationMessagesSource and ThreadLocale
> services:
> >> >>>
> >> >>> ValidationMessagesSource validationMessagesSource;
> >> >>>
> >> >>> ThreadLocale threadLocale;
> >> >>>
> >> >>> Messages messages =
> >> >>>
> >>
> validationMessagesSource.getValidationMessages(threadLocale.getLocale()
> >> );
> >> >>>
> >> >>> Roberto.
> >> >>>
> >> >>>
> >> >>> Nicolas Charles ha scritto:
> >> >>>>
> >> >>>> Hello there,
> >> >>>>
> >> >>>> I'm currently struggling with a proper way to use localization
> in
> >> a
> >> >>>> service. My need is fairly simple : i'm using t5-restful-
> >> webservices from
> >> >>>> Bill Holloway (by the way great job Bill) to offer REST
> services.
> >> >>>> One of my service sends an email. The email is localized. Using
> >> the
> >> >>>> Asset for the body of the mail works great for its
> localization.
> >> >>>> However the mail's subject is stored in the app.properties...
> >> >>>>
> >> >>>> I cannot use the @Inject Messages to retrieve the oh-so-
> convenient
> >> >>>> Messages service ( Service id 'Messages' is not defined by any
> >> module. )
> >> >>>>
> >> >>>> Thus my question is :
> >> >>>> - How can i access to the app.properties from a given service ?
> >> >>>&g

RE: Localization in Services

2009-02-06 Thread Blower, Andy
I thought that it might be possible to use constructor injection to inject the 
Messages resource just like you can with Logger. I take it that this is not 
possible to provide in T5 because of lifecycle/reloading issues then Howard?

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 06 February 2009 17:03
> To: Tapestry users
> Subject: Re: Localization in Services
> 
> I would go a different route.
> 
> Using the ComponentSource service, you can get any page in the
> application as a Component instance.
> 
> From that you can get the ComponentResources and from that, the
> Messages object.
> 
> Just be aware of the lifecycle: once you boost a Messages instance out
> of the component layer and into the services tier, you are moving it
> out of Tapestry's ability to reload ... in other words, acquire the
> Messages and use it briefly, but don't retain it for longer than a
> single request.
> 
> On Fri, Feb 6, 2009 at 7:24 AM, Nicolas Charles 
> wrote:
> > Thanks for the tip Roberto, but I didn't succeed into adding the
> > app.properties (or just i can't get the key, i don't know)
> > And it feels strange to use the ValidationMessage for a standart
> message
> >
> > Nick
> >
> > Tapestry Infodea wrote:
> >>
> >> I've forgetten a piece of code, you must contribute the
> >> ValidationMessagesSource in your AppModule:
> >>
> >> public void
> >> contributeValidationMessagesSource(OrderedConfiguration
> >> configuration) {
> >> configuration.add("myprop", "it/infodea/app/internal/myprop");
> >>}
> >>
> >> and define myprop.properties in it/infodea/app/internal/
> >>
> >> Tapestry Infodea ha scritto:
> >>>
> >>> You can use the ValidationMessagesSource and ThreadLocale services:
> >>>
> >>> ValidationMessagesSource validationMessagesSource;
> >>>
> >>> ThreadLocale threadLocale;
> >>>
> >>> Messages messages =
> >>>
> validationMessagesSource.getValidationMessages(threadLocale.getLocale()
> );
> >>>
> >>> Roberto.
> >>>
> >>>
> >>> Nicolas Charles ha scritto:
> 
>  Hello there,
> 
>  I'm currently struggling with a proper way to use localization in
> a
>  service. My need is fairly simple : i'm using t5-restful-
> webservices from
>  Bill Holloway (by the way great job Bill) to offer REST services.
>  One of my service sends an email. The email is localized. Using
> the
>  Asset for the body of the mail works great for its localization.
>  However the mail's subject is stored in the app.properties...
> 
>  I cannot use the @Inject Messages to retrieve the oh-so-convenient
>  Messages service ( Service id 'Messages' is not defined by any
> module. )
> 
>  Thus my question is :
>  - How can i access to the app.properties from a given service ?
> 
>  The best of the best would be to have a possibility to use
> Messages, but
>  i'm open to any other solution
> 
>  Regards,
>  Nick
> 
>  --
> ---
>  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>  For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> >>>
> >>>
> >>> ---
> --
> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>
> >>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >>
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
> 
> 
> 
> --
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



RE: Problem wiring up two components on a page

2009-02-06 Thread Blower, Andy
Thanks for the suggestion Thiago, but it doesn't help unfortunately.

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> Sent: 06 February 2009 12:42
> To: Tapestry users
> Subject: Re: Problem wiring up two components on a page
> 
> On Fri, Feb 6, 2009 at 10:05 AM, Blower, Andy
>  wrote:
> > @Parameter(required=true, defaultPrefix=BindingConstants.COMPONENT)
> 
> Try the principal attribute of @Parameter. Maybe it is the solution
> for your problem:
> @Parameter(required=true, principal = true,
> defaultPrefix=BindingConstants.COMPONENT)
> 
> --
> Thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Problem wiring up two components on a page

2009-02-06 Thread Blower, Andy
I've just run across a problem and I'm stumped, so I really hope someone can 
shed some light on this for me.

I have a page with a paged list component on it, elsewhere on the page I have 
another component which contains a select box and a 'go' button to change the 
number of things displayed on the page. The paged list component is passed into 
this per page selector component as a parameter so it can simply update using a 
setter method since the parameters are all bound together. The components are 
shared across multiple pages and this is working fine.

Now, the per page selector component is going in an area along with another 
component, and this should become a new component. Unfortunately when I try to 
nest my per page selector component in another component like this I get this 
error:

Failure writing parameter 'value' of component 
Results:displayoptionsbar.selectperpageresults.itemsperpage: Failure reading 
parameter 'for' of component Results:displayoptionsbar.selectperpageresults: 
Component Results:displayoptionsbar does not contain an embedded component with 
id 'pagedList'. Available components: selectperpageresults.


Now I can see that I could bubble up an event to the page and have the logic in 
there to set the value into the paged list component explicitly instead of 
relying on the setting of the per page parameter and that being bound back up 
to the page and down to the paged list component, but this would break the 
encapsulation of my per page selector component and duplicate the code on every 
page so I don't want to do that. The problem seems to be passing the paged list 
component reference down two levels so I have access to it... the middle level 
doesn't have the component in the template or in the Java class so it throws 
and error. How should I be doing this?

The parameters of the middle component holding the per page selector component 
look like this:

@Parameter(required=true, defaultPrefix=BindingConstants.COMPONENT)
@Property @SuppressWarnings("unused")
private PagedBase pagedList;

@Parameter
@Property @SuppressWarnings("unused")
private int itemsPerPage;


Hope someone can help me before I go on holiday in five hours? Asking a lot I 
know. ;-)

Thanks,

Andy.


RE: T5: Problem with a loop in a form

2009-01-30 Thread Blower, Andy
I certainly could do it that way, but I expect there to be some markup go in 
around these elements so it's much easier for our UI design people to add it 
into the tml than have to ask us to change the Java.

As I said it's not a problem I can't get around, but it doesn't seem right to 
me so either I've misunderstood T5 or there's a small bug here.

Thanks.

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> Sent: 29 January 2009 19:20
> To: Tapestry users
> Subject: Re: T5: Problem with a loop in a form
> 
> I don't have an answer for your question, but you are using a Loop to
> build a String. Wouldn't a method in your a page or component be a
> better
> suit?
> 
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



RE: T5: Problem with a loop in a form

2009-01-29 Thread Blower, Andy
No idea why that template code got mangled, here's another try. (grumble...MS 
outlook...grumble)


I have a loop in a form like this:



${message:additionalLimits}

; 
${fieldLimiterName} ${fieldLimiterValues}



 
> Which is just to display a label for a checkbox correctly, this loop
> doesn't contain any form elements so it shouldn't affect the form
> submission at all. However when the form is submitted, I get this
> error:
> 
> Failure writing parameter 'index' of component
> Results:basicsearchbox.loop: Component Results:basicsearchbox is not
> rendering, so render variable 'index' may not be updated.
> 
> This is easily fixed by using an index property in the java class, but
> I don't see why I can't use a render variable because this loop should
> be ignored by the form processing - Howard do you disagree or is this a
> bug?
> 
> Thanks,
> 
> Andy.


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



RE: [DISCUSS] Should the quickstart archetype include tapestry-hibernate?

2009-01-26 Thread Blower, Andy
I would say not to, create another quickstart if you feel there's an audience. 
I know that at the stage I found the QS Archetype useful, having to remove 
Hibernate would not have been a welcome or easy task.

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 23 January 2009 00:32
> To: Tapestry users
> Subject: [DISCUSS] Should the quickstart archetype include tapestry-
> hibernate?
> 
> The title says it all.  It would be very easy to include
> tapestry-hibernate as a dependency, and a minimal hibernate.cfg.xml
> file as well.  Thoughts?
> 
> --
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



RE: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Blower, Andy
I think the new URL encoding scheme should have some characters added to the 
safe list, including @.

According to the BNF for URLs (http://www.w3.org/Addressing/URL/url-spec.html), 
the following characters are perfectly valid for URLs:

$...@.&+-!*"'(),

-_. are already in the safe list, and I'm proposing that the others from the 
list above are all added as well. (except $ of course)

The main reason for this is Tapestry's new encoding scheme makes some of my 
application's URL's incredibly ugly with its $00xx replacements everywhere.

What do you all think?

Andy

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
> Sent: 10 December 2008 23:28
> To: Tapestry users
> Subject: Re: [T5] 5.0.17 URLEncoderImpl.decode error
>
> Em Wed, 10 Dec 2008 19:19:44 -0300, Leon Derks 
> escreveu:
>
> > Hello
>
> Hi!
>
> > I do get an java.lang.IllegalArgumentException
> > It says: "Input string 'u...@company.com' is not valid; the character
> > '@' at position 5 is not valid."
> > I didn't had this problem in tapestry 5.0.14.
> > I searched in the changes, but couldn't find a change that would
> cause
> > this error.
>
> That's here: https://issues.apache.org/jira/browse/TAP5-302. Look at
> the
> last comment. The default URL encoding used by Tapestry was changed in
> 5.0.16.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


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



RE: IoC registry survives between JUnit tests?

2008-12-05 Thread Blower, Andy
It's all in the subversion repository.

http://tapestry.apache.org/tapestry5/source-repository.html


> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> Sent: 05 December 2008 16:09
> To: Tapestry users
> Subject: Re: IoC registry survives between JUnit tests?
>
> Hi Howard
>
> I use easymock and JUnit to test IoC services, would love to see some
> of your test code to steal some of your ideas :o) is any of it
> available ?
>
> Peter
>
> - Original Message -
> From: "Christian Edward Gruber" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Friday, 5 December, 2008 8:53:22 AM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: IoC registry survives between JUnit tests?
>
> Ah.  Got it.
>
> Christian.
>
> On 4-Dec-08, at 21:41 , Howard Lewis Ship wrote:
>
> > My point was that it was possible the IoC was being re-initialized on
> > each test and it wasn't noticeable because its very fast.
> >
> > On Thu, Dec 4, 2008 at 12:39 PM, Christian Edward Gruber
> > <[EMAIL PROTECTED]> wrote:
> >> Oh, not a critique of startup or shutdown performance on T5-ioc,
> >> but more of
> >> a general principle of unit testing components that participate in
> >> any IoC
> >> container.  To test the component, you shouldn't need to use the
> >> container,
> >> because it's a "unit" test.  But he said he was testing the wiring
> >> between
> >> components anyway, rather than the functionality of the units, so
> >> my comment
> >> isn't as relevant.
> >>
> >> Christian.
> >>
> >> On 4-Dec-08, at 15:23 , Howard Lewis Ship wrote:
> >>
> >>> I use a mix of techniques, using a lot of mocks for true unit
> tests,
> >>> but also a lot of integration tests.
> >>>
> >>> I'm not sure what CEG has actually seen here; Registry.shutdown()
> is
> >>> very dramatic, it tears apart the registry (releasing almost
> >>> everything to the GC) and informs all of the proxies to shutdown as
> >>> well.  Could he just be missing the re-creation of the services in
> >>> later tests ... Registry startup is very, very fast once all the
> >>> underlying classes are instantiated.
> >>>
> >>> On Thu, Dec 4, 2008 at 12:04 PM, Christian Edward Gruber
> >>> <[EMAIL PROTECTED]> wrote:
> 
>  FYI, in general, you shouldn't be using the container in your
>  tests,
>  unless
>  you're testing the wiring itself.  You should be creating the
>  component/service under test, and constructing it with fakes.
>  This isn't
>  absolute but there is a lot more effort/configuration/overhead if
>  you
>  want
>  to use the container infrastructure in your unit test, and you
>  start to
>  have
>  subtle interactions that might potentially make it more of an
>  integration
>  test.  You risk testing more than one thing at a time.
> 
>  Christian
> 
>  On 4-Dec-08, at 01:28 , Stephan Schwab wrote:
> 
> >
> > Hi!
> >
> > I have several JUnit tests that instantiate
> > org.apache.tapestry5.ioc.Registry via the RegistryBuilder before
> > tests
> > run.
> > Now I'm observing that services registered in one test are still
> > available
> > in other tests although I did call registry.shutdown(). My test
> > runner
> > does
> > not fork a new JVM.
> >
> > Calling registry.shutdown() should cause everything to vanish.
> > Is there
> > anything that causes one-registry-per-JVM?
> >
> > Stephan
> >
> >
> >
> > -
> > --
> > http://www.caimito.net - Caimito One Team - Agile Collaboration
> > and
> > Planning
> > tool
> > http://www.stephan-schwab.com - Personal blog
> > http://code.google.com/p/tapestry-sesame - Authentication
> > extension for
> > Tapestry 5
> >
> > --
> > View this message in context:
> >
> > http://www.nabble.com/IoC-registry-survives-between-JUnit-tests--
> tp20828078p20828078.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]
> 
> 
> >>>
> >>>
> >>>
> >>> --
> >>> Howard M. Lewis Ship
> >>>
> >>> Creator Apache Tapestry and Apache HiveMind
> >>>
> >>> ---
> --
> >>> 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: rendering unclosed tags - a petition to fix before 5.1

2008-12-04 Thread Blower, Andy
If you don't mind holding off a day, we'll be checking the fix for clustering 
ASO's tomorrow morning UK time. (today was just too full unfortunately)

> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 04 December 2008 17:12
> To: Tapestry users
> Subject: Re: rendering unclosed tags - a petition to fix before 5.1
>
> https://issues.apache.org/jira/browse/TAP5-401
>
> Wil be fixed shortly.  I'm deciding whether I should then generate
> 5.0.18 and put it to a vote.
>
> On Thu, Dec 4, 2008 at 9:01 AM, Steven Woolley <[EMAIL PROTECTED]>
> wrote:
> >>
> >>
> >> I seems quite important, but I believe it's not the good place for
> that :
> >> just open a bug and after, put the link to it here - the T5 dev
> could miss
> >> your post here, there is a lot of posts on this list.
> >>
> >
> > The bug had been closed and moved to the 5.1 branch.  I added my
> comment
> > there https://issues.apache.org/jira/browse/TAP5-333 but can't vote
> on it
> > now that it's closed, and don't think I can reopen it.
> >
> >
> >>
> >> Moreover, it seems that a 5.0.18 will come (and so that the 5.0.17
> won't be
> >> the GA). So I think it's quite possible that T5 dev includes a patch
> for
> >> that issue, if only they know how important it is.
> >>
> >
> > Hence, the reason I posted here (hoping more users would chime in, it
> had 6
> > votes when closed).  5.0.18 please!!Steve
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> 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: Treating a Component Like a Form Field

2008-10-08 Thread Blower, Andy
Coincidentally we're having the same issues where we're trying to create 
reusable sections of forms as components that we'll use on lots of different 
forms. The information from these components is aggregated into a single value 
object which needs to get back into the parent page. For example, a date input 
component with day, month & year select boxes. The parent is only interested in 
a Date object which we want to be a bound parameter which works both ways.

The only way I've found to get this working so far is to inject the component 
and use a getter in the form submission event handler. Binding a parameter 
doesn't seem to work, because the properties updated within the component are 
not bound parameters and the bound parameter is never updated directly. I could 
update it for each of the properties, but I don't really want to do this as 
many times as I have properties that make up the single value object parameter. 
If the order that the properties are updated is predictable in some way, I 
could make the last setter called update the parameter.

I hope this makes sense, and makes the crux of this issue clear.

Andy.

> -Original Message-
> From: Jonathan Barker [mailto:[EMAIL PROTECTED]
> Sent: 07 October 2008 21:18
> To: 'Tapestry users'
> Subject: RE: Treating a Component Like a Form Field
>
>
> Yup, completely.
>
> This is just an issue of getting @Parameter working properly then.  I
> defer
> to Thiago.
>
> Jonathan
>
>
> > -Original Message-
> > From: Keith Bottner [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 07, 2008 15:42
> > To: Tapestry users
> > Subject: Re: Treating a Component Like a Form Field
> >
> > Jonathan,
> >
> > Actually I use an underlying select with an Encoder, OptionModel and
> > SelectionModel, I just wrap it all into a single component because it
> > gets used in a number of places and it is easier to set the Encoder,
> > OptionModel and SelectionModel once then to have multiple developers
> > remember what to set each time they want a select control with a list
> > of countries.
> >
> > Make sense?
> >
> >
> > On Oct 7, 2008, at 2:40 PM, Jonathan Barker wrote:
> >
> > > Keith,
> > >
> > > Is there a particular reason that you created a custom component
> for
> > > the
> > > Country selection rather than just using the standard Select
> > > component?  Is
> > > it just that it gets used in a number of places, or was there
> another
> > > reason?
> > >
> > > Jonathan
> > >
> > >
> > >> -Original Message-
> > >> From: Keith Bottner [mailto:[EMAIL PROTECTED]
> > >> Sent: Tuesday, October 07, 2008 14:59
> > >> To: Tapestry users
> > >> Subject: Re: Treating a Component Like a Form Field
> > >>
> > >> I have used @Parameter before but never like this. I am unsure how
> > >> this would work.
> > >>
> > >> Right now inside of my component I have a field named selection
> and I
> > >> have a public getter and setter so that I can retrieve this value
> > >> from
> > >> within the page that is using the component. I also have a
> @Property
> > >> private Country country in a page that uses the component along
> > >> with a
> > >> @Component( id = "country" ) private CountrySelect countrySelect.
> > >> After submitting the form the only way to retrieve what the user
> > >> selected in the select drop down is to do
> > >> countrySelect.getSelection(). The country field that is in the
> field
> > >> does not get field. What I would like is to be able to NOT include
> > >> the
> > >> CountrySelect and just use the @Property Country country like the
> > >> standard form controls.
> > >>
> > >> With all of that said, I do not see how @Parameter will make a
> > >> difference. Is there some other use then the standard use
> supplying a
> > >> parameter in a component template?
> > >>
> > >> Keith
> > >>
> > >> On Oct 6, 2008, at 5:22 PM, Thiago H. de Paula Figueiredo wrote:
> > >>
> > >>> Em Mon, 06 Oct 2008 18:03:13 -0300, Keith Bottner
> > >>> <[EMAIL PROTECTED]> escreveu:
> > >>>
> >  I created a custom component for displaying a selection list of
> >  countries. However, I have found that the only way for me to
> >  retrieve what the selection is from the component is to declare
> a
> >  @Component to that particular field and then request the value
> >  directly from the component. Is there no way to have a custom
> >  component act like a typical text field and have it assign the
> >  selection to a @Property without having to have a @Component
> >  designator?
> > >>>
> > >>> Have you tried adding a @Parameter to your component? This way,
> you
> > >>> could bind it to page property (or page property property and so
> on
> > >>> recursively).
> > >>>
> > >>> --
> > >>> Thiago H. de Paula Figueiredo
> > >>> Independent Java consultant, developer, and instructor
> > >>> Consultor, desenvolvedor e instrutor em Java
> > >>> http://www.arsmachina.com.br/thiago
> > >>>
> > >>> -

RE: T5: Validation message defaults

2008-10-07 Thread Blower, Andy
Okay, I've raised a JIRA TAP5-253 for this.

> -Original Message-
> From: Blower, Andy
> Sent: 01 October 2008 15:04
> To: 'Tapestry users'
> Subject: T5: Validation message defaults
>
> I'm trying to set up validation for our forms and I need to customise
> the default validation messages. Unfortunately there doesn't seem to be
> a way to do this as contributing to ValidationMessagesSource just adds
> new messages for new validators. I need to change the default messages
> to what we need.
>
> I know that we can override the message for each field name in the
> message catalogs, but this is undesirable (& expensive with extra
> translations needed) because they'll all be the same. The only solution
> I've found is to override this with a properties file in the
> tapestry5.internal package but this doesn't work in every environment
> so it's not really a good solution.
>
> Can anyone help with this or is there a JIRA or something?
>
> Thanks,
>
> 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]



T5: Validation message defaults

2008-10-01 Thread Blower, Andy
I'm trying to set up validation for our forms and I need to customise the 
default validation messages. Unfortunately there doesn't seem to be a way to do 
this as contributing to ValidationMessagesSource just adds new messages for new 
validators. I need to change the default messages to what we need.

I know that we can override the message for each field name in the message 
catalogs, but this is undesirable (& expensive with extra translations needed) 
because they'll all be the same. The only solution I've found is to override 
this with a properties file in the tapestry5.internal package but this doesn't 
work in every environment so it's not really a good solution.

Can anyone help with this or is there a JIRA or something?

Thanks,

Andy

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



RE: Available locales

2008-09-30 Thread Blower, Andy
I think that you need to inject the symbol as an argument to your service's 
constructor using a build method in your module.

> -Original Message-
> From: José Paumard [mailto:[EMAIL PROTECTED]
> Sent: 30 September 2008 10:10
> To: users@tapestry.apache.org
> Subject: Available locales
>
> Hello all,
>
> I defined a set of available locales in my AppModule class, and it
> works
> fine. In a component or a page class, when I use :
>
> @Inject @Symbol("tapestry.supported-locales")
> private String supportedLocales ;
>
> the string I get is correct.
>
> Now what I would like to get is a List rather than a string
> with
> a coma separated list of ISO codes, so I made a service :
>
> public class MyLocaleServiceImpl implements MyLocaleService {
>
> @Inject @Symbol("tapestry.supported-locales")
> private String availableLocales ;
>
> public List getSupportedLocales() {
>...
> }
> }
>
> ... but the availableLocales value is null in that case. Is it supposed
> to work like or is it a bug ?
>
> Thank you,
>
> José
>
>
> -
> 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: [ANN] JumpStart 3.15 for Tapestry 5.0.15

2008-09-29 Thread Blower, Andy
I have some feedback for you Geoff...

I refer to your site a lot and it's very helpful, I applaud you for keeping the 
updates flowing!

> -Original Message-
> From: Geoff Callender [mailto:[EMAIL PROTECTED]
> Sent: 29 September 2008 05:31
> To: Tapestry users
> Subject: [ANN] JumpStart 3.15 for Tapestry 5.0.15
>
> Hi all,
>
> JumpStart 3.15 is now available.  It's compatible with Tapestry 5.0.15
> and many of the examples have been revisited.
>
> Use it live:
>
>  http://202.177.217.122:8080/jumpstart/
>
> or download it:
>
>  http://files.doublenegative.com.au/jumpstart .
>
>   Feedback and suggestions are welcomed.
>
> Cheers,
>
> Geoff

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



RE: Upgrade issues with 5.0.15

2008-09-25 Thread Blower, Andy
Thanks for the quick reply Howard. I mis-described problem one, it's not the 
prefix itself but a secondary prefix that we have added to switch the output to 
raw. This is so we don't need hundreds of outputraw components and is detected 
& used in our custom markup model.

This is where the problem arose, you've changed the signature of the encode() 
method in the MarkupModel interface. I was overriding the old one, which you've 
left in DefaultMarkupModel so I didn't get any compile errors. (although it 
doesn't seem to be used any more)

So, now I'm overriding the new method everything seems to be working okay now. 
I'm still not sure why our custom markup model wasn't being used - something 
was going wrong with our build I think, but by the time I was looking into it 
in more detail it was fixed. Thanks for your help.

> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 24 September 2008 15:25
> To: Tapestry users
> Subject: Re: Upgrade issues with 5.0.15
>
> On Wed, Sep 24, 2008 at 6:21 AM, Blower, Andy
> <[EMAIL PROTECTED]> wrote:
> > We've just tried to upgrade our project from 5.0.14 to the new 5.0.15
> release of Tapestry and have discovered a couple of problems.
> >
> >
> > 1)  Our custom binding 'fmtmessage' stops working with .15, the
> 'fmt' part is ignored and the standard 'message' prefix is used with
> the output prefixed with 'fmt'.
>
> could you show me an example from a .tml file?  I can't even imagine
> how this would happen!
>
> >
> > 2)  Our custom XhtmlMarkupWriterFactoryImpl to enforce valid
> XHtml output also seems to have stopped working.
> >
>
> What you have looks like it should be working, I'm not sure why it
> would stop working. I'd place breakpoints in the bind() method and in
> the constructor to ensure that the methods are getitng invoked as a
> first pass at tracking down what happened.
>
>
> > Anyone else had these issues with 5.0.15?
> >
> > They are configured like this in our module:
> >
> > public static void contributeAlias(Configuration
> configuration, @InjectService("XhtmlMarkupWriterFactory")
> MarkupWriterFactory factory)
> > {
> >
> configuration.add(AliasContribution.create(MarkupWriterFactory.class,
> factory));
> > }
> >
> > public static void bind(ServiceBinder binder)
> > {
> >  binder.bind(MarkupWriterFactory.class,
> XhtmlMarkupWriterFactoryImpl.class).withId("XhtmlMarkupWriterFactory");
> > }
> >
> > public static void
> contributeBindingSource(MappedConfiguration
> configuration, BindingSource bindingSource)
> > {
> >  configuration.add("fmtmessage", new
> FormatMessageBindingFactory(bindingSource));
> > }
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> 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]



Upgrade issues with 5.0.15

2008-09-24 Thread Blower, Andy
We've just tried to upgrade our project from 5.0.14 to the new 5.0.15 release 
of Tapestry and have discovered a couple of problems.


1)  Our custom binding 'fmtmessage' stops working with .15, the 'fmt' part 
is ignored and the standard 'message' prefix is used with the output prefixed 
with 'fmt'.

2)  Our custom XhtmlMarkupWriterFactoryImpl to enforce valid XHtml output 
also seems to have stopped working.

Anyone else had these issues with 5.0.15?

They are configured like this in our module:

public static void contributeAlias(Configuration 
configuration, @InjectService("XhtmlMarkupWriterFactory") MarkupWriterFactory 
factory)
{
  configuration.add(AliasContribution.create(MarkupWriterFactory.class, 
factory));
}

public static void bind(ServiceBinder binder)
{
  binder.bind(MarkupWriterFactory.class, 
XhtmlMarkupWriterFactoryImpl.class).withId("XhtmlMarkupWriterFactory");
}

public static void contributeBindingSource(MappedConfiguration configuration, BindingSource bindingSource)
{
  configuration.add("fmtmessage", new 
FormatMessageBindingFactory(bindingSource));
}



RE: Overriding a render phase method

2008-09-24 Thread Blower, Andy
So I was missing an easy solution! Thanks for this Filip, although I really 
should have figured this out myself. I take it the index gets coerced into a 
Boolean for the test, I'd forgotten all about that useful feature of coercion. 
It gets worse, it's documented at the bottom of the if component page. D'oh.

> -Original Message-
> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2008 21:19
> To: Tapestry users
> Subject: Re: Overriding a render phase method
>
> Well... You could try this:
>
>
>  ; 
>  ${value}
>
>
> That's what I use.
>
> -Filip
>
> On 2008-09-23 21:58, Blower, Andy wrote:
> > Thanks Filip, I'll try and raise an enhancement request when I get a
> spare 10 mins.
> >
> > I've just been trying to do this using composition. I keep getting
> errors with render variables, and I really don't have time to track
> this down. It's pretty silly that I've spent probably two hours trying
> to use the T5 loop component to display a list of values separated by
> semicolons without having one at the end. This shouldn't be hard, or
> require a custom component. Maybe I'm missing some easy solution to
> this problem or something?
> >
> >> -Original Message-
> >> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> >> Sent: 23 September 2008 20:34
> >> To: Tapestry users
> >> Subject: Re: Overriding a render phase method
> >>
> >> Hi Andy,
> >>
> >> I totally agree on first and last parameters. As it is now, I'm
> using
> >> if-else components pretty much everywhere. =/
> >>
> >> You'd have my vote on a JIRA issue.
> >>
> >> -Filip
> >>
> >> On 2008-09-23 21:12, Blower, Andy wrote:
> >>> 
> >>> To be honest I think the standard loop component would benefit from
> >> first & last Boolean parameters that are set to true for first and
> last
> >> iterations repectively. Anyone else agree, or is this an unusual
> need?
> >>> Thanks,
> >>>
> >>> 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]


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



RE: Overriding a render phase method

2008-09-23 Thread Blower, Andy
Thanks Filip, I'll try and raise an enhancement request when I get a spare 10 
mins.

I've just been trying to do this using composition. I keep getting errors with 
render variables, and I really don't have time to track this down. It's pretty 
silly that I've spent probably two hours trying to use the T5 loop component to 
display a list of values separated by semicolons without having one at the end. 
This shouldn't be hard, or require a custom component. Maybe I'm missing some 
easy solution to this problem or something?

> -Original Message-
> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2008 20:34
> To: Tapestry users
> Subject: Re: Overriding a render phase method
>
> Hi Andy,
>
> I totally agree on first and last parameters. As it is now, I'm using
> if-else components pretty much everywhere. =/
>
> You'd have my vote on a JIRA issue.
>
> -Filip
>
> On 2008-09-23 21:12, Blower, Andy wrote:
> > 
> > To be honest I think the standard loop component would benefit from
> first & last Boolean parameters that are set to true for first and last
> iterations repectively. Anyone else agree, or is this an unusual need?
> >
> > Thanks,
> >
> > 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: Overriding a render phase method

2008-09-23 Thread Blower, Andy
Thank you Jonathan, that's very helpful - I must have seen the bug before as 
I've voted on it already, but I can't recall it. I hadn't even considered 
trying a mixin. Composition I'd discounted early because I was adding a single 
new parameter and never reconsidered after being unable to extend.

>From Howard's reply to the issue it looks like he has his reasons for them 
>being package private. The thing is, for what I need to do, I can't use a 
>mixin or extension because I still can't get at the Iterator driving the loop 
>to do a test for the last iteration. All I thought I needed to do was to be 
>able to override the @AfterRender after() method and call the superclass 
>version which returns the Boolean I need to expose. Unfortunately that would 
>be too late as the body would already have rendered.

I think my only option to avoid copying all the T5 Loop code into my own is to 
use composition and compare source.size() with index from the Loop component 
since that's the only thing exposed.

To be honest I think the standard loop component would benefit from first & 
last Boolean parameters that are set to true for first and last iterations 
repectively. Anyone else agree, or is this an unusual need?

Thanks,

Andy.

> -Original Message-
> From: Jonathan Barker [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2008 18:29
> To: 'Tapestry users'
> Subject: RE: Overriding a render phase method
>
> First, have a look at:
>
> https://issues.apache.org/jira/browse/TAP5-173
>
> and then vote for it.
>
> Sorry, no pearls of wisdom beyond that.
>
>
> > -Original Message-
> > From: Blower, Andy [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 23, 2008 12:44
> > To: 'Tapestry users'
> > Subject: RE: Overriding a render phase method
> >
> > Sorry to 'bump' this, but I'd really like some guidance/opinions.
> >
> > > -Original Message-
> > > From: Blower, Andy
> > > Sent: 17 September 2008 11:30
> > > To: 'Tapestry users'
> > > Subject: Overriding a render phase method
> > >
> > > From the T5 documentation:
> > >
> > > "When a sub-class overrides an render phase method of a base class,
> the
> > > method is only invoked once, along with any other base class
> methods.
> > > The subclass can change the implementation of the base class method
> via
> > > an override, but can't change the timing of when that method is
> > > invoked. See TAPESTRY-2311
> > <https://issues.apache.org/jira/browse/TAPESTRY-2311>."
> > >
> > > I want to extend the Loop component to add a 'last' parameter
> that's
> > > true for the last iteration of the loop, and false otherwise.
> > > Unfortunately when I extend the T5 Loop component and try to
> override
> > > after() so I can set the Boolean (change the implementation like
> the
> > > docs suggest), it cannot be overridden because the method is
> package
> > > private. All of the members of the T5 Loop component are private
> and
> > > there's no public accessors for the ones I need.
> > >
> > > So, anyone any ideas how I can do this? The only thing I can think
> is
> > > asking Howard to make the render phase methods public or protected
> so
> > > they can be overridden. Either that or I copy the entire loop
> component
> > > code into my own - ugh.
> > >
> > > Thanks,
> > >
> > > 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]



RE: Overriding a render phase method

2008-09-23 Thread Blower, Andy
Sorry to 'bump' this, but I'd really like some guidance/opinions.

> -Original Message-----
> From: Blower, Andy
> Sent: 17 September 2008 11:30
> To: 'Tapestry users'
> Subject: Overriding a render phase method
>
> From the T5 documentation:
>
> "When a sub-class overrides an render phase method of a base class, the
> method is only invoked once, along with any other base class methods.
> The subclass can change the implementation of the base class method via
> an override, but can't change the timing of when that method is
> invoked. See TAPESTRY-2311 
> <https://issues.apache.org/jira/browse/TAPESTRY-2311>."
>
> I want to extend the Loop component to add a 'last' parameter that's
> true for the last iteration of the loop, and false otherwise.
> Unfortunately when I extend the T5 Loop component and try to override
> after() so I can set the Boolean (change the implementation like the
> docs suggest), it cannot be overridden because the method is package
> private. All of the members of the T5 Loop component are private and
> there's no public accessors for the ones I need.
>
> So, anyone any ideas how I can do this? The only thing I can think is
> asking Howard to make the render phase methods public or protected so
> they can be overridden. Either that or I copy the entire loop component
> code into my own - ugh.
>
> Thanks,
>
> Andy

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



RE: Problem with getPage of ComponentSource(5.0.15-SNAPSHOT)

2008-09-23 Thread Blower, Andy
Looks like TAP5-132 was raised and fixed in .16-SNAPSHOT, my team had this 
issue today when we tried going from .14 -> .15

> -Original Message-
> From: faramos [mailto:[EMAIL PROTECTED]
> Sent: 23 September 2008 05:57
> To: users@tapestry.apache.org
> Subject: Problem with getPage of ComponentSource(5.0.15-SNAPSHOT)
>
>
> Dear
>
> Occupying the method "Component getPage (String pagename)" of the
> service
> "ComponentSource" with pageName = "", throws
>
> [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.
> at
> org.apache.tapestry5.ioc.internal.util.Defense.notBlank(Defense.java:59
> )
> at
> org.apache.tapestry5.internal.services.ComponentSourceImpl.getPage(Comp
> onentSourceImpl.java:77)
> ..
>
> With Tapestry 5.0.14 this method(getPage) was returning Index...
> --
> View this message in context: http://www.nabble.com/Problem-with-
> getPage-of-ComponentSource%285.0.15-SNAPSHOT%29-
> tp19621347p19621347.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]



Overriding a render phase method

2008-09-17 Thread Blower, Andy
>From the T5 documentation:

"When a sub-class overrides an render phase method of a base class, the method 
is only invoked once, along with any other base class methods. The subclass can 
change the implementation of the base class method via an override, but can't 
change the timing of when that method is invoked. See 
TAPESTRY-2311."

I want to extend the Loop component to add a 'last' parameter that's true for 
the last iteration of the loop, and false otherwise. Unfortunately when I 
extend the T5 Loop component and try to override after() so I can set the 
Boolean (change the implementation like the docs suggest), it cannot be 
overridden because the method is package private. All of the members of the T5 
Loop component are private and there's no public accessors for the ones I need.

So, anyone any ideas how I can do this? The only thing I can think is asking 
Howard to make the render phase methods public or protected so they can be 
overridden. Either that or I copy the entire loop component code into my own - 
ugh.

Thanks,

Andy


RE: T5: Event bubbling

2008-09-09 Thread Blower, Andy
That's how I've been dealing with this scenario up til today, but this event is 
fired from a form submission so I can't change the event name. Well I don't 
think I can any way. ;-)

And thank you Howard for your explanation. That's fine, I don't think it's a 
big deal. I do still think it'd be great to cut and paste one of your 
explanations of this to the event bubbling section of the docs...

Cheers guys.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Josh Canfield
> Sent: 09 September 2008 18:45
> To: Tapestry users
> Subject: Re: T5: Event bubbling
>
> I think the best practice here is to create your own events, that way
> you
> don't have to build dependencies on child components internal
> structure.
> Your subcomponent would catch the events from it's dependencies and
> translate them to events that it exposes.
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/Compo
> nentResourcesCommon.html
> triggerEvent or triggerContextEvent
>
> Josh
>
> On Tue, Sep 9, 2008 at 3:32 AM, Blower, Andy
> <[EMAIL PROTECTED]>wrote:
>
> > I found the answer by searching the list (see:
> > http://markmail.org/message/fjev6gt76fpc6akq) but I think the T5
> > documentation should be updated to include these details.
> >
> > I also wonder if allowing more specificity would be useful as an
> option
> > even if it did mean that changes in the child component could break
> event
> > handlers in the parent. What I'm thinking of is allowing
> > @OnEvent(component="childcomponentid.eventfiringcomponentid") as an
> option.
> > Not sure how this could be expressed in a method name convention, but
> that's
> > not necessary for this IMHO.
> >
> > Now I'll wait for Howard to tell me an obvious reason this can't be
> done
> > that'll make me feel silly... lol
> >
> > Andy.
> >
> > > -Original Message-
> > > From: Blower, Andy
> > > Sent: 09 September 2008 11:08
> > > To: 'Tapestry users'
> > > Subject: T5: Event bubbling
> > >
> > > I'm trying to handle an event in a parent component of one that
> fires
> > > the event and it doesn't seem to work unless it's a generic catch
> all
> > > event handler like onAction(). If I specify the component id like
> > > onActionFromThing() or specifying component="thing" in an OnEvent
> > > annotation it doesn't catch the event from the child component in
> the
> > > parent component. I've scoured the T5 documentation, but I can't
> find
> > > any details on how to do this.
> > >
> > > Can anyone help me with this?
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.

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



RE: T5: Event bubbling

2008-09-09 Thread Blower, Andy
I found the answer by searching the list (see: 
http://markmail.org/message/fjev6gt76fpc6akq) but I think the T5 documentation 
should be updated to include these details.

I also wonder if allowing more specificity would be useful as an option even if 
it did mean that changes in the child component could break event handlers in 
the parent. What I'm thinking of is allowing 
@OnEvent(component="childcomponentid.eventfiringcomponentid") as an option. Not 
sure how this could be expressed in a method name convention, but that's not 
necessary for this IMHO.

Now I'll wait for Howard to tell me an obvious reason this can't be done 
that'll make me feel silly... lol

Andy.

> -----Original Message-
> From: Blower, Andy
> Sent: 09 September 2008 11:08
> To: 'Tapestry users'
> Subject: T5: Event bubbling
>
> I'm trying to handle an event in a parent component of one that fires
> the event and it doesn't seem to work unless it's a generic catch all
> event handler like onAction(). If I specify the component id like
> onActionFromThing() or specifying component="thing" in an OnEvent
> annotation it doesn't catch the event from the child component in the
> parent component. I've scoured the T5 documentation, but I can't find
> any details on how to do this.
>
> Can anyone help me with this?

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



T5: Event bubbling

2008-09-09 Thread Blower, Andy
I'm trying to handle an event in a parent component of one that fires the event 
and it doesn't seem to work unless it's a generic catch all event handler like 
onAction(). If I specify the component id like onActionFromThing() or 
specifying component="thing" in an OnEvent annotation it doesn't catch the 
event from the child component in the parent component. I've scoured the T5 
documentation, but I can't find any details on how to do this.

Can anyone help me with this?


RE: Overriding Default Styles

2008-09-03 Thread Blower, Andy
That's a really good point Peter. I'd be interested to hear what you think 
about this Howard?

> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> Sent: 03 September 2008 15:40
> To: Tapestry users
> Subject: Re: Overriding Default Styles
>
> Yes, this much I know... and as I said before this is not ideal, and
> not very modular, it also means that I have to fiddle around with CSS
> inheritance which I loath to do as it can be time consuming, and one
> last point: bloating my pages with style sheets then more style sheets
> to cancel those out is not exactly a clean solution and it increases
> the size of my page.
>
> Thanks anyway,
>
> Peter
>
> - Original Message -
> From: "Ulrich Stärk" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Wednesday, 3 September, 2008 4:40:26 PM GMT +02:00 Athens,
> Beirut, Bucharest, Istanbul
> Subject: Re: Overriding Default Styles
>
> Hi Peter,
>
> As I said before, you can write a stylesheet that overrides the desired
> styles and include this everywhere you want to have the default styles
> being overriden by your custom style by including it either with
> renderSupport.addStylesheetLink() or with the @IncludeStylesheet
> annotation or by defining an asset and including it in your template.
> There you just override the desired styles. It might be necessary to
> use
> CSS' !important notation, though.
>
> Cheers,
>
> Uli
>
> Am Mi, 3.09.2008, 15:03, schrieb Peter Stavrinides:
> > Hi Ulrich,
> >
> > I am not sure exactly what you didn't understand, but what I meant is
> > this: Certain components such as the ones in the components project
> have
> > their own style sheet. Overriding these styles one by one everywhere
> I use
> > the component can be tedious, maybe I don't even want the styles to
> begin
> > with!
> >
> > Since these styles are linked in by the component using
> > RenderSupport.addStylesheetLink(asset, media), wouldn't it be great
> if I
> > could simply supply my own style sheet instead of the default style
> sheet
> > on a case by case basis? or perhaps override the style sheet in the
> > containing page? (hence:
> renderSupport_.overrideStylesheetLink(stylesheet,
> > media)) is this possible somehow at present?
> >
> > cheers,
> > Peter
> >
> >
> >
> > - Original Message -
> > From: "Ulrich Stärk" <[EMAIL PROTECTED]>
> > To: "Tapestry users" 
> > Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens,
> Beirut,
> > Bucharest, Istanbul
> > Subject: Re: Overriding Default Styles
> >
> > I don't quite understand. A stylesheet is an asset and we already got
> > RenderSupport.addStylesheetLink(asset, media)... Just write your css,
> > create an asset and pass it to addStylesheetLink().
> >
> > Uli
> >
> > Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides:
> >> hmmm not ideal, especially for components, I was hoping there was
> >> something more along the lines of:
> >> renderSupport_.addStylesheetLink(stylesheet, media);
> >>
> >> or even better:
> >> renderSupport_.overrideStylesheetLink(stylesheet, media);
> >>
> >>
> >>
> >>
> >> - Original Message -
> >> From: "Ulrich Stärk" <[EMAIL PROTECTED]>
> >> To: "Tapestry users" 
> >> Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens,
> >> Beirut,
> >> Bucharest, Istanbul
> >> Subject: Re: Overriding Default Styles
> >>
> >> Tapestry's styles are included via default.css which can be found
> here:
> >> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/main/resources/org/apache/tapestry5/default.css?view=markup
> >> Just include some css overriding those styles or change the
> >> configuration
> >> symbol tapestry.default-stylesheet to your own default stylesheet.
> >>
> >> Uli
> >>
> >> Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides:
> >>> Hi
> >>>
> >>> I would like to know how to override Tapestry's default styles,
> >>> particularly:
> >>>
> >>> 1. Individual styles like validation error popups
> >>> 2. Component styles
> >>>
> >>> ---
> --
> >>> 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]
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> 

RE: Event handlers with multiple parameters

2008-08-29 Thread Blower, Andy
Thanks for the reply Thiago, I missed EventContext in the docs. Looks to me 
like using EventContext to parse the context params myself is the best solution 
here. Unless anyone can suggest a better way?

Thanks,

Andy

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED]
> Sent: 28 August 2008 20:33
> To: Tapestry users
> Subject: Re: Event handlers with multiple parameters
>
> Em Thu, 28 Aug 2008 08:21:50 -0300, Blower, Andy
> <[EMAIL PROTECTED]> escreveu:
>
> > mark(boolean checked, String[] itemIds)
> >
> > mark(boolean checked, String... itemIds)
> >
> > mark(boolean checked, List itemIds)
>
> As far as I know, none of the would work because Tapestry would not
> handle
> an event handler method with one one String[] or List parameter AND
> other
> parameters. It handles String[], List and EventContext, each one as the
> single parameter, for that matter.
>
> Thiago
>
> -
> 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]



Event handlers with multiple parameters

2008-08-28 Thread Blower, Andy
(Sending again since the formatting was really bad and I have more to 
add/clarify)



Hi, after quite a while using Tapestry I've got a situation where I need an 
event handler that accepts an unknown amount multiple parameters.



mark(boolean checked, String[] itemIds)

mark(boolean checked, String... itemIds)

mark(boolean checked, List itemIds)



I've tried these and the Last one works after a fashion. Basically the first 
element of the itemIds list is the checked Boolean value in string form. This 
seems like a bug to me, but I've been struggling to get this working so I might 
be being stupid here. What do you all think?



It also seems strange that you can only get back what is essentially an Array 
of Strings as a List (Arrays.ArrayList) which then has to have its array 
extracted and copied into a real ArrayList just so the Boolean can be removed 
using remove().



Also, another couple of weird things. Tapestry doesn't appear to be able to 
distinguish between that method signature and this



mark(boolean checked, String itemId)



which does tie up with the documentation I suppose, but this is  why I was 
trying the String... itemIds way. Anyway I can use two different events to get 
round this.



Creating an action link for the event using createActionLink(EVENT, false, 
checked, itemIds.toArray()); where checked is a Boolean means that the id's are 
not written into the link correctly. No matter what I put before the itemId's, 
String, Object etc the array of Id's is not output correctly.



Thanks,



Andy.



(Hope this makes more sense than the last message)


Event handlers with multiple parameters

2008-08-28 Thread Blower, Andy
Hi, after quite a while using Tapestry I've got a situation where I need an 
event handler that accepts an unknown amount multiple parameters.

mark(boolean checked, String[] itemIds)
mark(boolean checked, String... itemIds)
mark(boolean checked, List itemIds)

I've tried these and the Last one works after a fashion. Basically the first 
element of the itemIds list is the checked Boolean value in string form. This 
seems like a bug to me, but I've been struggling to get this working so I might 
be being stupid here. What do you all think?

Also, Tapestry doesn't appear to be able to distinguish between that method 
signature and this

mark(boolean checked, String itemId)

which does tie up with the documentation I suppose, but this is  why I was 
trying the String... way. Anyway I can use two different events to get round 
this.

Thanks,

Andy.


RE: T5 Components site down.

2008-08-15 Thread Blower, Andy
Okay, thanks for letting me know Tobias, I'll get in touch with our IT dept.

> -Original Message-
> From: Tobias Wehrum [mailto:[EMAIL PROTECTED]
> Sent: 15 August 2008 12:07
> To: Tapestry users
> Subject: Re: T5 Components site down.
>
> Hi Andy,
>
> do you mean http://87.193.218.134:8080/t5components/index.html ? Works
> fine for me.
>
> - Tobias
>
> Blower, Andy schrieb:
> > The T5 components site has been down for a couple of days now, any
> chance of it coming back up.
> >
> >
>
>
> -
> 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]



T5 Components site down.

2008-08-15 Thread Blower, Andy
The T5 components site has been down for a couple of days now, any chance of it 
coming back up.


RE: [ANN] T5: JumpStart now runs online

2008-08-07 Thread Blower, Andy
That's a fantastic idea Geoff. Unfortunately it appears to be down at the 
moment. Hosting troubles?

> -Original Message-
> From: Geoff Callender [mailto:[EMAIL PROTECTED]
> Sent: 05 August 2008 14:33
> To: Tapestry users
> Subject: [ANN] T5: JumpStart now runs online
>
> Hi all,
>
> For those who missed the announcement late on Friday, you can now use
> Tapestry JumpStart on-line.  Just click on the Demo link at
>
> http://files.doublenegative.com.au/jumpstart
>
> Please contribute more examples!
>
> Cheers,
>
> Geoff

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



RE: What if Tapestry's I18N was just "UTF-8"?

2008-07-29 Thread Blower, Andy
Thiago,

Sorry I don't understand your objection. Could you expand on it please? 
Especially where you say "have a memory and bandwidth penalty using 2 bytes to 
encode many characters that would be encoded as 1 in UTF-8".

In my experience char encoding can be an absolute nightmare and having as much 
as possible as UTF-8 is highly desirable. IIRC Java uses UTF-16 internally 
which does have 2 bytes for each char, but UTF-8 only uses 2 bytes for unusual 
chars which is why it's the ideal external charset.

Andy.

> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2008 02:59
> To: Tapestry users
> Subject: Re: What if Tapestry's I18N was just "UTF-8"?
>
> Em Mon, 28 Jul 2008 21:17:11 -0300, Howard Lewis Ship
> <[EMAIL PROTECTED]>
> escreveu:
>
> > What if there was just a single default application character set,
> > which would default to UTF-8?
>
> This is not a nice option. Web applications that need accented
> characters
> (most Latin languages), but don't need to support another alphabets,
> will
> have a memory and bandwidth penalty using 2 bytes to encode many
> characters that would be encoded as 1 in UTF-8. In addition, I had some
> problems with Tapestry 5 using UTF-8 when using an existing ISO-8859-1
> MySQL database tables. Accented characters were always store as two
> garbled ones. Maybe I didn't spend enough time to solve it (I was doing
> some consultancy that had a fixed end date), but this could a huge
> problem
> for Tapestry adoption in Latin-speaking languages.
>
> My two Brazilian (Portuguese-speaking, with many accented characters)
> cents,
>
> Thiago
>
> -
> 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: AW: Strange behavior of special characters

2008-07-15 Thread Blower, Andy
This is not the case for Java 6 any more:

"Note: PropertyResourceBundle can be constructed either from an InputStream or 
a Reader, which represents a property file. Constructing a 
PropertyResourceBundle instance from an InputStream requires that the input 
stream be encoded in ISO-8859-1. In that case, characters that cannot be 
represented in ISO-8859-1 encoding must be represented by Unicode Escapes, 
whereas the other constructor which takes a Reader does not have that 
limitation."

The new constructor that takes a Reader can use UTF-8 encoded properties files.

> -Original Message-
> From: Maximilian Weißböck [mailto:[EMAIL PROTECTED]
> Sent: 07 July 2008 15:05
> To: Tapestry users
> Subject: AW: AW: Strange behavior of special characters
>
> Do you read this values from a property file?
> Property files in Java may not be utf-8 encoded.
> The have to be iso-8859-1 encoded.
> Many thanks to Sun ...
>
> Max
>
>
> -Ursprüngliche Nachricht-
> Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 7. Juli 2008 14:54
> An: users@tapestry.apache.org
> Betreff: Re: AW: Strange behavior of special characters
>
>
> No i didn't because i am using tapestry 4.0.2 (forgot to mention this
> :-(()
> but i read similar atricles on tapestry 4.
>
> The weird thing is that my encoding basically is ok,
> and this strange things happen just under certain circumstances.
>
> Another thing that confuses me is that for example in "löschen" not
> just the
> ö isn't displayed correct
> but also the 3 following characters (sch).
> This happens to every string with special characters (mostly not the
> next 3
> but the next 2 characters ).
>
>
>
> Maximilian Weißböck wrote:
> >
> > Did you have a look at
> > http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
> >
> > Max
> >
> >
> > -Ursprüngliche Nachricht-
> > Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 7. Juli 2008 14:06
> > An: users@tapestry.apache.org
> > Betreff: Strange behavior of special characters
> >
> >
> > Hi,
> >
> > we provide our tapestry application in two languages (german and
> english)
> > which work quite fine but with one problem.
> >
> > The problem is, that special characters used in german (like ö, ü, ä)
> are
> > displayed wrong the first time i access a page (in this case i get
> "l?en"
> > instead of  "löschen" för example).
> > If i do a refresh on the page or just navigate to another page all my
> > special characters are displayed correct all over the application.
> >
> > My first suspicion was that this is some kind of browser problem,
> > because the page's sourcecode is identic before and after refresh.
> >
> > But my browser encoding is UTF-8 in both cases which is ok.
> > By the way i tried both firefox and ie and always get the same wrong
> > behavior.
> >
> > Another point which confuses me is that we are developping more than
> one
> > tapestry application
> > and this just happens at one of them.
> >
> > Does anybody know more about this problem?
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Strange-behavior-of-special-characters-
> tp18315199p18315199.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/Strange-behavior-
> of-special-characters-tp18315199p18316032.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]


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



RE: Putting templates together with the java

2008-06-20 Thread Blower, Andy
Our web designers will be using a subversion repository directly (although I've 
not figured out the processes yet..) so I think having non-java in a resources 
sub-tree is very desirable.

Loom is a nice plugin, although it seems to open the tml's from my classes 
directory and it's not very useful until this is fixed.

> -Original Message-
> From: Geoff Callender [mailto:[EMAIL PROTECTED]
> Sent: 19 June 2008 22:43
> To: Tapestry users
> Subject: Re: Putting templates together with the java
>
> Yeah I assumed we're doing it for the web designers, too, which is a
> good reason.  But perhaps the better alternative is simply to filter
> out the java files as we copy the project to them?
>
> On 20/06/2008, at 12:27 AM, Blower, Andy wrote:
>
> > I've always assumed (apart from being more correct in some vague
> > way) that the main practical reason is to keep the web designers
> > away from Java code - so they only see the templates, properties,
> > javascript & css.
> >
> > Pure assumption on my part though.
> >
> >
> >> -Original Message-
> >> From: Geoff Callender [mailto:[EMAIL PROTECTED]
> >> Sent: 19 June 2008 15:02
> >> To: Tapestry users
> >> Subject: Putting templates together with the java
> >>
> >> Perhaps I've lost my mind, but I'm struggling to find a good reason
> >> why we keep our templates and properties separate from our java
> >> source.  I find it causes nothing but pain having to incessantly
> jump
> >> between these disconnected parts of the source tree.  Is it purely
> to
> >> appease some Maven convention?
> >>
> >> What makes it even stranger is that the java classes end up together
> >> with the templates and properties anyway - my build process puts
> >> classes, templates and properties all together in WEB-INF/classes/
> >> regardless of where they come from.  Live class reloading loves it
> >> that way and it keeps them secure from prying hackers.
> >>
> >> So why not mix the source together into the following structure
> >>
> >> src/
> >>main/
> >>   java/<-- or perhaps some other name like "t5/"
> >>  myproject/
> >>base/
> >>components/
> >>css/
> >>images/
> >>META-INF/
> >>mixins/
> >>pages/
> >>services/
> >>WEB-INF/
> >>
> >> and let the build coax it into the WAR file correctly?
> >>
> >> Cheers,
> >>
> >> Geoff
> >
> >
> > -
> > 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: Putting templates together with the java

2008-06-19 Thread Blower, Andy
I've always assumed (apart from being more correct in some vague way) that the 
main practical reason is to keep the web designers away from Java code - so 
they only see the templates, properties, javascript & css.

Pure assumption on my part though.


> -Original Message-
> From: Geoff Callender [mailto:[EMAIL PROTECTED]
> Sent: 19 June 2008 15:02
> To: Tapestry users
> Subject: Putting templates together with the java
>
> Perhaps I've lost my mind, but I'm struggling to find a good reason
> why we keep our templates and properties separate from our java
> source.  I find it causes nothing but pain having to incessantly jump
> between these disconnected parts of the source tree.  Is it purely to
> appease some Maven convention?
>
> What makes it even stranger is that the java classes end up together
> with the templates and properties anyway - my build process puts
> classes, templates and properties all together in WEB-INF/classes/
> regardless of where they come from.  Live class reloading loves it
> that way and it keeps them secure from prying hackers.
>
> So why not mix the source together into the following structure
>
> src/
> main/
>java/<-- or perhaps some other name like "t5/"
>   myproject/
> base/
> components/
> css/
> images/
> META-INF/
> mixins/
> pages/
> services/
> WEB-INF/
>
> and let the build coax it into the WAR file correctly?
>
> Cheers,
>
> Geoff


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



RE: T5 ajax zones example

2008-06-10 Thread Blower, Andy
Yeah, this is all fixed now in 5.0.13. Plus the AjaxFormLoop and issue I was 
having with the select box doing a resort and updating a zone!

I'm pretty happy, except I'm stuck in meetings in the US all week and not doing 
Tapestry dev... ho hum.

Good work Howard.

Andy

> -Original Message-
> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> Sent: 06 June 2008 14:08
> To: Tapestry users
> Subject: Re: T5 ajax zones example
>
> Howard is on it. See https://issues.apache.org/jira/browse/TAPESTRY-
> 2341.
>
> -Filip
>
> On 2008-06-06 16:07, james cai wrote:
> > I have the same problem using T5.0.12.Who can fix this?
> >
> > thanks.
> >
> >
> >
> > Sabine K. wrote:
> >> Hi,
> >>
> >> this works perfect with the Firefox. With the Internet Explorer it
> gives
> >> by triggering the submit button, the link works:
> >>
> >> org.apache.tapestry.runtime.ComponentEventException
> >> A component event handler method returned the value
> >> [EMAIL PROTECTED] Return
> type
> >> org.apache.tapestry.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.
> >>
> >> Any idea?
> >>
> >>
> >>
> >> Ted Steen wrote:
> >>> This is a simple example showing ajax with and without forms.
> >>> Hope it helps!
> >>>
> >>> --Test.tml--
> >>>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >>> Ajax test
> >>> 
> >>> 
> >>> Boring block
> >>> 
> >>>
> >>> 
> >>> fun dynamic block!
> >>> 
> >>> date on server ${date}
> >>> 
> >>> message: ${message}
> >>> 
> >>>
> >>> click
> >>> me!
> >>>
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> 
> >>>
> >>> 
> >>> Content before update
> >>> 
> >>>
> >>> 
> >>> 
> >>>
> >>> --Test.java--
> >>> public class Test
> >>> {
> >>> @Inject
> >>> private Block someBlock;
> >>> @Inject
> >>> private Block dynamicBlock;
> >>>
> >>> @Property
> >>> private String message;
> >>>
> >>> public String getDate()
> >>> {
> >>> return new Date().toString();
> >>> }
> >>>
> >>> @OnEvent(component="theLink", value="action")
> >>> private Block actionFromTheLink()
> >>> {
> >>> return someBlock;
> >>> }
> >>>
> >>> @OnEvent(component="theForm", value="success")
> >>> private Block successFromTheForm()
> >>> {
> >>> return dynamicBlock;
> >>> }
> >>> }
> >>>
> >>>
> >>> 2008/3/11, Janko Muzykant <[EMAIL PROTECTED]>:
> 
>  Tapestry's page mentions about zones and update-divs but i'm not
> able to
>  find
>  even one example how to use them. is there anyone who successfully
> tried
>  to
>  use these features?
> 
>  cheers,
>  m.
> 
> 
>  --
>  View this message in context:
>  http://www.nabble.com/T5-ajax-zones-example-
> tp15991696p15991696.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]
> 
> 
> >>>
> >>> --
> >>> /ted
> >>>
> >>>
> >>
> >
>
> -
> 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: Newbie

2008-06-03 Thread Blower, Andy
Menno,

No one knows whether Tapestry 6 will be compatible with Tapestry 5 because it 
doesn't exist, and is not even planned. According to Howard Lewis Ship 
(Tapestry creator) he has no plans to make Tapestry 6, and that's all anyone 
has to go on.

The way I have of looking at the major version incompatibilities of Tapestry 
3->4->5 is that it driven by improvements and is much better than 'nearly 
compatible' versions touted as backward compatible (quite common) because you 
know what you're getting into beforehand.

My advice is to use Tapestry 5 if it suits your needs better than anything 
else, and not if some other framework is more suited to you and your needs.

Cheers,

Andy.
(new to Tapestry myself - 2 months now)

> -Original Message-
> From: Menno Kok [mailto:[EMAIL PROTECTED]
> Sent: 03 June 2008 15:11
> To: Tapestry users
> Subject: Re: Newbie
>
> I search "tapestry" inside google and get many result and read many
> many of them.
> Sven, can you answer my question? I am now afraid with tapestry. Help
> me to be afraid not. I like tapestry a bit and I want to use tapestry.
>
> Thank you.
>
> Menno
>
>
> - Original Message 
> From: Sven Homburg <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Tuesday, June 3, 2008 3:50:13 PM
> Subject: Re: Newbie
>
> let me know your google query string
>
> 2008/6/3 Menno Kok <[EMAIL PROTECTED]>:
>
> > Hello men and women,
> >
> > I saw many google search result about tapestry that maked me nervos.
> Is it
> > true that tapetsry 6 would be not compatible with other tapestry
> versions?
> > I want to know before I spend many times with learning tapestry.
> > Forgive me my bad english, please.
> >
> > Thank you,
> >
> > Menno
> >
> >
> > - Original Message 
> > From: Menno Kok <[EMAIL PROTECTED]>
> > To: users@tapestry.apache.org
> > Sent: Tuesday, June 3, 2008 1:53:29 PM
> > Subject: Newbie
> >
> > Hi,
> >
> > I have see Tapestry and quite like it. Though some people no like it.
> > Is there plans to integrate Tapestry with YUI?
> >
> > Thanks
> >
> > Menno
> >
> >
> >
> >
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>
>


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



RE: T5: Components initialising derived variables for action requests?

2008-05-27 Thread Blower, Andy
Thanks for the replay Robert, I'll try to explain better.

Here's the component hierarchy, '->' means contains.

Page -> Component -> Sub-component

Page passes parameter (results) to Component which extracts a derived object 
(grouper) using the statement "grouper = results.getGrouper();" in 
setupRender().

The source parameter passed to Sub-component for it to do its work is the 
grouper object.

In event handlers in Sub-component, the grouper parameter is null because 
although results has been obtained by the page's onActivate() method, and 
passed to Component, grouper is not initialised and so null is passed as a 
paremeter to Sub-component for action requests.

Does that make any more sense?

> -Original Message-
> From: robert zeigler [mailto:[EMAIL PROTECTED] On Behalf Of
> Robert Zeigler
> Sent: 27 May 2008 18:02
> To: Tapestry users
> Subject: Re: T5: Components initialising derived variables for action
> requests?
>
> It makes some sense, but more details would help.
> You said that the parameter is "redundant": in what way is it
> redundant?
> If the parameter is already passed to the component, then what's the
> issue?
> If the value is calculated, why can't the component calculate it?
> Incidentally, if the component has the value at render time, couldn't
> the component stick the value into the context for the action/event
> link? Then your event handler would accept a parameter which is the
> value of interest, and you're done. :)
>
> Sometimes, to understand the general concept, specific situations/
> details are helpful; I suggest more specifics on your use case.
>
> Robert
>
> On May 27, 2008, at 5/2711:48 AM , Blower, Andy wrote:
>
> > Replying to myself so quickly - not a good sign. ;-)
> >
> > Anyway, I found another solution which is to let the event bubble up
> > to the parent component which needs to do the initialisation of the
> > derived variable (which is then provided as a source for the sub-
> > component) and do the init in the event handler method.
> >
> > Not so bad, but it does force me to have my event handler in the
> > component containing the sub-component which is actually generating
> > the event. I'm unsure as to the best practice for this, I was
> > assuming that a component should always handle its own events, which
> > isn't possible in this case without session usage or a redundant
> > parameter in the parent component.
> >
> > I do hope this makes sense to someone out there on the list...
> > rather than sounding like the babblings of a crazy man. ;-)
> >
> > Thanks,
> >
> > Andy
> >
> >
> >> -Original Message-
> >> From: Blower, Andy
> >> Sent: 27 May 2008 17:20
> >> To: 'Tapestry users'
> >> Subject: T5: Components initialising derived variables for action
> >> requests?
> >>
> >> How should a component initialise a derived variable from a
> parameter
> >> for the purposes of handling events?
> >>
> >> As far as I've seen so far, derived variable initialisation is
> >> usually
> >> done in a setupRender() method. This works for rendering, but not
> for
> >> the event handling phase. The containing page has the onActivate()
> >> method which sets up all required data for both the action requests
> >> as
> >> well as render requests, but the components setupRender() only sets
> >> up
> >> the component variable for render requests. Since pageAttached()
> >> fires
> >> before onActivate(), that can't be used. What else could be used?
> >>
> >> I know that the component variable could be made a (kinda redundant)
> >> parameter rather than being derived, or it could be persisted, but
> >> both
> >> solutions seem clumsy and inelegant since all the information is
> >> already available but only tied together for render requests.
> >>
> >> I find it hard to believe that Tapestry 5 has all the wonderful
> >> activation context for restoring state without it being held in the
> >> session but not have a mechanism for deriving variables on action
> >> requests. I'm probably going to feel silly if it's really obvious,
> >> but
> >> I can't figure it out.
> >>
> >> Thanks,
> >>
> >> 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]


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



RE: T5: Components initialising derived variables for action requests?

2008-05-27 Thread Blower, Andy
Replying to myself so quickly - not a good sign. ;-)

Anyway, I found another solution which is to let the event bubble up to the 
parent component which needs to do the initialisation of the derived variable 
(which is then provided as a source for the sub-component) and do the init in 
the event handler method.

Not so bad, but it does force me to have my event handler in the component 
containing the sub-component which is actually generating the event. I'm unsure 
as to the best practice for this, I was assuming that a component should always 
handle its own events, which isn't possible in this case without session usage 
or a redundant parameter in the parent component.

I do hope this makes sense to someone out there on the list... rather than 
sounding like the babblings of a crazy man. ;-)

Thanks,

Andy


> -Original Message-
> From: Blower, Andy
> Sent: 27 May 2008 17:20
> To: 'Tapestry users'
> Subject: T5: Components initialising derived variables for action
> requests?
>
> How should a component initialise a derived variable from a parameter
> for the purposes of handling events?
>
> As far as I've seen so far, derived variable initialisation is usually
> done in a setupRender() method. This works for rendering, but not for
> the event handling phase. The containing page has the onActivate()
> method which sets up all required data for both the action requests as
> well as render requests, but the components setupRender() only sets up
> the component variable for render requests. Since pageAttached() fires
> before onActivate(), that can't be used. What else could be used?
>
> I know that the component variable could be made a (kinda redundant)
> parameter rather than being derived, or it could be persisted, but both
> solutions seem clumsy and inelegant since all the information is
> already available but only tied together for render requests.
>
> I find it hard to believe that Tapestry 5 has all the wonderful
> activation context for restoring state without it being held in the
> session but not have a mechanism for deriving variables on action
> requests. I'm probably going to feel silly if it's really obvious, but
> I can't figure it out.
>
> Thanks,
>
> 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: Updating a zone as a result of a form submission

2008-05-22 Thread Blower, Andy
It's not being submitted using an XMLHttpRequest - that's the problem I need 
help with. One of the elements passed to Tapestry.init() is 
"linkZone":[["actionlink","lor"],["resort","lor"]] so the form should be linked 
to the zone.

The zone looks like this:













> -Original Message-
> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> Sent: 22 May 2008 12:30
> To: Tapestry users
> Subject: Re: Updating a zone as a result of a form submission
>
> How is your zone defined?
>
> Also, check if the form is really submitted using an XMLHttpRequest.
> I've seen this fail a couple of times lately, hence my suggestion to
> check Request#isXHR.
>
> -Filip
>
> Blower, Andy skrev:
> > Thanks for the reply Filip. I have bound the zone parameter on the
> form like this:
> >
> > 
> > :
> >  t:validate="required"/>
> > 
> >  t:id="resortButton" value="Resort"/>
> > 
> >
> >  t:context="literal:oldestFirst">oldest first
> >
> > The action link works in an Ajax way, but the form submit doesn't.
> The even handlers are:
> >
> > Object onSubmit() {
> > results.resort(sortType.name());// sortType
> is the enum bound to the select box.
> > return lor;
> > }
> >
> > Object onAction(String st) {
> > results.resort(st);
> > return lor;
> > }
> >
> > The form submit does the resort, but refreshes the entire page. I
> just can't figure this out.
> >
> >> -Original Message-
> >> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> >> Sent: 22 May 2008 10:52
> >> To: Tapestry users
> >> Subject: Re: Updating a zone as a result of a form submission
> >>
> >> Hi Andy,
> >>
> >> Form has a zone parameter, if you bind it the zone will be updated
> when
> >> the form has been submitted.
> >>
> >> Just make sure to check Request#isXHR to see if it's actually an
> >> Ajaz-request before you return a block/component or Tapestry will
> bark.
> >> The solution, then, is to just do a normal return like you would
> from a
> >> non-Ajax event handler.
> >>
> >> http://tapestry.apache.org/tapestry5/tapestry-
> >> core/ref/org/apache/tapestry/corelib/components/Form.html
> >> has the lowdown on events emitted by Form, it's at the bottom of the
> >> page.
> >>
> >> -Filip
> >>
> >> Blower, Andy skrev:
> >>> Is it possible to update a zone as a result of a form submission,
> >> rather than having the entire page refresh?
> >>> I have a form with a select box and submit button to change the
> >> sorting of a list of search results, and when I return a zone from
> the
> >> event handler method onSubmit() the entire page is refreshed rather
> >> than just the zone. The zone updates correctly from other
> actionlinks
> >> on the page and their onAction() event handler. Is the answer to get
> >> the form to fire action events somehow?
> >>> I admit that I'm still a little confused still by events, is there
> a
> >> complete list of the event types and their uses/behaviour somewhere
> >> that I've missed?
> >>> ---
> --
> >>> 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]


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



RE: Updating a zone as a result of a form submission

2008-05-22 Thread Blower, Andy
Thanks for the reply Filip. I have bound the zone parameter on the form like 
this:


:





oldest 
first

The action link works in an Ajax way, but the form submit doesn't. The even 
handlers are:

Object onSubmit() {
results.resort(sortType.name());// sortType is the enum 
bound to the select box.
return lor;
}

Object onAction(String st) {
results.resort(st);
return lor;
}

The form submit does the resort, but refreshes the entire page. I just can't 
figure this out.

> -Original Message-
> From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> Sent: 22 May 2008 10:52
> To: Tapestry users
> Subject: Re: Updating a zone as a result of a form submission
>
> Hi Andy,
>
> Form has a zone parameter, if you bind it the zone will be updated when
> the form has been submitted.
>
> Just make sure to check Request#isXHR to see if it's actually an
> Ajaz-request before you return a block/component or Tapestry will bark.
> The solution, then, is to just do a normal return like you would from a
> non-Ajax event handler.
>
> http://tapestry.apache.org/tapestry5/tapestry-
> core/ref/org/apache/tapestry/corelib/components/Form.html
> has the lowdown on events emitted by Form, it's at the bottom of the
> page.
>
> -Filip
>
> Blower, Andy skrev:
> > Is it possible to update a zone as a result of a form submission,
> rather than having the entire page refresh?
> >
> > I have a form with a select box and submit button to change the
> sorting of a list of search results, and when I return a zone from the
> event handler method onSubmit() the entire page is refreshed rather
> than just the zone. The zone updates correctly from other actionlinks
> on the page and their onAction() event handler. Is the answer to get
> the form to fire action events somehow?
> >
> > I admit that I'm still a little confused still by events, is there a
> complete list of the event types and their uses/behaviour somewhere
> that I've missed?
> >
> > -
> > 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]



Updating a zone as a result of a form submission

2008-05-22 Thread Blower, Andy
Is it possible to update a zone as a result of a form submission, rather than 
having the entire page refresh?

I have a form with a select box and submit button to change the sorting of a 
list of search results, and when I return a zone from the event handler method 
onSubmit() the entire page is refreshed rather than just the zone. The zone 
updates correctly from other actionlinks on the page and their onAction() event 
handler. Is the answer to get the form to fire action events somehow?

I admit that I'm still a little confused still by events, is there a complete 
list of the event types and their uses/behaviour somewhere that I've missed?

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



RE: AjaxFormLoop

2008-05-22 Thread Blower, Andy
Any update on this Howard? I'm trying to be patient and not check the svn repos 
too often... ;-)

> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 07 May 2008 17:42
> To: Tapestry users
> Subject: Re: AjaxFormLoop
>
> I expect to check this in over the weekend or early next week.  It's a
> suite of components, targetted at editing objects in a list, primarily
> Hibernate entities. There's the AjaxFormLoop, plus special links for
> handling removing an existing row or adding a new row.  You'd use this
> for master/detail relationships.
>
> On Wed, May 7, 2008 at 3:06 AM, Blower, Andy
> <[EMAIL PROTECTED]> wrote:
> > Hi Howard,
> >
> >  A couple of weeks ago you mentioned that you'd been developing and
> AjaxFormLoop component when talking about not doing an official release
> of 5.0.12 just yet. I've been waiting for this to appear in the svn
> repository so I can grab a new nightly and try out this component, but
> it doesn't seem to have been checked in yet. Am I missing it, or can
> you give a rough idea when we might see this component in the
> nightlies?
> >
> >  Thanks,
> >
> >  Andy.
> >
> >  P.S. Also, I asked a question on the list about whether there was an
> easy way to get hold of the integration test apps rather than one file
> at a time. Is there a way?
> >
> >  
> -
> >  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]


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



RE: Instability in Tapestry 5.0.12-SNAPSHOT

2008-05-19 Thread Blower, Andy
I agree.

> -Original Message-
> From: Massimo Lusetti [mailto:[EMAIL PROTECTED]
> Sent: 19 May 2008 16:02
> To: Tapestry users
> Subject: Re: Instability in Tapestry 5.0.12-SNAPSHOT
>
> On Mon, May 19, 2008 at 4:57 PM, Howard Lewis Ship <[EMAIL PROTECTED]>
> wrote:
>
> > The question is: would it have been better to just broadly rename
> > org.apache.tapestry to org.apache.tapestry5?  There was quite a bit
> of
> > discussion back on forth among the developers on this one.
>
> I would say yes.
>
> --
> Massimo
> http://meridio.blogspot.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: Calling method with parameter in prop

2008-05-14 Thread Blower, Andy
I think, in hindsight, maybe 'forcing' was the wrong word! Maybe 'encouraged' 
is more apt since it's so easy to add an OGNL mapping? I just think it's best 
if this is not part of T5 out of the box.

> -Original Message-
> From: Toby Hobson [mailto:[EMAIL PROTECTED]
> Sent: 13 May 2008 18:34
> To: Tapestry users
> Subject: Re: T5: Calling method with parameter in prop
>
> I'm not sure I like the idea of a framework FORCING me to do something,
> IMHO poorly structured code should be prevented by coding standards and
> peer reviews, not a rigid framework. Just moving the logic from a
> JSP/Template to a Java class doesn't necessarily mean it's cleaner.
> Sometimes it is actually clearer to put some logic in the template.
>
> In my experience T4 and 5 have proved to be very flexible, more so than
> JSF etc. so I'm surprised that there isn't some primitive form of EL in
> the TML.
>
> Anyway, like I said, just one user's opinion!
>
> Toby
>
> - Original Message 
> From: Josh Canfield <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Tuesday, 13 May, 2008 5:55:26 PM
> Subject: Re: T5: Calling method with parameter in prop
>
> On Tue, May 13, 2008 at 2:21 AM, Blower, Andy
> <[EMAIL PROTECTED]> wrote:
> > This should be done with care though IMO. To me, one big advantage of
> T5 over JSP's with
> > EL or OGNL is that you are forced to keep the logic out of the
> templates for the most part.
> > Simple comparisons and single parameter accessors seem okay, but I've
> always been
> > surprised when seeing people on the list want full OGNL
> functionality. Maybe I've had too
> > many issues with overcomplicated JSP's that have subsequently been
> broken by designers
> > over the years to want to the temptation any more... lol.
>
> Yeah, I'd agree with that. Getting code out of the templates is a good
> thing. Let the framework allow for OGNL type extensions to be built as
> add-ons. Turning them into first class core features will encourage
> people to use them...
>
>
> >
> > > -Original Message-
> > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> > > Sent: 12 May 2008 21:59
> > > To: Tapestry users
> > > Subject: Re: T5: Calling method with parameter in prop
> > >
> > > Mor expression language would be great; the pain is when you pull
> > > values out of a Map  or Collection and lose their type, at which
> point
> > > you also lose annotations and components such as BeanEditor and
> Grid
> > > no longer operate as expected.
> > >
> > > But I agree that having a few boolean operators in the expression
> > > language would be great: eq, lt, gt, gteq, lteq, etc.
> > >
> > > On Mon, May 12, 2008 at 2:26 AM, Andreas Pardeike <[EMAIL PROTECTED]>
> wrote:
> > > > Hi,
> > > >
> > > >  Don't know what you folks do, but I have created a bunch of
> custom
> > > >  bindings for different cases. The only thing I actually miss is
> the
> > > >  ability to COMBINE them.
> > > >
> > > >  I.e., I have added a binding
> > > >
> > > >  equals:foo=bar
> > > >
> > > >  where foo and bar can be other binding objects or literals. I
> use
> > > >  it successfully for switch/case situations like in
> > > >
> > > >  
> > > >  
> > > >  ..
> > > >  
> > > >
> > > >  without the need to write a lot of getters.
> > > >
> > > >  Now, I also have
> > > >
> > > >  map:foo.bar
> > > >
> > > >  where foo is suppose to be a HashMap and it will call
> foo.get(bar).
> > > >
> > > >  As a result, all I want is the ability to have a way to specify
> foo
> > > and
> > > >  bar with the same binding prefix as in the beginning.
> > > >
> > > >  For example, if I have a object that has a getter that returns a
> > > >  hashmap, I would love to write
> > > >
> > > >  --
> > > >  map:(prop:obj.foo).bar
> > > >  --
> > > >
> > > >  which would call
> > > >
> > > >  obj.getFoo().get('bar')
> > > >
> > > >  If I could get this working (I don't care about the syntax), I
> would
> > > be
> > > >  able to fulfill all my need by writing (and may

What happened to Tapestry 5 Layout component blog article

2008-05-13 Thread Blower, Andy
This blog seems to have vanished:

http://courcy-en.blogspot.com/2008/01/tapestry-5-create-layout-component.html

As linked to from the wiki. Anyone know what's happened or have an archive of 
this? I found it very useful.

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



RE: T5: Calling method with parameter in prop

2008-05-13 Thread Blower, Andy
This should be done with care though IMO. To me, one big advantage of T5 over 
JSP's with EL or OGNL is that you are forced to keep the logic out of the 
templates for the most part. Simple comparisons and single parameter accessors 
seem okay, but I've always been surprised when seeing people on the list want 
full OGNL functionality. Maybe I've had too many issues with overcomplicated 
JSP's that have subsequently been broken by designers over the years to want to 
the temptation any more... lol.

> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 12 May 2008 21:59
> To: Tapestry users
> Subject: Re: T5: Calling method with parameter in prop
>
> Mor expression language would be great; the pain is when you pull
> values out of a Map  or Collection and lose their type, at which point
> you also lose annotations and components such as BeanEditor and Grid
> no longer operate as expected.
>
> But I agree that having a few boolean operators in the expression
> language would be great: eq, lt, gt, gteq, lteq, etc.
>
> On Mon, May 12, 2008 at 2:26 AM, Andreas Pardeike <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  Don't know what you folks do, but I have created a bunch of custom
> >  bindings for different cases. The only thing I actually miss is the
> >  ability to COMBINE them.
> >
> >  I.e., I have added a binding
> >
> >  equals:foo=bar
> >
> >  where foo and bar can be other binding objects or literals. I use
> >  it successfully for switch/case situations like in
> >
> >  
> >  
> >  ..
> >  
> >
> >  without the need to write a lot of getters.
> >
> >  Now, I also have
> >
> >  map:foo.bar
> >
> >  where foo is suppose to be a HashMap and it will call foo.get(bar).
> >
> >  As a result, all I want is the ability to have a way to specify foo
> and
> >  bar with the same binding prefix as in the beginning.
> >
> >  For example, if I have a object that has a getter that returns a
> >  hashmap, I would love to write
> >
> >  --
> >  map:(prop:obj.foo).bar
> >  --
> >
> >  which would call
> >
> >  obj.getFoo().get('bar')
> >
> >  If I could get this working (I don't care about the syntax), I would
> be
> >  able to fulfill all my need by writing (and maybe contributing) a
> few
> >  custom bindings.
> >
> >
> >
> >
> >  On 9 maj 2008, at 18.31, Sven Homburg wrote:
> >
> > >
> > >
> > >
> > >
> > > we will see what can we do 
> > >
> > > 2008/5/9 Howard Lewis Ship <[EMAIL PROTECTED]>:
> > >
> > >
> > > >
> > > >
> > > >
> > > > Nope; I just want to let you create Insanely Great things, using
> T5 as
> > the
> > > > base.
> > > >
> > > > On Fri, May 9, 2008 at 9:10 AM, Sven Homburg
> <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > >
> > > > > howard,
> > > > >
> > > > > you make us jobless ;-)
> > > > >
> > > > > 2008/5/9 Howard Lewis Ship <[EMAIL PROTECTED]>:
> > > > >
> > > > >
> > > > > > In 5.1 I want to extend the Tapestry property expression
> language
> > > > > > quite a bit further to address this (invoking methods), as
> well as
> > map
> > > > > > and array ceation ... basically, all the cool OGNL stuff
> people
> > miss.
> > > > > >
> > > > > > On Fri, May 9, 2008 at 7:52 AM, kranga <[EMAIL PROTECTED]>
> wrote:
> > > > > >
> > > > > > > In looking at converting from T3 to T5, I've to deal with
> > constructs
> > > > > > >
> > > > > >
> > > > >
> > > > such
> > > >
> > > > >
> > > > > >
> > > > > > > as:
> > > > > > >
> > > > > > > class="ognl:menuClassName('home')"  where getMenuClassName
> uses
> > the
> > > > > > > parameter to compare with the page's "id" passed in to
> determine
> > if
> > > > > > >
> > > > > >
> > > > >
> > > > this
> > > >
> > > > >
> > > > > > is
> > > > > >
> > > > > > > the currentPage or not. So the template has multiple links
> with
> > > > > > >
> > > > > > constructs
> > > > > >
> > > > > > > such as:
> > > > > > >
> > > > > > > class="ognl:menuClassName('about')"
> > > > > > > class="ognl:menuClassName('contact')" etc.
> > > > > > >
> > > > > > > How do I do this in T5 given that prop bindings to methods
> cannot
> > > > > > >
> > > > > >
> > > > >
> > > > accept
> > > >
> > > > >
> > > > > >
> > > > > > > arguments? I'm sure there is a workaround, I just can't
> seem to
> > find
> > > > > > >
> > > > > >
> > > > >
> > > > one.
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > Howard M. Lewis Ship
> > > > > >
> > > > >
> > > > > Sven Homburg
> > > > >
> > > >
> > > > Howard M. Lewis Ship
> > > >
> > > >
> > >
> > > Sven Homburg
> > >
> >
> >
> >  
> -
> >  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: [

RE: overwrite first element in select

2008-05-08 Thread Blower, Andy
Look at the blankLabel and blankOption attributes for the select component. 
(http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Select.html)

There are good examples in the Tapestry 5 jumpstart. 
(http://files.doublenegative.com.au/jumpstart/)


> -Original Message-
> From: Leon Derks [mailto:[EMAIL PROTECTED]
> Sent: 08 May 2008 14:39
> To: Tapestry users
> Subject: overwrite first element in select
>
> Hello
>
> Is it possible to overwrite the first element in a select box?
> At the moment this is an empty value, but can I for example overwrite
> this with "All"
>
> Leon
>
> -
> 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]



AjaxFormLoop

2008-05-07 Thread Blower, Andy
Hi Howard,

A couple of weeks ago you mentioned that you'd been developing and AjaxFormLoop 
component when talking about not doing an official release of 5.0.12 just yet. 
I've been waiting for this to appear in the svn repository so I can grab a new 
nightly and try out this component, but it doesn't seem to have been checked in 
yet. Am I missing it, or can you give a rough idea when we might see this 
component in the nightlies?

Thanks,

Andy.

P.S. Also, I asked a question on the list about whether there was an easy way 
to get hold of the integration test apps rather than one file at a time. Is 
there a way?

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



RE: Dynamic list of strings in a form

2008-05-02 Thread Blower, Andy
(Apologies - I sent the wrong tml file - please ignore my last email)

I've been trying to use FormInjector to create a dynamic form and not getting 
very far. I've taken the demo that Igor gave links to and simply taken it out 
of the border element. It works fine unless I add the t:label component in the 
block. It seems to me that as soon as there is more than one kind of component 
in the injected block, the inserted HTML is just "" without any form elements. Two textfields work, and 
a textfield and an 'any' component work, but not label or radio with a 
textfield. I suspect it's all form components.

Here's the modified demo. Remove the label component to see it working. Add 
back in to see it broken again. I think this might be connected with 
TAPESTRY-2322.

Am I doing something wrong here, or is it a bug?


http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Tapestry Integration Test Application #1








  






Add a row








Current sum: ${sum}  

public class FormInjectorDemo
{
@Persist
private double _sum;
private double _value;
@Inject
private Block _newRow;
@Inject
private PageRenderSupport _pageRenderSupport;
@Component
private FormInjector _formInjector;

public double getSum() {
return _sum;
}
public double getValue() {
return _value;
}
public void setValue(double value) {
_value = value;
}
void onPrepareForSubmit() {
_sum = 0;
}
void onAfterSubmit() {
_sum += _value;
}

void afterRender()
{
_pageRenderSupport.addScript(
"$('addnewrow').observe('click', function() { 
$('%s').trigger(); return false; });",
_formInjector.getClientId());
}

Object onActionFromFormInjector() {
return _newRow;
}
}


> -Original Message-
> From: Igor Drobiazko [mailto:[EMAIL PROTECTED]
> Sent: 15 April 2008 15:28
> To: Tapestry users
> Subject: Re: Dynamic list of strings in a form
>
> Ups, wrong template url. This one is the correct one:
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormInjectorDemo.tml?view=markup
>
> On Tue, Apr 15, 2008 at 4:20 PM, Igor Drobiazko
> <[EMAIL PROTECTED]>
> wrote:
>
> > Have a look at the FormInjector component. This component is what you
> > need.
> > http://tapestry.apache.org/tapestry5/tapestry-
> core/ref/org/apache/tapestry/corelib/components/FormInjector.html
> >
> > An example can be found here:
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/java/org/apache/tapestry/integration/app1/pages/FormInjec
> torDemo.java?view=markup
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormFragmentDemo.tml?view=markup
> >
> >
> >
> > On Tue, Apr 15, 2008 at 3:51 PM, Michael Dukaczewski <
> > [EMAIL PROTECTED]> wrote:
> >
> > > I am using Tapestry 5.0.11 and have a problem with a dynamic list
> of
> > > strings in a form. What I am trying, is the following:
> > >
> > > In the Page.java:
> > >
> > > @Persist
> > > private List items;
> > >
> > > @Property
> > > private String item;
> > >
> > > public List getItems() {
> > >if (items == null) {
> > >items = new LinkedList();
> > >}
> > >return items;
> > > }
> > >
> > > public void onSelectedFromAdd() {
> > >getItems().add("");
> > > }
> > >
> > > And in the Page.tml:
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > >
> > > I have a list of values, the user has to enter. The number of
> values,
> > > that have to be typed in, is dynamic, so the user has to extend the
> form.
> > > The add button works, but the values are not saved. Can someone
> tell me,
> > > that I am doing wrong?
> > >
> > >
> > > ---
> --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
>
>
>
>
> --
> Best regards,
>
> Igor Drobiazko

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



RE: Dynamic list of strings in a form

2008-05-02 Thread Blower, Andy
I've been trying to use FormInjector to create a dynamic form and not getting 
very far. I've taken the demo that Igor gave links to and simply taken it out 
of the border element. It works fine unless I add the t:label component in the 
block. It seems to me that as soon as there is more than one kind of component 
in the injected block, the inserted HTML is just "" without any form elements. Two textfields work, and 
a textfield and an 'any' component work, but not label or radio with a 
textfield. I suspect it's all form components.

Here's the modified demo. Remove the label component to see it working. Add 
back in to see it broken again. I think this might be connected with 
TAPESTRY-2322.

Am I doing something wrong here, or is it a bug?


http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Tapestry Integration Test Application #1















Add a row








Current sum: ${sum}



public class FormInjectorDemo
{
@Persist
private double _sum;
private double _value;
@Inject
private Block _newRow;
@Inject
private PageRenderSupport _pageRenderSupport;
@Component
private FormInjector _formInjector;

public double getSum() {
return _sum;
}
public double getValue() {
return _value;
}
public void setValue(double value) {
_value = value;
}
void onPrepareForSubmit() {
_sum = 0;
}
void onAfterSubmit() {
_sum += _value;
}

void afterRender()
{
_pageRenderSupport.addScript(
"$('addnewrow').observe('click', function() { 
$('%s').trigger(); return false; });",
_formInjector.getClientId());
}

Object onActionFromFormInjector() {
return _newRow;
}
}

> -Original Message-
> From: Igor Drobiazko [mailto:[EMAIL PROTECTED]
> Sent: 15 April 2008 15:28
> To: Tapestry users
> Subject: Re: Dynamic list of strings in a form
>
> Ups, wrong template url. This one is the correct one:
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormInjectorDemo.tml?view=markup
>
> On Tue, Apr 15, 2008 at 4:20 PM, Igor Drobiazko
> <[EMAIL PROTECTED]>
> wrote:
>
> > Have a look at the FormInjector component. This component is what you
> > need.
> > http://tapestry.apache.org/tapestry5/tapestry-
> core/ref/org/apache/tapestry/corelib/components/FormInjector.html
> >
> > An example can be found here:
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/java/org/apache/tapestry/integration/app1/pages/FormInjec
> torDemo.java?view=markup
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormFragmentDemo.tml?view=markup
> >
> >
> >
> > On Tue, Apr 15, 2008 at 3:51 PM, Michael Dukaczewski <
> > [EMAIL PROTECTED]> wrote:
> >
> > > I am using Tapestry 5.0.11 and have a problem with a dynamic list
> of
> > > strings in a form. What I am trying, is the following:
> > >
> > > In the Page.java:
> > >
> > > @Persist
> > > private List items;
> > >
> > > @Property
> > > private String item;
> > >
> > > public List getItems() {
> > >if (items == null) {
> > >items = new LinkedList();
> > >}
> > >return items;
> > > }
> > >
> > > public void onSelectedFromAdd() {
> > >getItems().add("");
> > > }
> > >
> > > And in the Page.tml:
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > >
> > > I have a list of values, the user has to enter. The number of
> values,
> > > that have to be typed in, is dynamic, so the user has to extend the
> form.
> > > The add button works, but the values are not saved. Can someone
> tell me,
> > > that I am doing wrong?
> > >
> > >
> > > ---
> --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
>
>
>
>
> --
> Best regards,
>
> Igor Drobiazko

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



RE: Dynamic list of strings in a form

2008-05-02 Thread Blower, Andy
I've not seen these demos before and although they look like integration tests, 
they also look really informative and very useful starting points for 
experimentation. There doesn't seem to be any release or package with them in 
and I can't figure out how to retrieve them en masse from the svn repository 
(probably don't have permissions anyway) so is there any way to get hold the 
source of these demo/test apps to learn and play around with? Obviously I could 
get a file at a time from the viewvc webpages.. but that would take a rather 
long (and boring) time.

> -Original Message-
> From: Igor Drobiazko [mailto:[EMAIL PROTECTED]
> Sent: 15 April 2008 15:28
> To: Tapestry users
> Subject: Re: Dynamic list of strings in a form
>
> Ups, wrong template url. This one is the correct one:
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormInjectorDemo.tml?view=markup
>
> On Tue, Apr 15, 2008 at 4:20 PM, Igor Drobiazko
> <[EMAIL PROTECTED]>
> wrote:
>
> > Have a look at the FormInjector component. This component is what you
> > need.
> > http://tapestry.apache.org/tapestry5/tapestry-
> core/ref/org/apache/tapestry/corelib/components/FormInjector.html
> >
> > An example can be found here:
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/java/org/apache/tapestry/integration/app1/pages/FormInjec
> torDemo.java?view=markup
> >
> > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-
> core/src/test/app1/FormFragmentDemo.tml?view=markup
> >
> >
> >
> > On Tue, Apr 15, 2008 at 3:51 PM, Michael Dukaczewski <
> > [EMAIL PROTECTED]> wrote:
> >
> > > I am using Tapestry 5.0.11 and have a problem with a dynamic list
> of
> > > strings in a form. What I am trying, is the following:
> > >
> > > In the Page.java:
> > >
> > > @Persist
> > > private List items;
> > >
> > > @Property
> > > private String item;
> > >
> > > public List getItems() {
> > >if (items == null) {
> > >items = new LinkedList();
> > >}
> > >return items;
> > > }
> > >
> > > public void onSelectedFromAdd() {
> > >getItems().add("");
> > > }
> > >
> > > And in the Page.tml:
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > >
> > > I have a list of values, the user has to enter. The number of
> values,
> > > that have to be typed in, is dynamic, so the user has to extend the
> form.
> > > The add button works, but the values are not saved. Can someone
> tell me,
> > > that I am doing wrong?
> > >
> > >
> > > ---
> --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
>
>
>
>
> --
> Best regards,
>
> Igor Drobiazko

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



RE: page activation + components

2008-04-30 Thread Blower, Andy
This is not what I understood 'perthread' scope to be. I thought that it meant 
that each thread using a service gets its own instance of the service to use, 
even though that instance may not be the same as any previous instance it used. 
In other words, nothing to do with user sessions, it's just for services that 
are not thread safe and cannot be singletons.

Have I got the wrong end of the stick here?

> -Original Message-
> From: Andy Huhn [mailto:[EMAIL PROTECTED]
> Sent: 29 April 2008 17:34
> To: Tapestry users
> Subject: Re: page activation + components
>
>
> Hello,
>
> You can define the scope of each service...you can set that particular
> service to be tied to only one session.
>
> See http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html, and
> search for "perthread".
>
> Thanks,
> Andy
>
> On Tue, 29 Apr 2008 18:02:52 +0200, "János Jarecsni"
> <[EMAIL PROTECTED]> wrote:
> > Hi there,
> >
> > the service approach (as I expected) is session-agnostic (and is
> > page-independent so concurrent users would interfere badly),
> therefore is
> > not ok.
> >
> > I will now try the Environment approach... if that is session-aware
> :)
> >
> > thx again
> > janos
> >
> > 2008/4/29 János Jarecsni <[EMAIL PROTECTED]>:
> >
> >> Hi Chris,
> >>
> >> even so you could help :) I want this kind of generic way of passing
> >> around information (component to component communication :)) so I'll
> > look
> >> for the solutions Kristian and you outlined.
> >>
> >> thanks!
> >>
> >> cheers,
> >> janos
> >>
> >> 2008/4/29 Chris Lewis <[EMAIL PROTECTED]>:
> >>
> >> > Janos,
> >> >
> >> > Without code or a description of your actual goal, I'm finding
> your
> >> > situation too hypothetical to really digest. The one thing I can
> point
> >> > out is what you said about wanting a component to set a property
> in
> > the
> >> > page. If you want to do that, then you have to know the class of
> the
> >> > page and so injecting a page would make sense. Of course that
> means
> >> > tightly coupling a component to a page, which to me doesn't make
> > sense.
> >> > If you simply need a generic way of passing data between pages and
> >> > components, consider using a service that provides an untyped list
> or
> >> > putting something in the environment as Kristian suggested. I'm
> sorry
> > I
> >> > can't be more helpful but as I said I'm not clear on what you're
> > really
> >> > trying to do.
> >> >
> >> > good luck
> >> > chris
> >> >
> >> > János Jarecsni wrote:
> >> > > Hi Chris,
> >> > >
> >> > > I thought of pages as "contexts" for the components embedded
> within
> >> > them.
> >> > > So, in one event handler of a component I would like to set some
> >> > property or
> >> > > another (in the page object), and the other components in the
> page,
> >> > which
> >> > > are also able to access this property may change their
> appearance
> >> > (say, the
> >> > > .TML would test the property). Maybe I'm on a wrong track,
> please
> > let
> >> > me
> >> > > know :)
> >> > >
> >> > > thx
> >> > > Cheers,
> >> > > janos
> >> > >
> >> > > 2008/4/29 Chris Lewis <[EMAIL PROTECTED]>:
> >> > >
> >> > >
> >> > >> Janos,
> >> > >>
> >> > >> I'm having a hard time understanding a case that a component
> should
> >> > know
> >> > >> in which page it is embedded, so my suggestion probably wasn't
> a
> > good
> >> > >> one. Activation contexts aren't meant for components but for
> pages
> > -
> >> > you
> >> > >> should be using component parameters to configure them, and if
> it's
> > a
> >> > >> more sophisticated component, probably a service.
> >> > >>
> >> > >> chris
> >> > >>
> >> > >> János Jarecsni wrote:
> >> > >>
> >> > >>> and how a component can get to know the page in which it is
> >> > included? I
> >> > >>> mean, I can't @InjectPage, as the component will be included
> in
> > many
> >> > >>>
> >> > >> kinds
> >> > >>
> >> > >>> of pages.
> >> > >>>
> >> > >>> @Kristian: thx for the many ways :) I'll try these, hope that
> the
> >> > >>> @Environmental stuff is scalable (I'm trying to bypass session
> >> > creation
> >> > >>>
> >> > >> as
> >> > >>
> >> > >>> much as possible)
> >> > >>>
> >> > >>> Is there a doc on the various annotations available?
> >> > >>>
> >> > >>> @Michael:
> >> > >>> Could you include a tiny bit of example? THX!
> >> > >>>
> >> > >>> Thx to you all
> >> > >>> cheers
> >> > >>> janos
> >> > >>>
> >> > >>> 2008/4/29 Chris Lewis <[EMAIL PROTECTED]>:
> >> > >>>
> >> > >>>
> >> > >>>
> >> >  5) @InjectPage the page and call the getter
> >> > 
> >> >  Kristian Marinkovic wrote:
> >> > 
> >> > 
> >> > > hi janos,
> >> > >
> >> > > there are several possibilities:
> >> > >
> >> > > 1) declare a component parameter and pass in the variable
> >> > >
> >> > > 2) put it in a ASO and inject the ASO in all your components
> >> > (using
> >> > > @ApplicationState)
> >> > > the drawback is that any other page or component will be
> able to
>

RE: AW: Automatic class reloading on Tomcat 6 not working for me

2008-04-24 Thread Blower, Andy
You're quite right, this is what's happening rather than the live class 
reloading. My mistake.

> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> Sent: 24 April 2008 07:14
> To: Tapestry users
> Subject: Re: AW: Automatic class reloading on Tomcat 6 not working for
> me
>
> Tomcat in eclipse has an Automatic publishing feature, which is not to
> be confused with live class reloading. Publishing requires a partial
> restart and republishes the war, you will notice the difference when
> your web application grows, running the same app under jetty reloading
> reloading is instant whereas under Tomcat it degrades significantly as
> it grows.
>
>
> Blower, Andy wrote:
> > Tomcat 5.5 live reloading works for me with Eclipse. I followed the
> setup process from the Tapestry 5 - Building Web Applications book and
> it works fine. I've not really got into figuring out how a real dev
> environment should be set up yet - I'm just evaluating/prototyping so
> far. I've not tried TC6.
> >
> >
> >> -Original Message-
> >> From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> >> Sent: 23 April 2008 15:44
> >> To: Tapestry users
> >> Subject: Re: AW: Automatic class reloading on Tomcat 6 not working
> for
> >> me
> >>
> >> Hi Josh,
> >>
> >> I am pleasantly surprised to hear it works in IntelliJ, has anyone
> got
> >> it working in eclipse?
> >>
> >> Josh Canfield wrote:
> >>
> >>> Hmm... after reading the title again I guess the fact that it works
> >>>
> >> in
> >>
> >>> Tomcat 5.5 is irrelevant... sorry for the sidetrack.
> >>>
> >>> On Thu, Apr 17, 2008 at 10:01 AM, Josh Canfield
> >>>
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >>>> I use Tomcat 5.5 and IntelliJ, I haven't tried tomcat in eclipse.
> >>>>
> >> I've
> >>
> >>>> found that if I don't allow IntelliJ to replace the classes while
> >>>> debugging then the Tapestry reloading will work. Otherwise, it
> might
> >>>> work once then goes back to the old class.
> >>>>
> >>>> Josh
> >>>>
> >>>>
> >>>> On Thu, Apr 17, 2008 at 2:44 AM, Martin Kersten
> >>>> <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>>
> >>>>> Is it still true? I use hot replacement for components and
> somehow
> >>>>>
> >> the class
> >>
> >>>>> is reloaded. I thought this issue was solved. Do I miss
> something?
> >>>>> (Using also T6)
> >>>>>
> >>>>> -Ursprüngliche Nachricht-
> >>>>> Von: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> >>>>> Gesendet: Donnerstag, 17. April 2008 11:05
> >>>>> An: Tapestry users
> >>>>> Betreff: Re: AW: Automatic class reloading on Tomcat 6 not
> working
> >>>>>
> >> for me
> >>
> >>>>> You cannot use Tomcat for class reloading, this is not a bug,
> it's
> >>>>>
> >> a feature which apparently is a result of the limitations Java has
> for
> >> package traversal and exploration, Jetty somehow gets around this
> >> partially but its also not perfect...
> >>
> >>>>> http://tapestryjava.blogspot.com/2007/02/fighting-with-
> tomcat.html
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Filip S. Adamsen wrote:
> >>>>>
> >>>>>
> >>>>>> There's an equivalent antiResource(s)Locking attribute as well
> >>>>>>
> >> that I
> >>
> >>>>>> think you might need.
> >>>>>>
> >>>>>> I use Jetty for all my development, though, and only test in
> >>>>>>
> >> Tomcat
> >>
> >>>>>> before deploying my applications.
> >>>>>>
> >>>>>> -Filip
> >>>>>>
> >>>>>> On 2008-04-16 18:45, Javier Molina wrote:
> >>>>>>
> >>>>>>
> >>>>>>> Do you work on Windows? I've changed my packaging to build a
> .jar
> >>>>>>> with my classes and put it in WEB-INF/lib instead of havin

RE: AW: Automatic class reloading on Tomcat 6 not working for me

2008-04-23 Thread Blower, Andy
Tomcat 5.5 live reloading works for me with Eclipse. I followed the setup 
process from the Tapestry 5 - Building Web Applications book and it works fine. 
I've not really got into figuring out how a real dev environment should be set 
up yet - I'm just evaluating/prototyping so far. I've not tried TC6.

> -Original Message-
> From: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> Sent: 23 April 2008 15:44
> To: Tapestry users
> Subject: Re: AW: Automatic class reloading on Tomcat 6 not working for
> me
>
> Hi Josh,
>
> I am pleasantly surprised to hear it works in IntelliJ, has anyone got
> it working in eclipse?
>
> Josh Canfield wrote:
> > Hmm... after reading the title again I guess the fact that it works
> in
> > Tomcat 5.5 is irrelevant... sorry for the sidetrack.
> >
> > On Thu, Apr 17, 2008 at 10:01 AM, Josh Canfield
> <[EMAIL PROTECTED]> wrote:
> >
> >> I use Tomcat 5.5 and IntelliJ, I haven't tried tomcat in eclipse.
> I've
> >> found that if I don't allow IntelliJ to replace the classes while
> >> debugging then the Tapestry reloading will work. Otherwise, it might
> >> work once then goes back to the old class.
> >>
> >> Josh
> >>
> >>
> >> On Thu, Apr 17, 2008 at 2:44 AM, Martin Kersten
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >>> Is it still true? I use hot replacement for components and somehow
> the class
> >>> is reloaded. I thought this issue was solved. Do I miss something?
> >>> (Using also T6)
> >>>
> >>> -Ursprüngliche Nachricht-
> >>> Von: Peter Stavrinides [mailto:[EMAIL PROTECTED]
> >>> Gesendet: Donnerstag, 17. April 2008 11:05
> >>> An: Tapestry users
> >>> Betreff: Re: AW: Automatic class reloading on Tomcat 6 not working
> for me
> >>>
> >>>
> >>> You cannot use Tomcat for class reloading, this is not a bug, it's
> a feature which apparently is a result of the limitations Java has for
> package traversal and exploration, Jetty somehow gets around this
> partially but its also not perfect...
> >>> http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html
> >>>
> >>>
> >>>
> >>>
> >>> Filip S. Adamsen wrote:
> >>>
>  There's an equivalent antiResource(s)Locking attribute as well
> that I
>  think you might need.
> 
>  I use Jetty for all my development, though, and only test in
> Tomcat
>  before deploying my applications.
> 
>  -Filip
> 
>  On 2008-04-16 18:45, Javier Molina wrote:
> 
> > Do you work on Windows? I've changed my packaging to build a .jar
> > with my classes and put it in WEB-INF/lib instead of having the
> > exploded classes in WEB-INF/classes but once the webapp is
> started, I
> > can't replace the .jar, the file is locked. I have tried to set
> > antiJARLocking="true" in the  element but that doesn't
> help.
> >
> > Is anyone working with tapestry 5 and tomcat on windows with
> working
> > auto-reload of classes?
> >
> > Filip S. Adamsen escribió:
> >
> >> I believe the reloading is the only Tapestry-related thing
> affected
> >> by this. But I use Maven and archiveClasses in both development
> and
> >> production so I can't say for sure.
> >>
> >> -Filip
> >>
> >> On 2008-04-16 16:38, Stranzenbach, Ralf wrote:
> >>
> >>> Hi.
> >>>
> >>> Does this "tomcat bug" affect only the class/page reloading
> process
> >>> or is there any other significant problem that may arise during
> >>> development / production.
> >>>
> >>> I've tried to create a sample application using Tomcat +
> Tapestry
> >>> 5.0.10 and everything seems to work fine beside that reloading
> issues.
> >>>
> >>> - Ralf
> >>>
> >>>
> >>> 
> >>>
> >>> Von: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
> >>> Gesendet: Mi 16.04.2008 16:36
> >>> An: Tapestry users
> >>> Betreff: Re: Automatic class reloading on Tomcat 6 not working
> for
> >>> me
> >>>
> >>>
> >>>
> >>> Hi,
> >>>
> >>> Due to the way class loaders work in Tomcat you have to jar
> your
> >>> classes etc. and put the jar into WEB-INF/lib.
> >>>
> >>> http://tapestry.apache.org/tapestry5/tomcat.html
> >>>
> >>> -Filip
> >>>
> >>> On 2008-04-16 13:42, Javier Molina wrote:
> >>>
>  I'm working with Tapestry 5.0.11 and Tomcat 6 (tested on
> 6.0.14
>  and 6.0.16). Automatic class reloading doesn't work for pages
>  (there are no components yet in this test application, so I
>  haven't checked that).
>  Jetty 6 works fine and does autoreload pages.
> 
>  Is this a known issue? Do I have to configure anything in
> Tomcat
>  to get class reloading to work?
> 
>  Thank you.
> 
> >>> ---
> 
> >>> -- To unsubscribe, e-mail: users-
> [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL P

RE: Problem with select and beanEditForm

2008-04-22 Thread Blower, Andy
It's already mentioned in this page:

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


> -Original Message-
> From: Tomasz Dziurko [mailto:[EMAIL PROTECTED]
> Sent: 22 April 2008 14:50
> To: Tapestry users
> Subject: Re: Problem with select and beanEditForm
>
> Yea, it helped. Just added method below into AppModule
>
> public static void
> contributeApplicationDefaults(MappedConfiguration
> configuration)
> {
> configuration.add(TapestryConstants.PRODUCTION_MODE_SYMBOL,
> "false");
> }
>
> And it also solved my problem showing which my method caused problem
> completely not connected with tapestry :)
>
> Thank you for help, again community at users@tapestry.apache.org
> showed its power and potential :)
>
> PS: What about adding it to WIki Pages? I don't see it clearly written
> in any of wiki articles. I could do it, but I am not sure is it good
> idea :)
>
> -
> 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 actionlink, ajax zone and user onclick handler

2008-04-21 Thread Blower, Andy
Chris,

Just wanted to say that's a very well written wiki page which seems to pull 
together all relevant points without being too verbose. Bravo.

Hope you get the urge to write more.

Andy.

> -Original Message-
> From: Luca Fossato [mailto:[EMAIL PROTECTED]
> Sent: 19 April 2008 22:30
> To: Tapestry users
> Subject: Re: T5 actionlink, ajax zone and user onclick handler
>
> Hi Chris,
>
> thank you !
>
> I will read your article and I will try to use the mixin to implement
> the confirmation dialog for my "delete" actionLink.
> Give me some days to digest all this stuff and to implement it into my
> test application ;^)
>
> Regards,
> Luca
>
> Chris Lewis wrote:
> > Hi Lucca,
> >
> > I'd been looking for a good example to use to write a wiki explaining
> > the integration javascript by Tapestry, and your request gave me what
> I
> > was looking for. Check out the article here:
> > http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained
> (project
> > source: http://thegodcode.net/tapestry5/jsclarity-project.zip). Apart
> > from discussing in detail how T5 integrates JS, it shows how to
> create a
> > mixin that can be added to link components. The mixin attaches js
> code
> > to the component, so that when the link is clicked the user is
> presented
> > with a confirmation box. Canceling the box cancels the click, while
> OK
> > allows it to proceed as normal. This should be useful for those
> looking
> > to add click confirmation functionality, but in your case I'm not
> sure
> > if it will help. I ask you to try and see, but the problem will be
> how
> > T5 attaches the js handlers for the ajax code (that is, they may fire
> > before the confirmation code).
> >
> > Anyway, I think it will be helpful to those looking for such an
> > explanation, and I hope it helps you.
> >
> > chris
>
> -
> 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: Could not find a coercion from type java.lang.String to type com.****.lighting.guidecontrol.view.BreadcrumbBean

2008-04-18 Thread Blower, Andy
Me too Jan, thank you.

I was also passing a list via the template loop component attribute 'source' as 
well, and I was also wrapping it with ${} - I've obviously spent too long using 
the JSP EL! This would be a good gotcha to add to the wiki or even possibly the 
T5 documentation...?

Anyway it looks like I was completely wrong about the loop component then. I 
could still use an explanation of volatility & forms though if anyone can point 
me in the right direction.

> -Original Message-
> From: Jan Vissers [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2008 16:06
> To: Tapestry users
> Subject: Re: Could not find a coercion from type java.lang.String to
> type com..lighting.guidecontrol.view.BreadcrumbBean
>
> Spot on! Now I also understand why the .tml passing didn't work. This
> is
> a great 'a-ha' moment for me!
>
> -J.
> On Fri, 2008-04-18 at 17:03 +0200, Chris Lewis wrote:
> > Ok I think I see the problem. In your layout replace this:
> >
> > t:breadCrumbs="${basePage.breadCrumbHolder.model}"
> >
> > with this:
> >
> > t:breadCrumbs="basePage.breadCrumbHolder.model"
> >
> > Notice the lack of ${}. ${} is trying to convert it to a string,
> which
> > it's not. When passing params to components you don't use expansions,
> > what you want is the object property from the class. The default
> binding
> > prefix for params is "prop" which is what you want in this case.
> >
> > Jan Vissers wrote:
> > > I think I'm getting a bit further now - sorry to spam this list by
> the
> > > way...
> > >
> > > If I pass the breadCrumb model in the Component class instead via
> the
> > > Component Template something is happening.
> > >
> > > So instead of:
> > >  > > t:breadCrumbs="${basePage.breadCrumbHolder.model}" />
> > >
> > > I do in .java
> > > @Component(inheritInformalParameters = true, parameters =
> > > {
> "loginPage=inherit:loginPage","breadCrumbs=basePage.breadCrumbHolder.mo
> del" })
> > >
> > >
> > >
> > > On Fri, 2008-04-18 at 16:47 +0200, Jan Vissers wrote:
> > >
> > >> The layout component that passes in the 'breadCrumb' model to the
> > >> 'heading' component which should render the breadcrumbs...
> > >>
> > >>
> > >> 
> > >>  > >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > >> http://www.w3.org/1999/xhtml";
> > >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > >> 
> > >>  > >> content="text/html;charset=utf-8" />
> > >> 
> > >> ${title}
> > >> 
> > >> 
> > >> 
> > >> 
> > >>  > >> t:breadCrumbs="${basePage.breadCrumbHolder.model}" />
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >>
> > >> On Fri, 2008-04-18 at 16:43 +0200, Chris Lewis wrote:
> > >>
> > >>> And that is the part I want to see, from the template code which
> you
> > >>> still haven't shared ;-). What I'm referring to is your .tml file
> where
> > >>> you use this component.
> > >>>
> > >>> Jan Vissers wrote:
> > >>>
> >  In the snippet below if I change:
> >  public List getBreadCrumbs()
> > 
> >  and let it return a freshly created list. The loop construct
> works.
> >  However via the @Parameter (passing it it) doesn't.
> > 
> >  -J.
> > 
> > 
> >  On Fri, 2008-04-18 at 16:27 +0200, Jan Vissers wrote:
> > 
> > 
> > > Here it is:
> > >
> > > import java.util.List;
> > >
> > > import org.apache.log4j.Logger;
> > > import org.apache.tapestry.annotations.Parameter;
> > >
> > > import com.philips.lighting.guidecontrol.view.BreadcrumbBean;
> > >
> > > /**
> > >  * The heading component holds the following pieces of Heading
> > > information.
> > >  *
> > >  * 
> > >  *
> > > * > > > *
> > > * > > > * > > > * @author Cumquat Information Technology > > > * > > > */ > > > public class Heading { > > > private static final Logger logger = > > > Logger.getLogger(Heading.class); > > > > > > @Parameter > > > private boolean loginPage = false; > > > > > > @Parameter > > > private List breadCrumbs; > > > > > > private int index; > > > > > > private BreadcrumbBean crumb; > > > > > > public boolean isLoginPage() { > > > return loginPage; > >

RE: Could not find a coercion from type java.lang.String to type com.****.lighting.guidecontrol.view.BreadcrumbBean

2008-04-18 Thread Blower, Andy
I think I encountered the same issue last week where I wanted to loop over a 
List of objects that were instances of one of my own classes. The loop 
component code finds it necessary to be able to convert the object into a 
string and then back again when populating your value property variable from 
the element of the list.

The reason for this appears to be something to do with forms and volatility, 
but I really don't understand those issues at all. (Note: it would be 
*fantastic* if someone could explain the concepts behind forms and volatility 
because it's not clear to me from the T5 documentation)

Instead of creating a coercer for my class, which I had no desire to do as this 
loop was not part of a form, I made my own component handle the 
looping/iteration. I could have made a non-coercing generic loop component, but 
as I was already creating a component whose template just needed a loop in, I 
just used that component.

I don't know what the general thought is about the loop component, but having 
to coerce each element to a string for form support seems to me to be more 
applicable to a special case of loop than a generic loop. But I'm very new to 
Tapestry so I might be getting this all wrong.

Does that make sense?

Andy.

> -Original Message-
> From: Jan Vissers [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2008 13:28
> To: Tapestry users
> Subject: Could not find a coercion from type java.lang.String to type
> com..lighting.guidecontrol.view.BreadcrumbBean
>
> Hi,
>
> Just to make sure I'm not missing something.
>
> In T4 when I wrote a @For construct I could use value="..." as long as
> I
> provided a setter|getter pair for the class involved - in this case
> BreadcrumbBean. I want to iterate over a list of beans and use each
> instance individually. Now T5 throws up on me with this nice coercion
> message. Does this mean I need to contribute my own coercion - or is
> there a more simple way? In my case BreadcrumbBean is a simple class
> holding three String members.
>
> Thanks (again :-))
> -J.
>
>
> -
> 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: How do I access a page property in my component

2008-04-18 Thread Blower, Andy
Add the @Property annotation to dummy in component class to provide 
getter+setter?

> -Original Message-
> From: Jan Vissers [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2008 11:59
> To: nicholas Krul
> Cc: Tapestry users
> Subject: Re: T5: How do I access a page property in my component
>
> This approach doesn't work.
>
>
> Top level class->
>
>   public abstract class AbstractBasePage {
>   private int dummy;
>
>   public int getDummy() {
>  return 14575; //Test
>   }
>   }
>
> Component class (which is part of Layout)
>   @Parameter
>   private int dummy;
>
> Component template
>   ${dummy}
>
> -> without getter in Component class: error
> -> with getter in Component class: always 0
>
> Any other ideas - I must be doing some wrong, right?
>
> -J.
>
>
>
> On Fri, 2008-04-18 at 11:43 +0100, nicholas Krul wrote:
> > @Paramater per property required.
> > If you need access to all of them as a bundle, consider wrapping them
> > into a class.
> >
> >
> >
> >
> > ...
> > or (I guess) you could use
> > @Parameter
> > private MyBasePageClass basePage;
> >
> > and make sure that the MyBasePageClass has a getThis(return this;)
> > method
> >
> > bind as 
> >
> > (I think)
> >
> >
> > I'd suggest trying the first...
> > but, at least you have a solution that works.
> >
> > --nK
> >
> > On Fri, Apr 18, 2008 at 11:32 AM, Jan Vissers
> <[EMAIL PROTECTED]>
> > wrote:
> > Ok - figured out what @InjectContainer gives me.
> > Although I'm not quite happy with it, as it returns another
> > component,
> > which contains the component - but not the actual page. This
> > is one
> > level further up the foodchain for me ;-)
> >
> > Would be nice to have a direct way to access page
> > properties :-(
> >
> > -J.
> >
> >
> > On Fri, 2008-04-18 at 12:26 +0200, Jan Vissers wrote:
> > > Thanks - but I don't understand...
> > >
> > > What is the parameter - the containing page?
> > >
> > > Basically I want to access a property from my
> > 'AbstractBasePage' which
> > > has some common properties on it from a component that is
> > placed on a
> > > concrete page.
> > >
> > > @Chris: regarding your hint of @InjectContainer...? what
> > should the type
> > > be - 'Page'?
> > >
> > > -J.
> > >
> > > On Fri, 2008-04-18 at 11:23 +0100, nicholas Krul wrote:
> > > > bind it as a paramater
> > > >
> > > > @Paramater(required=true) //only if required
> > > > Object needed
> > > >
> > > >
> > > >
> > > > On Fri, Apr 18, 2008 at 11:07 AM, Chris Lewis
> > <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > > Jan,
> > > > >
> > > > > There's probably a simpler way, but you should be able
> > to use
> > > > > @InjectContainer in your component to get the page and
> > call whatever
> > > > > methods (in your case a a getter) you want. I imagine
> > there's a more
> > > > > terse way, but I'm not sure what it would be.
> > > > >
> > > > > chris
> > > > >
> > > > > Jan Vissers wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I want to access a page property from within my
> > component - that has
> > > > > > been placed on that page. In T4 I had something like
> > 'page.' - how is
> > > > > > this done in T5?
> > > > > >
> > > > > > Thx,
> > > > > > -J.
> > > > > >
> > > > > >
> > > > > >
> > -
> 
> > > > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > http://thegodcode.net
> > > > >
> > > > >
> > > > >
> > -
> 
> > > > > 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: AW: Getting Answers on the User List

2008-04-15 Thread Blower, Andy
Blimey, they really are out to get you Rob!

Run, run like the wind...

> -Original Message-
> From: Rob Smeets [mailto:[EMAIL PROTECTED]
> Sent: 15 April 2008 11:27
> To: Tapestry users
> Subject: Re: AW: Getting Answers on the User List
>
> Oh, Jesse help me here. You wrote that you tend to delete my emails
> without
> reading them but you are obviously replying to one of them. Like those
> reading now, I'm smelling something fishy here. Or did your slave
> master
> Howard come to drag and force you to reply? It seems, like the other
> high
> profile users, you too are quietly dissapearing but Howard came to
> bribe you
> to come and show your face here because of the remark I made about you.
> That's sad. If you've quit Tapestry don't be shy to admit. Above all
> you'll
> be free from your master since he's been treating you like a slave for
> too
> long a time. And everyone here would rejoice a slave is finally set
> free.
>
> Yours friendly,
>
> Rob
>
> On Tue, Apr 15, 2008 at 2:19 AM, Jesse Kuhnert <[EMAIL PROTECTED]>
> wrote:
>
> > Just very busy with work and playing video games.  (Tapestry has
> > improved my lifestyle in this area immensely )
> >
> > I usually spend more time writing code and learning than
> communicating
> > with humans,  so it's easy to get lost in that sometimes.
> >
> > (sorry if you've felt ignored,  I tend to delete your private emails
> > when I see who the sender is without reading them - as you have
> > nothing interesting to offer)
> >
> > On Mon, Apr 14, 2008 at 9:28 AM, Rob Smeets <[EMAIL PROTECTED]>
> wrote:
> > > And please allow me to also mention that, not only are high profile
> > Tapestry
> > >  users abandoning Tapestry, high profile sites which were using
> Tapestry
> > are
> > >  also ditching Tapestry. An example is theserverside.com which
> whacked
> > >  Tapestry like a baseball from their servers and replaced it with
> > another
> > >  webframework, maybe Wicket, I'm not sure. This because they have a
> > business
> > >  model that looked forward into the future. Their model wasn't
> > compatible
> > >  with Tapestry, which would have meant in every major release they
> would
> > have
> > >  to rewrite their frontend all over again and again.
> > >
> > >  BTW, why is Jesse Kuhnert not participating anymore in the forum?
> Is he
> > >  going to be the next to deflect?
> > >
> > >  Yours friendly,
> > >
> > >  Rob
> > >
> > >
> > >
> > >  On Mon, Apr 14, 2008 at 12:41 PM, Rob Smeets <[EMAIL PROTECTED]>
> > wrote:
> > >
> > >  > Howard,
> > >  >
> > >  > Please stop throwing a dark blanket on me condemning me. Why not
> pick
> > on
> > >  > the points I made head on and defend yourself? Wel,
> > >  > I'm not surprised you're not doing it because you are not
> destined to
> > take
> > >  > challenges head on.
> > >  > Is it not true Tapestry's popularity has diminished over the
> last
> > couple
> > >  > of years or so? Is it not true high profile users have
> > >  > fled away from Tapestry like flies. If you dispute this I can
> even
> > name
> > >  > more names. That within 7 years you've
> > >  > trained only 100 developers says a lot about the status of
> Tapestry.
> > I
> > >  > would have expected more than a 1,000 within the seven years,
> > >  > if you say Tapestry is one of the best. I know the mass used to
> > follow
> > >  > Tapestry. But the unfortunate thing is at the release of
> > >  > any major version, you punch them hard in the stomach and then
> they
> > flee
> > >  > from the schock and pain. At a point in time your
> > >  > ego became inflated to an explosive point. And as we all know,
> from
> > any
> > >  > bubble there is a burst. That's why you're in the current
> > >  > state.
> > >  > The solution to all your current travails? Maybe you should
> rename
> > >  > Tapestry 5, to maybe Wicketstry, because it
> > >  > resembles Wicket so much. By doing so all the misery and the
> hooplas
> > about
> > >  > backward incompatibilty would end and you'll have
> > >  > your peace of mind.
> > >  >
> > >  > Howard, I'm only a messenger and as the saying goes, don't
> persecute
> > the
> > >  > messenger.
> > >  >
> > >  > Yours friendly,
> > >  >
> > >  > Rob
> > >  >
> > >  > On Fri, Apr 11, 2008 at 9:07 PM, Howard Lewis Ship
> <[EMAIL PROTECTED]>
> > >  > wrote:
> > >  >
> > >  > > My father in law is a brilliant marketer; he has this
> incredible
> > >  > > ability to pick up the jargon and terminology of whatever he's
> > working
> > >  > > with.  I remember picking him up from the airport once and
> he's
> > >  > > chatting about Tapestry and Spring and all that ... and he
> really
> > >  > > doesn't know what it all is (nor would anyone expect him to),
> but
> > he's
> > >  > > able to use the correct words at the correct time and sound
> like he
> > >  > > knows how everything fits together.  It's actually quite
> > impressive.
> > >  > >
> > >  > > I kind of picture Rob as a dark mirror image of this; perhaps
> he's
> > a
> > >

RE: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Blower, Andy
Our codebase? So, you do use T5 then Rob? Poor you, I sympathise with using 
technology you dislike.

I'm really looking forward to your perfectly designed web framework where you 
took the trouble to "Think and design before you code" though, avoiding 
temptations and saving much misery and pain. When are you due to announce it?

I've got a great name for you to use, you could call it 'Second Coming'.

Yours friendliest,

Andy.

> -Original Message-
> From: Rob Smeets [mailto:[EMAIL PROTECTED]
> Sent: 14 April 2008 17:10
> To: Tapestry users
> Subject: Re: RequestGlobals in a PersistentFieldStrategy
> >
> > In fact, if I was doing the code again, module classes would not have
> > instance methods, only static methods.
>
> Please, please help. Howard, take your hands off that code, ok. You'll
> break
> our current code base. You may do it in Tapestry 6. Because, again that
> would be it's own beast- as usual another 100% backward incompatible
> with
> previous versions. Tapestry users, BEWARE!!
>  A piece of advice to Howard: Think and design before you code. If you
> do so
> you would avoid all these temptations and save so many people misery
> and
> pain.
>
> Yours friendly,
>
> Rob

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



RE: Getting Answers on the User List

2008-04-11 Thread Blower, Andy
Great post Onno! +1

Like Jan, I also find Rob pretty amusing. You never know, maybe one day his 
messages about the version incompatibilities will help someone who has somehow 
managed to miss the statements on the Tapestry site, however unlikely that 
might be.

> > Take for example Kent Tong, the former Tapestry commiter. He has now
> even
> > written a book on
> > Wicket.
>
> ..and he has written yet another one on JSF after that. So clearly he
> must
> not like Wicket very much :o)
>
> Seriously though: I have used Tapestry 3 on several projects. I've used
> Tapestry 4 on several projects and I'm currently learning my way around
> Tapestry 5. Inbetween I've also done a couple of projects using Wicket.
>
> I think Wicket is much easier to learn, even than Tapestry 5. Howard
> often
> claims everything is easy in T5 and for him that's probably true. Not
> only
> is Howard very intelligent and talented, but he also knows everything
> there
> is to know about Tapestry.
> But T5 uses naming-conventions and annotations for methods, properties
> and
> parameters instead of simply extending a base-class. It also injects
> all
> kinds of stuff into the components using annotations and if you want to
> use
> a service, you'll have to know how to get to it.
> All of this means your IDE won't help you much when you get started and
> you
> have have to learn an awful lot (annotations, naming conventions,
> services
> and a little about the inner workings of Tapestry) before you can
> actually
> really build something other than an HelloWorld application. I still
> find
> myself going back to the documentation all the time.
> Once you have learned all those things though, Tapestry is extremely
> productive and powerful.
>
> And even though I claimed Wicket is much easier to learn, once I
> started
> creating more complex web-applications with it, I've also lost many
> days
> trying to figure out how I could make Wicket components do the things I
> wanted them to do and often I found that I was writing a lot of code
> for
> simple things (especially a lot of simple models, where Tapestry only
> expected me to write a getter on the page).
>
> You repeatedly stated that you don't like Tapestry. Mostly because of
> the
> lack of backward compatibility. I understand that and I have old
> projects in
> T3 and T4 as well and migrating them over to T5 would take months or
> even
> years. Supporting them requires knowledge of old versions of Tapestry.
> This
> is indeed a problem. But I also have customers that still have old
> applications written with plain servlets. Applications written with
> JSP's
> (and scriptlets) and applications written with Struts. I don't like
> those
> technologies but it's basically the same thing: Time moves on and so
> does
> technology. Old stuff that works doesn't get migrated simply because I
> happen to prefer the latest and greatest tools.
>
> I now prefer Wicket over T3 and T4, but I am starting to prefer T5 over
> Wicket again. Every framework has its pros and cons and fits a
> different
> audience and target. I have advised different customers to use Tapestry
> in
> one situation and Wicket in another (different projects, different
> requirements). They are all still happy with those choices. Each
> framework
> has its place and is just another tool in your toolbox.
>
> You can choose to either use Tapestry or to use something else. Just be
> glad
> that a group of people is willing to share their work with the rest of
> world. Frameworks like Click or Wicket probably wouldn't have existed
> if it
> wasn't for Tapestry. And Tapestry 5 probably would have looked
> different if
> Wicket and Rails hadn't been around.
> All frameworks are important because they push innovation, making each
> other
> a little better over time.
>
>
> regards,
>
> Onno

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



RE: T5: beta?

2008-04-10 Thread Blower, Andy
The fact that you're using T5 in the real world at this beta stage is very good 
news for the upcoming release IMO, even if it delays the RC a bit. (not too 
much though I hope ;-)

> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 09 April 2008 19:32
> To: Tapestry users
> Subject: Re: T5: beta?
>
> We're still not making a big deal; the transition from alpha to beta
> affects us more than the rest of the world.  I think we'll probably
> start seeing a new branch for 5.0 work and a switch-over of trunk to
> 5.1 pretty soon.
>
> In the meantime, I'm using 5.0.12 for a client project and finding a
> fair amount of rough edges and minor bugs.  I'd just as soon take care
> of those in parallel with the client project since the end result is a
> far more useable and finished 5.0 final.
>

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



RE: T5: AJAX Zone updating doesn't work correctly in IE

2008-04-09 Thread Blower, Andy
Has anyone tried my demo page of the problem? I've simplified it as much as I 
can to show just the issue at hand. Should this go into JIRA now?

Class:

public class BasicAJAX
{
@Property
@Persist
private int count = 0;

@Component
private Zone aZone;

Object onActionFromOutsideZone() {
count++;
return aZone;
}

Object onActionFromInsideZone() {
count++;
return aZone;
}
}

Template:
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Basic AJAX Tester (${count} - only updates on full page refresh)

Refresh - 
this is an AJAX-enabled ActionLink


I am a AJAX updated ZONE! count=${count}
Refresh - this is an AJAX-enabled ActionLink inside the 
zone





> Rather than explain (probably badly) exactly what the problem is, I'll 
> provide a small example page called
> BasicAJAX. This page demonstrates that if an actionlink that causes a zone 
> refresh via AJAX is part of the
> refreshed zone itself, it only works on alternate clicks in IE. Each time 
> it's rendered as part of the zone
> update it causes a full page refresh when clicked, which means it can do a 
> zone update the following click.
> It works fine in Firefox though.
>
> If I return a block instead of a zone the second click in the link inside
> causes the ComponentEventException shown below, instead of the full page
> refresh.
>
> org.apache.tapestry.runtime.ComponentEventException - A component event
> handler method returned the value
> [EMAIL PROTECTED] Return type
> org.apache.tapestry.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.
>
>
> It looks like a bug to me, should it be entered into a bug DB somewhere? I
> hope that this is a known problem that has already been fixed or is in the
> process of being fixed because it's a pretty big dealbreaker for T5 AJAX
> support as IE is still the dominant browser.
>
> (using T5.0.11, IE6.0.2900, FF2.0.0.6, Tomcat5.5.9)
>


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



RE: T5: AJAX Zone updating doesn't work correctly in IE

2008-04-08 Thread Blower, Andy
Thanks for the reply José, but I haven't got a nested zone. Unfortunately my 
example code has been completely screwed up by submitting it via Nabble so it's 
really not clear what on earth I'm going on about. I was really hoping to get a 
reply on this issue before I report on T5 to management at 2pm today as well. 
That's life I guess, anyway here's my example pages again. Hopefully it'll be 
clearer what the problem is.

Andy.

- BasicAJAX.java -
package com.proquest.Tap5ProtoIMPA.pages;

import org.apache.tapestry.annotations.Component;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.annotations.Property;
import org.apache.tapestry.corelib.components.Zone;


public class BasicAJAX
{
@Property
@Persist
private int count = 0;

@Component
private Zone aZone;

Object onActionFromOutsideZone() {
count++;
return aZone;
}

Object onActionFromInsideZone() {
count++;
return aZone;
}
}

- BasicAJAX.tml -
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>


Basic AJAX Tester (${count} - only updates on full page 
refresh)

Refresh - this is an AJAX-enabled ActionLink




I am a AJAX updated BLOCK! count=${count}
Refresh - this is an AJAX-enabled 
ActionLink








From: José Paumard [mailto:[EMAIL PROTECTED]
Sent: 07 April 2008 20:21
To: Tapestry users
Subject: Re: T5: AJAX Zone updating doesn't work correctly in IE

Andy,

I already pointed out this problem, that doesnt seem to be browser related, but 
merely due to T5 conception. Basically Howard answered that on a div refresh, 
the id of the refreshed elements nested in that div are changed by T5 : a 
timestamp based code is added, making them unique among the client DOM. If this 
div contains itself another div, pointed by a link, then that link is lost. It 
explains the page refresh, since your action link (or event link) points to 
nothing.

Howard didnt make any clear statement about that, but it seems to me that 
nesting Zones is not legal in T5, or at least needs some patching in order to 
work properly.

José

Andy Blower a écrit :
Rather than explain (probably badly) exactly what the problem is, I'll
provide a small example page called BasicAJAX. This page demonstrates that
if an actionlink that causes a zone refresh via AJAX is part of the
refreshed zone itself, it only works on alternate clicks in IE. Each time
it's rendered as part of the zone update it causes a full page refresh when
clicked, which means it can do a zone update the following click. It works
fine in Firefox though.

If I return a block instead of a zone the second click in the link inside
causes the ComponentEventException shown below, instead of the full page
refresh.

org.apache.tapestry.runtime.ComponentEventException - A component event
handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry.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.


It looks like a bug to me, should it be entered into a bug DB somewhere? I
hope that this is a known problem that has already been fixed or is in the
process of being fixed because it's a pretty big dealbreaker for T5 AJAX
support as IE is still the dominant browser.

(using T5.0.11, IE6.0.2900, FF2.0.0.6, Tomcat5.5.9)


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



<    1   2