Re: DatePicker not working after upgrading from 4.0.2 to 4.1
Hello, I've found same problem recently. Try to use DropdownDatePicker component instead. Igor Anders Cessner wrote: Hi, I recently upgraded from 4.0.2 to 4.1 and noticed that the datepicker doesnt work anymore. when the page is loaded i get this error: Could not load 'tapestry.form'; last tried '__package__.js' and when i click the calendar image i get: calendar_dueDate has no properties it has probably something to do with this http://issues.apache.org/jira/browse/TAPESTRY-1020?page=all as i´m developing on windows, but that issue seems to be resolved 21/7 and the 4.1jars i´ve downloaded from http://tapestry.apache.org/download.html looks like to be dated after that. what should i do to fix this? -- View this message in context: http://www.nabble.com/DatePicker-not-working-after-upgrading-from-4.0.2-to-4.1-tf2231968.html#a6260496 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
contrib:Table sorting and links
Hello List, currently I'm trying to make a sortable table based on an O/R Mapper backend. Until now I was using my own IBasicTableModel implementation which allowed to get results fast. However, it does not allow to sort columns (sorting has no effect) and it also does not allow to display links in the table rows (I want to link to a details page from each row in the table). I think I will have to implement my own ITableModel, right? Perhaps there is a tutorial somewhere or something? I have no clue how to do it because of the large number of classes and interfaces involved (ITableModel, ITableColumnModel, ITableSortingState, ITablePagingState, ITableColumn, ITableModelSource, etc.) Please point me to some documentation! Thanks Bastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to pass a parameter to my translator?
Hello, I need some help from hivemind gurus. I'd like to pass an additional parameter to my own translator, something like this: contribution configuration-id=tapestry.form.translator.Translators bean name=document class=ee.tallink.docman.web.tapestry.translators.DocumentTranslator set-object property=documentService value=spring:documentService / /bean /contribution How to implement this in hivemind? Thanks, Igor -- View this message in context: http://www.nabble.com/How-to-pass-a-parameter-to-my-translator--tf2257255.html#a6261264 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DatePicker not working after upgrading from 4.0.2 to 4.1
But be aware that you can't change the input dateformat at the moment, because the dojo DropdownDatePicker doesn't support it yet (but should from version 0.4 on) regards, Robert soir schrieb: Hello, I've found same problem recently. Try to use DropdownDatePicker component instead. Igor Anders Cessner wrote: Hi, I recently upgraded from 4.0.2 to 4.1 and noticed that the datepicker doesnt work anymore. when the page is loaded i get this error: Could not load 'tapestry.form'; last tried '__package__.js' and when i click the calendar image i get: calendar_dueDate has no properties it has probably something to do with this http://issues.apache.org/jira/browse/TAPESTRY-1020?page=all as i´m developing on windows, but that issue seems to be resolved 21/7 and the 4.1jars i´ve downloaded from http://tapestry.apache.org/download.html looks like to be dated after that. what should i do to fix this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book Enjoying web dev with Tapestry. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(admin)). But why? user was set to the login-user two lines before? Why I cant get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
I'd say because user.getState() returns null. Right? On 9/12/06, Michael Wölm [EMAIL PROTECTED] wrote: Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book Enjoying web dev with Tapestry. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers ().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(admin)). But why? user was set to the login-user two lines before? Why I can't get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
Well, if you get a NPE on this line: user.getState().equals(admin) then either user or getState() is null, right? And, since user is definitely not null, your private String state is obviously null. Perhaps you should add something like this: private String state = initial state; Martin On Tue, 12 Sep 2006 15:52:25 +0200, Michael Wölm [EMAIL PROTECTED] wrote: Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book “Enjoying web dev with Tapestry”. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(“admin”)). But why? user was set to the login-user two lines before? Why I can’t get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - 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: WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
As a general rule, it's safer to put the literal first in statements like this: admin.equals(user.getState()) If anyone wants to say that it looks/reads a bit funny, I'll agree. It's an odd syntax, but it protects you from NPEs. -Steve Martin Strand wrote: Well, if you get a NPE on this line: user.getState().equals(admin) then either user or getState() is null, right? And, since user is definitely not null, your private String state is obviously null. Perhaps you should add something like this: private String state = initial state; Martin On Tue, 12 Sep 2006 15:52:25 +0200, Michael Wölm [EMAIL PROTECTED] wrote: Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book “Enjoying web dev with Tapestry”. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(“admin”)). But why? user was set to the login-user two lines before? Why I can’t get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - 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]
EventListener: How to send values to the listener :)
Hello there! I've seen examples (and tried it, really cool, I'm still amazed, and all my co-workers with your job Jesse) using the EventListener. I'd like to know if it is possible to send some values to the listener? Also, is there a way, maybe a callback or something, to interact within it? I mean, after calling the ajax function that sends the values to the server, call a javascript function provided by the developer? Best Regards Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Asynchronous form submission
Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1 and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td /tr tr tdEmail:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.email//td /tr tr tdAge:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.age //td /tr tr td colspan=2span jwcid= [EMAIL PROTECTED] listener=listener:formSubmit//td /tr /table /form table border=1 tr td style=background-color:aquaName/td td style=background-color:aquaEmail/td td style=background-color:aquaAge/td /tr span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.name//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.email//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.age//td /tr /span /table /body /html public abstract class Home extends BasePage{ @InitialValue(new java.util.ArrayList()) public abstract ListUser getUsers(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUser(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUserDetail(); public void formSubmit(IRequestCycle cycle){ ResponseBuilder builder = cycle.getResponseBuilder(); getUsers().add(getUser()); } } I'm guessing the problem is withing the submit button that will submit the form, bypassing any javascript. Another question is about the state of my list. Do i need to use a persist model for that? I'm worried about the amount of stuff that will be set on the session, or if not, the number of fetches on the DB will be needed ex: setUsers(dao.getOldValues()) getUsers.add(getUser()); know what I mean? 2nd is pretty much like this one, but I need a form that will have almost all the fields set to read only. The user enters the id, and clicks on the TAB button, it will fetch the values from the server and populate it and setting all the fields back to editable form. I guess my question here is: how do I interact with local javascript using @EventListener? I'm creating examples
Re: EventListener: How to send values to the listener :)
To answer number 1, I'm not sure...I guess that depends on what you are trying to send. Since this isn't a direct component used it is harder to find a good way to provide DirectLink parameters to the listener. If you have a specific example in mind I can be more helpful. For number 2, is this something you wanted to invoke globally after all async calls or only specific to this particular event listener call? It's very easy to add things to be updated to a request from within a listener method(getResponseBuilder().updateComponent()), but I want to be sure you didn't want some sort of client side UI effect for requests instead. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hello there! I've seen examples (and tried it, really cool, I'm still amazed, and all my co-workers with your job Jesse) using the EventListener. I'd like to know if it is possible to send some values to the listener? Also, is there a way, maybe a callback or something, to interact within it? I mean, after calling the ajax function that sends the values to the server, call a javascript function provided by the developer? Best Regards Vinicius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Asynchronous form submission
Hmmm... If you have debug turned on you should be able to see the content returned by the server...Does it return a partial list or everything you expected? If it's returning content for the area you are requesting but the content isn't exactly what you expect it's possible you are having other issues specific to the For loop that aren't as relevant to ajax updates...Then again it could be a bug, I just want to be sure we know which.. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td /tr tr tdEmail:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.email//td /tr tr tdAge:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.age //td /tr tr td colspan=2span jwcid= [EMAIL PROTECTED] listener=listener:formSubmit//td /tr /table /form table border=1 tr td style=background-color:aquaName/td td style=background-color:aquaEmail/td td style=background-color:aquaAge/td /tr span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.name//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.email//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.age//td /tr /span /table /body /html public abstract class Home extends BasePage{ @InitialValue(new java.util.ArrayList()) public abstract ListUser getUsers(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUser(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUserDetail(); public void formSubmit(IRequestCycle cycle){ ResponseBuilder builder = cycle.getResponseBuilder (); getUsers().add(getUser()); } } I'm guessing the problem is withing the submit button that will submit the form, bypassing any javascript. Another question is about the state of my list. Do i need to use a persist model for that? I'm worried
RE: Asynchronous form submission
I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1 and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td /tr tr tdEmail:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.email//td /tr tr tdAge:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.age //td /tr tr td colspan=2span jwcid= [EMAIL PROTECTED] listener=listener:formSubmit//td /tr /table /form table border=1 tr td style=background-color:aquaName/td td style=background-color:aquaEmail/td td style=background-color:aquaAge/td /tr span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.name//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.email//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.age//td /tr /span /table /body /html public abstract class Home extends BasePage{ @InitialValue(new java.util.ArrayList()) public abstract ListUser getUsers(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUser(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract User getUserDetail(); public void
Re: Asynchronous form submission
Ahh..Good call..You can also give For the element parameter to have it render itself as an html dom node. On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td /tr tr tdEmail:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.email//td /tr tr tdAge:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.age //td /tr tr td colspan=2span jwcid= [EMAIL PROTECTED] listener=listener:formSubmit//td /tr /table /form table border=1 tr td style=background-color:aquaName/td td style=background-color:aquaEmail/td td style=background-color:aquaAge/td /tr span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.name//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.email//td td style=background-color:aquaspan jwcid=@Insert value=ognl:userDetail.age//td /tr /span /table /body /html public abstract class Home extends BasePage{ @InitialValue(new java.util.ArrayList()) public abstract ListUser getUsers(); @InitialValue(new com.mgjug.tapestry.model.User()) public abstract
Re: Asynchronous form submission
Does the server return valid html in your areas though? FireBug or tapestry browser debug (via Shell) should be able to show you this. Either way I don't think you can add tr elements like this in IE anyways..You'd have to do it through the dom interface. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hum, thanks Denis, that almos did the trick :) I guess the updateComponent does not work the way I expected, I was misunderstanding it... Here's what's happening using Denis' solution: Let's say the list was empty, so no rows are displayed on the table ok. So the user add a row. Since the @Any is surrounding the tr @For element, it writes the td elements outside the tr, messing the whole document format. So let's say the user leaves the page and comes back. This time, when the for renders, it displays the values (ok expected :) ) but a side effect comes when the user add another value, the whole list is displayed on top of the previous. I guess the whole problem I'm having is that I'm not being able to refresh the for inner elements. I'll keep trying different stuff here and let you know. Thanks for all the support On 9/12/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Ahh..Good call..You can also give For the element parameter to have it render itself as an html dom node. On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td /tr tr tdEmail:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.email//td /tr tr tdAge:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.age //td /tr tr
RE: Asynchronous form submission
I guess you can always refresh the entire table. I do it in one of my pages and it works pretty well. The downside is that on a really large table it would defeat part of the purpose of using ajax in the first place since it wouldn't be so efficient. -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 13:39 To: Tapestry users Subject: Re: Asynchronous form submission Does the server return valid html in your areas though? FireBug or tapestry browser debug (via Shell) should be able to show you this. Either way I don't think you can add tr elements like this in IE anyways..You'd have to do it through the dom interface. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hum, thanks Denis, that almos did the trick :) I guess the updateComponent does not work the way I expected, I was misunderstanding it... Here's what's happening using Denis' solution: Let's say the list was empty, so no rows are displayed on the table ok. So the user add a row. Since the @Any is surrounding the tr @For element, it writes the td elements outside the tr, messing the whole document format. So let's say the user leaves the page and comes back. This time, when the for renders, it displays the values (ok expected :) ) but a side effect comes when the user add another value, the whole list is displayed on top of the previous. I guess the whole problem I'm having is that I'm not being able to refresh the for inner elements. I'll keep trying different stuff here and let you know. Thanks for all the support On 9/12/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Ahh..Good call..You can also give For the element parameter to have it render itself as an html dom node. On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true debugContainerId=dojoDebug title=AjaxForm disableCaching=true body jwcid=@Body form jwcid=[EMAIL PROTECTED] async=true updateComponents=ognl:{'userList'} table tr tdName:/td tdinput type=text jwcid= [EMAIL PROTECTED] value=ognl:user.name//td
Re: Asynchronous form submission
Jesse, I've enable debug but it is only working when something bad happens. The last system I've developed (the chat application) I was using ajax, but bare, on the hand dealing with all dom elements. Is it possible to do so? I guess that's what I was asking in another thread, about having other functions called after the response from the server. I'll keep looking for more tracing on this :) Thanks again folks Regards On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I guess you can always refresh the entire table. I do it in one of my pages and it works pretty well. The downside is that on a really large table it would defeat part of the purpose of using ajax in the first place since it wouldn't be so efficient. -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 13:39 To: Tapestry users Subject: Re: Asynchronous form submission Does the server return valid html in your areas though? FireBug or tapestry browser debug (via Shell) should be able to show you this. Either way I don't think you can add tr elements like this in IE anyways..You'd have to do it through the dom interface. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hum, thanks Denis, that almos did the trick :) I guess the updateComponent does not work the way I expected, I was misunderstanding it... Here's what's happening using Denis' solution: Let's say the list was empty, so no rows are displayed on the table ok. So the user add a row. Since the @Any is surrounding the tr @For element, it writes the td elements outside the tr, messing the whole document format. So let's say the user leaves the page and comes back. This time, when the for renders, it displays the values (ok expected :) ) but a side effect comes when the user add another value, the whole list is displayed on top of the previous. I guess the whole problem I'm having is that I'm not being able to refresh the for inner elements. I'll keep trying different stuff here and let you know. Thanks for all the support On 9/12/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Ahh..Good call..You can also give For the element parameter to have it render itself as an html dom node. On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better) The first one is pretty easy, but its reloading the entire page, I've checked the list and saw some discussions about it, I tried but it seems not to be working: html jwcid=@Shell debugEnabled=true
Expired Session message
Hi. When the session expires, how can I handle this and redirect to a customized page saying Your session has expired In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException { cycle.activate(Expired); // Trigger my customized session-expired page. } Thanks, Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expired Session message
I would also like to see how this is done. Perhaps even with a javascript popup telling the user the session is about to/has expired. I imagine this type of active checking could be done through ajax, or through a client side timer, rather than waiting for the user to refresh a page and find out then. Dan On 9/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi. When the session expires, how can I handle this and redirect to a customized page saying Your session has expired In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException { cycle.activate(Expired); // Trigger my customized session-expired page. } Thanks, Greg - 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: Asynchronous form submission
Forget about debug, sorry, just saw the browserLogLevel option :P On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Jesse, I've enable debug but it is only working when something bad happens. The last system I've developed (the chat application) I was using ajax, but bare, on the hand dealing with all dom elements. Is it possible to do so? I guess that's what I was asking in another thread, about having other functions called after the response from the server. I'll keep looking for more tracing on this :) Thanks again folks Regards On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I guess you can always refresh the entire table. I do it in one of my pages and it works pretty well. The downside is that on a really large table it would defeat part of the purpose of using ajax in the first place since it wouldn't be so efficient. -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 13:39 To: Tapestry users Subject: Re: Asynchronous form submission Does the server return valid html in your areas though? FireBug or tapestry browser debug (via Shell) should be able to show you this. Either way I don't think you can add tr elements like this in IE anyways..You'd have to do it through the dom interface. On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hum, thanks Denis, that almos did the trick :) I guess the updateComponent does not work the way I expected, I was misunderstanding it... Here's what's happening using Denis' solution: Let's say the list was empty, so no rows are displayed on the table ok. So the user add a row. Since the @Any is surrounding the tr @For element, it writes the td elements outside the tr, messing the whole document format. So let's say the user leaves the page and comes back. This time, when the for renders, it displays the values (ok expected :) ) but a side effect comes when the user add another value, the whole list is displayed on top of the previous. I guess the whole problem I'm having is that I'm not being able to refresh the for inner elements. I'll keep trying different stuff here and let you know. Thanks for all the support On 9/12/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Ahh..Good call..You can also give For the element parameter to have it render itself as an html dom node. On 9/12/06, Denis Souza [EMAIL PROTECTED] wrote: I think the problem is the way that the For component renders. You're trying to update a component named userList where: span jwcid=[EMAIL PROTECTED] source=ognl:users value=ognl:userDetail tr ... /tr /span My guess is the for component is rendering it's body but not it's own tag. Usually the component's name is placed on the id property on the component's tag. When the ajax/js logic runs it looks for a tag which id=userList. In this case it probably can't find userList because it's not there, the For component didn't render it. Try using wrapping another component around it and naming it userList. I guess something like this would work: span jwcid=[EMAIL PROTECTED] tr jwcid=@For source=ognl:users value=ognl:userDetail element=tr ... /tr /span -Original Message- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 11:42 To: Tapestry users Subject: Re: Asynchronous form submission Hum, thanks but nope. Didn't work either. I can't get the @For to get updated. When I nested it inside an @Any, it almost work :). I mean that because it only the last value inserted in the list is returned. Even with the list being persisted to the session. Anyone done this before? Regards On 9/12/06, Chaitanya Jeerage [EMAIL PROTECTED] wrote: not sure if the same applies to 4.1, but using action instead of listener in your form submit should solve the problem of list not being populated action=listener:formSubmit instead of listener=listener:formSubmit -Chaitanya On 9/12/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Well the synchronous submission was fixed after I updated my version :P But I still get no updates on my list, event setting it as a persistent property. I'm adding values, and they are not being updated. As it is a persistent property I was hoping that re-loading the page would set it values, but they come blank again. Any hint? Regards On 9/11/06, Vinicius Carvalho [EMAIL PROTECTED] wrote: Hi there! I'm trying to get two things to work with Tapestryt 4.1and Ajax support: 1st a master detail form 2nd a auto populated form from server (I'll explain it better)
AW: WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help!
hey, lot of thanks, the state field was really null because the parameters were passed to the constructor but I never saved the value... By the reason I am a novice in tapestry, I had searched it everywhere but not in that simple way... Greetings, Michael Wölm -Ursprüngliche Nachricht- Von: Steve Shucker [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 12. September 2006 16:03 An: Tapestry users Betreff: Re: WG: Question: Can not get access to object fields (Null Pointer Exception) pls pls help! As a general rule, it's safer to put the literal first in statements like this: admin.equals(user.getState()) If anyone wants to say that it looks/reads a bit funny, I'll agree. It's an odd syntax, but it protects you from NPEs. -Steve Martin Strand wrote: Well, if you get a NPE on this line: user.getState().equals(admin) then either user or getState() is null, right? And, since user is definitely not null, your private String state is obviously null. Perhaps you should add something like this: private String state = initial state; Martin On Tue, 12 Sep 2006 15:52:25 +0200, Michael Wölm [EMAIL PROTECTED] wrote: Hi, Sadly, nobody have helped me with my problem. I dont know why. Am I too noob or is my question incomprehensible? I would be pleased, if anybody could give me an advice for my problem. Greettings from Germany, Michael Wölm Original message is under this. -Ursprüngliche Nachricht- Von: m-woelm [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 10. September 2006 16:13 An: 'Tapestry users' Betreff: Question: Can not get access to object fields (Null Pointer Exception) Hi, I hope anybody could explain me why I get a Null Pointer Exception, if I want to get access to a field of an object. My method is similar to the eshop-project of the book Enjoying web dev with Tapestry. I tried to change the Listener-method onLogin as follows: public void onLogin(IRequestCycle cycle) { try { User user = Users.getKnownUsers().getUser(email,password); getUser().copyFrom(user); if (user.getState().equals(admin)) cycle.activate(Admin_Konsole); else cycle.activate(User_Konsole); } catch (AuthenticationException e) { ValidationDelegate delegate = getDelegate(); delegate.setFormComponent(null); delegate.record(Login failed, null); } } Now I get an exception at point (user.getState().equals(admin)). But why? user was set to the login-user two lines before? Why I cant get the field: private String state which I have set in User.class: private String state; public String getState() { return this.state; } Thx ahead! Michael Wölm mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc href=http://gsg.ath.cx/~phoenix/downloads/MyPublicKey.asc - 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: What's the more convenient way to add logging to a tapestry app?
Thanks for your responses, but I still has the problem to put the parameters into the ASO. I tried putting that into web.xml but the examples to read the InitParams involve init() procedure and the argument is the ServletContext. so I don't know how to access it if Tapestry wrap it and the initial load is doing by hivemind AFAIK. I tried with context (context.lookup(String)) but the logging don´t work because never found the init-param key (I tried something like Tong's book did with JDBC connection pool, but for initial parameters isn't the way). How I can send some parameters from hivemind or Tomcat to this StateObjectFactory in order to finally logging works? The point here is that I'm doing that in a library that return the Logger (Log4j) not via Tapestry page (where I can Inject something) and is executed before every page can be showed trying to guarantee that only one Logger is running. Another thing is that the parameters should be send into the constructor, but the StateObjectFactory interface has only createStateObject() without parameters, so how... ?? Thanks Peter Dawn escribió: i use log4J. try using that. - 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: Expired Session message
The one difference I see between your code and what's been working for me in my custom Engine class is one more line: cycle.activate(page); renderResponse(cycle); [EMAIL PROTECTED] wrote: Hi. When the session expires, how can I handle this and redirect to a customized page saying Your session has expired In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException { cycle.activate(Expired);// Trigger my customized session-expired page. } Thanks, Greg - 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: What's the more convenient way to add logging to a tapestry app?
Hello: Finally I can do it using a Tomcat approach to configure the Logger (with context) that is instanciated by hivemind and now works the logging into pages. Thanks a lot Peter and Kevin for your help and time. JQ Peter Dawn escribió: i use log4J. try using that. - 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: Expired Session message
There's another way... Create a custom page in your application, named StaleSession Bryan Lewis wrote: The one difference I see between your code and what's been working for me in my custom Engine class is one more line: cycle.activate(page); renderResponse(cycle); [EMAIL PROTECTED] wrote: Hi. When the session expires, how can I handle this and redirect to a customized page saying Your session has expired In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException { cycle.activate(Expired); // Trigger my customized session-expired page. } Thanks, Greg - 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] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expired Session message
what about tap3. any way of implementing this in the older version. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Expired Session message
Peter Dawn wrote: what about tap3. any way of implementing this in the older version. no need to... http://t-deli.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ?
Yippee ! Thank you for this link ! Now I understood the concept and encapsulated the plain dojo-widgets (like SortableTable, Dialog etc.) with 'Tapestry-widgets' and everything is running like intended ... that's really cool ! Together with the IDirect interface I found in your code it got even better :-) So Ben was right: when using targets=... with an 'encapsulated' widget the rendering will be dojo.widget.byId(...). So it is possible to get those AOP style events from dojo. Fine !! Thanks again for helping my out there :) Bye, Gary if you have a component that extends or implements IWidget tapestry will resolve the client side code using dojo.widget.byId...(It'll also parse your widget for you inline so your whole app isn't bogged down by needless parsing of the entire dom tree). Look at Autocompleter in the svn source for a good example. http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/ On 9/11/06, Gerald Schöffel [EMAIL PROTECTED] wrote: Hi Ben, thank you for your reply ! I tried it right away ... Would be too cool if this will work ... but for me it does not :( When using targets=..: tapestry is looking for a component like in [EMAIL PROTECTED] ... but internally Tapestry is again connecting via dojo.event.connect(dojo.byId(...),...) by resolving the assigned ID of the component. Omitting the ID will not work, because Tapestry will render one with the name of the component by default. Being tricky naming all IDs the same will fail because of the 'wrong' dojo.byId(). Hmmm ... Jesse ... how about something like 'element=widget:addressTable' or 'widget=addressTable' to get a connection with dojo.widget.byId(...) ?? Or is there something included already ? Worth an JIRA-entry ? Thanks again for helping !! Bye, Gary Gary, If you change @EventListener(events=onSelect, elements=addressTable) to @EventListener(events=onSelect, targets=addressTable) then Tapestry will render the event script using dojo.widget.ByID (elements hooks to html elements, targets hooks to components/widgets) Hope that helps regards, Ben -Original Message- From: Gerald Schöffel [mailto:[EMAIL PROTECTED] Sent: Monday, 11 September 2006 2:10 PM To: Tapestry users Subject: Re: Is it possible to connect a dojo SortableTable to Tapestry 4.1.1 ? Ok, me again ... could not give up on this ... So I cleaned up my code and learned how to use the @Script-tag ...cool thing :-) When connecting manually, the following code will work: dojo.event.connect(dojo.widget.byId(tableWidget), onSelect, window, addressDisplay_selectAlert) ; This will display an alert whenever I click on a row. Tapestry will render the following when using @EventListener: dojo.event.connect(dojo.byId(addressTable), onSelect, tapestry, event327750702); When using this syntax to connect the event by hand like dojo.event.connect(dojo.byId(addressTable), onSelect, window, addressDisplay_selectAlert); it will NOT work. Hmmm ... is there a way to get this working with @EventListener ? The second possibility would be to do the 'eventhandling' (onSelect is a function-call, no event at all) with js and send another 'real' event to Tapestry. But as the first possibility ... I do not know, how to to so :( Any help on this is really desired :) Thank you ! Bye, Gary Hi Jesse ! Thank you for your quick reply ! But I already use binding name=parseWidgets value=ognl:true / in my shell component. So the widget is created and functional (clicking on a header sorts the table and so on). The only 'issue' I have is binding the call to onSelect to an event with @EventListener. There is just no request happening when clicking and selecting table-rows (using firebug to do the 'debugging'). Other events are working fine ... but this one is driving me nuts ... For today I will give up on this :( Tomorrow I will try to bind an event to a js-funtion with dojo.event.connect manually to narrow this down. In the meantime: if anyone has an idea ... please let me know. :-) Bye Gary The table won't be parsed into a dojo widget by default. (Tapestry turns this off..) You can probably add a single line of js to parse it out though: dojo.widget.createWidget(dojo.byId(addressTable)); On 9/10/06, Gerald Schöffel [EMAIL PROTECTED] wrote: Hi there ! I am trying to connect a dojo SortableTable via the @EventListener annotation to Tapestry (4.1.1, latest build from svn). In my component html file I have something like this: table id=addressTable dojoType=SortableTable widgetId=tableWidget headClass=fixedHeader tbodyClass=scrollContent enableMultipleSelect=false enableAlternateRows=true rowAlternateClass=alternateRow cellpadding=0 cellspacing=0 border=0 ... /table Inside my component I have the following annotation: @EventListener(events=onSelect,
Re: Contrib Table Summarize
Mael Caldas wrote: If I implement the decorator pattern by myself, how can I let the row only on the last position, even if the user change the sorter collumn? You're right. If you need sorting, you can't do it this way. You'll probably have to create your own IBasicTableModel and make it add the extra row you need. Do you have any SumDecorator already done? Thanks! Mael Caldas On 9/11/06, Mael Caldas [EMAIL PROTECTED] wrote: SumDecorator, decorator pattern? I didn't see anything about that in any documentation... Can you give-me some example or a link? Thank you, Mael Caldas On 9/1/06, andyhot [EMAIL PROTECTED] wrote: cotrib:Table can't do anything by itself but I'd use the decorator pattern... public Collection getData() { return new SumDecorator( getRealData() ); } Mael Caldas wrote: Hi, I'm using the contrib Table component, iterating over a Collection of Row Objects, and setting the collumns values with a String parameter. I want to get the last row of the table with a sum of all data on each column. Does anybody know how to do this in a simple way? Thank's! Mael Caldas -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]