Re: T5: Multiple clicks causing NPE
I've added https://issues.apache.org/jira/browse/TAPESTRY-2037 On Jan 8, 2008 4:47 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > I'll have to look into whether there is a workaround for that > ThreadLocal bug, and figure out a way to test this. > > > On Jan 8, 2008 2:08 PM, jason lea <[EMAIL PROTECTED]> wrote: > > Hi, > > > > We get this error quite often with Java 1.5, we asked about it in the > > mailing list back in August. We found the error doesn't occur in Java 1.6. > > We usually see a stack trace with a NPE when doing getSession() or > > getCookies(). > > > > Here is what I wrote last time: > > > > We are getting an intermittent NullPointerException in Tapestry 5.0.5. We > > are running on Java 1.5. > > It seems that the RequestGlobals has a null Request when the call to > > getCookies is made (or that RequestGlobals is null). We cannot get the > > error to occur every time so testing is tricky, sometimes it occurs on the > > first request after the webapp starts with subsequent requests good for a > > few minutes before it occurs again. Other times it starts fine and pressing > > F5 100 times might make it occur. > > > > Our thought at the moment is that a ThreadLocal bug ( > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6550283 ) might be > > causing the RequestGlobals to initially be correctly initialised and stored > > in ThreadLocal but later on with more items being added this bug means > > further down the track, a new RequestGlobals is added with null values. > > > > > > > > -- > > Jason Lea > > > > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: 5.0.8 whitespace
What you /might/ be able to do (to avoid the java code), is to use var here... I haven't played with the var prefix yet, so this is a "try and see" idea. :) But. Something like: , $ {var:string} If that works, you could even write your own DelimittedLoop component and not have to duplicate the logic elsewhere. Robert On Jan 12, 2008, at 1/125:06 PM , Chris Lewis wrote: That would work of course, but I'd like to do something like this: delimit=", "> $ {var:string} And then each element would be separated by my delimiter without any extra java code. Robert Zeigler wrote: How about testing the value of index? Something like: .java: private int index; public int getIndex() { return index; } public void setIndex(int i) index = i; } public boolean isFirst() { return index==0; } .tml: , $ {var:string} Robert On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: 5.0.8 whitespace
Hi Chris, may i advise you the listbinding from t5components ? ${element} 2008/1/13, Chris Lewis <[EMAIL PROTECTED]>: > > That would work of course, but I'd like to do something like this: > > delimit=", "> >context="var:string">${var:string} > > > And then each element would be separated by my delimiter without any > extra java code. > > Robert Zeigler wrote: > > How about testing the value of index? > > Something like: > > > > .java: > > > > private int index; > > public int getIndex() { return index; } > > public void setIndex(int i) index = i; } > > public boolean isFirst() { return index==0; } > > > > .tml: > > > > > > > > , > > > >> context="var:string">${var:string} > > > > > > Robert > > > > On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: > > > >> Sorry, I missed the "check if first" part. How can you do such a > >> check in Loop? The "If" can test, but what can you test in a Loop? > >> nothing that I know of will tell you where in the iteration you are. > >> > >> chris > >> > >> Davor Hrg wrote: > >>> just reverse where you write the "," > >>> instead of checking if last and putting comma behind > >>> > >>> check if first and put comma in front > >>> > >>> Davor Hrg > >>> > >>> On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> > >>> wrote: > >>> > So this ticket has been implemented in svn: > https://issues.apache.org/jira/browse/TAPESTRY-2028 > > And now I need whitespace... so how can I get it back? Is there or > isn't > there a way to disable this? Im using loop to output links > (pagelinks), > and i have whitespace behind in the body so there is separation. > Unfortunately, it's getting stripped. Is there a workaround? > > On a related note, is there a way to know if im on the last > iteration of > the loop, so i could for example, follow all but the last with a ","? > This may be outside the scope of loop as currently implemented, but i > can see it being useful. > > chris > > - > 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] > > -- with regards Sven Homburg
Re: T5: 5.0.8 whitespace
That would work of course, but I'd like to do something like this: delimit=", "> context="var:string">${var:string} And then each element would be separated by my delimiter without any extra java code. Robert Zeigler wrote: How about testing the value of index? Something like: .java: private int index; public int getIndex() { return index; } public void setIndex(int i) index = i; } public boolean isFirst() { return index==0; } .tml: , context="var:string">${var:string} Robert On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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: T5: 5.0.8 whitespace
How about testing the value of index? Something like: .java: private int index; public int getIndex() { return index; } public void setIndex(int i) index = i; } public boolean isFirst() { return index==0; } .tml: , $ {var:string} Robert On Jan 12, 2008, at 1/124:41 PM , Chris Lewis wrote: Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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: T5: 5.0.8 whitespace
Sorry, I missed the "check if first" part. How can you do such a check in Loop? The "If" can test, but what can you test in a Loop? nothing that I know of will tell you where in the iteration you are. chris Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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: T5: 5.0.8 whitespace
That will just 'reverse' the problem (a leading comma instead of a trailing one). Suppose I have a list of strings like: { "one", "two", "three" } And a Loop to display: context="${var:string}">${var:string}, This renders: one,two,three If do as you suggest: context="${var:string}">${var:string}, This would render: ,one,two,three Davor Hrg wrote: just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - 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: T5: 5.0.8 whitespace
just reverse where you write the "," instead of checking if last and putting comma behind check if first and put comma in front Davor Hrg On Jan 12, 2008 11:04 PM, Chris Lewis <[EMAIL PROTECTED]> wrote: > So this ticket has been implemented in svn: > https://issues.apache.org/jira/browse/TAPESTRY-2028 > > And now I need whitespace... so how can I get it back? Is there or isn't > there a way to disable this? Im using loop to output links (pagelinks), > and i have whitespace behind in the body so there is separation. > Unfortunately, it's getting stripped. Is there a workaround? > > On a related note, is there a way to know if im on the last iteration of > the loop, so i could for example, follow all but the last with a ","? > This may be outside the scope of loop as currently implemented, but i > can see it being useful. > > chris > > - > 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]
T5: 5.0.8 whitespace
So this ticket has been implemented in svn: https://issues.apache.org/jira/browse/TAPESTRY-2028 And now I need whitespace... so how can I get it back? Is there or isn't there a way to disable this? Im using loop to output links (pagelinks), and i have whitespace behind in the body so there is separation. Unfortunately, it's getting stripped. Is there a workaround? On a related note, is there a way to know if im on the last iteration of the loop, so i could for example, follow all but the last with a ","? This may be outside the scope of loop as currently implemented, but i can see it being useful. chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 Tapestry-hibernate problem
Hi Grigoris I will assume that your form is surrounding the @For component. Advices: * remove the updatePassenger it will confuse things. * persist "passengerList" in the session * populate "passengerList" on pageBeginRender * add a "keyExpression" to the For component * then save all the passengers at once. public void savePassengers() throws DataAccessException { try { for (Passenger passenger : getPassengerList()) { getSession().saveOrUpdate(passenger); } } catch (HibernateException e) { e.printStackTrace(); //nkons debug throw convertHibernateAccessException(e); } } I hope it helps. Regards. -- Alejandro Scandroli Amneris: We build process-driven web applications. http://www.amneris.es On Jan 12, 2008 4:54 PM, Grigoris Ioannou <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a dynamic form where the user can set a dynamic number of passengers. > The html looks like: > >source="ognl:passengerList" > value="ognl:currentPassengerId" > width="100%" > border="0"> > > >Title >Name >Surname >Age > > > > value="ognl:currentPassenger.name" > type="text" > class="textField" > maxlength="40" > size="26"/> > > > > value="ognl:currentPassenger.surname > " > type="text" > class="textField" > maxlength="40" > size="26"/> > > > > > > > > > The updatePassenger is an InvokeListener that executes this code: > > public void updatePassenger(IRequestCycle cycle) { > if (cycle.isRewinding()) { > > setCurrentPassenger(getPassengerManager().getPassengerById(getCurrentPassengerId())); > getPassengerManager().savePassenger(getCurrentPassenger()); > } else { > Passenger passenger = > getPassengerManager().getPassengerById(getCurrentPassengerId()); > setCurrentPassenger(passenger); > } > } > (The idea is that in the beginning I retrieve every Passenger's data from > the database and when the form is rewinding I store them in the database > again) > > The getPassengerManager() is a class responsible for handling the Passenger > objects, based on hibernate. The savePassenger function is: > > public void savePassenger(Passenger passenger) throws DataAccessException { > try { > getSession().saveOrUpdate(passenger); > } catch (HibernateException e) { > e.printStackTrace(); //nkons debug > throw convertHibernateAccessException(e); > } > } > > The problem is that when the user submits the form in which all these are > contained, the savePassenger is called (as it should) but nor does it update > the passengers or throw an exception. What am I doing wrong? > > The thing is that in the list with passengers, I am keeping the Ids of the > passengers, not the full Passenger Object, because the DataSqueezer produced > long strings that (I believe) caused some random problems in submission: > blank screens or no reaction. > > I am using Tapestry 4.1.3. Any help would be really appreciated. Thank you > in advance, > > Grigoris > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 naming and case peculiarities
Very good research. On Jan 11, 2008 2:13 PM, Daniel Jue <[EMAIL PROTECTED]> wrote: > I wanted to throw together a list of naming peculiarities (I hesitate > to call them pitfalls), to put on the wiki. > Some are documented on the API website, some of these are mailing list > documented, some are only documented if you look into the code. > > Use of underscore prefixes for fields, but not in accessors >Some people just grew into doing it this way. Eclipse's > getter/setter autogeneration keeps the underscore. > As you found, Eclipse can adapt to this. It's not a requirement of Tapestry, just a coding style. > Non case sensitivity of page names in URL >This is just a nice feature in Tapestry, documented in the code > > URL shortening of page names under a similarly named directory. >A documented feature intended to make things nice for users. > For example: >A page named "Report" under a directory named "Report" will not resolve. This should be fixed in 5.0.7, is it not? >A page named "StatusReport" under a directory named "Report" will > resolve to "Status" (i.e. report/status in the url) To me, this seems sensible. >A page named "ReportStatus" under a directory named "Report" will > resolve to "Status" (i.e. report/status in the url) Again, seems sensible. >A page named "StatusReport1" under a directory named "Report" will > resolve to "StatusReport1" (i.e. report/statusreport1 in the url) When a package name is replicated as a prefix or suffix of the unqualified class name, it is stripped out (unless that would reduce the name to the empty string). > > Case sensitivity in @OnEvent and similar annotations > This is just a Java case sensitivity rule. Those unfamiliar with > annotations before working with Tapestry (as I was) may forget that > case matters in annotations! @onEvent is not the same, and your IDE > should tell you this. A concern of the Java compiler, not of Tapestry, of course. > > Non case sensitive for value of OnEvent >@OnEvent(value="SUBMIT") >@OnEvent(value="submit") > > Form event methods without annotations: > Besides typos in the name of the method, there is a case sensitivity > issue to be aware of: the "on" prefix must be lower case. i.e. > "OnSubmit" will not get called, but "onSubmit" will. T5's extensive > case insensitivity can cause us to be lazy sometimes. > This could be considered a bug, if you feel it is, submit a bug. > Tapestry XML DTD's and their keys are case sensitive > Again, this is in accord with XML, a concern that goes beyond Tapestry. > Injected Assets are case sensitive >This is a Servlet API /Java runtime rule. This could be overcome with some effort and expense. > > Names of *.properties files are case sensitive Again, could be overcome with some effort and expense. > Names of properties inside the *.properties files are not case sensitive Yes, by intention. > > > Are there more? Does this list sound right? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JS Library Inclusion Idea
Hi All, I love T5. However I'm not over the moon with being force-fed protoype/scriptaculous when I'm developing say a dojo app, I don't want proto/scrpt downloaded as well to do stuff that dojo can do, so here is my suggestion with dealing with this. Normally all the standard functionality is handled through the tapestry.js file which is coded to use proto/script, now surely all we need to do is have a standard API defined which can handle all the Tapestry stuff like validation etc and have an implementation for each js library? So we have a Tapestry javascript API defined interface like: Tapestry.registerForm(form, clientValidations) Tapestry.registerValidations : function(form, clientValidations) Tapestry.linkZone(link, zoneDiv) Tapestry.initializeZones(zoneSpecs, linkSpecs) Tapestry.addValidator(field, acceptBlank, validator) Tapestry.ElementAdditions.decorateForValidationError(element, event, message) Tapestry.Validator.required(field, message) Tapestry.Validator.minlength(field, message, length) Tapestry.Validator.maxlength(field, message, maxlength) Tapestry.Validator.min(field, message, minValue) Tapestry.Validator.max(field, message, maxValue) Tapestry.Validator.regexp(field, message, pattern) etc tapestry.js could just contain common lib agnostic stuff only - no implementations of the above interface. Then create a tapestry-[lib].js file for each library. Then tell the app what libraries to use along with a Tapestry implementation to use: js-libraries=tapestry-tapestry.js js-libraries=/dojo-1.0.2/dojo/dojo.js,tapestry-dojo102.js js-libraries=/prototype-1.6/prototype.js,/scriptaculous/scriptaculous.js,tapestry-proto16scriptac18.js js-libraries=/ext-2.0/extjs.js,tapestry-ext20.js The last entry will be the Tapestry implementation for that library. So you would end up with the following getting downloaded: tapestry.js, [lib].js, tapestry-[lib].js That way Tapestry becomes completely library agnostic, it just makes calls to its API and the actual implementation is handles by the specialised tapestry-[lib].js. I'd love to see something like this implemented, I don't think there should be any major technical reasons why something like this could not be implemented (or can it de done now??) but I'd like to know what people think. Regards, Adam Reated:https://issues.apache.org/jira/browse/TAPESTRY-1650 PS. Keep up the great work lads. -- View this message in context: http://www.nabble.com/JS-Library-Inclusion-Idea-tp14776058p14776058.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: tapestry-hibernate: rollback
Hi, I had mistaken. I had set 'hibernate.transaction.auto_close_session' instead of 'hibernate.connection.autocommit'. But I encountered the same condition again when I set 'hibernate.connection.autocommit' to false. -- org.hibernate.dialect.PostgreSQLDialect jdbc:postgresql://192.168.0.103/Test test testtest org.postgresql.Driver net.sf.ehcache.hibernate.EhCacheProvider false true true true true true -- Thanks, Osamuo Sven Homburg wrote: > > i miss the autocommit property in your config > > 2008/1/12, osamuo <[EMAIL PROTECTED]>: >> >> >> Hi, >> >> Yes, I have. >> I created 'hibernate.cfg.xml' like the following. >> >> -- >> >> >> >> > name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect >> >> >> > name="hibernate.connection.url >> ">jdbc:postgresql://192.168.0.103/Test >> test >> testtest >> > name="hibernate.connection.driver_class">org.postgresql.Driver >> >> > name="hibernate.cache.provider_class"> >> net.sf.ehcache.hibernate.EhCacheProvider >> >> > name="hibernate.transaction.auto_close_session">false >> >> true >> true >> true >> >> true >> true >> >> >> >> >> >> >> -- >> >> Thanks, >> Osamuo >> >> >> >> >> >> Sven Homburg wrote: >> > >> > have you set autocommit to off in hibernate config >> > like this: >> > >> > false >> > >> > >> > >> > >> > osamuo wrote: >> >> >> >> Hi, >> >> >> >> I used the following code in order to rollback the current >> transaction. >> >> But its transaction was committed after the calling >> >> HibernateSessionManager.abort(). >> >> >> >> What's wrong? >> >> >> >> --- >> >> public class RegisterUser{ >> >> ... >> >> >> >> @Inject >> >> private Session session; >> >> >> >> @Inject >> >> private HibernateSessionManager sessionManager; >> >> >> >> >> >> public Object onSubmit(){ >> >> ... >> >> TmpUser tmpUser = new TmpUser(); >> >> ... >> >> >> >> session.save( tmpUser ); >> >> sessionManager.abort(); // force rollback >> >> >> >> return null; >> >> } >> >> } >> >> - >> >> >> >> >> >> Thanks, >> >> Osamuo >> >> >> >> >> >> Davor Hrg wrote: >> >>> >> >>> HibernateSessionManager >> >>> >> >>> >> >>> On Jan 11, 2008 11:51 AM, Massimo Lusetti <[EMAIL PROTECTED]> wrote: >> On Jan 11, 2008 10:00 AM, osamuo <[EMAIL PROTECTED]> wrote: >> >> > >> > Hi, >> > >> > I have noticed that the tapestry-hibernate commits the current >> transaction >> > even after an exception occurs. >> > >> > Is there any way to do rollback its transaction? >> >> Use the manager ? >> >> >> -- >> Massimo >> http://meridio.blogspot.com >> >> >> >> - >> 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] >> >>> >> >>> >> >>> >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/T5%3A-tapestry-hibernate%3A-rollback-tp14752000p14775087.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > with regards > Sven Homburg > > > - > best regards > Sven > -- View this message in context: http://www.nabble.com/T5%3A-tapestry-hibernate%3A-rollback-tp14752000p14775449.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help: checkbox selection
without java script impossible. 2008/1/12, harish v <[EMAIL PROTECTED]>: > > Hi all > > I am new to web development and tapestry. > > Please help/guide me to achive this > > I have check box headers (disabled ) as 1 2 3 4 > and from next row checkbox (not disabled)as5 6 7 8 > and 9 10 > 11 12 > > When I check the 5 or 9 then automatically 1 should get checked > When I check 12 then 4 should get checked > > How to achieve this in tapestry > > Is there any way to achieve this without using .script files > > HELP > > regards > Harry > > > > > - > 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. -- with regards Sven Homburg
Re: T5: tapestry-hibernate: rollback
i miss the autocommit property in your config 2008/1/12, osamuo <[EMAIL PROTECTED]>: > > > Hi, > > Yes, I have. > I created 'hibernate.cfg.xml' like the following. > > -- > > > > name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect > > > name="hibernate.connection.url > ">jdbc:postgresql://192.168.0.103/Test > test > testtest > name="hibernate.connection.driver_class">org.postgresql.Driver > > name="hibernate.cache.provider_class"> > net.sf.ehcache.hibernate.EhCacheProvider > > false > > true > true > true > > true > true > > > > > > > -- > > Thanks, > Osamuo > > > > > > Sven Homburg wrote: > > > > have you set autocommit to off in hibernate config > > like this: > > > > false > > > > > > > > > > osamuo wrote: > >> > >> Hi, > >> > >> I used the following code in order to rollback the current transaction. > >> But its transaction was committed after the calling > >> HibernateSessionManager.abort(). > >> > >> What's wrong? > >> > >> --- > >> public class RegisterUser{ > >> ... > >> > >> @Inject > >> private Session session; > >> > >> @Inject > >> private HibernateSessionManager sessionManager; > >> > >> > >> public Object onSubmit(){ > >> ... > >> TmpUser tmpUser = new TmpUser(); > >> ... > >> > >> session.save( tmpUser ); > >> sessionManager.abort(); // force rollback > >> > >> return null; > >> } > >> } > >> - > >> > >> > >> Thanks, > >> Osamuo > >> > >> > >> Davor Hrg wrote: > >>> > >>> HibernateSessionManager > >>> > >>> > >>> On Jan 11, 2008 11:51 AM, Massimo Lusetti <[EMAIL PROTECTED]> wrote: > On Jan 11, 2008 10:00 AM, osamuo <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > I have noticed that the tapestry-hibernate commits the current > transaction > > even after an exception occurs. > > > > Is there any way to do rollback its transaction? > > Use the manager ? > > > -- > Massimo > http://meridio.blogspot.com > > > - > 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] > >>> > >>> > >>> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/T5%3A-tapestry-hibernate%3A-rollback-tp14752000p14775087.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- with regards Sven Homburg
Re: T5: tapestry-hibernate: rollback
Hi, Yes, I have. I created 'hibernate.cfg.xml' like the following. -- org.hibernate.dialect.PostgreSQLDialect jdbc:postgresql://192.168.0.103/Test test testtest org.postgresql.Driver net.sf.ehcache.hibernate.EhCacheProvider false true true true true true -- Thanks, Osamuo Sven Homburg wrote: > > have you set autocommit to off in hibernate config > like this: > > false > > > > > osamuo wrote: >> >> Hi, >> >> I used the following code in order to rollback the current transaction. >> But its transaction was committed after the calling >> HibernateSessionManager.abort(). >> >> What's wrong? >> >> --- >> public class RegisterUser{ >> ... >> >> @Inject >> private Session session; >> >> @Inject >> private HibernateSessionManager sessionManager; >> >> >> public Object onSubmit(){ >> ... >> TmpUser tmpUser = new TmpUser(); >> ... >> >> session.save( tmpUser ); >> sessionManager.abort(); // force rollback >> >> return null; >> } >> } >> - >> >> >> Thanks, >> Osamuo >> >> >> Davor Hrg wrote: >>> >>> HibernateSessionManager >>> >>> >>> On Jan 11, 2008 11:51 AM, Massimo Lusetti <[EMAIL PROTECTED]> wrote: On Jan 11, 2008 10:00 AM, osamuo <[EMAIL PROTECTED]> wrote: > > Hi, > > I have noticed that the tapestry-hibernate commits the current transaction > even after an exception occurs. > > Is there any way to do rollback its transaction? Use the manager ? -- Massimo http://meridio.blogspot.com - 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] >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/T5%3A-tapestry-hibernate%3A-rollback-tp14752000p14775087.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help: checkbox selection
Hi all I am new to web development and tapestry. Please help/guide me to achive this I have check box headers (disabled ) as 1 2 3 4 and from next row checkbox (not disabled)as5 6 7 8 and 9 10 11 12 When I check the 5 or 9 then automatically 1 should get checked When I check 12 then 4 should get checked How to achieve this in tapestry Is there any way to achieve this without using .script files HELP regards Harry - 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
T4.1.3 Tapestry-hibernate problem
Hi all, I have a dynamic form where the user can set a dynamic number of passengers. The html looks like: Title Name Surname Age The updatePassenger is an InvokeListener that executes this code: public void updatePassenger(IRequestCycle cycle) { if (cycle.isRewinding()) { setCurrentPassenger(getPassengerManager().getPassengerById(getCurrentPassengerId())); getPassengerManager().savePassenger(getCurrentPassenger()); } else { Passenger passenger = getPassengerManager().getPassengerById(getCurrentPassengerId()); setCurrentPassenger(passenger); } } (The idea is that in the beginning I retrieve every Passenger's data from the database and when the form is rewinding I store them in the database again) The getPassengerManager() is a class responsible for handling the Passenger objects, based on hibernate. The savePassenger function is: public void savePassenger(Passenger passenger) throws DataAccessException { try { getSession().saveOrUpdate(passenger); } catch (HibernateException e) { e.printStackTrace(); //nkons debug throw convertHibernateAccessException(e); } } The problem is that when the user submits the form in which all these are contained, the savePassenger is called (as it should) but nor does it update the passengers or throw an exception. What am I doing wrong? The thing is that in the list with passengers, I am keeping the Ids of the passengers, not the full Passenger Object, because the DataSqueezer produced long strings that (I believe) caused some random problems in submission: blank screens or no reaction. I am using Tapestry 4.1.3. Any help would be really appreciated. Thank you in advance, Grigoris
Re: T5 naming and case peculiarities
Josh, I've been looking for that! Thanks for the tip! Andy > This is configurable in Eclipse. Under Window | Preferences look at Java | > Code Style there is a "Conventions for variable names" section where you can > tell eclipse what your prefix/suffix preferences are... Then it will make > nice getter/setter names for you. > > Josh > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: tapestry-hibernate: rollback
have you set autocommit to off in hibernate config like this: false osamuo wrote: > > Hi, > > I used the following code in order to rollback the current transaction. > But its transaction was committed after the calling > HibernateSessionManager.abort(). > > What's wrong? > > --- > public class RegisterUser{ > ... > > @Inject > private Session session; > > @Inject > private HibernateSessionManager sessionManager; > > > public Object onSubmit(){ > ... > TmpUser tmpUser = new TmpUser(); > ... > > session.save( tmpUser ); > sessionManager.abort(); // force rollback > > return null; > } > } > - > > > Thanks, > Osamuo > > > Davor Hrg wrote: >> >> HibernateSessionManager >> >> >> On Jan 11, 2008 11:51 AM, Massimo Lusetti <[EMAIL PROTECTED]> wrote: >>> On Jan 11, 2008 10:00 AM, osamuo <[EMAIL PROTECTED]> wrote: >>> >>> > >>> > Hi, >>> > >>> > I have noticed that the tapestry-hibernate commits the current >>> transaction >>> > even after an exception occurs. >>> > >>> > Is there any way to do rollback its transaction? >>> >>> Use the manager ? >>> >>> >>> -- >>> Massimo >>> http://meridio.blogspot.com >>> >>> >>> - >>> 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] >> >> >> > > - best regards Sven -- View this message in context: http://www.nabble.com/T5%3A-tapestry-hibernate%3A-rollback-tp14752000p14774442.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5.0.8: Too much space being removed from rendered file
sorry, wrote nonsense in last message. the link dont be stripped, but the produced page effect is the same: page is unusable, firefox says: Tapestry not found: Tapestry.onDOMLoaded(function() Sven Homburg wrote: > > same as here: > tapestry strips the last "/>" at the end of the link tag > > sample: > type="text/css"> rel="stylesheet" type="text/css"> > tapestry throws many exceptions on console, and the rendered page is > unusable. > > if i switch "tapestry.force-full-uris" to "false", all is fine > > > joshcanfield wrote: >> >> I was playing around with the 5.0.8 snapshot and it looks like an effort >> has >> been made to compact the html. The problem is that it's a little >> over-zealous about the job and spaces between text nodes and elements are >> removed. >> >> For example: >> >> Click this ... Link >> >> becomes >> >> Click this ... Link >> >> which looks like >> >> Click thisLink >> >> in the browser... >> >> I haven't seen this commented on in the list, has anyone else notice it? >> >> Josh >> >> -- >> -- >> TheDailyTube.com. Sign up and get the best new videos on the internet >> delivered fresh to your inbox. >> >> > > - best regards Sven -- View this message in context: http://www.nabble.com/T5.0.8%3A-Too-much-space-being-removed-from-rendered-file-tp14765869p14774393.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5.0.8: Too much space being removed from rendered file
same as here: tapestry strips the last "/>" at the end of the link tag sample: > I was playing around with the 5.0.8 snapshot and it looks like an effort > has > been made to compact the html. The problem is that it's a little > over-zealous about the job and spaces between text nodes and elements are > removed. > > For example: > > Click this ... Link > > becomes > > Click this ... Link > > which looks like > > Click thisLink > > in the browser... > > I haven't seen this commented on in the list, has anyone else notice it? > > Josh > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > - best regards Sven -- View this message in context: http://www.nabble.com/T5.0.8%3A-Too-much-space-being-removed-from-rendered-file-tp14765869p14774167.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DWR compatible with T5?
Hi, Can I use DWR for Ajax calls with my Tapestry5 application? Thanks and Regards Yeeswara N DISCLAIMER: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
Re: [T5] - slash (/) in ActionLink context value causes error.
its an known bug, i dont know if it cleared out in a newer release/snapshot of tapestry look in jira 2008/1/12, Mohammad Shamsi <[EMAIL PROTECTED]>: > > hi all, > > i have a actionlink my page like this : > > context="literal:secure/Home">${message: > app.welcome} > > when i clik this link i just see this url in browser without any content > > http://localhost:8080/app/secure/home.layout.list/secure%2FHome > > thats bacause of "/" in context variable. when i remove this "/", > application works fine. > > any idea ? > > -- > sincerely yours > M. H. Shamsi > -- with regards Sven Homburg
[T5] - slash (/) in ActionLink context value causes error.
hi all, i have a actionlink my page like this : ${message: app.welcome} when i clik this link i just see this url in browser without any content http://localhost:8080/app/secure/home.layout.list/secure%2FHome thats bacause of "/" in context variable. when i remove this "/", application works fine. any idea ? -- sincerely yours M. H. Shamsi
Re: T5: Packaging 3rd Party Javascript Libraries
Hi Michael, only for clarification: t5componets dont use extJs for now. i have tried out to implement it some months ago, but i struggled with diffrent prototype versions that tapestry/extJs used. i think the best way to standardize the symbol abstraction is, that howard (or any one else) implements that in a small optional tapestry module that linked formal into the tapestry project, so everybody who wants to implements an extJs-based library and guarantee his/her user the best compatibility is good advised to use this officicial module. i think its important, that this will central controlled by the parent project. best regards S.Homburg Michael Lake schrieb: Let's say Sven, Chris, and I each are creating component libraries for re-use and each of us are using the ExtJs library. And supposing that a T5 project used all of our libraries, then there could potentially be a conflict on the client side because multiple javascript files of the same library (with different package locations) might get included on the same page. (i suppose it might depend on the specific js library and how it might handle onPageLoad events for example) wouldn't it make sense to have a single ExtJs library that could be shared by each of our component libraries? A library with just Ext might look something like this: public class ExtModule { public static void contributeFactoryDefaults(MappedConfiguration configuration) { configuration.add("tapestry.ext2", "classpath:${tapestry.ext2.path}"); configuration.add("tapestry.ext2.path", "net/sourceforge/mtc/ext_2_0"); } } And could then be used in each of our libraries in the following way (after adding the dependency in maven): @Inject @Path("${tapestry.ext2}/resources/css/ext-all.css") private Asset _extAllStyle; Does this make sense? are there things to look out for in the licenses? What's the future in this? -mike - 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]