T5: Tapestry-upload and Safari

2007-10-22 Thread Angelo Chen
Hi, It's common to fail in file uploading in Safari, however it seems the failing depends on the web page, I tried Tapestry-upload, it works with Firefox/Opera, but cause an exception in Safari, upgrading to Safari 3 does not solve the problem:

5.0.6-SNAPSHOT archetype problems ...

2007-10-22 Thread Alex Shneyderman
I am using archetype to create a quickstart app. I have copmiled from sources and installed the archetype. Now when I run create:archetype there seems to be 2 problems: 1. In archetype.xml (quickstart/src/main/resources/META-INF/archetype.xml) there is a line like this in sources section:

T5: @Persist form field or not?

2007-10-22 Thread Angelo Chen
Hi, I have two classes, Edit1 and Edit2, name is the form field, when I submit the form using Edit1, everything works, and when I tried Edit2, it generates an exception: java.lang.NullPointerException Stack trace • org.bfe.test.t5.pages.Edit.setName(Edit.java:52) •

[T4.1.3] Component and Form generated id's and form refresh

2007-10-22 Thread RachelS
Hi I have a component which has a form on it. This component is included in a @For and is rendered on the page a number of times. What I am finding is that the component's generated id's are component component_1 component_2 etc... while the form's generated id is (i'm using jwcid=[EMAIL

Antwort: T5: @Persist form field or not?

2007-10-22 Thread Kristian Marinkovic
hi angelo, edit1 does not throw an exception because it is a string. Tapestry will automatically coerce the input and convert it to a string. edit2 does not work without persist because after rendering the usr instance will be discarded and usr will reference null. on submit tapestry will try to

T5: how to use a detached hibernate object in a form?

2007-10-22 Thread Angelo Chen
Hi, I have code like following, but it generate an exception when form submits, i thought there is only one Session open and usr is a detached instance, any hints on how to fix this? thanks. A.C. Illegal attempt to associate a collection with two open sessions @Persist private Usr usr;

Re: Antwort: T5: @Persist form field or not?

2007-10-22 Thread Angelo Chen
Hi Kristian, Thanks for the explanation, now it's getting a little clearer. let me understand this and correct me if wrong: Tapestry renders a page to the browser, onActivate was called at this time. it generate another page or whatever you call it if a form is specified, form

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread lasitha
http://thread.gmane.org/gmane.comp.java.tapestry.user/53095/focus=53170 Cheers, lasitha. On 10/22/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, I have code like following, but it generate an exception when form submits, i thought there is only one Session open and usr is a detached instance,

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Oct 2007 06:10:42 -0300, Angelo Chen [EMAIL PROTECTED] wrote: String onSuccess() { _session.saveOrUpdate(usr); return null; } Just do this: String onSuccess() { usr = _session.merge(usr); // take a look at Session.merge() method to learn more. :)

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread Angelo Chen
Hi Lasitha, Thanks for the link, but what's the conclusion? Tapestry-hibernate has to be updated to close the session? there seems no decision in that thread. I use now merge which get rid of the problem so far. I'm new to this T5 form handling, if I understand correctly: onActivate the session

Re: Tap 4.0.2 to 4.1.2 migration loop / ognl issue

2007-10-22 Thread Dom Couldwell
Anything in particular that you would suggest? Some of the underlying code is dictating some of this (e.g. the use of the 2D array of booleans). Dom Couldwell Global Markets Research +1(212)250-7082

Re: Tap 4.0.2 to 4.1.2 migration loop / ognl issue

2007-10-22 Thread Jesse Kuhnert
Yes, I think it's probably the 2d array causing my problems. Should be a fix for it later today. (evening EST ) On 10/22/07, Dom Couldwell [EMAIL PROTECTED] wrote: Anything in particular that you would suggest? Some of the underlying code is dictating some of this (e.g. the use of the 2D

Re: Tap 4.0.2 to 4.1.2 migration loop / ognl issue

2007-10-22 Thread Dom Couldwell
I should point out that the underlying implementation is a List of Lists not an actual 2D Array, don't know if that makes any difference. Dom Couldwell Global Markets Research +1(212)250-7082 Jesse

Re: 5.0.6-SNAPSHOT archetype problems ...

2007-10-22 Thread Christian Edward Gruber
I thought I saw this removed from the SVN, so it should not be there in the next update. christian. On 22-Oct-07, at 4:07 AM, Alex Shneyderman wrote: I am using archetype to create a quickstart app. I have copmiled from sources and installed the archetype. Now when I run create:archetype

Re: Tap 4.0.2 to 4.1.2 migration loop / ognl issue

2007-10-22 Thread Dom Couldwell
OK, I've updated the JIRA with more info on the underlying implementation. Yell if you need more detail. Thanks, Dom Couldwell Global Markets Research Jesse Kuhnert

T5: accessing fields in a nested form?

2007-10-22 Thread Angelo Chen
Hi, I know nested form is not allowed in html, however I have a need for that, I have a sub form embedded in the main form, the sub form will be replaced by Ajax calls to obtain more specific forms depending on the country field, the UI works quite well, but there is no way for me to access

T5: partial form template

2007-10-22 Thread Angelo Chen
Hi, I have this template: div xmlns:t=... input t:type=textfield t:id=address1 / /div it can be used as component like this: t:form t:mycomponent /t:form but if I use it as page template, it can not be rendered at run time, I have to surround it with t:form/t:form. Is there a way that

Re: T5: partial form template

2007-10-22 Thread Christian Edward Gruber
Why can't you use it as a component? This feels like a component to me. Christian. On 22-Oct-07, at 10:37 AM, Angelo Chen wrote: Hi, I have this template: div xmlns:t=... input t:type=textfield t:id=address1 / /div it can be used as component like this: t:form t:mycomponent /t:form

[T5] BeanEditor used as a Custom Property Editor throwing StackOverflowError Exception on form post

2007-10-22 Thread Daniel Leffel
Hi, I'm using a BeanEditor as a custom property editor. The parent page renders the BeanEditor properly, but on submit, I get a StackOverflowError exception. Any ideas? Code and stack trace below: - public class AppPropertyEditBlocks { @Environmental private

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread lasitha
On 22-Oct-07, at 6:50 AM, Angelo Chen wrote: Thanks for the link, but what's the conclusion? Tapestry-hibernate has to be updated to close the session? there seems no decision in that thread. That is _my_ conclusion :). You're right, that thread didn't really go anywhere, partly because

Re: T5: accessing fields in a nested form?

2007-10-22 Thread Josh Canfield
I know nested form is not allowed in html, however I have a need for that, That's a fun statement... I know the spec doesn't allow it but I'm going to do it anyway... Why do you need a nested form? Can you just add the fields you want without the form? If your possibilities are limited enough

T5: Newbie question - block example needed

2007-10-22 Thread jblier
I'm making progress with T5.0.5 and I'm eager to switch to 5.0.6 when it will be available. In 5.0.5, I am now able to create advanced Layouts by merging a page template with a component. And I am also able to use the parameter element to load specific content inside the layout. All of this

T5: Injecting initialized array

2007-10-22 Thread Borut Bolčina
Hi, one of my pages needs to have an ArrayList of strings. This array must be populated once per application start. The array gets populated by reading a file line by line. How is this done the T5 (and Tapestry IoC) way? I am looking for the most elegant solution. Cheers, Borut (T5 newbie)

Re: T3: enable/disable one column according to the other columns result

2007-10-22 Thread Nazmul Bhuiyan
Thanks a lot Nick and Paul. Naz Nick Westgate wrote: There is a Conditional component: http://tapestry.apache.org/tapestry3/doc/ComponentReference/Conditional.html But much more useful are the If, Else and For components here: http://www.t-deli.com/ If you want to disable links then

Re: T5: Injecting initialized array

2007-10-22 Thread Josh Canfield
Hi Borut, If this is really just for one page then you may just want to use a static initilializer in your class, and a static property to hold it. Or you could build a service http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html. Use the singleton service scope so it only gets built

Re: T5: accessing fields in a nested form?

2007-10-22 Thread Angelo Chen
Hi Josh, I'm now trying this Javascript approach, I need to position those fields differently depending on parameter, so I insert them runtime, however T5's page class will not recognize them, so I have to render all of them in the page and delete when page is loaded , add back those variables

Re: T5: accessing fields in a nested form?

2007-10-22 Thread Josh Canfield
I don't entirely follow what you said. There are lots of resources on the web for dynamically building forms. Here are a couple that you can start with. http://developer.apple.com/internet/webcontent/dynamicforms.html http://www.quirksmode.org/dom/usableforms.html Josh On 10/22/07, Angelo

[T4.1.3] Tip for using using directlink and updatecomponents in a for loop

2007-10-22 Thread Jim Roycroft
I spent three hours on this silly thing so I hope this post will help you avoid that! I was testing this out with two iterations of the loop, and that's what caused me grief. As soon as I switched to four iterations, I figured out what was happening: I have a SimplePage.html which includes

Re: [T4.1.3] Tip for using using directlink and updatecomponents in a for loop

2007-10-22 Thread Andreas Andreou
I've always had such direct links after their updateComponents and used updateComponents=clientId:componentWrapper (though nowadays updateComponents=componentWrapper is equivalent). So, I never had to have the link before the wrapper - but i believe (though never tried) that peekClientId() in