How to overrid configuration?

2008-09-03 Thread Jun Tsai
hi,all for example in TapestryModule public void contribXX(MappedConfiguration config.){ config.add(theId,locator.autobuild(XXX.class)); } Now I want to overrid theId Object?such as I want to override EntityPersistentFieldStrategy service .how to do? thanks. -- regards, Jun

Re: editing a bean with a required password field

2008-09-03 Thread Ulrich Stärk
That still wouldn't solve the validation issue. If the user doesn't input anything, validation will fail. Uli Am Di, 2.09.2008, 22:39, schrieb Carl Crowder: Why not just @Persist the password value in the session, only overwriting the value if the user submits something? That way the value

T5: AjaxFormLoop parameter addRow

2008-09-03 Thread Sven Homburg
Hi there, in one of the last tapestry commits, the parameter addRow from component AjaxFormLoop was changed to defaultBinding literal makes that sense ? -- with regards Sven Homburg http://www.chenillekit.org http://tapestry5-components.googlecode.com

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
can anyone help me, what I'm doing wrong... On Wed, Sep 3, 2008 at 11:06 AM, Natia Gdzelishvili [EMAIL PROTECTED] wrote: I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password; @Inject private

Re: Problem with aso

2008-09-03 Thread Sven Homburg
any exception stack ? 2008/9/3 Natia Gdzelishvili [EMAIL PROTECTED] I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password; @Inject private IBusinessServicesLocator _businessServicesLocator;

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no On Wed, Sep 3, 2008 at 12:52 PM, Sven Homburg [EMAIL PROTECTED]wrote: any exception stack ? 2008/9/3 Natia Gdzelishvili [EMAIL PROTECTED] I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password;

Re: Problem with aso

2008-09-03 Thread Martijn Brinkers
Just a guess, I'm not sure, correct me if I'm wrong, but I don't think you can just replace the ASO like you are doing. getMerchantCreator().login probably does not return an ASO object. You should make a shallow copy (ie copy all relevant info) from the returned object to you ASO object.

Re: Problem with aso

2008-09-03 Thread Hugo Palma
When you say that you can't access currUser what exactly does that mean ? That it's always null ? Natia Gdzelishvili wrote: I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password; @Inject private

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no assignment cant be done currUser = u; // currUser cannot be resolved when i;m inspecting currUser On Wed, Sep 3, 2008 at 1:02 PM, Hugo Palma [EMAIL PROTECTED] wrote: When you say that you can't access currUser what exactly does that mean ? That it's always null ? Natia Gdzelishvili

Re: Problem with aso

2008-09-03 Thread José Paumard
Natia, I think there is a mistake in your code : private User currUser ; private boolean userExists ; I dont think T5 will link userExists and currUser, currUser should be named user, or userExists currUserExists (please correct me if I'm wrong). That said, what do you mean I cant access

Re: Problem with aso

2008-09-03 Thread Hugo Palma
You could also add the created=false parameter to the ApplicationState annotation if you want to keep the assignment and not have to copy every field to the ASO object. Martijn Brinkers wrote: Just a guess, I'm not sure, correct me if I'm wrong, but I don't think you can just replace the ASO

Re: Problem with aso

2008-09-03 Thread Fernando Padilla
Also, i thought you were to think of an ASO almost as a singleton or a service. Tapestry will create it for you on first access. I didn't know you could set it. Even if I'm wrong, using this design pattern might clean things up a little. So you should use another class to contain a

Overriding Default Styles

2008-09-03 Thread 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,

Re: Overriding Default Styles

2008-09-03 Thread Ulrich Stärk
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

Re: Overriding Default Styles

2008-09-03 Thread 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

Re: Overriding Default Styles

2008-09-03 Thread Ulrich Stärk
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

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
I'm not using userExists, in tapestry 5.0.9 everything was working, i was doing the same On Wed, Sep 3, 2008 at 1:24 PM, Fernando Padilla [EMAIL PROTECTED] wrote: Also, i thought you were to think of an ASO almost as a singleton or a service. Tapestry will create it for you on first access.

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
I've tried to do this: currUser=new User(); and then set some values but it does not work... On Wed, Sep 3, 2008 at 2:26 PM, Natia Gdzelishvili [EMAIL PROTECTED]wrote: I'm not using userExists, in tapestry 5.0.9 everything was working, i was doing the same On Wed, Sep 3, 2008 at 1:24 PM,

Re: Problem with aso

2008-09-03 Thread Sven Homburg
the aso created internal by tapestry you should not create the object by youself aso should used as container 2008/9/3 Natia Gdzelishvili [EMAIL PROTECTED] I'm not using userExists, in tapestry 5.0.9 everything was working, i was doing the same On Wed, Sep 3, 2008 at 1:24 PM, Fernando

Re: Problem with aso

2008-09-03 Thread Sven Homburg
a short sample public class UserASOUSER extends IUser { private USER userEntity; private Logger logger; public UserASO(final Logger logger) { this.logger = logger; logger.info(UserASO created); } public USER getUserEntity() { return

Re: Problem with aso

2008-09-03 Thread Hugo Palma
You have two ways of setting the currUser DAO: 1. Copy fields from one object to another. Just add this to your code: currUser.setUsername(user.getUsername); currUser.setPassword(user.getPassword); . You don't have to assign the currUser field. That will the done for you by Tapestry. 2.

Re: Problem with aso - a further query

2008-09-03 Thread photos
Quoting Hugo Palma [EMAIL PROTECTED]: You have two ways of setting the currUser DAO: 1. Copy fields from one object to another. Just add this to your code: currUser.setUsername(user.getUsername); currUser.setPassword(user.getPassword); . You don't have to assign the currUser field. That

[ANN] JumpStart 3.13 for Tapestry 5.0.14

2008-09-03 Thread Geoff Callender
Hi all, JumpStart 3.13 is now available, in an on-line demo at http://202.177.217.122:8080/jumpstart/ and for download at http://files.doublenegative.com.au/jumpstart . To all experienced users of Tapestry, please scour it for inaccuracies and let me know here or via the

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, Can you post ASO code? Marcus

Re: Problem with aso

2008-09-03 Thread Carl Crowder
Is this actually a compilation error? Natia Gdzelishvili wrote: in version 5.0.9 it is working I've addedvist class but still same situation _visit cannot be resolved On Wed, Sep 3, 2008 at 3:44 PM, Geoff Callender [EMAIL PROTECTED] wrote: Fernando's right. Your field curruser starts

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
public class Visit { // The logged in user private boolean _loggedIn = false; private String _myLoginId = null; public void noteLogIn(User user) { _loggedIn = true; _myLoginId = user.getUserName(); } public void noteLogOut() { _loggedIn = false;

Re: Problem with aso

2008-09-03 Thread Geoff Callender
I can't see anything obviously wrong. Can you post the whole Login class - all of it. On 03/09/2008, at 10:13 PM, Natia Gdzelishvili wrote: public class Visit { // The logged in user private boolean _loggedIn = false; private String _myLoginId = null; public void noteLogIn(User

Newbie question about T5 urls

2008-09-03 Thread nick shaw
Hi I am new to Tapestry5 and I have a question about page urls: I have a page called admin/ManageContent which I access with http://server/context-root/admin/manageContent. I have now secured the page using Acegi so only admin users can access pages that match /admin/*, so typing the above url

T4.0 PropertySelection + onChange

2008-09-03 Thread Leon Derks
Hello Is it possible to catch an onchange Event for the PropertySelection component? I don't want the form te be submitted, but want to update a section in my page. I use tapestry 4.0.2 with Java 1.4 Leon - To

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
maybe i have to add some configuration in appmodule... package ge.bog.merchants.regform.pages; import ge.bog.merchants.exception.UserNotFoundException; import ge.bog.merchants.model.User; import ge.bog.merchants.regform.helper.Visit; import

Re: Problem with aso

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 06:24:44 -0300, Fernando Padilla [EMAIL PROTECTED] escreveu: So you should use another class to contain a reference to the current active user, call it UserContainer. I would call it Session, then it could be used to hold more info about the user session. Thiago

Re: Problem with aso

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 08:44:43 -0300, Geoff Callender [EMAIL PROTECTED] escreveu: @ApplicationState private Visit _visit; private boolean _visitExists; Visit? Can I guess you were a long time Tapestry 4 user? :) Thiago

Re: Problem with aso

2008-09-03 Thread Geoff Callender
Yeah, old habits die hard. On 03/09/2008, at 10:52 PM, Thiago H. de Paula Figueiredo wrote: Em Wed, 03 Sep 2008 08:44:43 -0300, Geoff Callender [EMAIL PROTECTED] escreveu: @ApplicationState private Visit _visit; private boolean _visitExists; Visit? Can I guess you

Re: Overriding Default Styles

2008-09-03 Thread 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

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no I'm not tapestry 4 user I'm new in tapestry i thins there is some problem with my project, i've make new project anad tested aso and it is working, I'll try to find out what it is thank you On Wed, Sep 3, 2008 at 4:59 PM, Geoff Callender [EMAIL PROTECTED] wrote: Yeah, old habits die hard.

Re: Problem with aso

2008-09-03 Thread Geoff Callender
I'm stumped. When you say can't be resolved, I'm guessing you're using debug in an IDE. Which IDE? Field u is a detached entity which may have some lazy-loaded fields. Is the IDE showing that? What if you print u, _visitExists and _visit before and after _visit.noteLogIn(u) ? Are they

Re: Problem with aso

2008-09-03 Thread Geoff Callender
Crazy thought - in your old project, if you're using Eclipse, have you tried Project Clean... ? On 03/09/2008, at 11:05 PM, Natia Gdzelishvili wrote: no I'm not tapestry 4 user I'm new in tapestry i thins there is some problem with my project, i've make new project anad tested aso and

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
yes i've tried many times On Wed, Sep 3, 2008 at 5:09 PM, Geoff Callender [EMAIL PROTECTED] wrote: Crazy thought - in your old project, if you're using Eclipse, have you tried Project Clean... ? On 03/09/2008, at 11:05 PM, Natia Gdzelishvili wrote: no I'm not tapestry 4 user I'm new

t5: using a non primary key field as context

2008-09-03 Thread Angelo Chen
Hi, I like the feature that we can now pass Hibernate entity to the onActivate and T5 automatically picks up object from database. however it assumes what passed is the primary key, example: 1. this works. localhost://page/1 2. this will not work: localhost://page/myName is there a way to

[T5] - new client side validator

2008-09-03 Thread Mohammad Shamsi
Hi friends, i am going to add new validator in my T5 project. the server side validatioin is ok and i have no problem with it. but in client side, i changed the Tapestry.js to add my validator funciton in it. is there any better way to avoid change Tapestry original javascripts ? -- sincerely

Re: Overriding Default Styles

2008-09-03 Thread Peter Stavrinides
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

RE: how to include css resource inside tapestry script file

2008-09-03 Thread Ken in nashua
Sorry... forgot... T-4.1.6-SNAPSHOTBest regards Ken in nashua From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: how to include css resource inside tapestry script fileDate: Wed, 3 Sep 2008 10:42:22 -0400 Folks, Wanted to know if there is a mechanism whereby we can include a whole set of CSS

[T5] - another question about validators

2008-09-03 Thread Mohammad Shamsi
Hi, is there any way to write a new validator that accept more than one parameter ? exampe range (from, to) i know that i can do it with using 2 validator instead of one (min and max). but i want to write new validator with 2 or more parameter . :( :) -- sincerely yours M. H. Shamsi

Re: T4.1.5 possible ognl cache problem

2008-09-03 Thread Kalle Korhonen
On the page in your production application, you wouldn't be using #this anywhere in an OGNL expression, would you? Kalle On Wed, Sep 3, 2008 at 6:35 AM, denis queffeulou [EMAIL PROTECTED] wrote: I've done a simple webapp and the result is that compileExpression is called 18 times but this

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, My suggestions: - put the setter's on Visit class. - remove methods noteLogIn() and noteLogOut() , when you want to logout just attrib null to ASO, inside any page. and try this approach: @ApplicationState private Visit _visit; public Object submitLoginForm() { Class nextPage;

T4: How I can obtain the system path of my application?

2008-09-03 Thread Jorge Quiroga
Hello gurus: I need to obtain the real path of my application, but I don't know in Tap 4.1 how to get the ServletContext or how to obtain the object that implements that interface. I see the real path when watching a cycle.getInfrastructure().getContextRoot() object while debugging, but the

RE: Problem with aso

2008-09-03 Thread Jonathan Barker
Whenever I see, It worked in 5.0.x, my first suggestion is always to make sure that you don't have old Tapestry libraries floating around in your classpath. -Original Message- From: Natia Gdzelishvili [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2008 08:14 To: Tapestry

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, just correcting: _visit.setMyLoginId(u.getUserName()); and check Jonathan's tip. (old Tapestry libraries in your classpath.) Marcus

Re: Overriding Default Styles

2008-09-03 Thread Ulrich Stärk
That's a point, indeed. I could imagine some kind of mechanism where you specify a stylesheet link for every component (or override it for existing components) and Tapestry combines those definitions together to one stylesheet, omitting unused definitions. But I don't know if this improved

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Chris Lewis
Awesome! I'll try to have a look in a couple of hours, and if I can make the time, I'd like to contribute either in raw content and/or collaborative editing. As for a discussion channel for the book, why not use google-groups? Alex Kotchnev wrote: I've created a new project for the proposed book

Re: Overriding Default Styles

2008-09-03 Thread Howard Lewis Ship
Bloat is all relative. Tapestry could dynamically assemble a virtual stylesheet for the page from bits and pieces, somewhat like JavaScript initialization is accomplished. However, that would require encoding a lot of state information into the URL for the virtual stylesheet, and that would

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Hugo Palma
Just an idea, maybe hosting the book on assembla (http://www.assembla.com) would fit this project needs better. I've used assembla with great success in the past, it has all the things we need, an SVN repo, a forum, a chat room, an issue tracker, and more... Alex Kotchnev wrote: I've created

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Howard Lewis Ship
Looked at the TOC. My thoughts on writing the book line up closely with how I've written the Tapestry Workshop. I can tell you that, in the Workshop, we are using Hibernate in the first session (the Workshop consists of themed sessions, with labs inside the session). In other words, focus on

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread ProAdmin Dariusz Dwornikowski
I really would love to see a walkthrough on making blog application in tapestry5+spring+hibernate. Not only the integration, but how to implement simple blog with it, design DAOs, where to put them etc. Tapestry alone is no use if you do not have DB. In advanced topics I would like to see ex.

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 15:31:05 -0300, ProAdmin Dariusz Dwornikowski [EMAIL PROTECTED] escreveu: Tapestry alone is no use if you do not have DB. As a instructor of Java, Hibernate, Spring and other frameworks, my experience says that people learn way better when they're learning just one

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Patrick Moore
I would suggest that you get a way from the linear, single path flow of writing book. I have stopped reading most technical books because they assume that I am a beginner and am going to read the book in a strictly serial manner. I would suggest that rather than be chapter focused that you be

Re: T5: RenderSupport in XHR requests

2008-09-03 Thread Josh Canfield
If you have a form in the block that is being rendered then I've used the PREPARE_FOR_RENDER event from the form to inject scripts. Subcomponents get their render methods called during a partial render, I'm not sure why the targeted component's render methods are not called. On Tue, Sep 2, 2008

Re: Newbie question about T5 urls

2008-09-03 Thread Filip S. Adamsen
Nope, that's not possible anymore. The reason it worked in T4 is that friendly URLs were just aliases for the real Tapestry URLs. That's not how it is in T5. -Filip On 2008-09-03 14:33, nick shaw wrote: Hi I am new to Tapestry5 and I have a question about page urls: I have a page called

Re: T5: @PageActivationContext and @CommitAfter

2008-09-03 Thread Filip S. Adamsen
Hi Angelo, Put this.person.view_count = this.person.view_count + 1; in setupRender (@SetupRender) and put @CommitAfter on that. -Filip On 2008-09-03 15:36, Angelo Chen wrote: Hi, I have code like this, I updated the view_count in the onActivate public class Page { private Person

Re: T5 : [ANN] The book - next steps

2008-09-03 Thread Timothy Sweetser
Instead of debating the book's structure first, why don't we start out by just breaking it down into the various topics and subtopics (excluding introductions, tutorials, and prolonged examples) and working on them? From my perspective, the priority should be first on compiling and organizing

Tapestry 5

2008-09-03 Thread Alex Florentino
How to make an complex component layout using tapestry5, I read the T5 begin tutorial and it works fine, but I need create an component layout with big left menu and then I would like separate at my layout.tml in various tml files such as leftmenu.tml, footer.tml etc.. how to make it ? thanks,

Re: Tapestry 5

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 17:42:22 -0300, Alex Florentino [EMAIL PROTECTED] escreveu: How to make an complex component layout using tapestry5, I read the T5 begin tutorial and it works fine, but I need create an component layout with big left menu and then I would like separate at my

Re: Tapestry 5

2008-09-03 Thread ProAdmin Dariusz Dwornikowski
http://wiki.apache.org/tapestry/Tapestry5Layoutcomponent Look here. 2008/9/3 Alex Florentino [EMAIL PROTECTED] How to make an complex component layout using tapestry5, I read the T5 begin tutorial and it works fine, but I need create an component layout with big left menu and then I would

Re: T4.0 PropertySelection + onChange

2008-09-03 Thread Andreas Andreou
Hi - see the 2nd example in the docs: http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/PropertySelection.html and change the onchange js handler the way you like On Wed, Sep 3, 2008 at 3:39 PM, Leon Derks [EMAIL PROTECTED] wrote: Hello Is it possible to catch an onchange Event

Re: Newbie question about T5 urls

2008-09-03 Thread nick shaw
Great, that puts my mind at ease! Thanks Filip On Wed, Sep 3, 2008 at 9:22 PM, Filip S. Adamsen [EMAIL PROTECTED] wrote: Nope, that's not possible anymore. The reason it worked in T4 is that friendly URLs were just aliases for the real Tapestry URLs. That's not how it is in T5. -Filip

T5 Persistence issue appears when using Firefox with YSlow

2008-09-03 Thread Daniel Jue
This is really weird and I've spend all day trying to fix it. I believe this started a couple days ago. I noticed that my Tapestry-acegi interception code started asking me to reauthenticate on every page navigation to a new page, or form submission. Then I noticed my grid tables columns could

Re: T4: How I can obtain the system path of my application?

2008-09-03 Thread Andreas Andreou
just add an abstract getter for it (ServletContext) in your page or component and call it. On Wed, Sep 3, 2008 at 6:33 PM, Jorge Quiroga [EMAIL PROTECTED] wrote: Hello gurus: I need to obtain the real path of my application, but I don't know in Tap 4.1 how to get the ServletContext or how to

Re: [T5] tapestry-hibernate and transactions

2008-09-03 Thread buckofive
Hi guys, I have run into a related issue. I am using a thrid party library which creates transactions, commits and also performs rollbacks internally. When ever a transaction is rolledback in the third party library I later see a hibernate exception in the log file:

Wrong error message

2008-09-03 Thread Alex Florentino
Hi all, I was trying make an hello world with tapestry 5, but I make mistake, sample : my web.xml : context-param param-nametapestry.app-package/param-name param-valuemy.package.tutorial/param-value /context-param filter filter-nameapp/filter-name

Re: Tapestry 5

2008-09-03 Thread Alex Florentino
thanks On Wed, Sep 3, 2008 at 6:47 PM, Carl Crowder [EMAIL PROTECTED] wrote: Each .tml file is basically a component or page. If you want to separate things into separate .tml files then you need to make separate components. Assuming your layout component is like this html