Re: PageLink to the current page

2009-06-10 Thread Sergey Didenko
Thanks, that works. On Thu, Jun 11, 2009 at 4:04 AM, Howard Lewis Ship wrote: > The "literal:" part only works for the root Index page of your application. > > On Wed, Jun 10, 2009 at 6:03 PM, Howard Lewis Ship wrote: > >> ... ---

javascript after client validation

2009-06-10 Thread Arif Puji Ananto
I use tapestry 4.1.5 I have problem to add javascript that execute after form submit and all field valid (through validation) before form really send request to server. anyone have same problem? or already have solution? thanks -

IE javascript errors...

2009-06-10 Thread Tom Zurkan
so, i have a page that has many components with zones and blocks. the page loads fine, but, when i try and submit on a form that uses a zone i get javascript errors while rendering the block. these are probably my own javascript problems, but, the ie script debugger is not finding the right l

Re: PageLink to the current page

2009-06-10 Thread Howard Lewis Ship
The "literal:" part only works for the root Index page of your application. On Wed, Jun 10, 2009 at 6:03 PM, Howard Lewis Ship wrote: > ... > > > On Wed, Jun 10, 2009 at 11:34 AM, Sergey > Didenko wrote: > > Sorry, the first tml is better written as : > > > > SomePage.tml: > > ... > > Link tex

Re: PageLink to the current page

2009-06-10 Thread Howard Lewis Ship
... On Wed, Jun 10, 2009 at 11:34 AM, Sergey Didenko wrote: > Sorry, the first tml is better written as : > > SomePage.tml: > ... > Link text > ... > > > On Wed, Jun 10, 2009 at 8:39 PM, Sergey Didenko > wrote: >> Hi, >> >> Is this the most concise and clear way to create a PageLink to the >>

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> 1) Defining an framework-independent API to be used by Tapestry (events, > DOM manipulation, selectors, etc). Maybe there's something similar out > there, not necessarily Tapestry-related. Sizzle selector (http://sizzlejs.com/) might be a nice contender, but I haven't looked into it indepth yet

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
just like in spring, you'll have a separation between the view technologies and the spring MVC, the classes that represent the web framework should be in core, and the ui related classes in its own module. while it can be argued that ui components can change quite a lot, and would potentially bea

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
Em Wed, 10 Jun 2009 17:16:03 -0300, ice escreveu: well, that's kind of my idea really. to seperate them into two parts. That way, changes to the UI layer don't break the core. Changes to the UI layer, as Tapestry is now, won't break the core, so there'se no need do separate it in two proje

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
Em Wed, 10 Jun 2009 16:45:53 -0300, Onno Scheffers escreveu: I wouldn't mind helping out. I'm not an expert either, so I don't think I can do it all alone. But I think this is important enough for the future of Tapestry to donate some of my time. Nice! I think we need to focus in at least

Re: t5: obtaining server name and port

2009-06-10 Thread Marcus Veloso
... @Inject private RequestGlobals requestGlobals; ... requestGlobals.getHTTPServletRequest().getServerName(); ... requestGlobals.getHTTPServletRequest().getServerPort(); ...

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
Thiago H. de Paula Figueiredo wrote: > > Tapestry-core almost donsn't have UI-related code, and all it's all in the > components and CSS files (that are overridable and can be configured to > not be used). > Thiago H. de Paula Figueiredo wrote: > > Tapestry-core has two parts: the fr

Re: Stale Link Exception on Disabled Select Component

2009-06-10 Thread bryans
This worked. Thank you. Andreas Andreou-4 wrote: > > try setting volatile to true in the @For component > > > -- View this message in context: http://www.nabble.com/Stale-Link-Exception-on-Disabled-Select-Component-tp23964397p23970088.html Sent from the Tapestry - User mailing list archi

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> Does anyone volunteer to write this Javascript encapsulation layer? I think > it's a nice idea, but I don't have the time nor the Javascript knowledge > needed. I wouldn't mind helping out. I'm not an expert either, so I don't think I can do it all alone. But I think this is important enough f

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
Em Wed, 10 Jun 2009 16:31:55 -0300, ice escreveu: My point is that Tapestry-core should be about generation of state management of pages, and generation of markup. javascript niceties are a plus, but not core. Moving away UI related code into another module should make it easier to encapsul

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
My point is that Tapestry-core should be about generation of state management of pages, and generation of markup. javascript niceties are a plus, but not core. Moving away UI related code into another module should make it easier to encapsulate the problem, and deal with it in a succession of ref

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
Em Wed, 10 Jun 2009 15:39:56 -0300, ice escreveu: Even more of a reason to encapsulate as much as possible all this patches. Otherwise, as time passes, the API would end up polluted with javascript patches to support required behaviour. Does anyone volunteer to write this Javascript encap

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
Even more of a reason to encapsulate as much as possible all this patches. Otherwise, as time passes, the API would end up polluted with javascript patches to support required behaviour. In my view, javascript/css is a very dangerous arena, and deep integration can lead you to lock-ins such as th

Re: PageLink to the current page

2009-06-10 Thread Sergey Didenko
Sorry, the first tml is better written as : SomePage.tml: ... Link text ... On Wed, Jun 10, 2009 at 8:39 PM, Sergey Didenko wrote: > Hi, > > Is this the most concise and clear way to create a PageLink to the > current page? Or are there other solutions that don't look so hacky? ( > Note that "li

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> switching js approaches in the middle of the game is definitely an idea > that needs to be approached with copious amounts of caution and > consideration. I think we all agree on that. And we also all want Tapestry to be the best it can be. Sadly that means something different to everyone :o)

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Robert Zeigler
I believe it's mentioned in the comments of the previously-referenced jira, but, the main reason this issue is trickier than it seems is that there are many applications in existence already that are relying on: 1) The fact that tapestry bundles prototype 2) The fact that tapestry reli

PageLink to the current page

2009-06-10 Thread Sergey Didenko
Hi, Is this the most concise and clear way to create a PageLink to the current page? Or are there other solutions that don't look so hacky? ( Note that "literal:" part) SomePage.tml: ... Link text ... SomePage.java: ... @Component( id = "linkId", parameters = { "page=literal:", "context=

Re: Stale Link Exception on Disabled Select Component

2009-06-10 Thread Andreas Andreou
try setting volatile to true in the @For component On Wed, Jun 10, 2009 at 6:10 PM, bryans wrote: > > I've got a page where I want to disable a @Select component. However when > rewinding the form, it generates a StaleLink because the @For loop which > populates the select doesn't get rewound due

Re: t5: protecting data from public access

2009-06-10 Thread Onno Scheffers
> > this is a good idea. which one is faster: > returning the image as a stream or a direct link to a physical file in the > file system? The physical file is much faster. It just gets a little troublesome to keep all files in sync if your application has to be distributed over multiple servers

Re: t5: protecting data from public access

2009-06-10 Thread Angelo Chen
this is a good idea. which one is faster: returning the image as a stream or a direct link to a physical file in the file system? Onno Scheffers-3 wrote: > >> >> Hi, >> your understanding is correct, photos are under protected folders. and >> the >> scaling will be a problem, but do you think

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
excellent resource iberck! i also like this one mentioned in the blog post: http://selectors.turnwheel.com/slickspeed.php jQuery was a clear winner against Prototype in my Ubuntu/Firefox 3 box (287 vs 386) iberck wrote: > > > Hi, there is a interest survey results of JavaScript Frameworks

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> > Maybe it doesn't have to be plain js since there's a lot to be gained from > these libraries. Perhaps all Tapestry's .js files could be moved to a > tapestry-prototype module, each of those files could then be reimplemented > in a tapestry-jquery module. > A problem remains with script snippets

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Michael Gentry
I don't quite agree with that statement. I started playing around with T5.1 (mostly having skipped T5.0) and added this line to my Layout.java component: @IncludeJavaScriptLibrary ( { "context:js/jquery-1.3.2.min.js", "context:js/jquery-ui-1.7.1.custom.min.js" } ) The resulting HTML

Re: t5: protecting data from public access

2009-06-10 Thread Onno Scheffers
> > Hi, > your understanding is correct, photos are under protected folders. and the > scaling will be a problem, but do you think it is good to store photo in > the > database's blob field? and every rendering requires copying from database > to > a temporary file? You can spool the data from a

Re: Switch from Prototype to jQuery?

2009-06-10 Thread iberck
Hi, there is a interest survey results of JavaScript Frameworks http://www.kylehayes.info/2009/03/29/survey-results-javascript-frameworks/ -- View this message in context: http://www.nabble.com/Switch-from-Prototype-to-jQuery--tp21750338p23965054.html Sent from the Tapestry - User mailing list

Problems with Tapestry, Spring & jax-ws integration

2009-06-10 Thread rsdev
Has anyone successfully created a project using Tapestry and Spring for jax-ws web services? I have a project using these technologies and I'm getting a number of issues. The first is this error:- org.apache.tapestry5.ioc.internal.util.TapestryException: Exception constructing service 'ValueEnc

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Martin Strand
On Wed, 10 Jun 2009 17:21:57 +0200, Onno Scheffers wrote: >> >> The problem is: how would Tapestry do that? Not using any framework? >> This would mean the committers would need to spend an awful lot of >> time rewriting something that Javascript frameworks already do. Not >> only this, but also

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
As a start, anything that deals with Javascript should be moved away from the core, since it's not essential. a tapestry-ui module would be great starting point. When i say forcing, i mean that Prototype is already built-in, rather than letting me choose which Javascript framework do i want. Th

Re: t5: protecting data from public access

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 12:14 PM, Angelo Chen wrote: > Hi, Hi! > and every rendering requires copying from database to > a temporary file? You don't need to that. Just create a page that returns the image wrapped in a StreamResponse. -- Thiago

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> > The problem is: how would Tapestry do that? Not using any framework? > This would mean the committers would need to spend an awful lot of > time rewriting something that Javascript frameworks already do. Not > only this, but also to cope with the insonsistencies between browsers. > Defining an

Re: Using JSP taglibs in T5?

2009-06-10 Thread Lance Java
I have seen this sort of functionality used in DWR. The response is wrapped in a class that writes to a local buffer instead of the response output stream. 2009/6/10 Andreas Andreou > I think i remember a Tapestry component in the wiki (not sure if it > was T4 or T5) that would include a jsp > i

Re: t5: protecting data from public access

2009-06-10 Thread Angelo Chen
Hi, your understanding is correct, photos are under protected folders. and the scaling will be a problem, but do you think it is good to store photo in the database's blob field? and every rendering requires copying from database to a temporary file? Onno Scheffers-3 wrote: > > I didn't fully un

Stale Link Exception on Disabled Select Component

2009-06-10 Thread bryans
I've got a page where I want to disable a @Select component. However when rewinding the form, it generates a StaleLink because the @For loop which populates the select doesn't get rewound due to the @Select being disabled: < span jwcid="@For" source="ognl:customers" value="ognl:currentCust

Re: t5: protecting data from public access

2009-06-10 Thread Onno Scheffers
I didn't fully understand your exact requirement. Should the photo's be publicly accessible (as in published by the user) or do you need to be logged in to be able to access the photo? If public access it isn't allowed, you should move the photo's to a protected folder and you can create a Tapestr

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 11:32 AM, ice wrote: > It seems a bit awkward to have a project called tapestry-core that depends > in two third-party javascript libraries. The problem is: how would Tapestry do that? Not using any framework? This would mean the committers would need to spend an awful lot

Re: T5.1 Question regarding BeanModel and BeanModelSource

2009-06-10 Thread Robert Zeigler
Yes, what you've described, in general, would work. Although you wouldn't necessarily need to contribute to DefaultDataTypeAnalyzer. If you're already adding the "@DisplayForEdit"-annotated properties in the decorator, you could easily define the datatype for them explicitly, as well. See:

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 11:46 AM, Onno Scheffers wrote: > This simply means that particular plugin didn't adhere to the jQuery plugin > guidelines (http://docs.jquery.com/Plugins/Authoring). A plugin should never > use $() directly otherwise it will indeed break the jQuery.noConflict > method. You

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> > IMHO, the whole Prototype/jQuery compatibility problem is that both > define a $() function and they work differently, so you can't use code > based on both of them at the same time without modification. Some time > ago I used a jQuery color picker in a project. Even using the > jQuery.noConfli

Re: Using JSP taglibs in T5?

2009-06-10 Thread Andreas Andreou
I think i remember a Tapestry component in the wiki (not sure if it was T4 or T5) that would include a jsp in the current (tapestry) page - it basically did context.getRequestDispatcher( jspPath ).include(request, response) I'm not really sure if this still works + it would mean you'd use the tagl

Re: t5: passing query string when redirect

2009-06-10 Thread Angelo Chen
Hi, Thanks for the quick reply and I think your first answer should work, reason for using query string is, it is from Google, it passes ?glid=test something to the site. Thiago H. de Paula Figueiredo wrote: > > On Wed, Jun 10, 2009 at 11:21 AM, Angelo Chen > wrote: > Couldn't you use activat

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
I voted on the issue in JIRA, since i believe is an important part of Tapestry that needs to be revisited. It seems a bit awkward to have a project called tapestry-core that depends in two third-party javascript libraries. It's not just java developers who are affected by using Prototype,but als

Re: t5: passing query string when redirect

2009-06-10 Thread Ulrich Stärk
I'm sorry. links are now (5.1) obtained via PageRenderLinkSource's createPageRenderLink(...) Ulrich Stärk schrieb: You can also return a Link instance (you can obtain one by injecting ComponentResources and calling resources.createPageLink(...)) and set the parameter with link.addParameter(...

Re: t5: passing query string when redirect

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 11:21 AM, Angelo Chen wrote: > Hi, > > In index page my app will do a return MyPage.class, so browser address bar > shows localhost/mypage instead of localhost, now I'd like to pass any query > string from the url to the new page, it should look like this: > > if user type

Re: t5: passing query string when redirect

2009-06-10 Thread Ulrich Stärk
You can also return a Link instance (you can obtain one by injecting ComponentResources and calling resources.createPageLink(...)) and set the parameter with link.addParameter(...) prior to returning it. Uli Angelo Chen schrieb: Hi, In index page my app will do a return MyPage.class, so brows

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 11:14 AM, Onno Scheffers wrote: > If Tapestry doesn't depend on any framework at all (just plain Javascript), > extensions based on Prototype will still work if the libraries are included > into the pages. It just means Tapestry can do without it. IMHO, the whole Prototype/

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Angelo Chen
Totally agreed with this, removing dependency is a good step, replacing Prototype with jQuery will have the same issue when a better framework comes in the future. I use jQuery with T5, it works quite well. Onno Scheffers-3 wrote: > >> >> I agree with you. Most T5 users have projects that rely

t5: passing query string when redirect

2009-06-10 Thread Angelo Chen
Hi, In index page my app will do a return MyPage.class, so browser address bar shows localhost/mypage instead of localhost, now I'd like to pass any query string from the url to the new page, it should look like this: if user type : http://localhost/?test=123 then after redirect, browser's addre

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Onno Scheffers
> > I agree with you. Most T5 users have projects that rely on Prototype > now, so plain switching to jQuery would break backward compatibility. I agree as well. But I don't think there's a need to play the backward-compatibility card here since removing the dependencies doesn't need to break ba

Re: t5: obtaining server name and port

2009-06-10 Thread Peter Stavrinides
This is not something related to tapestry, but: HttpServletRequest.getServerName(); HttpServletRequest.getServerPort(); Peter - Original Message - From: "Angelo Chen" To: users@tapestry.apache.org Sent: Wednesday, 10 June, 2009 15:41:51 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Su

t5: obtaining server name and port

2009-06-10 Thread Angelo Chen
Hi, I need to obtain the server name and port like example.com:8080 or example.com:80, any idea ? Thanks Angelo -- View this message in context: http://www.nabble.com/t5%3A-obtaining-server-name-and-port-tp23961432p23961432.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: t5: protecting data from public access

2009-06-10 Thread Angelo Chen
Hi, I use dispatcher in some cases like logging and automatic logging of user with cookie, but how to use dispatcher in this context? any tips? how we expose the protected data? Angelo Thiago H. de Paula Figueiredo wrote: > > On Wed, Jun 10, 2009 at 7:06 AM, Angelo Chen > wrote: >> folder, b

Re: t5: protecting data from public access

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 7:06 AM, Angelo Chen wrote: > folder, but it will slow down the rendering, any idea how to meet this > requirement with tapestry 5? If you need or want a pure Tapestry solution, use a dispatcher. By the way, a dispatcher is possible a solution for almost any cross-page or c

Re: Using JSP taglibs in T5?

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 7:21 AM, Alfie Kirkpatrick wrote: > Do people think this is possible and worth doing, or a complete > non-starter? We occasionally want to use products/libraries that come > with taglibs as their primary way of integrating functionality into > pages. For example, it might be

Re: LinkSubmit and confirm dialog

2009-06-10 Thread Andy Pahne
This has been posted on the mailing list. Search for "Mixin" and "Confirm". Andy Alfie Kirkpatrick schrieb: Hi, would like to write a mixin (or even a subclass) that allows me to throw up a confirm div/message box when the user clicks the link before submitting the form. Basically an 'are you

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 10, 2009 at 8:02 AM, ice wrote: > Standing from the point of view that i prefer jQuery to prototype, i would > like to see (Tapestry 5.2? ) a move into breaking down what the core web > functionalities, from those that depend on Javascript, particularly any > extensions, such as Protot

Re: Switch from Prototype to jQuery?

2009-06-10 Thread ice
Standing from the point of view that i prefer jQuery to prototype, i would like to see (Tapestry 5.2? ) a move into breaking down what the core web functionalities, from those that depend on Javascript, particularly any extensions, such as Prototype. But plain switching to jQuery is even worse.

Using JSP taglibs in T5?

2009-06-10 Thread Alfie Kirkpatrick
Do people think this is possible and worth doing, or a complete non-starter? We occasionally want to use products/libraries that come with taglibs as their primary way of integrating functionality into pages. For example, it might be a CMS product with taglibs to render content + formatting into th

Re: t5: protecting data from public access

2009-06-10 Thread Michael Gerzabek
Hi Angelo, you might investigate tapestry-spring-security [1]. It has everything you need and there is a snapshot [2] that works with T5.1. You can secure resources and if someone requests a secured resource authentication is required from the framework. So, no hacking possible. Michael [1

t5: protecting data from public access

2009-06-10 Thread Angelo Chen
Hi, In a app that I'm going to develop, it requires users to log in before they can browse job related info, quite a number of those are pictures, those photos now are stored in folders of the server, the easiest way is, link that folder to tomcat's context, and program can refer to a particular

RE: [Tapestry Central] Tapestry 5 Support in IDEA Maia

2009-06-10 Thread ice
+1 for Eclipse Galileo plugin! Blšták Peter wrote: > > Can one has the source code for the IDEA plugin or for initial Hugo's IDEA > plugin ? > Would be nice to have Tapestry 5 support for Eclipse too. And source code > would be a help. > > Thanks > > P. > > -Original Message- > From:

RE: [Tapestry Central] Tapestry 5 Support in IDEA Maia

2009-06-10 Thread Blšták Peter
Can one has the source code for the IDEA plugin or for initial Hugo's IDEA plugin ? Would be nice to have Tapestry 5 support for Eclipse too. And source code would be a help. Thanks P. -Original Message- From: Hugo Palma [mailto:hugo.m.pa...@gmail.com] Sent: Wednesday, May 27, 2009 11