Weaves library
Hi! I'm improving my T5 app interface and during this process I found the excellent library called Weaves. I want to test the PagedGrid component, it looks great! But I have a little problem: when I replace the standard grid by the pagedgrid then all of the ajax actionlinks stop working. The pagedgrid seems to work fine, but when i click in any action link then the application response with the message Page must be specified before initializing for partial page render. Before add the pagedgrid the actionlinks were working fine,.. Any ideas? I'm using tapestry 5.3.7 with org.got5.tapestry5-jquery, may be this last library could be related?? Thanks in advance! David -- David Germán Canteros
Re: Weaves library
The link: https://github.com/intercommit/Weaves I'm pretty sure that weaves uses jquery (in the repository I saw the files jquery-1.9.1.min.js and jquery_init.js), can we have a conflict between jquery from weaves and jquery from tapestry5-jquery? -- David Germán Canteros 2013/8/16 Emmanuel DEMEY demey.emman...@gmail.com I do not think tapestry jquery is the problem. I am maybe wrong. Does Weaves use tapestry jquery? Can you give a link to this library and some codes. Manu Le 16 août 2013 17:40, David Canteros davidcanteros@gmail.com a écrit : Hi! I'm improving my T5 app interface and during this process I found the excellent library called Weaves. I want to test the PagedGrid component, it looks great! But I have a little problem: when I replace the standard grid by the pagedgrid then all of the ajax actionlinks stop working. The pagedgrid seems to work fine, but when i click in any action link then the application response with the message Page must be specified before initializing for partial page render. Before add the pagedgrid the actionlinks were working fine,.. Any ideas? I'm using tapestry 5.3.7 with org.got5.tapestry5-jquery, may be this last library could be related?? Thanks in advance! David -- David Germán Canteros
Re: Weaves library
Sorry, I forgot the code. There is nothing special, I have only included a component called PagedGrid in the TML(instead of the classic Grid) file and a code for specific GridDataSource in java file. The component works fine, but the ajax actionlink throw the mentioned exception. This only happen in the page which i added the component. TML: t:weaves.PagedGrid t:id=testPagedSource inPlace=true pagedsource=TestPagedSource/t:weaves.PagedGrid t:actionlink t:id=test t:zone=testZone try ajax/t:actionlink t:zone t:id=testZone ${greeting}!/t:zone JAVA: public CollectionPagedGridDataSource getTestPagedSource() { return new CollectionPagedGridDataSource(this.bookingsResultDS, BookingHolder.class); } @Component private Zone testZone; public String getGreeting(){ return Hello; } public Object onActionFromTest() { return testZone.getBody(); } -- David Germán Canteros 2013/8/16 David Canteros davidcanteros@gmail.com The link: https://github.com/intercommit/Weaves I'm pretty sure that weaves uses jquery (in the repository I saw the files jquery-1.9.1.min.js and jquery_init.js), can we have a conflict between jquery from weaves and jquery from tapestry5-jquery? -- David Germán Canteros 2013/8/16 Emmanuel DEMEY demey.emman...@gmail.com I do not think tapestry jquery is the problem. I am maybe wrong. Does Weaves use tapestry jquery? Can you give a link to this library and some codes. Manu Le 16 août 2013 17:40, David Canteros davidcanteros@gmail.com a écrit : Hi! I'm improving my T5 app interface and during this process I found the excellent library called Weaves. I want to test the PagedGrid component, it looks great! But I have a little problem: when I replace the standard grid by the pagedgrid then all of the ajax actionlinks stop working. The pagedgrid seems to work fine, but when i click in any action link then the application response with the message Page must be specified before initializing for partial page render. Before add the pagedgrid the actionlinks were working fine,.. Any ideas? I'm using tapestry 5.3.7 with org.got5.tapestry5-jquery, may be this last library could be related?? Thanks in advance! David -- David Germán Canteros
Re: [ANN] New project available : Kawwa
It looks great! Many examples, well documented... Tapestry examples! Congratulations! -- David Germán Canteros 2013/1/25 Bob Harner bobhar...@gmail.com Very very nice! On Fri, Jan 25, 2013 at 9:06 AM, Emmanuel DEMEY demey.emman...@gmail.com wrote: Hi Everyone Atos Worldline is very proud to announce a new project : Kawwa, now available in production at https://kawwa.atosworldline.com/http://kawwa.atosworldline.com/ The Kawwa Portal gives you access to more than 50 Kawwa components, assembled following the best (X)HTML and CSS practices to create standard, accessible web products. For each Kawwa component you will find: - A general introduction to the component - HTML, CSS and JS snippets - The jQuery plug-ins needed for interactive components In the portal you will also find a download page which will allow you to customize your zip file with only the components and the graphical theme you need. Today only two graphical themes are available, but we’ll keep adding new themes. As we love Tapestry, we have also created a Tapestry components library based on these Kawwa components. The last SNAPSHOT is available on a Maven Repository.You just need to add the following dependence in your “pom.xml”: dependency groupIdnet.atos.tapestry/groupId artifactIdtapestry5-kawwa-components/artifactId version2.0.4-SNAPSHOT/version /dependency repository idKawwa/id nameKawwa Repository for Maven2/name urlhttp://nexus.devlab722.net/nexus/content/repositories/snapshots/ /url http://10.25.20.165/nexus/content/repositories/ganeshrepository%3c/url /repository This contribution is based on the open-source project Tapestry5-jQuery ( http://tapestry5-jquery.com/) If you have questions, feel free to send an email to our distribution list dl-ka...@atos.net. Emmanuel DEMEY and Angela RICCI -- Emmanuel DEMEY Ingénieur Etude et Développement ATOS Worldline demey.emman...@gmail.com Twitter : @EmmanuelDemey - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-JQuery: use of GoogleMap component
Thank you Emmanuel, i will try it! David -- David Germán Canteros 2012/11/23 Emmanuel DEMEY demey.emman...@gmail.com It is just a problem of the jQuery Widget. I found a solution (in French sorry http://www.touraineverte.com/gmap3/api/get-address.html) : public JSONObject getOptions(){ JSONObject json = new JSONObject(); json.put(action, addMarker).put(latLng, new JSONArray(46.578498,2.457275)); return json; } 2012/11/23 Emmanuel DEMEY demey.emman...@gmail.com Sorry for the delay on the Tapestry5-jQuery mailing list. I will try to find a solution right now. 2012/11/23 David Canteros davidcanteros@gmail.com Thank you for your answers! I didn't know about the exanpe library, i looks very good! However I'm already using Tapestry-Jquery so I'll try first the solution proposed by arterzatij. The tapestry-jquery developers should be noticed about this problem,I posted this on the google-group of the project , but with no concrete answers... -- David Germán Canteros 2012/11/23 Lance Java lance.j...@googlemail.com I haven't used the gmap in tapestry-jquery but I have used the gmap component from exanpe without any trouble at all. Demo: http://exanpe-t5-lib.appspot.com/components/googlemap/example2 Source: https://github.com/exanpe/exanpe-t5-lib Demo Source: https://github.com/exanpe/exanpe-t5-demo -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-JQuery-use-of-GoogleMap-component-tp5718195p5718201.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Emmanuel DEMEY Ingénieur Etude et Développement ATOS Worldline +33 (0)6 47 47 42 02 demey.emman...@gmail.com http://emmanueldemey.fr/ Twitter : @EmmanuelDemey -- Emmanuel DEMEY Ingénieur Etude et Développement ATOS Worldline +33 (0)6 47 47 42 02 demey.emman...@gmail.com http://emmanueldemey.fr/ Twitter : @EmmanuelDemey
Re: Tapestry-JQuery: use of GoogleMap component
Thank you for your answers! I didn't know about the exanpe library, i looks very good! However I'm already using Tapestry-Jquery so I'll try first the solution proposed by arterzatij. The tapestry-jquery developers should be noticed about this problem,I posted this on the google-group of the project , but with no concrete answers... -- David Germán Canteros 2012/11/23 Lance Java lance.j...@googlemail.com I haven't used the gmap in tapestry-jquery but I have used the gmap component from exanpe without any trouble at all. Demo: http://exanpe-t5-lib.appspot.com/components/googlemap/example2 Source: https://github.com/exanpe/exanpe-t5-lib Demo Source: https://github.com/exanpe/exanpe-t5-demo -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-JQuery-use-of-GoogleMap-component-tp5718195p5718201.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: best Eclipse platform
I'm using Juno and I see the maven dependencies in same way that Indigo, all in the folder called Maven dependencies... I think you can control this by editing the project file called .classpath . -- David Germán Canteros 2012/11/1 John j...@quivinco.com Hi, I don't like how Juno shows all the maven dependencies in the root project node, which is why I went back to Indigo and I also don't see any of the maven tasks listed on the run menu. Is there a tweak to organise the project more manageably? Any eclipse tools recomended for working with tapestry source? John - Original Message - From: Thiago H de Paula Figueiredo To: Tapestry users Sent: Thursday, November 01, 2012 10:40 AM Subject: Re: best Eclipse platform On Thu, 01 Nov 2012 07:36:45 -0200, John j...@quivinco.com wrote: Hi, Hi! I've been using Indigo but the m2e and run jetty plugins seem to not work well. Is there a particular Eclipse version that runs well with these plugins and supports any tapestry aware editor plugins? Just use the latest Eclipse available. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.2: How to block UI and disable double click upon form submission?
If the form is inside a zone you can try the ajax throbbers propoused by Howard. http://tapestryjava.blogspot.com.ar/2011/12/adding-ajax-throbbers-to-zone-updates.html By adding some css/js files and a little code in the layout component you can get the desired effect: while the zone is updating, it becomes opaque and shows the loading animation. This effect will be showed in all zones, so if your forms are inside in a zone, you will get what you want. I use this solution and works great Regards -- David Germán Canteros 2012/7/9 Thiago H de Paula Figueiredo thiag...@gmail.com On Mon, 09 Jul 2012 15:45:15 -0300, wesleywj2 wesley...@yahoo.co.uk wrote: Hi, Hi! I wondered how do i block the UI when user click/double click the submit button upon form submission? The exact same way you'd do it in any HTML and JavaScript webapp. I know you're asking about something already implemented in Tapestry, but I really like to remember everyone that anything in JavaScript can be used without changes (except for the fact that Prototype is included by default) with Tapestry. T5 has any UI block script to help out? Nope, but Lance provided one implementation in the always-useful JumpStart for you getting some inspiration. :) -- Thiago H. de Paula Figueiredo --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
changing grid-model using ajax
Hi guys! I'm looking for help with a rare case. I have a zone, a form (with a checkbox) and a grid. The form and the grid are enclosed by the zone. t:zone t:id=targetsZone t:update=show t:form t:id=filterTargetsForm t:zone=targetsZone zone=targetsZone t:checkbox t:id=flag t:value=flag / t:submit value=Filter / /t:form t:grid source=targets row=target model=myModel inPlace=true / /t:zone On the java side: I change the grid model, depending on the checkbox value: @Component private Zone targetsZone; @Property @Persist private boolean flag; public BeanModelCycleTargets getMyModel() { BeanModelCycleTargets myModel = beanModelSource.createDisplayModel( CycleTargets.class, messages); if (flag){ myModel.include(.); myModel.exclude(.); myModel.reorder(.); } else { myModel.include(.); myModel.exclude(.); myModel.reorder(.); } } void onSubmitFromFilterTargetsForm() { this.ajaxResponseRenderer.addRender(targetsZone, this.targetsZone); } Note that the method onSubmit only update the zone. So, depending if the checkbox is clicked or not, i want to change the properties displayed by the grid. The problem is that after the form-submit the model seem not to change and throws an *Render queue error in SetupRender[cycles/NewEditCyclePage:targetsgrid]: Bean editor model for does not contain a property with id 'XX'* Do you know if the model of a grid can be changed on this way? Thanks in advance! -- David Germán Canteros
Re: changing grid-model using ajax
Addition information: the exception occurs only if I submit the form after a column sort process was done. Also the stack begins with the following lines: Stack trace - org.apache.tapestry5.internal.beaneditor.BeanModelImpl.getById(BeanModelImpl.java:185) - org.apache.tapestry5.corelib.components.Grid$DefaultGridSortModel.getSortConstraints(Grid.java:364) - org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:483) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:447) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java) And I found in the grid's documentation, about sort-model: *The model used to handle sorting of the Grid. This is generally not specified, and the built-in model supports only single column sorting. The sort constraints (the column that is sorted, and ascending vs. descending) is stored as persistent fields of the Grid component*. Is the grid catching the old properties in the sort-model??? -- David Germán Canteros 2012/7/10 David Canteros davidcanteros@gmail.com Hi guys! I'm looking for help with a rare case. I have a zone, a form (with a checkbox) and a grid. The form and the grid are enclosed by the zone. t:zone t:id=targetsZone t:update=show t:form t:id=filterTargetsForm t:zone=targetsZone zone=targetsZone t:checkbox t:id=flag t:value=flag / t:submit value=Filter / /t:form t:grid source=targets row=target model=myModel inPlace=true / /t:zone On the java side: I change the grid model, depending on the checkbox value: @Component private Zone targetsZone; @Property @Persist private boolean flag; public BeanModelCycleTargets getMyModel() { BeanModelCycleTargets myModel = beanModelSource.createDisplayModel( CycleTargets.class, messages); if (flag){ myModel.include(.); myModel.exclude(.); myModel.reorder(.); } else { myModel.include(.); myModel.exclude(.); myModel.reorder(.); } } void onSubmitFromFilterTargetsForm() { this.ajaxResponseRenderer.addRender(targetsZone, this.targetsZone); } Note that the method onSubmit only update the zone. So, depending if the checkbox is clicked or not, i want to change the properties displayed by the grid. The problem is that after the form-submit the model seem not to change and throws an *Render queue error in SetupRender[cycles/NewEditCyclePage:targetsgrid]: Bean editor model for does not contain a property with id 'XX'* Do you know if the model of a grid can be changed on this way? Thanks in advance! -- David Germán Canteros
Re: changing grid-model using ajax
I answer myself: Yes, the sort model seems to be catched in the grid. I solved the problem by adding the following line in onSubmit method: void onSubmitFromFilterTargetsForm() { *this.targetsGrid.getSortModel().clear();* this.ajaxResponseRenderer.addRender(targetsZone, this.targetsZone); } -- David Germán Canteros 2012/7/10 David Canteros davidcanteros@gmail.com Addition information: the exception occurs only if I submit the form after a column sort process was done. Also the stack begins with the following lines: Stack trace - org.apache.tapestry5.internal.beaneditor.BeanModelImpl.getById(BeanModelImpl.java:185) - org.apache.tapestry5.corelib.components.Grid$DefaultGridSortModel.getSortConstraints(Grid.java:364) - org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:483) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:447) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java) And I found in the grid's documentation, about sort-model: *The model used to handle sorting of the Grid. This is generally not specified, and the built-in model supports only single column sorting. The sort constraints (the column that is sorted, and ascending vs. descending) is stored as persistent fields of the Grid component*. Is the grid catching the old properties in the sort-model??? -- David Germán Canteros 2012/7/10 David Canteros davidcanteros@gmail.com Hi guys! I'm looking for help with a rare case. I have a zone, a form (with a checkbox) and a grid. The form and the grid are enclosed by the zone. t:zone t:id=targetsZone t:update=show t:form t:id=filterTargetsForm t:zone=targetsZone zone=targetsZone t:checkbox t:id=flag t:value=flag / t:submit value=Filter / /t:form t:grid source=targets row=target model=myModel inPlace=true / /t:zone On the java side: I change the grid model, depending on the checkbox value: @Component private Zone targetsZone; @Property @Persist private boolean flag; public BeanModelCycleTargets getMyModel() { BeanModelCycleTargets myModel = beanModelSource.createDisplayModel( CycleTargets.class, messages); if (flag){ myModel.include(.); myModel.exclude(.); myModel.reorder(.); } else { myModel.include(.); myModel.exclude(.); myModel.reorder(.); } } void onSubmitFromFilterTargetsForm() { this.ajaxResponseRenderer.addRender(targetsZone, this.targetsZone); } Note that the method onSubmit only update the zone. So, depending if the checkbox is clicked or not, i want to change the properties displayed by the grid. The problem is that after the form-submit the model seem not to change and throws an *Render queue error in SetupRender[cycles/NewEditCyclePage:targetsgrid]: Bean editor model for does not contain a property with id 'XX'* Do you know if the model of a grid can be changed on this way? Thanks in advance! -- David Germán Canteros
Re: Progressive display on submit
As Thiago says, you can use throbbers. One good example (but using Zones) is provided by Howard on his blog. I tried it and works great! http://tapestryjava.blogspot.com.ar/2011/12/adding-ajax-throbbers-to-zone-updates.html Br -- David Germán Canteros 2012/7/1 Thiago H de Paula Figueiredo thiag...@gmail.com On Sun, 01 Jul 2012 09:22:12 -0300, liquid_sun hristijan.curuko...@gmail.com** wrote: Hi, Hi! I have submit form that needs about 2-3 seconds to execute (insert in database, send mail ...etc). How can I show progressive display while the whole code is executed and then return an Object (success.java). Is there any good example doing this using Progressive display or possibly any other other way to accomplish this. ProgressiveDisplay isn't meant to be used that way. It's meant to be used while a page is initially rendering. It seems to me that what you want is somehow to tell the user the webapp isn't stuck. You could just get the form submission JavaScript event and show some throbber and other visual indication that the webapp is running. -- Thiago H. de Paula Figueiredo --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Server Side Validation with ajax form loop work around
I have done a quick test and it works perfectly! Thanks Geoff! -- David Germán Canteros 2012/4/12 Geoff Callender geoff.callender.jumpst...@gmail.com Hi all, I've taken on board all the suggestions and observations here about AjaxFormLoop problems and fixes, and done a complete rewrite of the JumpStart examples. I've put a beta on the demo site. Is every corner case handled now? I sure hope so. See if you can find a hole in it. http://jumpstart.doublenegative.com.au/jumpstart/ Cheers, Geoff On 23/03/2012, at 1:57 AM, George Christman wrote: Hi David, after some testing I wanted to provide you with some updates based on some scenarios I ran into. You'll notice in the !request.isHXR condition, I'm checking for a null lineItem id. This prevents duplicate objects from being added to the collection. @SuppressWarnings(unchecked) public ValueEncoder getEncoderLineItem() { return new ValueEncoderLineItem() { public String toClient(LineItem value) { Long id = value.getId(); return id == null ? NEW_OBJ : id.toString(); } public LineItem toValue(String idAsString) { lineItem = null; if (!idAsString.equals(NEW_OBJ)) { Long id = new Long(idAsString); lineItem = (LineItem) session.get(LineItem.class, id); } // AjaxFormLoop can't handle null obj, so if null we return a new empty obj. lineItem = lineItem == null ? new LineItem() : lineItem; if (!request.isXHR() lineItem.getId() == null) { lineItem.setPurchaseRequest(pr); pr.getLineItems().add(lineItem); } return lineItem; } }; } I also found a cleaner way to copy the persisted data to the new session. void onActivate() { System.out.println(onActivate + this.pr); if (this.pr == null) { this.pr = prPersist != null ? prPersist : new PurchaseRequest(); prPersist = null; } } Class? onActivate(Long prId) { PurchaseRequest purchaseRequest = prPersist != null ? prPersist : (PurchaseRequest) session.get(PurchaseRequest.class, prId); } If you have any better solutions, please feel free to share. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5586509.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Forms require that the request method be POST....
Ok, I will try it in my code. Thanks Lenny! -- David Germán Canteros 2012/3/20 Lenny Primak lpri...@hope.nyc.ny.us I am the author of that fix and it definitely works correctly. It strips out the form from the request and redirects it to the page that the client was actually looking for. On Mar 20, 2012, at 9:04 AM, David Canteros wrote: Hi guys! Lately I detected a lot of this exception in the logs of my tap applications... It said: *org.apache.tapestry5.ioc.internal.OperationException: Forms require that the request method be POST and that the t:formdata query parameter have values. [at context:courses/ManageCoursesPage.tml, line 8]* The .tml form t:type=form t:id=filterCoursesForm t:zone=coursesGridZone ... /form This happens often, but not all the time... I didn't found external causes, so i believe that are related with tapestry... I was looking for fix in the mailing list, but only found some tricks... For example http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html , In this case, it decorates the RequestExceptionHandler and checks if the exception contains the string *Forms require that the request..*., if true then throws some kind on redirect... Can anybody say if this fix is correct?? Otherwise, can anybody suggest other more clear fix, or provide some context to understand the exception? Thanks in advance! David -- David Germán Canteros - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Server Side Validation with ajax form loop work around
Hi George, finally it worked! Thank you for the help! Before I was using the ajaxformloop like as Geoff example, with the tree arrays XXXtoCreate, XXXToChange and XXXtoDelete and the same encoder. That made me think, probably the problem was caused by Geoff's example and not by the loop component... I'll make some test next days about it. Regards! -- David Germán Canteros 2012/3/19 George Christman gchrist...@cardaddy.com Hi David, I'm using the pr object like so div t:type=ajaxFormLoop t:id=lineItem source=pr.lineItems value=lineItem addRow=block:addRow show=show encoder=encoderLineItem It seems to be working perfectly for me. I'm only using the prPersist object to hold a temporary copy of the current pr at validation. When the page reloads with the validation errors, I'm using the prPersist to extract and populate my current lineItem objects before immediately disregarding. Be sure to implement the value encoder in a similar fashion. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5578227.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Forms require that the request method be POST....
I forgot to say that I'm using tapestry 5.3.2 running on tomcat 6, and the exceptions happens which users who use Firefox 3... -- David Germán Canteros 2012/3/20 David Canteros davidcanteros@gmail.com Hi guys! Lately I detected a lot of this exception in the logs of my tap applications... It said: *org.apache.tapestry5.ioc.internal.OperationException: Forms require that the request method be POST and that the t:formdata query parameter have values. [at context:courses/ManageCoursesPage.tml, line 8]* The .tml form t:type=form t:id=filterCoursesForm t:zone=coursesGridZone ... /form This happens often, but not all the time... I didn't found external causes, so i believe that are related with tapestry... I was looking for fix in the mailing list, but only found some tricks... For example http://tapestry.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html, In this case, it decorates the RequestExceptionHandler and checks if the exception contains the string *Forms require that the request..*., if true then throws some kind on redirect... Can anybody say if this fix is correct?? Otherwise, can anybody suggest other more clear fix, or provide some context to understand the exception? Thanks in advance! David -- David Germán Canteros
Re: Server Side Validation with ajax form loop work around
Hi George, i've done a quick test and it doesnt work on my code, but i will do a full test by tomorrow. Only one question: which object are you using in the ajaxformloop (in the tml code)? pr or prPersist? Regards and thanks! -- David Germán Canteros 2012/3/19 George Christman gchrist...@cardaddy.com David, I have a working work around, I'm sure it's not the best, but does work. See code below. @Persist private PurchaseRequest prPersist; private PurchaseRequest pr; private final String NEW_OBJ = new; void onActivate() { if(prPersist != null) { for(LineItem _lineItem : prPersist.getLineItems()) { if(_lineItem.getId() == null || !pr.getLineItems().contains(_lineItem)) { _lineItem.setPurchaseRequest(pr); pr.getLineItems().add(_lineItem); } } } prPersist = null; } void onValidateFromPR() { if (form.getHasErrors()) { prPersist = pr; } } //Modified Geoff's value encoder. @SuppressWarnings(unchecked) public ValueEncoder getEncoderLineItem() { return new ValueEncoderLineItem() { public String toClient(LineItem value) { Long id = value.getId(); return id == null ? NEW_OBJ : id.toString(); } public LineItem toValue(String idAsString) { LineItem lineItem = null; if (!idAsString.equals(NEW_OBJ)) { Long id = new Long(idAsString); lineItem = (LineItem) session.get(LineItem.class, id); } // AjaxFormLoop can't handle null obj, so if null we return a new empty obj. lineItem = lineItem == null ? new LineItem() : lineItem; if (!request.isXHR()) { lineItem.setPurchaseRequest(pr); pr.getLineItems().add(lineItem); } return lineItem; } }; } Hope this helps. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5577886.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with generated javascript and zone update
Hi, thanks for the response. Probably you are right. I'm not an ajax/js expert, so the only thing I can did is check the response when the zone is updated (using firebug console) and I can see the generated script inside a JSON variable called * evalScript*, i think. I dont know why it is not executed (problems with the quote, maybe?). The response (from firebug console): { content : div class='t-zone' id='graphZone_13607275c88'br clear='none'/htmlform enctype='application/x-www-form-urlencoded' action='/reports/trainingbudgetreportpage.amchartdisplay.reportexecutionform' method='post' id='reportExecutionForm_13607275c88'div class='t-invisible'input value='1331559881875' name='ult' type='hidden'\/inputinput value='H4sIAJXPvUoDQRAH8PHAD9BKG8XGwvrOD+LFDySYRuWQ4FnZyGR32GzY2113N7mksRJ8Bt/BUsGXsvEJ3BwIglWqgf8M/H/z9gWL9THkjqxxwWd3DqWWWlyMuKBw26Q9FHSCFRugC1x6q3Ca+rFghpN30DFOpGiRDSgNaMkHN22lzDhSsh9nZY0mHXx6KTknvdtzhpH35ahfSe+l0fcvOxuT7c+lBBYKWGVGB2fUDVYUYL0Y4hgzhVpkZXDRdTqxAZZjeze21+dwNi+cm1org3xoScyjb7zhv/61/N76eH/uJpAUsMKUjNdX/BGemm9IURWD2Tdv/hKuI+Fh//BoLz/IW6zdDrD2d/UDrNmj75sBAAA=' name='t:formdata' type='hidden'\/input\/divdiv style='width: 700px; height: 600px; background-color:white; top:0px; bottom:0px;' class='chartclass' id='chartdiv'\/divinput id='svgCode' value='' name='svgCode' type='hidden'\/inputinput onClick='render(this.form);' value='Export as JPEG' class='ubutton' id='downloadJpeg_13607275c88' name='downloadJpeg' type='submit'\/input\/form\/htmlbr clear='none'/\/div, scripts : [/assets/1.3.4/ctx/js/amcharts.js, /assets/1.3.4/ctx/js/raphael.js, /assets/1.3.4/ctx/js/SvgToCanvas.js ], inits : [{ formEventManager : [{ formId : reportExecutionForm_13607275c88, validate : { submit : true,blur : true }} ] },{ * evalScript : [**var chart; var chartData = [{month: \01-2011\,travel: 6688.0,training: 3705.0,cumulative: 10393.0,budget: 0.0},{month: \02-2011\,travel: 3135.0,training: 7593.0,cumulative: 21121.0,budget: 0.0},{month: \03-2011\,travel: 3490.0,training: 7555.23,cumulative: 32166.23,budget: 0.0},{month: \04-2011\,travel: 8696.0,training: 2091.0,cumulative: 42953.23,budget: 0.0},{month: \05-2011\,travel: 15912.0,training: 5416.0,cumulative: 64281.23,budget: 0.0},{month: \06-2011\,travel: 13657.4499,training: 3832.0,cumulative: 81770.68,budget: 0.0},{month: \07-2011\,travel: 7491.3899,training: 4857.0,cumulative: 12348.39,budget: 0.0},{month: \08-2011\,travel: 5517.5999,training: 2207.0,cumulative: 20072.99,budget: 0.0},{month: \09-2011\,travel: 17166.18,training: 12551.0,cumulative: 49790.17,budget: 0.0},{month: \10-2011\,travel: 4151.67,training: 1483.0,cumulative: 55424.8404,budget: 0.0},{month: \11-2011\,travel: 15269.7,training: 10241.0,cumulative: 80935.541,budget: 0.0},{month: \12-2011\,travel: 13838.3,training: 1608.0,cumulative: 96381.843,budget: 990993.0},{month: \01-2012\,travel: 4727.59,training: 3954.0,cumulative: 8681.59,budget: 990993.0}];AmCharts.ready(function () { chart = new AmCharts.AmSerialChart(); chart.dataProvider = chartData; chart.categoryField = \month\;chart.startDuration = 1;chart.rotate = false;chart.depth3D = 20;chart.angle = 45; chart.addTitle(\Training budget tracking for MS\, 14);var categoryAxis = chart.categoryAxis;categoryAxis.gridPosition = \start\; categoryAxis.axisColor = \#DADADA\; categoryAxis.title = \Months \;categoryAxis.dashLength = 5;categoryAxis.labelRotation = 45;var valueAxis0 = new AmCharts.ValueAxis(); valueAxis0.stackType = \regular\; valueAxis0.title = \Travel and training costs \;valueAxis0.gridAlpha = 0.1; valueAxis0.axisAlpha = 0;chart.addValueAxis(valueAxis0);var valueAxis1 = new AmCharts.ValueAxis(); valueAxis1.stackType = \regular\; valueAxis1.title = \Cumulative costs and Budget\; valueAxis1.gridAlpha = 0.1; valueAxis1.axisAlpha = 0; valueAxis1.synchronizationMultiplyer = 1;valueAxis1.synchronizeWithAxis(valueAxis0);valueAxis1.position = \right\;chart.addValueAxis(valueAxis1);var graph1 = new AmCharts.AmGraph(); graph1.type = \column\;graph1.title = \Travel cost (flight + expenses)\;graph1.valueField = \travel\; graph1.fillColors = \#8414A5\;graph1.lineAlpha = 0;graph1.fillAlphas = 1;graph1.axisColor=\#ADD981\;chart.addGraph(graph1);var graph2 = new AmCharts.AmGraph(); graph2.type = \column\;graph2.title = \Training cost (fee)\;graph2.valueField = \training\; graph2.fillColors = \#84CB7B\;graph2.lineAlpha = 0;graph2.fillAlphas = 1;graph2.axisColor=\#ADD981\;chart.addGraph(graph2);var graph3 = new AmCharts.AmGraph(); graph3.type = \line\;graph3.title = \Cumulative cost\;graph3.valueField = \cumulative\; graph3.lineColor = \#FFA218\;graph3.lineThickness = 3;graph3.bullet = \round\; graph3.fillAlphas = 0;graph3.axisColor=\#ADD981\;graph3.valueAxis=valueAxis0;chart.addGraph(graph3);var graph4 = new AmCharts.AmGraph(); graph4.type = \line\;graph4.title = \Budget\;graph4.valueField = \budget\;
Re: Customising T5 URL Encoding
+1 I have several problems with the integration of my Tapestry tools and other non-tapestry tools, all of this caused by tapestry URLEncoder. I solved this by overriding URLEncoder, but your proposal would be a more elegant solution -- David Germán Canteros 2012/3/11 Paul Stanton p...@mapshed.com.au +1 possibly with 3 options? : a) tomcat compatible default encoding b) jetty compatible default encoding c) tapestry encoding On 21/06/2010 6:34 AM, Joel Halbert wrote: Agreed, it would be good to have this as a configuration option. On 20/06/10 19:20, Kai Weber wrote: * Nicolas Bouillonnico...@bouil.org: The Tapestry URL encoding is not a problem for me in general, just for one use case when i wanted to migrate a site to tapestry and keeping the same URL (with accents, spaces, dashes, underscores and so on). It is a problem if you get called by other webapps. If they call your page with the standard URL encoding scheme you have a problem. Say you have onActivate(String emailadress) no one can call your page because the expected encoding for @ in T5 is $0040 where the rest of the world would send you an @. We use only query strings or numerical IDs as parameters for pages which can get called from external sites. I would like to see configuration option to switch or disable the URLEncoder completly. Kai --**--** - To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Server Side Validation with ajax form loop
Could you please do it? My english is not good (my natural language is spanish) and you already have the code with the issue. Tell me if you can't. Thanks! David -- David Germán Canteros 2012/3/6 George Christman gchrist...@cardaddy.com Sounds good to me. Do you want to file the jira issue, or would you like me to? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5540927.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Server Side Validation with ajax form loop
Hi George, I still have the problem. I don't understand the underlying code of the frameworks so i can't find the code that is working wrong, so the clientside validation is the only way to solve it. We would file a JIRA to get help (i dont saw any similar issue registered ), what do you think? -- David Germán Canteros 2012/2/15 George Christman gchrist...@cardaddy.com David have you figured out how to get around this issue? I'm using clientside validation to over come it for the short term, but it would be nice to get server side working properly. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5487493.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Display blob image store in session
Hi! Check this set of mails : http://tapestry.1045711.n5.nabble.com/Uploading-then-displaying-Images-td3423946.html It could help you. Regards! -- David Germán Canteros 2012/2/8 tommy_tape5 tommy_share2...@yahoo.com guys i need help immediately...i won't to display blob image array that store in session with @Persist using outputstream and inputstream...the problem is i convert image to blob byte in Capture3.java and display it already in convert image in Capture2.java and i don't know how to use outputstream and inputstream in my problem, this my code : *Capture3.java* @InjectPage private Capture2 next; @Property(write = false) @Persist private ListImage allImageSvs; @Persist @Property private Image image; @Property private UploadedFile imageGraber; public void setupRender(){ this.image = new Image(); if(allImageSvs == null){ allImageSvs = new ArrayListImage(); } if(image == null){ image = new Image(); } } Object onSelectedFromAdd() throws IOException{ image.setSignature(IOUtils.toByteArray(imageGraber.getStream())); next.setAllImageRules(allImageSvs); next.setView(image); return next; } *Capture2.java* @Property(write = false) @Persist private ListImage allImageSvs; public void setAllImageRules(ListImage allImageSvs){ this.allImageSvs = allImageSvs; } public void setupRender(){ if(allImageSvs == null){ allImageSvs = new ArrayListImage(); } if(image == null){ image = new Image(); } } public void setView(Image image) { // TODO Auto-generated method stub this.image = image; } Regards, Tommy -- View this message in context: http://tapestry.1045711.n5.nabble.com/Display-blob-image-store-in-session-tp5466225p5466225.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Server Side Validation with ajax form loop
I have the same problem with AjaxFormLoop, the values typed on new added row are lost when server side validations record any error on the form. -- David Germán Canteros 2012/2/2 George Christman gchrist...@cardaddy.com Hi Geoff, just curious if you ever had a chance to look at this issue again? Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/Server-Side-Validation-with-ajax-form-loop-tp5120576p5451139.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.3.1: replacing css for t:errors
yes, i have the css code in an external file too, and it works fine. I had the same problem that you and got the patch from the following mails: http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-td4969412.html (see the last one) Regards -- David Germán Canteros 2011/12/27 angelochen angelochen...@yahoo.com.hk it is this one: HTMLBODY DIV.t-error LI { margin-left: 20px; } but putting it in tml file does not work, put it in an external css file works. -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-3-1-replacing-css-for-t-errors-tp5102590p5103128.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.3.1: replacing css for t:errors
I can do it adding the word BODY before DIV in each class of the alert's css. For instance, the file t-alerts.css says DIV.t-alert-container then and I write in my css BODY DIV.t-alert-container. -- David Germán Canteros 2011/12/27 angelochen angelochen...@yahoo.com.hk Hi, I'd like to replace some css elements for component errors, but seems not working no matter how I tried, following is the code for that, the t-error li defined will not be used by browser, it's already the one in default.css take over, any idea why? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-3-1-replacing-css-for-t-errors-tp5102590p5102590.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Autocomplete question
Maybe tag-select? Take a look to https://github.com/argoyle/tapestry-tagselect -- David Germán Canteros 2011/12/27 bigcache1 sharp.maes...@gmail.com Good day to everyone! I have textfield where I need multiple input of people credentials, like: Aragorn, Legolas, Sauron Question is: Is there any functionality in autocomplete to provide completions after each comma, and not to erase data, that was already written? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Autocomplete-question-tp5102734p5102734.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tap 5.3.1: IllegalArgumentException
https://issues.apache.org/jira/browse/TAP5-1803 Done! Regards -- David Germán Canteros 2011/12/22 Lenny Primak lpri...@hope.nyc.ny.us Thanks for confirming this. It is definitely a bug. Please file an JIRA issue. On Dec 22, 2011, at 4:21 PM, David Canteros wrote: You are right... thanks again! According to the UrlEncoderImpl the safe chars are the following: *private final BitSet safe = new BitSet(128); { markSafe(abcdefghijklmnopqrstuvwxyz); markSafe(ABCDEFGHIJKLMNOPQRSTUVWXYZ); markSafe(01234567890-_.:); } * I dont know the internal working of Tapestry that have this requirement, but it should consider that some applications follow the standard, al least with @ActivationRequestParameter. -- David Germán Canteros 2011/12/22 Lenny Primak lpri...@hope.nyc.ny.us Bet the syntax checker is a bit overzealous. Unconfirmed though. I think you should file an issue. On Dec 22, 2011, at 3:56 PM, David Canteros wrote: Mmm I have a doubt.. .why tapestry consider that asterisk symbol (*) is unsafe?? (that symbol is my problem now). The specification for URLs (RFC 1738 http://www.rfc-editor.org/rfc/rfc1738.txt, Dec. '94) says that asterisk could be used unencoded... - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tap 5.3.1: IllegalArgumentException
Hi guys! Today I have updated the libraries to tapestry 5.3.1 and my applications started to throw an unexpected exception *(this doesnt happen with tapestry 5.3 or earlier*). I have a page called login that receives a variable called key by URL, which looks like the following example: *http://localhost:8080/mytool/login?key=diXmpfiW1uk*1w21wCIi*21312423*w* In the onActivate() method I have to catch the value of key to do some work. The code of Login.java is very short: @ActivationRequestParameter private String key; @Inject private Logger log; public Object onActivate() { // Some work with key value } The exception happens when I try to access to the above URL, it occurs before to call onActivate (i think). The exception is: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException:* Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid.* at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) (and continues..) I think is a problem when tapestry tries to handle the URL to catch the value of key ... someone have an idea of the problem?? This not happens with tap 5.3... Regards! David Complete exception: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:302) at org.apache.tapestry5.internal.services.PageActivatorImpl.activatePage(PageActivatorImpl.java:34) at $PageActivator_7f2c9a23350.activatePage(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:57) at org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2207) at $PageRenderRequestHandler_7f2c9a23351.handle(Unknown Source) at $PageRenderRequestHandler_7f2c9a2334a.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) at $ComponentRequestHandler_7f2c9a2334b.handlePageRender(Unknown Source) at org.tynamo.security.SecurityComponentRequestFilter.handlePageRender(SecurityComponentRequestFilter.java:50) at $ComponentRequestFilter_7f2c9a23348.handlePageRender(Unknown Source) at $ComponentRequestHandler_7f2c9a2334b.handlePageRender(Unknown Source) at $ComponentRequestHandler_7f2c9a23311.handlePageRender(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) at $Dispatcher_7f2c9a23314.dispatch(Unknown Source) at $Dispatcher_7f2c9a2330e.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_7f2c9a2330f.service(Unknown Source) at
Re: Tap 5.3.1: IllegalArgumentException
Opps! at first glance it will be a problem for meThat url is automatically generated by other tool... I got back to 5.3 for the moment. Thanks Lenny! David -- David Germán Canteros 2011/12/22 Lenny Primak lpri...@hope.nyc.ny.us This is one of the incompatible changes in 5.3.1. You have to URLencode all parameters form now on. I use the URLEncoder service. On Dec 22, 2011, at 3:05 PM, David Canteros wrote: Hi guys! Today I have updated the libraries to tapestry 5.3.1 and my applications started to throw an unexpected exception *(this doesnt happen with tapestry 5.3 or earlier*). I have a page called login that receives a variable called key by URL, which looks like the following example: *http://localhost:8080/mytool/login?key=diXmpfiW1uk*1w21wCIi*21312423*w* In the onActivate() method I have to catch the value of key to do some work. The code of Login.java is very short: @ActivationRequestParameter private String key; @Inject private Logger log; public Object onActivate() { // Some work with key value } The exception happens when I try to access to the above URL, it occurs before to call onActivate (i think). The exception is: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException:* Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid.* at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) (and continues..) I think is a problem when tapestry tries to handle the URL to catch the value of key ... someone have an idea of the problem?? This not happens with tap 5.3... Regards! David Complete exception: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:302) at org.apache.tapestry5.internal.services.PageActivatorImpl.activatePage(PageActivatorImpl.java:34) at $PageActivator_7f2c9a23350.activatePage(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:57) at org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2207) at $PageRenderRequestHandler_7f2c9a23351.handle(Unknown Source) at $PageRenderRequestHandler_7f2c9a2334a.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) at $ComponentRequestHandler_7f2c9a2334b.handlePageRender(Unknown Source) at org.tynamo.security.SecurityComponentRequestFilter.handlePageRender(SecurityComponentRequestFilter.java:50) at $ComponentRequestFilter_7f2c9a23348.handlePageRender(Unknown Source
Re: Tap 5.3.1: IllegalArgumentException
Mmm I have a doubt.. .why tapestry consider that asterisk symbol (*) is unsafe?? (that symbol is my problem now). The specification for URLs (RFC 1738 http://www.rfc-editor.org/rfc/rfc1738.txt, Dec. '94) says that asterisk could be used unencoded... -- David Germán Canteros 2011/12/22 David Canteros davidcanteros@gmail.com Opps! at first glance it will be a problem for meThat url is automatically generated by other tool... I got back to 5.3 for the moment. Thanks Lenny! David -- David Germán Canteros 2011/12/22 Lenny Primak lpri...@hope.nyc.ny.us This is one of the incompatible changes in 5.3.1. You have to URLencode all parameters form now on. I use the URLEncoder service. On Dec 22, 2011, at 3:05 PM, David Canteros wrote: Hi guys! Today I have updated the libraries to tapestry 5.3.1 and my applications started to throw an unexpected exception *(this doesnt happen with tapestry 5.3 or earlier*). I have a page called login that receives a variable called key by URL, which looks like the following example: * http://localhost:8080/mytool/login?key=diXmpfiW1uk*1w21wCIi*21312423*w* In the onActivate() method I have to catch the value of key to do some work. The code of Login.java is very short: @ActivationRequestParameter private String key; @Inject private Logger log; public Object onActivate() { // Some work with key value } The exception happens when I try to access to the above URL, it occurs before to call onActivate (i think). The exception is: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException:* Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid.* at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) (and continues..) I think is a problem when tapestry tries to handle the URL to catch the value of key ... someone have an idea of the problem?? This not happens with tap 5.3... Regards! David Complete exception: [ERROR] PricetoolModule.PricetoolRequestExceptionHandler Unexpected runtime exception: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. (Track ID: 1324576808506) org.apache.tapestry5.runtime.ComponentEventException: Input string 'diXmpfiW1uk*1w21wCIi*21312423*w' is not valid; the character '*' at position 12 is not valid. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:302) at org.apache.tapestry5.internal.services.PageActivatorImpl.activatePage(PageActivatorImpl.java:34) at $PageActivator_7f2c9a23350.activatePage(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:57) at org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2207) at $PageRenderRequestHandler_7f2c9a23351.handle(Unknown Source) at $PageRenderRequestHandler_7f2c9a2334a.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender
Re: Tap 5.3.1: IllegalArgumentException
You are right... thanks again! According to the UrlEncoderImpl the safe chars are the following: *private final BitSet safe = new BitSet(128); { markSafe(abcdefghijklmnopqrstuvwxyz); markSafe(ABCDEFGHIJKLMNOPQRSTUVWXYZ); markSafe(01234567890-_.:); } * I dont know the internal working of Tapestry that have this requirement, but it should consider that some applications follow the standard, al least with @ActivationRequestParameter. -- David Germán Canteros 2011/12/22 Lenny Primak lpri...@hope.nyc.ny.us Bet the syntax checker is a bit overzealous. Unconfirmed though. I think you should file an issue. On Dec 22, 2011, at 3:56 PM, David Canteros wrote: Mmm I have a doubt.. .why tapestry consider that asterisk symbol (*) is unsafe?? (that symbol is my problem now). The specification for URLs (RFC 1738 http://www.rfc-editor.org/rfc/rfc1738.txt, Dec. '94) says that asterisk could be used unencoded... - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Show your Tapestry support!
I agree that registration form is bugging , but if it is a good place to contribute with the framework (wich is so useful and is free!) we should do the effort and place our comments, is my oppinion. Regards! -- David Germán Canteros 2011/12/5 Bob Harner bobhar...@gmail.com I hope you all don't put in your real info in such forms. Fake data works just as well. On Mon, Dec 5, 2011 at 8:01 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote: Somehow I doubt that all that 'valuable' registration information didn't go into the grubby hands of the marketers. On Dec 5, 2011, at 7:58 PM, Taha Hafeez Siddiqi wrote: Hi Lenny I am registered there for last two years and have never received any mail, so that is not a problem. Yes, I agree, the Registration concept is too primitive. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Changes in the tml and components are not reflecting
A tip: when I started with tapestry and Eclipse-Jetty, I found more useful executing jetty with maven pluging, directly from command line writing mvn jetty:run. -- David Germán Canteros 2011/11/9 ramakanthreddy.t ramakanthredd...@gmail.com got the turotial example from the apache site built using the commands given and then I have created the resources required for the exlipse to work and then imported the project into eclipse into maven as existing maven project. I have downloaded the jetty plugin for my eclipse and I have created the instance of my application on the Jetty instance and I am running. m2eclipse I could not install and It was already there in the eclipse my Eclipse version is 3.7 Indigo. ramakanthreddy.t wrote: I am working on simple examples that are there in the Tapestry site and for each change I am not seeing the changes with out restarting the Jetty server. I have used -Dorg.apache.tapestry.disable-caching=true but with out any use the changes are not reflecting with out restarting the server. Please tell me what I have to configure so that the changes automatically get reflected in the Jetty server. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Changes-in-the-tml-and-components-are-not-reflecting-tp4974308p4977598.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Changes in the tml and components are not reflecting
Yes you are right Thiago, it's only my habit :)... Maven Jetty plugin always worked well for me, but configure jetty with any eclipse pluging was too difficult.. -- David Germán Canteros 2011/11/9 Thiago H. de Paula Figueiredo thiag...@gmail.com On Wed, 09 Nov 2011 11:13:39 -0200, David Canteros davidcanteros@gmail.com wrote: A tip: when I started with tapestry and Eclipse-Jetty, I found more useful executing jetty with maven pluging, directly from command line writing mvn jetty:run. Or you can create a Maven/m2eclipse run/debug configuration that invokes jetty:run. ;) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br
Re: progressive display
Hi again! For instance: i have a page with the following tml: t:progressivedisplay t:id=processingWork update=show initial=block:loadingBlock / t:block id=loadingBlock div align=center Working/div /t:block t:block id=workErrorBlock div align=center Error! /div /t:block t:block id=workDoneBlock div align=center Work done! /div /t:block And in the java file : @Inject private Block workDoneBlock; @Inject private Block workErrorBlock; public Object onProgressiveDisplayFromProcessingWork() { try { // working code return workDoneBlock; } catch (Exception e) { return workErrorBlock; } } You can find more info here: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/ajax/progressivedisplay and here: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/ajax/progressivedisplayvariations BR!! -- David Germán Canteros 2011/10/21 Wechsung, Wulf wulf.wechs...@sap.com Hi David, I'm using 5.2.6 as well. What happens when your progressively-displayed grid can't render and throws an exception? Best Regards, Wulf -Original Message- From: David Canteros [mailto:davidcanteros@gmail.com] Sent: Donnerstag, 20. Oktober 2011 18:33 To: Tapestry users Subject: Re: progressive display Wich tap version are you using?? I'm doing something like that with grids and it works OK, using tap 5.2.6 BR -- David Germán Canteros 2011/10/20 Steve Eynon steve.ey...@alienfactory.co.uk It may be something to do with this (now fixed) Jira : https://issues.apache.org/jira/browse/TAP5-1706 Try munky patching your tapestry.js page with the suggestion in the Jira and see if it makes any difference. Steve. On 20 October 2011 05:07, Wechsung, Wulf wulf.wechs...@sap.com wrote: Hello T-User, I would like to start using the progressive display component to create the illusion of responsitivity (:) ) but I'm facing the problem that if anything goes wrong during the rendering of the P-D's body it will not show an error page and instead keeps showing the load animation. Is there a quick way fix for that? My component template looks like this: t:progressivedisplay update=show t:grid source=systemResults / /t:progressivedisplay And my component eventhandler is like this: @OnEvent(EventConstants.PROGRESSIVE_DISPLAY) void onProgressiveDisplay() { ... create query etc ... /** this might take a while ...**/ systemResults = em.createQuery(query).getResultList(); } The grid rendering fails with a class cast exception because I haven't provided a proper beanmodel yet. I can see the trace in the console but the P-D just keeps loading. Best Regards, Wulf - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: progressive display
Wich tap version are you using?? I'm doing something like that with grids and it works OK, using tap 5.2.6 BR -- David Germán Canteros 2011/10/20 Steve Eynon steve.ey...@alienfactory.co.uk It may be something to do with this (now fixed) Jira : https://issues.apache.org/jira/browse/TAP5-1706 Try munky patching your tapestry.js page with the suggestion in the Jira and see if it makes any difference. Steve. On 20 October 2011 05:07, Wechsung, Wulf wulf.wechs...@sap.com wrote: Hello T-User, I would like to start using the progressive display component to create the illusion of responsitivity (:) ) but I'm facing the problem that if anything goes wrong during the rendering of the P-D's body it will not show an error page and instead keeps showing the load animation. Is there a quick way fix for that? My component template looks like this: t:progressivedisplay update=show t:grid source=systemResults / /t:progressivedisplay And my component eventhandler is like this: @OnEvent(EventConstants.PROGRESSIVE_DISPLAY) void onProgressiveDisplay() { ... create query etc ... /** this might take a while ...**/ systemResults = em.createQuery(query).getResultList(); } The grid rendering fails with a class cast exception because I haven't provided a proper beanmodel yet. I can see the trace in the console but the P-D just keeps loading. Best Regards, Wulf - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: strange situation
Hi, thank you for your quick response. My question was just out of curiosity because this behavior happens seldom and this brings me no major problems . It is rarely because there are other projects (developed with other frameworks) deployed on that server and the strange page only appear with tapestry applications. I'll try with tap 5.2.6 Thank you again! David -- David Germán Canteros 2011/8/10 Howard Lewis Ship hls...@gmail.com I believe this was a bug where under certain circumstances, a corrupt GZIP stream of page content would be streamed to the client; this is fixed in 5.2.6 for sure, but I thought it was fixed in 5.2.5 as well. Failing that, you need to be sure its Tapestry generating the corrupt content, rather than some other server in the middle (perhaps a firewall). This isn't about shifting the blame, but merely about understanding the problem before looking for a fix. On Wed, Aug 10, 2011 at 1:56 PM, David Canteros davidcanteros@gmail.com wrote: Hi! I have a strange situation to share with you: a weird page appear when some users try to load some page of my tapestry application: a lot of strange symbols appear instead of the correct page. But if they try again (or if they reload the page with F5) the correct page appear. This happen very rarely and I can not reproduce it... I have attached a screenshot for review. Just out of curiosity, has this ever happened to anyone else? Tapestry version: 5.2.5 Server: Tomcat 6 Browser: Firefox 4 -- David Germán Canteros - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
strange situation
Hi! I have a strange situation to share with you: a weird page appear when some users try to load some page of my tapestry application: a lot of strange symbols appear instead of the correct page. But if they try again (or if they reload the page with F5) the correct page appear. This happen very rarely and I can not reproduce it... I have attached a screenshot for review. Just out of curiosity, has this ever happened to anyone else? Tapestry version: 5.2.5 Server: Tomcat 6 Browser: Firefox 4 -- David Germán Canteros - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Uploading then displaying Images
Hi again Josh, i had not seen your first response, there was the solution to my problem. Thank you! David -- David Germán Canteros 2011/8/6 David Canteros davidcanteros@gmail.com Yes, user is an object loaded in the setupRender() method, and getImage() returns an InputStream every time the page is loaded. -- David Germán Canteros 2011/8/5 Josh Canfield joshcanfi...@gmail.com The real issue is more likely the first point, you're getting your InputStream from an object from the session. Does calling getImage() return a new InputStream every time? On Fri, Aug 5, 2011 at 2:44 PM, David Canteros davidcanteros@gmail.com wrote: Hi Josh; I have already tried with PageRenderLinkSource but It has the same behavior. I did not know the difference between LinkSource and PageRenderLinkSource, thanks for the information! David -- David Germán Canteros 2011/8/5 Josh Canfield joshcanfi...@gmail.com Also. private LinkSource linkSource; This is an internal class, you should be using PageRenderLinkSource. You can replace: linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); with pageRenderLinkSource.createPageRenderLinkWithContext(DisplayImagePage.class, imageId); Josh On Fri, Aug 5, 2011 at 1:39 PM, David Canteros davidcanteros@gmail.com wrote: Hi I have to show a image loaded from database BLOB field. I implemented Thiago's suggestion, I have created a page with the following code: public class ShowImagePage { @Inject private LinkSource linkSource; (...) public Link *getUploadedFile*(String imageId) { return linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); } public StreamResponse *onActivate*(String imageId) { this.filename = imageId; return new StreamResponse() { public String *getContentType*() { return contentType; } public InputStream *getStream*() throws IOException { User user = (User)_request.getSession(true).getAttribute(user); return user.getImage(); } public void *prepareResponse*(Response response) { response.setHeader(Content-Disposition, inline; filename= + filename + ((extension == null) ? : (. + extension))); } }; } } ** In the javacode of the page where i have to show the image, I injected the above page and wrote this method public Link *getImageLink*(ImageId){ return showImagewPage.getUploadedFile(imageId); } and in html code I put this: img src=${imageLInk}/ It works fine, the image is showed but when I refresh the page (with F5), the image dissapear. It behavior does not occur if I submit some form placed in the same page that refresh the page too (the method onSubmitFrom... returns this ). I have debugged the code and everything works fine, do you have any idea about this behavior? Thanks!! -- David Germán Canteros 2011/3/11 Rich M rich...@moremagic.com Thanks everyone for the responses so far, conceptually I think this is coming together for me. So, I'm glad the context path was not a good idea, it felt dirty from the beginning. Avoiding that, there are two main options: use the database to store/retrieve the images, or use a configured system folder from where I can load/save files with Java IO. Regardless of the option chosen there, the image file will be captured as an InputStream and returned as a StreamResponse in some form to a page/component. As far as linking the StreamResponse to an HTML IMG tag, I believe I understand the various options presented here. LLTYK suggests using an EventLink. I was looking through my code and found a Captcha implementation I have using a propertyExpression in the TML on the src attribute of IMG to reference a getImageLink function that returns ComponentResources.**createActionLink(image,null)**. Then there is an onImage() action handler method that returns a StreamResponse. I understand this is ActionLink and not EventLink, but I think the concept must be nearly identical. Alternately, Thiago is suggesting that instead of using ComponentResources to generate an ActionLink or EventLink, it may be easier to create a seperate Page that handles returning just a StreamResponse
Re: Uploading then displaying Images
Yes, user is an object loaded in the setupRender() method, and getImage() returns an InputStream every time the page is loaded. -- David Germán Canteros 2011/8/5 Josh Canfield joshcanfi...@gmail.com The real issue is more likely the first point, you're getting your InputStream from an object from the session. Does calling getImage() return a new InputStream every time? On Fri, Aug 5, 2011 at 2:44 PM, David Canteros davidcanteros@gmail.com wrote: Hi Josh; I have already tried with PageRenderLinkSource but It has the same behavior. I did not know the difference between LinkSource and PageRenderLinkSource, thanks for the information! David -- David Germán Canteros 2011/8/5 Josh Canfield joshcanfi...@gmail.com Also. private LinkSource linkSource; This is an internal class, you should be using PageRenderLinkSource. You can replace: linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); with pageRenderLinkSource.createPageRenderLinkWithContext(DisplayImagePage.class, imageId); Josh On Fri, Aug 5, 2011 at 1:39 PM, David Canteros davidcanteros@gmail.com wrote: Hi I have to show a image loaded from database BLOB field. I implemented Thiago's suggestion, I have created a page with the following code: public class ShowImagePage { @Inject private LinkSource linkSource; (...) public Link *getUploadedFile*(String imageId) { return linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); } public StreamResponse *onActivate*(String imageId) { this.filename = imageId; return new StreamResponse() { public String *getContentType*() { return contentType; } public InputStream *getStream*() throws IOException { User user = (User)_request.getSession(true).getAttribute(user); return user.getImage(); } public void *prepareResponse*(Response response) { response.setHeader(Content-Disposition, inline; filename= + filename + ((extension == null) ? : (. + extension))); } }; } } ** In the javacode of the page where i have to show the image, I injected the above page and wrote this method public Link *getImageLink*(ImageId){ return showImagewPage.getUploadedFile(imageId); } and in html code I put this: img src=${imageLInk}/ It works fine, the image is showed but when I refresh the page (with F5), the image dissapear. It behavior does not occur if I submit some form placed in the same page that refresh the page too (the method onSubmitFrom... returns this ). I have debugged the code and everything works fine, do you have any idea about this behavior? Thanks!! -- David Germán Canteros 2011/3/11 Rich M rich...@moremagic.com Thanks everyone for the responses so far, conceptually I think this is coming together for me. So, I'm glad the context path was not a good idea, it felt dirty from the beginning. Avoiding that, there are two main options: use the database to store/retrieve the images, or use a configured system folder from where I can load/save files with Java IO. Regardless of the option chosen there, the image file will be captured as an InputStream and returned as a StreamResponse in some form to a page/component. As far as linking the StreamResponse to an HTML IMG tag, I believe I understand the various options presented here. LLTYK suggests using an EventLink. I was looking through my code and found a Captcha implementation I have using a propertyExpression in the TML on the src attribute of IMG to reference a getImageLink function that returns ComponentResources.**createActionLink(image,null)**. Then there is an onImage() action handler method that returns a StreamResponse. I understand this is ActionLink and not EventLink, but I think the concept must be nearly identical. Alternately, Thiago is suggesting that instead of using ComponentResources to generate an ActionLink or EventLink, it may be easier to create a seperate Page that handles returning just a StreamResponse. In that case the EventLink can be replaced with a PageLink and using an activation context the ID for the Image can be passed to the Page so it can load the Image, build the StreamResponse, and return it. 30 minutes later Okay, the PageLink works out
Re: Uploading then displaying Images
Hi I have to show a image loaded from database BLOB field. I implemented Thiago's suggestion, I have created a page with the following code: public class ShowImagePage { @Inject private LinkSource linkSource; (...) public Link *getUploadedFile*(String imageId) { return linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); } public StreamResponse *onActivate*(String imageId) { this.filename = imageId; return new StreamResponse() { public String *getContentType*() { return contentType; } public InputStream *getStream*() throws IOException { User user = (User)_request.getSession(true).getAttribute(user); return user.getImage(); } public void *prepareResponse*(Response response) { response.setHeader(Content-Disposition, inline; filename= + filename + ((extension == null) ? : (. + extension))); } }; } } ** In the javacode of the page where i have to show the image, I injected the above page and wrote this method public Link *getImageLink*(ImageId){ return showImagewPage.getUploadedFile(imageId); } and in html code I put this: img src=${imageLInk}/ It works fine, the image is showed but when I refresh the page (with F5), the image dissapear. It behavior does not occur if I submit some form placed in the same page that refresh the page too (the method onSubmitFrom... returns this ). I have debugged the code and everything works fine, do you have any idea about this behavior? Thanks!! -- David Germán Canteros 2011/3/11 Rich M rich...@moremagic.com Thanks everyone for the responses so far, conceptually I think this is coming together for me. So, I'm glad the context path was not a good idea, it felt dirty from the beginning. Avoiding that, there are two main options: use the database to store/retrieve the images, or use a configured system folder from where I can load/save files with Java IO. Regardless of the option chosen there, the image file will be captured as an InputStream and returned as a StreamResponse in some form to a page/component. As far as linking the StreamResponse to an HTML IMG tag, I believe I understand the various options presented here. LLTYK suggests using an EventLink. I was looking through my code and found a Captcha implementation I have using a propertyExpression in the TML on the src attribute of IMG to reference a getImageLink function that returns ComponentResources.**createActionLink(image,null)**. Then there is an onImage() action handler method that returns a StreamResponse. I understand this is ActionLink and not EventLink, but I think the concept must be nearly identical. Alternately, Thiago is suggesting that instead of using ComponentResources to generate an ActionLink or EventLink, it may be easier to create a seperate Page that handles returning just a StreamResponse. In that case the EventLink can be replaced with a PageLink and using an activation context the ID for the Image can be passed to the Page so it can load the Image, build the StreamResponse, and return it. 30 minutes later Okay, the PageLink works out, great! I can see the biggest issue I was having was setting up the src attribute for IMG correctly. I was stuck thinking it was either the URL to the context path or the StreamResponse itself, rather than a link to an event or page that returns the StreamResponse. Thanks, Rich On 03/11/2011 08:08 AM, Thiago H. de Paula Figueiredo wrote: On Fri, 11 Mar 2011 09:24:35 -0300, LLTYK ll...@mailinator.com wrote: Nobody's mentioned createEventLink. That's where you get the image url, create an event link pointing to the event handler that returns the stream response. I haven't mentioned it because my preferred approach is to create a page just for returning StreamResponses. It's more reusable, as it can be used to serve images for any page, while an event must be only used inside a give page. --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Uploading then displaying Images
Hi Josh; I have already tried with PageRenderLinkSource but It has the same behavior. I did not know the difference between LinkSource and PageRenderLinkSource, thanks for the information! David -- David Germán Canteros 2011/8/5 Josh Canfield joshcanfi...@gmail.com Also. private LinkSource linkSource; This is an internal class, you should be using PageRenderLinkSource. You can replace: linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); with pageRenderLinkSource.createPageRenderLinkWithContext(DisplayImagePage.class, imageId); Josh On Fri, Aug 5, 2011 at 1:39 PM, David Canteros davidcanteros@gmail.com wrote: Hi I have to show a image loaded from database BLOB field. I implemented Thiago's suggestion, I have created a page with the following code: public class ShowImagePage { @Inject private LinkSource linkSource; (...) public Link *getUploadedFile*(String imageId) { return linkSource.createPageRenderLink(DisplayImagePage.class.getSimpleName(), false, new Object[]{imageId}); } public StreamResponse *onActivate*(String imageId) { this.filename = imageId; return new StreamResponse() { public String *getContentType*() { return contentType; } public InputStream *getStream*() throws IOException { User user = (User)_request.getSession(true).getAttribute(user); return user.getImage(); } public void *prepareResponse*(Response response) { response.setHeader(Content-Disposition, inline; filename= + filename + ((extension == null) ? : (. + extension))); } }; } } ** In the javacode of the page where i have to show the image, I injected the above page and wrote this method public Link *getImageLink*(ImageId){ return showImagewPage.getUploadedFile(imageId); } and in html code I put this: img src=${imageLInk}/ It works fine, the image is showed but when I refresh the page (with F5), the image dissapear. It behavior does not occur if I submit some form placed in the same page that refresh the page too (the method onSubmitFrom... returns this ). I have debugged the code and everything works fine, do you have any idea about this behavior? Thanks!! -- David Germán Canteros 2011/3/11 Rich M rich...@moremagic.com Thanks everyone for the responses so far, conceptually I think this is coming together for me. So, I'm glad the context path was not a good idea, it felt dirty from the beginning. Avoiding that, there are two main options: use the database to store/retrieve the images, or use a configured system folder from where I can load/save files with Java IO. Regardless of the option chosen there, the image file will be captured as an InputStream and returned as a StreamResponse in some form to a page/component. As far as linking the StreamResponse to an HTML IMG tag, I believe I understand the various options presented here. LLTYK suggests using an EventLink. I was looking through my code and found a Captcha implementation I have using a propertyExpression in the TML on the src attribute of IMG to reference a getImageLink function that returns ComponentResources.**createActionLink(image,null)**. Then there is an onImage() action handler method that returns a StreamResponse. I understand this is ActionLink and not EventLink, but I think the concept must be nearly identical. Alternately, Thiago is suggesting that instead of using ComponentResources to generate an ActionLink or EventLink, it may be easier to create a seperate Page that handles returning just a StreamResponse. In that case the EventLink can be replaced with a PageLink and using an activation context the ID for the Image can be passed to the Page so it can load the Image, build the StreamResponse, and return it. 30 minutes later Okay, the PageLink works out, great! I can see the biggest issue I was having was setting up the src attribute for IMG correctly. I was stuck thinking it was either the URL to the context path or the StreamResponse itself, rather than a link to an event or page that returns the StreamResponse. Thanks, Rich On 03/11/2011 08:08 AM, Thiago H. de Paula Figueiredo wrote: On Fri, 11 Mar 2011 09:24:35 -0300, LLTYK ll...@mailinator.com wrote: Nobody's mentioned createEventLink. That's where you get the image url, create an event link pointing to the event handler that returns the stream response. I haven't mentioned it because my preferred approach is to create a page just
Re: onActivate doubt
Hi, thank you both for the answers! I know the problem of passing userpass via url, but for the time being I can't change it. All pages ( except Login ) are protected by @RequiresAuthentication annotation of tapestry-security framework thus they are locked if you are not logged. Login page appear because I have defined the following security symbols in the Module: *configuration.add(SecuritySymbols.LOGIN_URL, /login); configuration.add(SecuritySymbols.DEFAULTSIGNINPAGE, /login); configuration.add(SecuritySymbols.SUCCESS_URL, /Index); configuration.add(SecuritySymbols.UNAUTHORIZED_URL, /Unauthorized);* My doubt was the onActivate() method behavior. Why was the page loaded and wasn't onActivate launched? Do you think the way that the page was invoked ( implicitly) causes the behavior?. I will try nillehammer's suggestion, and I'll have a look at jumpstart as well. Thank you again! David -- David Germán Canteros 2011/7/29 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 29 Jul 2011 19:58:40 -0300, David Canteros davidcanteros@gmail.com wrote: I have to implement an automatic login on my tap application. I use tap 5.2.6 and tapestry-security 0.3.1. Initially I had a Login page with a login form, but now I have to pass the username and password to the login page via url, like this: *http://localhost:8080/**MyAppName/login?usr=userName** pass=encryptedPass*http://localhost:8080/MyAppName/login?usr=userNamepass=encryptedPass* I'd never, ever, ever do that. It can open your application to replay attacks. The problem is: If I write http://localhost:8080/**MyAppName/http://localhost:8080/MyAppName/ in my browser and hit enter, then the login page appear, but it doesn't execute onActivate() method! So I can't redirect to the external page. But if I write http://localhost:8080/**MyAppName/loginhttp://localhost:8080/MyAppName/login the method is executed. Anybody know why?? MyAppName is the context, so http://localhost:8080/**MyAppName/http://localhost:8080/MyAppName/is requesting the Index page of your application. Your login page has URL /login, so what you're seeing is absolutely correct, expected behavior. I thought that onActivate is always executed when a page is called. It's only executed in the page that was requested. If you want to implement something that is executed in every page, search for ComponentRequestFilter in the mailing list or look here: http://jumpstart.** doublenegative.com.au/**jumpstart/examples/** infrastructure/protectingpageshttp://jumpstart.doublenegative.com.au/jumpstart/examples/infrastructure/protectingpages -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
onActivate doubt
Hello: First of all thanks for your help, I read the mails every day and I always take something useful for my tap applications. I have to implement an automatic login on my tap application. I use tap 5.2.6 and tapestry-security 0.3.1. Initially I had a Login page with a login form, but now I have to pass the username and password to the login page via url, like this: *http://localhost:8080/MyAppName/login?usr=userNamepass=encryptedPass* If I try to enter writing http://localhost:8080/MyAppName/; then I have to redirect to an external page (This is a client requirement). Now I catch the usr and pass in.onActivate() method and here I execute the following logic: *@ActivationRequestParameter(usr) private String usr; @ActivationRequestParameter (pass) private String pass; Object onActivate(){ Object nextpage; if (usr!=null pass!=null){ if(doLogin(usr, pass){ nextPage = Index; } else { nextPage= LoginErrorPage; } } else { nextPage= new URL ExternalPage; } }* The problem is: If I write http://localhost:8080/MyAppName/; in my browser and hit enter, then the login page appear, but it doesn't execute onActivate() method! So I can't redirect to the external page. But if I write http://localhost:8080/MyAppName/login; the method is executed. Anybody know why?? I thought that onActivate is always executed when a page is called. Thanks!! David -- David Germán Canteros
Re: [ANN] Tapestry-breadcrumbs version 1.4 is released
Now works. Nice component! Thanks! David 2011/6/23 Joakim Olsson joa...@unbound.se Hi, My bad. You need this in the page/layout-class as well: @Property private BreadCrumbInfo breadCrumb; I'll update the readme. Regards, Joakim On Thu, Jun 23, 2011 at 4:35 PM, David Canteros davidcanteros@gmail.com wrote: Hello! I would like to test your component, I followed the instructions from https://github.com/argoyle/tapestry-breadcrumbs but i get an exception: *Exception assembling root component of page Index: Could not convert 'breadCrumb' into a component parameter binding: Exception generating conduit for expression 'breadCrumb': Class org.example.pages.Index does not contain a property (or public field) named 'breadCrumb'.* Index.class is the page class where I want to place the trail. Is there anything else besides the @BreadCrums annotation that i have to add to the page class? I'm using tapestry 5.2.5. Thanks for you help! David 2011/6/19 Joakim Olsson joa...@unbound.se Gaah...Of course. It's on GitHub: https://github.com/argoyle/tapestry-breadcrumbs /Joakim On Sun, Jun 19, 2011 at 8:16 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: Always link to your project page! Kalle On Sun, Jun 19, 2011 at 10:19 AM, Joakim Olsson joa...@unbound.se wrote: Hi, I just released version 1.4 of tapestry-breadcrumbs. The only change is regarding how the dispatcher is added to the master dispatcher. Previously I added it with before:PageRender but that made it pick up assets and component events as well as page renders so I have changed it to after:ComponentEvent,before:PageRender. Regards, Joakim - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANN] Tapestry-breadcrumbs version 1.4 is released
Hello! I would like to test your component, I followed the instructions from https://github.com/argoyle/tapestry-breadcrumbs but i get an exception: *Exception assembling root component of page Index: Could not convert 'breadCrumb' into a component parameter binding: Exception generating conduit for expression 'breadCrumb': Class org.example.pages.Index does not contain a property (or public field) named 'breadCrumb'.* Index.class is the page class where I want to place the trail. Is there anything else besides the @BreadCrums annotation that i have to add to the page class? I'm using tapestry 5.2.5. Thanks for you help! David 2011/6/19 Joakim Olsson joa...@unbound.se Gaah...Of course. It's on GitHub: https://github.com/argoyle/tapestry-breadcrumbs /Joakim On Sun, Jun 19, 2011 at 8:16 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: Always link to your project page! Kalle On Sun, Jun 19, 2011 at 10:19 AM, Joakim Olsson joa...@unbound.se wrote: Hi, I just released version 1.4 of tapestry-breadcrumbs. The only change is regarding how the dispatcher is added to the master dispatcher. Previously I added it with before:PageRender but that made it pick up assets and component events as well as page renders so I have changed it to after:ComponentEvent,before:PageRender. Regards, Joakim - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pentaho Reporting integration - SOLVED
Hi I had the same problem but with ETL integration and i solved in the same way that you. There are a lot of jars to add, but it works too. Thanks! David 2011/5/27 atcach atc...@gmail.com Had to manually include every file from the pentaho's artifactory and that worked ok. Regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pentaho-Reporting-integration-tp4419907p4431642.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: A new T5 site! www.bookmarkerpro.com
Thanks! I'm working with Tapestry about a year ago and I agree that it is a very nice framework, but my collegues are not pretty convinced of that and prefer traditional frameworks. This real sites help a lot, it should be more shown in tapestry main website or in the wiki. I'm from Argentina. Best regards! David 2011/5/25 Joel Halbert j...@su3analytics.com Exactly (what Thiago and Bob said!). I'm aware that Tapestry isn't as widely adopted as it should be, despite being a great framework that we've enjoyed using, and (I think) it's always nice to see what others have been doing with the technology (I would post it to the Tapestry wiki, but this requires an ICLA which requires me to print out and post a form so haven't quite managed to get around to that yet...!) For what it's worth this is now our 3'rd T5 based site, dating back to 2008. On Wed, 2011-05-25 at 08:46 -0300, Thiago H. de Paula Figueiredo wrote: On Wed, 25 May 2011 06:47:57 -0300, George Banus georgeba...@gmail.com wrote: Wao, what a brilliant idea to gain some popularity for your site. What do you mean by you use Tapestry for the backend? Tapestry is a front end technology. I think people doing their site with PHP can also come here in the future and mention just the Tapestry keyword and qualify for free advert for their site. That's easy and free as in beer! :-) Actually, this kind of post is welcome. Tapestry is a very nice Java web framework, but unfortunately it isn't very popular. Many times we had people posting a message asking for live websites using Tapestry so they can convince their bosses to use it. (p.s. Thiago - should be OK in Opera too, but let me know if not!) Cool! I'll test it. :) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org