[FAQ] common design

2008-02-28 Thread Jesper Zedlitz
Howard Lewis Ship wrote: Please send your Question and Answer to this list. Q: What is a convenient way to create a common design for all pages of an application? A: (how I do it) Create a component called Layout for your application. If the package name of the application is

Re: t5 beaneditor vm lock

2008-02-28 Thread riccaruf
sorry Howard and thanks for your reply! I've changed my post with the stack trace but something was wrong and It was not be published.. here it is... [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: org.apache.tapestry.runtime.ComponentEventException

[T5] [FAQ] Form and old errors/data

2008-02-28 Thread Christian Köberl
Q: Why does the form show old data and old errors not the newly set object? (see: http://www.nabble.com/-T5--Why-is-default-ValidationTracker-in-Form-marked-Persist-not-Persist%28%22flash%22%29-td11981083.html) A1: Write your own form extending the tapestry default form: public class Form

Re: [t5] pretty HTML output

2008-02-28 Thread Filip S. Adamsen
Set tapestry.compress-whitespace to false in your ApplicationDefaults. http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/conf.html http://tapestry.formos.com/nightly/tapestry5/tapestry-ioc/symbols.html -Filip Dapeng skrev: i noticed that the generated HTML is stripping down all

[t5] pretty HTML output

2008-02-28 Thread Dapeng
i noticed that the generated HTML is stripping down all the white spaces can we have an option to turn off this feature ??? and let the generated HTML preserve the original indent ... - To unsubscribe, e-mail: [EMAIL

Re: T4 AutoCompleter onkeypress event never triggered

2008-02-28 Thread Andreas Andreou
I'd connect a key handler somewhere higher at the html hierarchy (perhaps at the containing div or form level) and do something like: dojo.event.connect(dojo.byId('container'), 'onkeydown', function(e) { if (e.keyCode==13) // or use e.target to refine the condition for ENTER trapping

Re: [T5] [FAQ] Form and old errors/data

2008-02-28 Thread Robert Zeigler
You can also provide the tracker parameter to form, which looks almost the same as extending form, except that you don't have to extend form. :) @Component(parameters={tracker=customTracker}) private Form form; @Persist(flash) private ValidationTracker customTracker; public

Re: [FAQ] common design

2008-02-28 Thread Thiago HP
A little suggestion . . . On 2/28/08, Jesper Zedlitz [EMAIL PROTECTED] wrote: All pages of the application look like: t:layout title=message:page.name xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; content /t:layout I prefer div t:type=Layout t:title=message:page.name

Re: [FAQ] common design

2008-02-28 Thread Jesper Zedlitz
I prefer div t:type=Layout t:title=message:page.name ... /div. It looks more similar to ordinary HTML than t:layout. :) I agree to that. With T4 it was possible to write complete HTML pages and only use the body-part for output. Is there a similar possibility with T5? Would be easier for mixed

Re: [FAQ] common design - What is the best way to add components to my page

2008-02-28 Thread Kristian Marinkovic
another FAQ: What is the best way to add components to my page? pros/cons see the three possiblities below i prefer ... div t:id=layout/ ... @Component private Layout layout; because refactoring of componet names is much safer and easier... and the templates are even more like ordinary

t5 Inject service to HttpSessionListener

2008-02-28 Thread anujith amaratunga
Hi, I am trying to inject a service into a class which implements HttpSessionListener, which is instantiated by the web container (jetty). So I cant use the constructor or the on call methods sessionCreated() or sessionDestroyed() to pass in a service, nor can I use the @Inject annotation

T4: form input components inside a For loop

2008-02-28 Thread Petri Wessman
Ok, I'm a bit stumped here. I'm using Tapestry 4.1.3, and I'm trying to use (sub)components which have form input fields inside a For loop. I have a list of items, initialized by a calling page, and one as placeholder for the current value, something like this: public abstract Foobar

Re: T5: Client-side Execution before form submission

2008-02-28 Thread Michael Lake
Howard - Thanks - that's a start. Unfortunately I need(ed) a way to stop the form submission. I'm executing code that has a callback to tell me it's done. $('form').observe(form:prepareforsubmit, function(event) { if(!callbackExecuted){ event.stop(); //this won't stop

Re: [T5] Is there a way to restric filesize in upload component?

2008-02-28 Thread Otho
I digged a bit deeper into the upload component. And thankfull it seems to be possible by contributing to ApplicationDefaults. For example: public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will

Re: [t5] pretty HTML output

2008-02-28 Thread Mark W. Shead
If you are running Jetty from mvn (mvn jetty:run) you can use this setting in your pom.xml to enable white spaces and enable stacktraces in the browser: plugin groupIdorg.mortbay.jetty/groupId

Re: T4: form input components inside a For loop

2008-02-28 Thread Andreas Andreou
Why do you need to iterate through the components thing in the listener? Can you explain what you're after? BTW, there's only one FoobarEdit instance, so, that's why you get one! On Thu, Feb 28, 2008 at 3:32 PM, Petri Wessman [EMAIL PROTECTED] wrote: Ok, I'm a bit stumped here. I'm using

Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread Mark W. Shead
On Feb 28, 2008, at 7:32 AM, anujith amaratunga wrote: Registry from the HttpSessionListener itself, so I can pull out my service. Is there a way to access the Registry from a non page, non service class? You can create a registry by doing something like: RegistryBuilder builder = new

Tapestry + Problem with @contrib:AjaxStatus

2008-02-28 Thread giri . v . srini
Hi, In order to prevent user interruption, Used @contrib:AjaxStatus component to display hour glass when AJAX request happens. PFB the code snippet used div jwcid=@contrib:AjaxStatus style=display:none; cursor:wait; position:absolute; top:0; left:0; width:99%; height:99%; margin: 0;

Re: [4.1.5] @EventListener and dynamic responses

2008-02-28 Thread Andy Pahne
I discovered another pitfall: after I had a working solution in my stripped down test case, I added the feature into a much more complex page with a large form, only to find out that it still does not work. It took me quite a while to find out, that my dynamic update of parts of the page

Re: T4: form input components inside a For loop

2008-02-28 Thread Petri Wessman
Andreas Andreou wrote: Why do you need to iterate through the components thing in the listener? Can you explain what you're after? Maybe I wasn't clear enough. What I want to do is to edit 1-N identical records on one page. I currently have a component which encapsulates the editing of fields

Tapestry + Problem with @contrib:AjaxStatus

2008-02-28 Thread sasidhar
Hi In order to prevent user interruption, Used @contrib:AjaxStatus component to display hour glass when AJAX request happens. PFB the code snippet used div jwcid=@contrib:AjaxStatus style=display:none; cursor:wait; position:absolute; top:0; left:0; width:99%; height:99%; margin: 0;

Re: Tapestry + Problem with @contrib:AjaxStatus

2008-02-28 Thread Andy Pahne
For me it works in Firefox and IE7. But the behaviour in IE7 is somehow delayed, it takes a few seconds, but not in FF2. Andy [EMAIL PROTECTED] schrieb: Hi, In order to prevent user interruption, Used @contrib:AjaxStatus component to display hour glass when AJAX request happens. PFB the

Re: Tapestry + Problem with @contrib:AjaxStatus

2008-02-28 Thread Andreas Andreou
http://tapestry.apache.org/tapestry4.1/jsdoc/files/fx-js.html see the tapestry.fx.attachAjaxStatus function, it's what the component calls... Apart from a dom node (to show - hide), it can accept a custom function, so that you can: tapestry.fx.attachAjaxStatus( function(show) { if (show) { //

Re: T4: form input components inside a For loop

2008-02-28 Thread Andreas Andreou
it is doable with components - the idea is that on rewind, each iteration can store the current data in a 'global' structure which your listener will then work on On Thu, Feb 28, 2008 at 4:33 PM, Petri Wessman [EMAIL PROTECTED] wrote: Andreas Andreou wrote: Why do you need to iterate through

Re: [4.1.5] @EventListener and dynamic responses

2008-02-28 Thread Andreas Andreou
and no unclosed hr tags ! On Thu, Feb 28, 2008 at 4:29 PM, Andy Pahne [EMAIL PROTECTED] wrote: I discovered another pitfall: after I had a working solution in my stripped down test case, I added the feature into a much more complex page with a large form, only to find out that it still

[4.1.5] FieldLabel buggy

2008-02-28 Thread Andy Pahne
I have two form fields with corresponding labels: input jwcid=[EMAIL PROTECTED] value=ognl:searchForHotels displayName=literal:Hotels size=3 class=inputsmall/ label jwcid=@FieldLabel field=component:doHotelSearchCheckboxHotels/label input jwcid=[EMAIL PROTECTED]

Re: [4.1.5] FieldLabel buggy

2008-02-28 Thread Andreas Andreou
http://tapestry.apache.org/tapestry4.1/components/form/fieldlabel.html explains this On Thu, Feb 28, 2008 at 5:05 PM, Andy Pahne [EMAIL PROTECTED] wrote: I have two form fields with corresponding labels: input jwcid=[EMAIL PROTECTED] value=ognl:searchForHotels

Re: [t5] pretty HTML output

2008-02-28 Thread Christian Köberl
If you just want to view the source without the white space (and formatted) there's a nice Firefox Plugin called View Source Chart (https://addons.mozilla.org/de/firefox/addon/655). -- Chris PS: thanks Kris (Marinkovic) for this plugin-tip -- View this message in context:

Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread Ted Steen
We had the same problem. We created a static field (of the service type) in the HttpSessionListener and when the service was created (in buildService...) we assigned the service to the static field. We then could access the service from the HttpSessionListener via that static field. Yes, it

Re: [T5] [FAQ] Form and old errors/data

2008-02-28 Thread Christian Köberl
Robert Zeigler wrote: You can also provide the tracker parameter to form, which looks almost the same as extending form, except that you don't have to extend form. :) If you do that, you'll have to provide this on each and every page in all projects (or at leas in a BasePage for each

Re: Tapestry + Problem with @contrib:AjaxStatus

2008-02-28 Thread sasidhar
Thanks Andy. Just now we observed, this works in IE 7.0. As you mentioned it is taking quite a few seconds(35 - 40). Is there a way to workaround this for IE 6.0 and make it as faster as firefox? Thanks in advance for your help, Giri Andy Pahne-3 wrote: For me it works in Firefox and

T5 informal parameters for embedded component

2008-02-28 Thread Riccardo Ruffilli
Hi Guys, Is there any way to pass informal parameters through two component the container and an embedded one possibly without mapping them in to formal parameters? for example I have this situation this is what I'd like to use in my page input t:type=mytextfield t:par=mypar style=mystyle

NPE problem

2008-02-28 Thread Baofeng Yu
Hi All, I deployed a tapestry application into Jboss and am having the following problem: If I call a page directly with the url: http://localhost:8080/test/start, all works OK. But when I access the page with the url: http://localhost/test/start , it first returns a NullPointerException.

Re: [FAQ] common design

2008-02-28 Thread Christian Köberl
Jesper Zedlitz-3 wrote: I agree to that. With T4 it was possible to write complete HTML pages and only use the body-part for output. Is there a similar possibility with T5? Do you mean Invisible Instrumentation (see http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html)?

Re: form aware page and action links

2008-02-28 Thread Marcelo Lotif
Hi all, I have exactly the same problem, but I'm using many submit buttons instead of links. I had a small light with the onSelectedFromXXX feature, but the validations are still there on every submit button, and I just want it in some of them... Anyone has any solution to this? 2008/2/20,

Re: NPE problem

2008-02-28 Thread Robert Zeigler
Does this happen consistently? I see the same stack trace on occasion. Also using mod_jk, tomcat 4.x, but no jboss, and I can't reliably reproduce this issue. It just pops up on occasion. So I'd be interested in knowing if you can consistently reproduce this problem. Btw, what version of

Re: [t5] pretty HTML output

2008-02-28 Thread Chris Lewis
While you're using Fattyfox, you might as well use firebug (http://www.getfirebug.com/) - brilliance. Christian Köberl wrote: If you just want to view the source without the white space (and formatted) there's a nice Firefox Plugin called View Source Chart

Re: form aware page and action links

2008-02-28 Thread Joachim Van der Auwera
I have just noticed today that there is indeed a problem when you have a multiple components with submitbutton on the form (when they originally have the same id). It seems the onSelectedFrom is called on the last(?) of these components in the form, not on the correct one. I am trying to work

Re: NPE problem

2008-02-28 Thread Baofeng Yu
Yes, it happens consistently when I restart jboss and access the page the first time after the restart. Afterwards, it's all OK. I am using 5.0.9. Baofeng Robert Zeigler wrote: Does this happen consistently? I see the same stack trace on occasion. Also using mod_jk, tomcat 4.x, but no

[T5] AJAX form submit

2008-02-28 Thread Adriaan Joubert
Hi, I have a form that needs to change the view in a zone on a page. So I use the new (5.0.11-SNAPSHOT) form with a zone (fantastic stuff, Howard!) t:form t:id=choose zone=allocations t:label for=liquidated Show liquidated funds

Re: Calling javascript after asynchronous update

2008-02-28 Thread Kelly Merrell
Would this also be the reason that I can't get an AjaxDirectLink to behave correctly if it was in an updated component? Unfortunately I am on Tap 4.0, so my fix may be more difficult if this is the case. Richard Hoberman wrote: Just a note to confirm that this does work with the 4.1.5

Re: form aware page and action links

2008-02-28 Thread Marcus
Hi Joachim, from http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Submit.html (The thing to remember is that the Submit component will trigger its selected event in the *middle* of the form submission, *before the form triggers its validate,

Re: form aware page and action links

2008-02-28 Thread Marcelo Lotif
I agree with Marcus I'm using multiple buttons with no problems the only thing that is bugging me is the client side validation that I talked about... 2008/2/28, Marcus [EMAIL PROTECTED]: Hi Joachim, from

Re: T4: form input components inside a For loop

2008-02-28 Thread Pai911
Put an InvokeListener component in the For when the rewinding occures, it will invoke the listener with each Iteration. In each iteration, the page property is stored with different value which you can use The listener is like public void updateUser(IRequestCycle cycle) { if

Re: [FAQ] common design

2008-02-28 Thread Marcus
Hi Jesper, You can use: @IncludeStylesheet(context:style.css) public class Layout { instead of: @Inject @Path(context:/style.css) private Asset style; link rel=stylesheet href=${style} type=text/css media=all / Marcus

[t5components] I need explanation on Button behavior

2008-02-28 Thread Marcelo Lotif
Hi all, specially Sven I was using the Button component from t5components, when I set the type parameter to button, it fires my onClickedFromButton method. But if I set the type to submit, it fires the onSubmit method and ignores the other. Should it do this? The event parameter is set to clicked

T5.0.11-SNAPSHOT: Selenium upgrade

2008-02-28 Thread Joel Wiegman
All, Anyone know of any plans to upgrade the Selenium version in tapestry-test from 0.8.1 to a more current version? I've spent all day trying to get SSL to work with it, only to find out that the version Tapestry uses (0.8.1) does not support HTTPS:

Re: T5.0.11-SNAPSHOT: Selenium upgrade

2008-02-28 Thread Howard Lewis Ship
Working on it right now; I was having a problem upgrading, but it turns out I was calling assertText() when I should have been calling assertAttribute(). Hopefully see version 0.9.2 in tonights snapshot. On Thu, Feb 28, 2008 at 11:07 AM, Joel Wiegman [EMAIL PROTECTED] wrote: All, Anyone know

T5.0.11-SNAPSHOT: tapestry-test suggestions

2008-02-28 Thread Joel Wiegman
All, I'd like to suggest some improvements to the tapestry-test library. I've had to write my own custom version of these classes because some of them aren't very configurable. - Perhaps most importantly, leverage the @BeforeSuite and @AfterSuite TestNG annotations for setting up and tearing

Re: T5.0.11-SNAPSHOT: tapestry-test suggestions

2008-02-28 Thread Howard Lewis Ship
I'm thinking that instead of a bunch of unrelated configuration values and constants, perhaps a single object that contains all of them, that can be passed to the constructor. BeforeSuite/AfterSuite: Have to look into this; right now, T5's tests start up a series of different applicaitions to

Re: t5 beaneditor vm lock

2008-02-28 Thread Howard Lewis Ship
I've seen this a couple of times just now; the debugger is having some trouble with instrumented code. I can pass the buck and blame Javassist, but that doesn't give you an answser. On Thu, Feb 28, 2008 at 12:31 AM, riccaruf [EMAIL PROTECTED] wrote: sorry Howard and thanks for your reply!

RE: T5.0.11-SNAPSHOT: tapestry-test suggestions

2008-02-28 Thread Joel Wiegman
I've always been under the impression that the purpose of the TestNG parameter paradigm is that it's a hook to help you dynamically configure your tests. And since we're using TestNG... Not sure what you mean with the whole constructor idea? Surefire's the one instantiating my tests. My

Re: [T5] JSONObject response

2008-02-28 Thread Sven Homburg
in class AjaxComponentEventRequestHandler the method handle creates an empty JSONObject, i cant checkout why. is it a bug or a feature? 2008/2/27, Adriaan Joubert [EMAIL PROTECTED]: Hi, I'm having a problem with returning a JSON object from an actionlink in (5.0.11-SNAPSHOT). I have some

Re: [T5] JSONObject response

2008-02-28 Thread Howard Lewis Ship
Looks like a bug, its supposed to be for the case where the event handler returns null, but it seems like it's getting added in even for event handlers that return a JSONObject. On Thu, Feb 28, 2008 at 1:03 PM, Sven Homburg [EMAIL PROTECTED] wrote: in class AjaxComponentEventRequestHandler the

Re: [t5components] I need explanation on Button behavior

2008-02-28 Thread Sven Homburg
moved to http://groups.google.com/group/t5components-user/t/b57e3b138b669132 2008/2/28, Marcelo Lotif [EMAIL PROTECTED]: Hi all, specially Sven I was using the Button component from t5components, when I set the type parameter to button, it fires my onClickedFromButton method. But if I set

[T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Moritz Gmelin
Hi, maybe this is for the FAQ I can't seem to find a way to tell Tapestry 5 to render all boolean elements in my beans as YES and NO instead of TRUE and FALSE in Grids and BeanDisplays. Setting an extra parameter cell for all boolean columns in my grids is probably not the T5-way to

what is the reason to declare component Select as final ?

2008-02-28 Thread Sven Homburg
has anybody an answer for that? -- with regards Sven Homburg

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Davor Hrg
here's tutorial for date (by SvenHomburg) http://wiki.apache.org/tapestry/Tapestry5LocalizedDateField use it to do it for boolean Davor Hrg On 2/28/08, Moritz Gmelin [EMAIL PROTECTED] wrote: Hi, maybe this is for the FAQ I can't seem to find a way to tell Tapestry 5 to render all

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Moritz Gmelin
Great! Now guess who posted the question leading to this answer :-) M. Am 28.02.2008 um 23:02 schrieb Davor Hrg: here's tutorial for date (by SvenHomburg) http://wiki.apache.org/tapestry/Tapestry5LocalizedDateField use it to do it for boolean Davor Hrg On 2/28/08, Moritz Gmelin [EMAIL

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Davor Hrg
it's just what this mailing list is about :) On 2/28/08, Moritz Gmelin [EMAIL PROTECTED] wrote: Great! Now guess who posted the question leading to this answer :-) M. Am 28.02.2008 um 23:02 schrieb Davor Hrg: here's tutorial for date (by SvenHomburg)

setting form entype

2008-02-28 Thread Joachim Van der Auwera
I tried setting the form enctype to avoid problems with charset conversions on form submits. I included the code below in one of the components in the form, but then a NPE occurs when the form is submitted. How can the enctype be set? Thanks for the help, Joachim @Environmental

Re: what is the reason to declare component Select as final ?

2008-02-28 Thread Howard Lewis Ship
Not sure why Select and not the others. I've been struggling to come up with a strategy for components that will help maintain backwards compatibility. I've nervous that using existing components as base classes opens up future code to the fragile base class problem, as was the case in Tapestry

Re: T4 AutoCompleter onkeypress event never triggered

2008-02-28 Thread Paul Stanton
Well that works for FireFox, but not IE. in IE the event listener is never triggered so I'm assuming it has trouble propagating the event handler from the container to the child. I worked out another solution yesterday though, it's pretty exhaustive but it works: 1. this function finds the

Re: updateComponent from JavaScript

2008-02-28 Thread Paul Stanton
Andreas, thanks, calling updateComponent on a wrapping div works. by the way, i was updating the whole table before, that wasn't working. table jwcid=[EMAIL PROTECTED]:TableView... p. Paul Stanton wrote: Oh, ok, i'll try and update a div surrounding the table, otherwise back to JS i guess.

Re: what is the reason to declare component Select as final ?

2008-02-28 Thread Sven Homburg
howard, thanx for your answer, i think your doubt brings me back on right (easy) way. somtimes i need only a bit food for thoughts ... 2008/2/28, Howard Lewis Ship [EMAIL PROTECTED]: Not sure why Select and not the others. I've been struggling to come up with a strategy for components that

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Moritz Gmelin
Hm, I can see this having an influence on how the BeanEditor behaves. OK. But my question was how to change the default renderer for Grids and BeanDisplay components... M. Am 28.02.2008 um 23:13 schrieb Davor Hrg: it's just what this mailing list is about :) On 2/28/08, Moritz Gmelin

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Robert Zeigler
You can do the same trick for display components, as well. The main difference is in the following line from the wiki: configuration.add(new BeanBlockContribution(date, AppPropertyEditBlocks, date, true)); The last parameter is true if the contribution is for an edit contribution, and false

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Moritz Gmelin
Hi, This was hard. The line for booleans must be configuration.add(new BeanBlockContribution(checkbox, AppPropertyDisplayBlocks, boolean, false)); Where I would have expected configuration.add(new BeanBlockContribution(boolean, AppPropertyDisplayBlocks, boolean, false)); for a

Re: [T5] Changing default renderer for boolean in Grid and BeanDisplay

2008-02-28 Thread Howard Lewis Ship
I'm working on a service to allow for overriding the blocks. Contributing a duplicate value into the configuration is haphazard, as it is affected by the order of operations, which isn't always known. I agree about the naming; my first thought on data type was to name it after the control used,

Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread anujith amaratunga
Thanks Mark. I've tried this approach, but as you say it builds you a new Registry. The problem is if you need a stateful service, i.e. a service which handles persistence. Depending on your configuration this might give you undesired results. The solution suggested by Ted,

T5: Persisting object from ApplicationState

2008-02-28 Thread Joshua Jackson
Dear all, I have annotated an object with @ApplicationState. On the next page, I persist that object with Hibernate. But it turns out it throw this exception. org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions I am using Tapestry 5.0.11-SNAPSHOT.

Re: T5: Persisting object from ApplicationState

2008-02-28 Thread Davor Hrg
that is expected behavior, if you persist hibernate objects across requests errors like that will occur you can try session.merge(obj); it is recommended to handle it differently Davor Hrg On Fri, Feb 29, 2008 at 7:15 AM, Joshua Jackson [EMAIL PROTECTED] wrote: Dear all, I have annotated an

Re: T5: Persisting object from ApplicationState

2008-02-28 Thread Joshua Jackson
On 2/29/08, Davor Hrg [EMAIL PROTECTED] wrote: that is expected behavior, if you persist hibernate objects across requests errors like that will occur you can try session.merge(obj); it is recommended to handle it differently Yes you're right. Silly me that didn't know about this Hibernate