Re: StreamResponse for small cacheable images
that works, thanks. the component approach generates different urls for the same photo depending on which page the component is used, maybe some other approach that can create a unique url regardless pages? http://localhost:8080/test123.memimg:image/image1 http://localhost:8080/testxyz.memimg:image/image1 -- View this message in context: http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755p5715775.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: StreamResponse for small cacheable images
here is the code I'm trying to come out, ImageResponse derived from StreamResponse, the issue now is, the img url is always the same for every photo: http://localhost:8080/test123.memimg:image tml: < img t:type="MemImg" image_name='literal:image1' / > java: @SupportsInformalParameters public class MemImg { @Inject private ComponentResources resources; @Inject private Response response; @Parameter(required = true) private String image_name; boolean beginRender(MarkupWriter writer) { writer.element("img", "src", getImage()); resources.renderInformalParameters(writer); writer.end(); return false; } Link getImage() { return resources.createEventLink("Image"); } private StreamResponse onImage() { return new ImageResponse(image_name); } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755p5715763.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: StreamResponse for small cacheable images
it's not static, but some small photos that are kept just for a short time. -- View this message in context: http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755p5715762.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
StreamResponse for small cacheable images
Hi, I have some very small jpegs that are kept in the file system, what is the right method to render them to client and it can also be cached in the browser? I'm looking at StreamResponse, is it the right way to go? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755.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: redirecting in the same page class
https://issues.apache.org/jira/browse/TAP5-1990 -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525p5715567.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: redirecting in the same page class
could have been nice if setAnchor returns Link instead of void so we can have: return renderLinkSource.createPageRenderLinkWithContext(MyClass.class, code).setAnchor(entry) Howard Lewis Ship wrote > > The Link object already has a setAnchor() method. It's called OO > Design, people :-) > > > -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525p5715559.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: redirecting in the same page class
cool, most of time t5 already got something ahead of my poor imagination, thanks. Howard Lewis Ship wrote > > The Link object already has a setAnchor() method. It's called OO > Design, people :-) > > Also note that the server *never sees* the anchor; that stays on the > client and is not part of the HTTP GET/POST request in any way. It is > not accessible. > > -- > 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-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525p5715558.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: redirecting in the same page class
right, might be nice if PageRenderLinkSource can add another two methods: createPageRenderLinkWithContextAndAnchor createPageRenderLinkWithAnchor the use case is, say you are converting your app into Backbonejs based, you might like to redirect: /mypage/0001 to /mypage#0001 and you would like to keep the old link as well. -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525p5715541.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: redirecting in the same page class
turned out, T5 already has this: Link lnk = renderLinkSource.createPageRenderLinkWithContext(Mypage.class, code); lnk.setAnchor(entry); return lnk -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525p5715529.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
redirecting in the same page class
Hi, I have a page class(mypage) with two methods: #1. Object onActivate(String code) #2. Object onActivate(String code, String entry) so I can pass localhost:8080/mypage/0001/#entry, this matches method #1, I'd like that method #2 will redirect it to method #1 using code and entry, so : /mypage/0001/entry will redirect to /mypage/0001/#entry possible? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-in-the-same-page-class-tp5715525.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: combining scripts
hi, location of JS is: webapp/js/jquery-1.7.1.js to compare, WEB-INF is in: webapp/WEB-INF to load something from WEB-INF during run time, I do: globals.getServletContext().getResourceAsStream("/WEB-INF/param.txt") Here is the class: public class JS_stack implements JavaScriptStack { private final AssetSource assetSource; public JS_stack(AssetSource assetSource) { this.assetSource = assetSource; } public List getStacks() { return null; } public List getJavaScriptLibraries() { List ret = new ArrayList(); ret.add(assetSource.getUnlocalizedAsset("context:/js/jquery-1.7.1.js")); return ret; } public List getStylesheets() { return null; } public String getInitialization() { return null; } } Here is the code in AppModule, it is at end: @Contribute(JavaScriptStackSource.class) public static void addMyStack (MappedConfiguration configuration) { configuration.addInstance("my_js_stack", JS_stack.class); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/combining-scripts-tp5715446p5715488.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: combining scripts
Thanks for the help, I tried : ret.add(assetSource.getUnlocalizedAsset("context:/js/jquery-1.7.1.js")); but still get this error: Caused by: java.lang.NullPointerException at org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.addAssetsFromStack(JavaScriptSupportImpl.java:299) at org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importStack(JavaScriptSupportImpl.java:340) at org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:248) at org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importJavaScriptLibrary(JavaScriptSupportImpl.java:237) at $JavaScriptSupport_12aab93a5a38b002.importJavaScriptLibrary(Unknown Source) at $JavaScriptSupport_12aab93a5a38ae0f.importJavaScriptLibrary(Unknown Source) at org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:53) at org.apache.tapestry5.internal.transform.ImportWorker$1.work(ImportWorker.java:50) at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:66) at org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:30) -- View this message in context: http://tapestry.1045711.n5.nabble.com/combining-scripts-tp5715446p5715481.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: [ANNOUNCEMENT] tapestry-routing 0.0.4 with locale support and rememberme with rolling tokens
tapestry-routing is interesting, can it be used in place of PageRenderLinkTransformer? -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANNOUNCEMENT-tapestry-routing-0-0-4-with-locale-support-and-rememberme-with-rolling-tokens-tp5715473p5715476.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: combining scripts
i tried without context as well: ret.add(assetSource.getContextAsset("/js/jquery-1.7.1.js", null)); also this: ret.add(assetSource.getContextAsset("js/jquery-1.7.1.js", null)); not working too -- View this message in context: http://tapestry.1045711.n5.nabble.com/combining-scripts-tp5715446p5715474.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: combining scripts
Hi, got the point, so I'm trying to add a js stack, but seems not getting the location right: this is what I did with Import: @Import(library = {"context:/js/jquery-1.7.1.js"... but in the JavascriptStack: ret.add(assetSource.getContextAsset("context:/js/jquery-1.7.1.js", null)); // not working ret.add(assetSource.getContextAsset("js/jquery-1.7.1.js", null)) // not working ret.add(assetSource.getContextAsset("/js/jquery-1.7.1.js", null)); // not working -- View this message in context: http://tapestry.1045711.n5.nabble.com/combining-scripts-tp5715446p5715469.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: combining scripts
Hi, Thanks for the quick response, as the program come from old version of Tapestry 5, we use only @Import, what 's the difference between JavaScriptStack and scripts loaded from @Import? and how we can put them together? Thanks, -- View this message in context: http://tapestry.1045711.n5.nabble.com/combining-scripts-tp5715446p5715450.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
combining scripts
Hi, I set this: configuration.add("tapestry.combine-scripts", "true"); and use @Import(library to include scripts, but i can see the scripts not combined in my page source like: "/assets/d83ba0cccf5d1e11/stack/en/core.js" type="text/javascript">
loading order of javascripts
Hi, I have this order of loading: @Import(library = {"context:/js/jquery-1.7.1.js"}) public class Layout { } @Import(library = {"context:/js/page_view.js"}) public class page_view { } page_view extends from Layout template, in the final page html source, page_view.js is always ahead of jquery-1.7.1.js, is there a way to re-order this? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/loading-order-of-javascripts-tp5715313.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: AjaxResponseRenderer help
the template is here: < a t:type="eventLink" t:parameters="prop:{'mode':${current}}" t:id="UpdateOff" >Turn it off< /a> -- View this message in context: http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295p5715307.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: AjaxResponseRenderer help
I use only '@Inject Block block1, block2', then define Zone in the template to fold a block, what's the difference '@InjectComponent private Zone zone1'? Taha Hafeez wrote > > You can't. You can specify one and then use AjaxResponseRenderer to add > more zones to it. > > Refresh > > @InjectComponent > private Zone zone1; > > @InjectComponent > private Zone zone2; > > @Inject > private AjaxResponseRenderer ajaxResponseRenderer; > > onSomeEvent(){ >ajaxResponseRenderer.addRender("zone2", zone2); >return zone1.getBody(); > } > > > > On Aug 12, 2012, at 7:00 PM, Angelo C. wrote: > >> How to specify two zones in a event link? >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295p5715301.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295p5715306.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: AjaxResponseRenderer help
That works, now, I'd like to put this eventLink in a loop: Turn it off but got: Component Test123 already contains a child component with id 'UpdateOff'. Embedded component ids must be unique (excluding case, which is ignored). any fix to this? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295p5715305.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: AjaxResponseRenderer help
How to specify two zones in a event link? -- View this message in context: http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295p5715301.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: calling some functions from javascript
Hi, I got some very old code working, turned out quite tedious, maybe T5.3.4 has some easier way? here is the code public String getUpdateLink() { return resources.createEventLink("action").toAbsoluteURI(); } public void action() { String name = requestGlobals.getRequest().getParameter("name"); } < input t:type="Checkbox" onchange="update('123')" /> -- View this message in context: http://tapestry.1045711.n5.nabble.com/calling-some-functions-from-javascript-tp5715291p5715298.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
AjaxResponseRenderer help
Hi, I am trying out AjaxResponseRenderer to update multiple zones in a page, here is the code: java: @Inject private AjaxResponseRenderer ajaxResponseRenderer; @Inject Block redBlock; @Inject Block blueBlock; @Component(parameters = {"event=ModeUpdate"}) private EventLink UpdateOff; public void onModeUpdate(@RequestParameter("mode") String value) { ajaxResponseRenderer.addRender("zone1", redBlock); ajaxResponseRenderer.addRender("zone2", blueBlock); } here is the template: < a t:type="eventLink" t:parameters="prop:{'mode':'off'}" t:id="UpdateOff">Turn it off< /a> red blue I was hoping if I click the link above, zone1 and zone2 got updated, but not the case, I'm getting this error: Page must be specified before initializing for partial page render. What I'm missing here? thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/AjaxResponseRenderer-help-tp5715295.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
calling some functions from javascript
Hi, I got a page class, and in the tml I have a javascript function that will call a function in the page class, and the function will return a json object to the javascript, any tips on how to achieve this? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/calling-some-functions-from-javascript-tp5715291.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: Tapestry5 vs Vaadin
Hi Taha, I agree with almost all except the testability, maybe it's my fault not knowing how to structure the app to be testable, for now, I test only in the service/class level, very difficult to test the app/page level with those IOC things. angelo Taha Hafeez wrote > > Hi > > You are not going to get a fair comparison in a tapestry mailing list :). > Try it on stack-overflow. > > IMHO tapestry-jquery has a lot of components and you can easily create a > new one . Also tapestry is a lot more than set of components. The power of > class-reloading, class transformations, mixins, testability, inbuilt IOC > etc can't be ignored. > > regards > Taha > > On Aug 12, 2012, at 12:14 AM, lukaszkaleta wrote: > >> The question is what you need more: >> 1. RichClient like application on the web - then you can go with vaadin, >> since it has many build in components >> 2. If you look for good perfomnace in faver of rich components then >> tapestry >> is better choice IMHO >> >> I used vaadin for administrative application, the performance was not so >> important. >> Together with Google Guice as IoC it was nice combination. >> >> Tapestry has build in own IoC, but integrating Spring is very easy too. >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Tapestry5-vs-Vaadin-tp5715273p5715274.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry5-vs-Vaadin-tp5715273p5715282.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
multiple actionlink with same ID in one page
Hi, say I have a code: void onActionFromUpdateMode(String mode) { System.out.println(mode); } then I'd like to have this in the page: switch off switch mode but I got this error: Embedded component ids must be unique, any help? thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/multiple-actionlink-with-same-ID-in-one-page-tp5715216.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
adding border-radius to t:grid
Hi, I'd like the table come out from t:grid rounded, is there a way to add? I tried following, does not work: div.t-data-grid { border-radius:5px; } Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/adding-border-radius-to-t-grid-tp5715209.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
tapestry5 double form submit handled?
Hi, Does t5 handle double submit issues? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry5-double-form-submit-handled-tp5715083.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: Loop and starting index
Brilliant idea, it works. i have to remove 'literal:' to make it work. thanks for the tip. Taha Hafeez wrote > > One solution will be > > > ${row}.. > > > > ${row} > > > > @Property > private int index; > > public Item getRow(){ >return myList.get(index); > } > > regards > Taha > > On Aug 3, 2012, at 7:29 AM, Angelo C. wrote: > >> I have this list of 10, and I need to have two loops for two tables in >> the >> page, one is from 1 to 5 and another is 6 to 10, side by side, my >> approach >> now is two functions getRows1() and getRows2(), so the list is splited in >> code, was just thinking maybe Loop has this feature? >> >> >> Thiago H de Paula Figueiredo wrote >>> >>> On Thu, 02 Aug 2012 22:15:35 -0300, Angelo C. <angelochen960@> >>> wrote: >>> >>>> Hi, >>> >>> Hi! >>> >>>> Can component loop have a starting index? say I have a source of 10, >>>> and >>>> I'd like to loop from 1 to 5, and another Loop from 6 to 10, possible? >>> >>> What are you trying to do? The Loop's index parameter always starts from >>> 0 >>> and it's not possible to change that, but it's very, very easy to have a >>> getRealIndex() (or any other method name) that returns the index summed >>> with some offset. >>> >>> -- >>> Thiago H. de Paula Figueiredo >>> >>> - >>> To unsubscribe, e-mail: users-unsubscribe@.apache >>> For additional commands, e-mail: users-help@.apache >>> >> >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014p5715019.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014p5715023.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: Loop and starting index
I have this list of 10, and I need to have two loops for two tables in the page, one is from 1 to 5 and another is 6 to 10, side by side, my approach now is two functions getRows1() and getRows2(), so the list is splited in code, was just thinking maybe Loop has this feature? Thiago H de Paula Figueiredo wrote > > On Thu, 02 Aug 2012 22:15:35 -0300, Angelo C. <angelochen960@> > wrote: > >> Hi, > > Hi! > >> Can component loop have a starting index? say I have a source of 10, and >> I'd like to loop from 1 to 5, and another Loop from 6 to 10, possible? > > What are you trying to do? The Loop's index parameter always starts from 0 > and it's not possible to change that, but it's very, very easy to have a > getRealIndex() (or any other method name) that returns the index summed > with some offset. > > -- > Thiago H. de Paula Figueiredo > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014p5715019.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
Loop and starting index
Hi, Can component loop have a starting index? say I have a source of 10, and I'd like to loop from 1 to 5, and another Loop from 6 to 10, possible? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/Loop-and-starting-index-tp5715014.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
Iterating a map in template
Hi, I'm trying to iterate a map in template with following code, but, it turns out that the entire map is only one row, I'm sure I have made something wrong, can anybody point it out? Thanks, template: ${count} code: @Property private Map count; @Cached public Map getCounts() { return cnts; } private static TreeMap cnts = new TreeMap(); static { cnts.put(1, "ITEM1"); cnts.put(2, "ITEM2"); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Iterating-a-map-in-template-tp5715010.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
component parameter coercion
hi, trying to pass a literal to a component hoping it can do a coercion, here is the code: public class IfGroup { @Parameter(required = true) private Group context; Object beginRender() { } } this works as 'tesGroup' is a property in the page: hello but this one will not: hello Could not find a coercion from type java.lang.String to type org.sample.entities.Group. How to make this work? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/component-parameter-coercion-tp5714988.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: redirecting to a class with parameter
it's an external url, i found out it can be done this way: new URL("http://sample.com?type='123'") Taha Hafeez wrote > > What is url ? Is it a tapestry page or event. > > For page you can use PageRenderLinkSource#createPageRenderLinkWithContext > and for event you can use ComponentResources#createEventLink... > > > On Aug 2, 2012, at 9:10 AM, Angelo C. wrote: > >> thanks for the fast answer, it works, in a related question, if I have >> something like this: >> URL u = new URL(url); >> how to add some query parameters? >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/redirecting-to-a-class-with-parameter-tp5714980p5714982.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-to-a-class-with-parameter-tp5714980p5714985.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: redirecting to a class with parameter
thanks for the fast answer, it works, in a related question, if I have something like this: URL u = new URL(url); how to add some query parameters? -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-to-a-class-with-parameter-tp5714980p5714982.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
redirecting to a class with parameter
Hi, I have a class that need to return to another class with context parameter, how? Thanks, Angelo public class Info { Object onActivate(String type) { } } @OnEvent(value = EventConstants.SUBMIT, component = "premiumForm") public Object premiumSubmit() { return Info.class; } -- View this message in context: http://tapestry.1045711.n5.nabble.com/redirecting-to-a-class-with-parameter-tp5714980.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: tweet buttons?
cool, care to share? Christian Riedel-4 wrote > > Yep, I've got one! > > Am 31.07.2012 um 00:54 schrieb Angelo C.: > >> anybody got one ? say, then expand to : >> < a href="https://twitter.com/share"; class="twitter-share-button" >> data-url="https://dev.twitter.com"; data-via="your_screen_name" >> data-lang="en">Tweet< /a> >> < script>!func .. >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898p5714900.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
tweet buttons?
anybody got one ? say, then expand to : < a href="https://twitter.com/share"; class="twitter-share-button" data-url="https://dev.twitter.com"; data-via="your_screen_name" data-lang="en">Tweet< /a> < script>!func .. -- View this message in context: http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898.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
PeriodicExecutor
Hi, I put following code to start a job, it runs every min, I'd like it to run once it is loaded, then every min, possible? thanks. @Startup public static void scheduleJobs( PeriodicExecutor executor, final Jobs jobs) { executor.addJob( new IntervalSchedule(1000L*60*60), "Job", new Runnable() { public void run() { jobs.hourlyrun(); } }); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/PeriodicExecutor-tp5714867.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: json support in template
That's a good solution, can you have a maven entry for that? also, does it handle nested json objects? Thanks, Christian Riedel-4 wrote > > This might be solved using a custom PropertyBinding and should look like > ${json:property.name}… > Challenge accepted! > > https://gist.github.com/3187796 > > > Am 27.07.2012 um 02:16 schrieb Angelo C.: > >> Hi, >> >> you have this in the code, >> >> public JSONObject getJS() { >> JSONObject js = new JSONObject(); >> js.put("name1","123"); >> return js; >> } >> >> then in the template: >> ${js.get('name1')} >> >> considering json objects are used often nowadays, possible to have a >> direct >> support in template? maybe some other prefix like: >> #{js.name1} >> >> what do you think? >> >> Angelo >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscribe@.apache >> For additional commands, e-mail: users-help@.apache >> > > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820p5714846.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
json support in template
Hi, you have this in the code, public JSONObject getJS() { JSONObject js = new JSONObject(); js.put("name1","123"); return js; } then in the template: ${js.get('name1')} considering json objects are used often nowadays, possible to have a direct support in template? maybe some other prefix like: #{js.name1} what do you think? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.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: Tapestry 5.3.4
congrats! any breaking feature from 5.3.3 to 5.3.4? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-4-tp5714512p5714584.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: Why the activate of another class got executed? T5.3.3
Finally I believe I located the problem: Chrome will fetch ahead pages while you are typing, say: localhost:8080/info/u before i finish the word update, it will show some suggestions, and in fact it already fetch the page as I can see the logs from the terminal, switching to Safari solves the problem. Howard Lewis Ship wrote > > Your template almost certainly has a hand-crafted, incorrect tag in it. > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-the-activate-of-another-class-got-executed-T5-3-3-tp5714496p5714540.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: Why the activate of another class got executed? T5.3.3
if there is a context, the problem will not come out. when I do a : http://localhost:8080/info/update the onActivate() of Register will be called first before onActivate() of Update.java. and this happens only once, if I just refresh the page, it will not happen. Thiago H de Paula Figueiredo wrote > > On Tue, 17 Jul 2012 10:38:32 -0300, Angelo C. <angelochen960@> > wrote: > >> no, i don't have. strange, one solution I can think of is, i'll create a >> Index.java. > > Isn't this another ocurrence of the assets with paths that end up matching > some page URL and then Tapestry considers it a request to that page? > What's the page activation context when the Register page onActivate() is > invoked? > > -- > Thiago H. de Paula Figueiredo > > - > To unsubscribe, e-mail: users-unsubscribe@.apache > For additional commands, e-mail: users-help@.apache > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-the-activate-of-another-class-got-executed-T5-3-3-tp5714496p5714510.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: Why the activate of another class got executed? T5.3.3
no, i don't have. strange, one solution I can think of is, i'll create a Index.java. Lance Java wrote > > Does update have a pagelink to register (in a layout perhaps?) > > From jumpstart: > When is onActivate(...) called? > The short answer is: whenever Tapestry gets a page. It can be in response > to a browser request. It can be when one page's java uses another. > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-the-activate-of-another-class-got-executed-T5-3-3-tp5714496p5714505.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: Why the activate of another class got executed? T5.3.3
when I call localhost:8080/info/update, it has nothing to do with /info/register, but register's onActivate() got called before Update.onActivate. Lance Java wrote > > In your example, you have not show how "Register" fits into the picture. > The code you have provided shows no link between > "localhost:8080/info/update" and Register. > > Perhaps jump start's onActivate / onPassivate explanation can help > http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3 > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-the-activate-of-another-class-got-executed-T5-3-3-tp5714496p5714499.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
Why the activate of another class got executed? T5.3.3
Hi, in a package, i got some files, the first one is Register.java, if I run: localhost:8080/info/update/123 this works, if I run localhost:8080/info/update Register/onActivate() will be called before Update/OnActivate(), that's quite surprising, Am I missing something here? Thanks, Angelo info/Register.java public class Register { Object onActivate() { return Base.class; } } info/Update.java public class Update { Object onActivate(String key) { // some process return Base.class; } Object onActivate() { return Base.class; } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-the-activate-of-another-class-got-executed-T5-3-3-tp5714496.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: non blocking code in T5?
that should work, any sample code applicable to t5? Muhammad Gelbana wrote > > I've been using Java's executor service lately and it's very neat. > http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html > > > It's just that I don't think it can guarantee a new thread for each > request > in case you are using per-thread scope services. > > On Wed, Jun 13, 2012 at 4:37 PM, Dmitry Gusev <dmitry.gusev@>wrote: > >> You need Java EE if you want to use Java Message Service, or you can use >> Apache TomEE which implements JMS >> (http://tomee.apache.org/tomcat-jms.html >> ) >> -- I haven't used TomEE though. >> >> Or you can implement your own queue (based on ArrayBlockingQueue, for >> instance) with consumer thread(s) which you should start manually. >> >> Both approaches have their pros and cons, though. >> >> On Wed, Jun 13, 2012 at 6:04 PM, Angelo C. <angelochen960@> >> wrote: >> >> > no, i don't need the response from the method, MS/JMS is new to me, can >> it >> > be >> > used even I 'm not using Java EE? >> > >> > >> > Dmitry Gusev wrote >> > > >> > > Do you plan to consume method's response in the same request? >> > > >> > > If not, some sort of MQ/JMS may be an option--just put your message >> there >> > > and return. >> > > The message itself will be processed in separate thread with MQ >> handler >> > > (Message-Driven Bean in case of Java EE). >> > > >> > > Dmitry Gusev >> > > >> > > AnjLab Team >> > > http://anjlab.com >> > > >> > >> > >> > -- >> > View this message in context: >> > >> http://tapestry.1045711.n5.nabble.com/non-blocking-code-in-T5-tp5713836p5713841.html >> > Sent from the Tapestry - User mailing list archive at Nabble.com. >> > >> > - >> > To unsubscribe, e-mail: users-unsubscribe@.apache >> > For additional commands, e-mail: users-help@.apache >> > >> > >> >> >> -- >> Dmitry Gusev >> >> AnjLab Team >> http://anjlab.com >> > > > > -- > *Regards,* > *Muhammad Gelbana > Java Developer* > -- View this message in context: http://tapestry.1045711.n5.nabble.com/non-blocking-code-in-T5-tp5713836p5713846.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: non blocking code in T5?
no, i don't need the response from the method, MS/JMS is new to me, can it be used even I 'm not using Java EE? Dmitry Gusev wrote > > Do you plan to consume method's response in the same request? > > If not, some sort of MQ/JMS may be an option--just put your message there > and return. > The message itself will be processed in separate thread with MQ handler > (Message-Driven Bean in case of Java EE). > > Dmitry Gusev > > AnjLab Team > http://anjlab.com > -- View this message in context: http://tapestry.1045711.n5.nabble.com/non-blocking-code-in-T5-tp5713836p5713841.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
non blocking code in T5?
hi, Got this situation, for every request, I need to call a function of a service, if I understand it, this is a 'blocking' code, the flow will continue only when the function returns, solution that I can think of is, create a thread, and let it run, but considering so many requests can happen in the same time, this might be quite costly, any better suggestion? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/non-blocking-code-in-T5-tp5713836.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
global variable concurrent access in different services
Hi, This is a situation, in a PageRenderRequestFilter my app need to access a global String variable, and this global variable is updated every hour in a PeriodicExecutor, any suggestion how to do this? will there be a conflict in accessing this variable? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/global-variable-concurrent-access-in-different-services-tp5713602.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
PageRenderRequestFilter
Hi, is this the correct way of hooking a PageRenderRequestFilter ? It works for a few hours, then the app simply stops responding after a few thousands of counts: public class CountRequestFilter implements PageRenderRequestFilter { final private RedisService redisService; public CountRequestFilter(RedisService redisService) { this.redisService = redisService; } public void handle(PageRenderRequestParameters pageRenderRequestParameters, PageRenderRequestHandler pageRenderRequestHandler) throws IOException { /* do some logging here */ pageRenderRequestHandler.handle(pageRenderRequestParameters); } } in AppModule.java binder.bind(RedisService.class, RedisServiceImpl.class); @Inject private RedisService redisService; public void contributePageRenderRequestHandler(OrderedConfiguration configuration) { configuration.add("CountRequestFilter", new CountRequestFilter(redisService) ); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/PageRenderRequestFilter-tp5713578.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 and Redis
Jedis has a pool, maybe it can be implemented as Hibernate. Is there anybody using Redis with T5 and how? Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-and-Redis-tp5713546p5713552.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
T5 and Redis
Hi, I'm trying to use Redis' Jedis client in T5, following this link: http://spreadthesource.com/2010/11/bringing-realtime-to-your-java-applications-with-websockets-nodejs-redis-tapestry-5/ I'd like to have one connection to redis per request, following is the Redis service code, problem is, after every request, the count of connected clients increase, maybe something wrong with my code? not disconnecting? thanks for any hints: @Scope(value = ScopeConstants.PERTHREAD) public class RedisServiceImpl implements RedisService { private Jedis jedis; public RedisServiceImpl() { this.jedis = new Jedis("localhost"); } public void add(String key, int count) { this.jedis.set("test", String.valueOf(count)); } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-and-Redis-tp5713546.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
counting visitors
Hi, Is there a simple way to plug in a function to count number of vistors to various pages? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/counting-visitors-tp5713527.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: deploy t5 war under jetty
thanks, actually I got it running a few months ago, the server restarted, and I can not remember how I did it last time, basically, it was in a screen session, then I run java -jar start.jar and myapp.war, i forgot the details, any idea how to do it this way? -- View this message in context: http://tapestry.1045711.n5.nabble.com/deploy-t5-war-under-jetty-tp5713524p5713526.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
deploy t5 war under jetty
Hi, Got a t5 app running inside IDE, now I need to deploy it into a server without tomcat, but i can run jetty, how to do this? thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/deploy-t5-war-under-jetty-tp5713524.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
accessing json properties in template
Hi, say I got a json object in the java side, and how to render its properties in the template? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/accessing-json-properties-in-template-tp5713500.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
getting asset path in 5.3.3
Hi, In 5.3, this is how to get asset path: RequestConstants.ASSET_PATH_PREFIX in 5.3.3, how? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/getting-asset-path-in-5-3-3-tp5713480.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: AssetProtectionDispatcher for 5.3.3?
It runs, but seems css, js are blocked, here is my old code that works with 5.2: public void contributeRegexAuthorizer(Configuration conf) { conf.add("^.*\\.png$"); conf.add("^.*\\.jpg$"); conf.add("^.*\\.jpeg$"); conf.add("^.*\\.js$"); conf.add("^.*\\.swf$"); conf.add("^.*\\.gif$"); conf.add("^.*\\.ico$"); conf.add("^.*\\.css$"); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetProtectionDispatcher-for-5-3-3-tp5713443p5713462.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: AssetProtectionDispatcher for 5.3.3?
hi robert, thanks, will try this out, but what is "extended paths"? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetProtectionDispatcher-for-5-3-3-tp5713443p5713458.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
TAP5-1779 and ASSET_PATH_PREFIX
Hi, Lenny Primak has this jira for the security issue in 5.3: https://issues.apache.org/jira/browse/TAP5-1779 and he got a fix that works very well in 5.3, it uses a constant ASSET_PATH_PREFIX, but this does not work any more in 5.3.3 as the latter does not have ASSET_PATH_PREFIX, any fix to this? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/TAP5-1779-and-ASSET-PATH-PREFIX-tp5713447.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
AssetProtectionDispatcher for 5.3.3?
Hi, Do we have Robert's AssetProtectionDispatcher for 5.3.3? thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetProtectionDispatcher-for-5-3-3-tp5713443.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: subdoamin when https else root, possible?
right, I was thinking maybe there is a simpler solution. then again, that requirement looks good to me, when a viewer sees: https://safe.sample.com instead of https://sample.com, that make him feel better:) -- View this message in context: http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4599336.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: subdoamin when https else root, possible?
not sure if that applicable in my case. let me explain a little more, with my BaseURLService: 1. In the www.sample.com/view, login page's link is: https://www.safe.sample.com/login, that's what I want. 2. When you are in the login page, view page's link become: http://www.safe.sample.com/view, i want it to be http://www.sample.com/view ? -- View this message in context: http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4599062.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
subdoamin when https else root, possible?
Hi, I use @secure on some pages(login, setup, etc), with following BaseURL service, it works well. now, there is this new requirement, when in https mode, the domain should be a subdomain: safe.sample.com not a root domain, sample.com, this cause problems to existing pages, example, a non @secure page View become http://www.safe.sample.com/view, instead of http://www.sample.com/view solutions? Angelo public static void contributeAlias(Configuration configuration) { BaseURLSource source = new BaseURLSource() { public String getBaseURL(boolean secure) { String protocol = secure ? "https" : "http"; int port = secure ? 8443 : 8080; return String.format("%s://www.%s", protocol, "sample.com"); } }; configuration.add(AliasContribution.create(BaseURLSource.class, source)); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/subdoamin-when-https-else-root-possible-tp4598875p4598875.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: accessing json objects posted in body from Groovy
right! that's where the data come from. rd = new BufferedReader(new InputStreamReader(requestGlobals.getHTTPServletRequest().getInputStream())); StringBuilder sb = new StringBuilder(); String line = null; while ((line = rd.readLine()) != null) sb.append(line); System.out.println(sb.toString()); -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-accessing-json-objects-posted-in-body-from-Groovy-tp4581287p4581362.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
T5: accessing json objects posted in body from Groovy
Hi, I use following Groovy code to post a json object to a T5 app: def http = new HTTPBuilder( "http://.sample.com"; ) http.request( POST, JSON ) { req -> uri.path = "updateproc/1/2/3" body = [ status : 'update!' , source : 'httpbuilder' ] requestContentType = ContentType.URLENC response.success = { resp, json -> println resp.status println json } } } in t5, how to get the one posted in the body? I can't find that info in query string and others. @Inject private RequestGlobals requestGlobals; Object onActivate() { System.out.println(requestGlobals.getHTTPServletRequest().getQueryString()); System.out.println(requestGlobals.getRequest().getParameterNames()); System.out.println(requestGlobals.getHTTPServletRequest().toString()); return getFailed(); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-accessing-json-objects-posted-in-body-from-Groovy-tp4581287p4581287.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: use of ActivationRequestParameter
hi taha, right, you and Tiago, always come to my mind when I post a question, see who answer my question:) >@ActivationRequestParameter >private String name; >as the field name is used by default >http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/annotations/ActivationRequestParameter.html#value() oh, just notice this, T5 has all this goodies that difficult to find, or not so obvious. Thanks, -- View this message in context: http://tapestry.1045711.n5.nabble.com/use-of-ActivationRequestParameter-tp4573855p4573926.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: use of ActivationRequestParameter
hi taha, seems you are online all the time:) i tried that /test/123, not working too, however I realize it should have been: /test?name=123 @ActivationRequestParameter("name") private String queryParam; that works. -- View this message in context: http://tapestry.1045711.n5.nabble.com/use-of-ActivationRequestParameter-tp4573855p4573878.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
use of ActivationRequestParameter
hi, not sure if I understand this correctly, was hoping i can do this: www.sample.com/test?123 for that I created following page class, but queryParam is always null: public class Test { @ActivationRequestParameter private String queryParam; Object onActivate() { System.out.println(queryParam); return null; } } ? -- View this message in context: http://tapestry.1045711.n5.nabble.com/use-of-ActivationRequestParameter-tp4573855p4573855.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: https and two T5 apps
i use mod_proxy in front of tomcat, does it have the same benefits of proxy_ajp? -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-https-and-two-T5-apps-tp4555456p4556392.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: https and two T5 apps
looks the way to go, but how to have this /order context in the 2nd app? in tomcat's server.xml, we need to virtual hosts pointing to two t5 apps, first one uses already Host name="safe.sample.com", how to specify another one 'safe.sample.com' with 'order' context? sorry, this is not t5 related. -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-https-and-two-T5-apps-tp4555456p418.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
t5: https and two T5 apps
Hi, I got two T5 applications, the first one: https://www.safe.sample.com:8443 Now I need to add a new one, and I need to share the same ssl certificate as the first one, so I need to use following url: https://www.safe.sample.com:8443/order can't figure out how to do this, suggestions? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-https-and-two-T5-apps-tp4555456p4555456.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: Java Magic has 10000+ hits
that's very good for a tech blog. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Java-Magic-has-1-hits-tp4530917p4530944.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: @Secure and https with subdomain
hi, if force a different host name, should it be another t5 app? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Secure-and-https-with-subdomain-tp4530831p4530924.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
T5: @Secure and https with subdomain
Hi, I have tried the @Secure, it will automatically direct to https:/sample.com/pay, now I have a special requirement, it should direct to: https://safe.sample.com/pay, any idea how to accomplish this? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Secure-and-https-with-subdomain-tp4530831p4530831.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
T5: Asset protection and 5.3.0
Hi, do we need assetProtectionDispatcher in 5.3? seems to me following not working any more com.saiwaisolutions AssetProtectionDispatcher 1.0.0 -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Asset-protection-and-5-3-0-tp4516645p4516645.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: Contributed modules to Tapestry
whatever as long as we can find it:) issue this time is, Taha has a nice module, I came across his posting before and book marked it as I know, I'd use it sometimes, but when the time comes to use, it is not there any more. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Contributed-modules-to-Tapestry-tp4514606p4516392.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: Contributed modules to Tapestry
putting it in github works, probably just a section in the tapestry.apache.org : contributed modules hosted in github with the last update date, forcing it to be in github will make locating easier. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Contributed-modules-to-Tapestry-tp4514606p4516169.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: [ANN] A Tapestry5 Based Security Module
it's a nice module, but not even posted in java magic? -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-A-Tapestry5-Based-Security-Module-tp3322452p4514269.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: [ANN] A Tapestry5 Based Security Module
Hi Taha, where to get this source code, everytime I click the link it says: 403. That’s an error. Your client does not have permission to get URL /p/tapestry-addons/ from this server. That’s all we know -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-A-Tapestry5-Based-Security-Module-tp3322452p4514233.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: Migrating to 5.3
might be more helpful by writing some new features in 5.3, example: skinning and theme support? this feature will get some users (I am one of them) goes into 5.3 immediately. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Migrating-to-5-3-tp4503774p4504698.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: Migrating to 5.3
might be more helpful by writing some new features in 5.3, example: skinning and theme support? this feature will get some users (I am one of them) goes into 5.3 immediately. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Migrating-to-5-3-tp4503774p4504697.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: RE : Trying out 5.3.0
this works. think have to replace all in the projects in order for upgrading. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Trying-out-5-3-0-tp4503041p4503355.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: RE : Trying out 5.3.0
Thanks, works this time, see those 5.3.0 jar's being downloaded, but got this: [ERROR] /Users/wcc/test_t5_3/newapp/src/main/java/com/example/newapp/components/Layout.java:[11,1] cannot find symbol [ERROR] symbol: class IncludeStylesheet [ERROR] @IncludeStylesheet("context:layout/layout.css") [ERROR] -> [Help 1] I do have another question, how to create a project in 5.3.0, following is not working: mvn -DarchetypeVersion=5.3.0 -Darchetype.interactive=false -DgroupId=com.example -DarchetypeArtifactId=quickstart -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.tapestry -Dpackage=com.example.newapp -DartifactId=newapp --batch-mode -DarchetypeRepository=https://repository.apache.org/content/repositories/orgapachetapestry-023/ archetype:generate -- View this message in context: http://tapestry.1045711.n5.nabble.com/Trying-out-5-3-0-tp4503041p4503126.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: RE : Trying out 5.3.0
Thanks, works this time, see those 5.3.0 jar's being downloaded, but got this: [ERROR] /Users/wcc/test_t5_3/newapp/src/main/java/com/example/newapp/components/Layout.java:[11,1] cannot find symbol [ERROR] symbol: class IncludeStylesheet [ERROR] @IncludeStylesheet("context:layout/layout.css") [ERROR] -> [Help 1] I do have another question, how to create a project in 5.3.0, following is not working: mvn -DarchetypeVersion=5.3.0 -Darchetype.interactive=false -DgroupId=com.example -DarchetypeArtifactId=quickstart -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.tapestry -Dpackage=com.example.newapp -DartifactId=newapp --batch-mode -DarchetypeRepository=https://repository.apache.org/content/repositories/orgapachetapestry-023/ archetype:generate -- View this message in context: http://tapestry.1045711.n5.nabble.com/Trying-out-5-3-0-tp4503041p4503127.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
Trying out 5.3.0
Hi, I updated a working 5.2.4 project's pom with following changes: apache-snapshots https://repository.apache.org/content/repositories/orgapachetapestry-023/org/apache/tapestry/ 5.3.0 but it does not pull down 5.3.0 jars, instead, it gives this: Downloading: https://repository.apache.org/content/repositories/orgapachetapestry-023/org/apache/tapestry/org/apache/tapestry/tapestry-core/5.3.0/tapestry-core-5.3.0.pom [WARNING] The POM for org.apache.tapestry:tapestry-core:jar:5.3.0 is missing, no dependency information available hints? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Trying-out-5-3-0-tp4503041p4503041.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
T5: Theming Support
Hi, T5.3.0 has Skin and Theming Support, any reference to these two great features? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Theming-Support-tp4500606p4500606.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
t5 friendly e commerce framework?
Hi, I'm looking for a java based ecommerce software which should have been easier to include some modules written in T5, any suggestions? anybody tried jadasite.com? Thanks, Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-friendly-e-commerce-framework-tp4478915p4478915.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
t5: edit a bean without beaneditform
Hi, I got a bean Person with a field name, when submit, the name is always null, why? java class: public class EditPerson { @Persist("flash") @Property private Person person; Object onActivate() { if (person != null) System.out.println(person.getName()); return null; } void onPrepareForRender() { if (person == null) person = new Person(); } } tml: Name -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-edit-a-bean-without-beaneditform-tp4382074p4382074.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
Using iframe to include a T5 page
Hi, This seems not too much related to T5, sorry. here is my situation: two t5 applications, A1 and A2, A1's pageA use iframe to include A2's pageB, and the pageB onSuccess returns new URL("http://localhost/A1/done/";); this works, the only problem is, after returning from A2, http://localhost/A1/done/ will be inside the PageA's iframe, I'd like to just go to A1/done page, any idea how to do this? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-iframe-to-include-a-T5-page-tp4380972p4380972.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: create a record from another table, what is best practice?
Hi, Thanks, but how to pass a string to prepareForRender? -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307173.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
t5: create a record from another table, what is best practice?
Hi, I have a form with email and name fields, and when the page is activated, it will retrieve an existing application, then initialize email and name, when submit is clicked, a Profile record is created in onSuccess and persisted, the following code seems not working, what is a right practice in this use case? Thanks, public class MakeProfile { @Inject private Session session; @Property private String email; @Property private String name; private Application app; void onActivate(String code_ref) { app = (Applicantion) session().createQuery("from Applicantion where code = ?").setString(0, code_ref).uniqueResult(); if (app != null) { email = app.getEmail(); name = app.getName(); } } @CommitAfter Object onSuccess() { Profile p = new Profile(); p.setEmail(email); p.setName(name); session.save(p); } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307107.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: @Import
how about this? @Import(library = {"context:ext-3.2.1/adapter/ext/ext-base.js","context:ext-3.2.1/ext-all-debug.js"}) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Import-tp4277615p4277644.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: [ANN] Tapestry5-JQuery
good, will try this in a new project. I have seen lately quite a lot of 3rd party components for t5, good news to the t5 users, thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry5-JQuery-tp4272950p4272957.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: Tapestry FileUploader Integration
very nice component, also your modalbox, how about putting all those into github? this will be easier for us to follow. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-FileUploader-Integration-tp4268987p4269518.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: [ANN] Tapestry Facebook components
hi, I like to see a simple 'hello World' facebook app in Tapestry5, is there any? Angelo -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-Facebook-components-tp3403224p4262246.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: [ANN] Tapestry Facebook components
I created an issue, actually if I can find a way to specify t:events as null, it should work, now I just modify the code to have no events at all, just a quick hack until you come out with a new one. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-Facebook-components-tp3403224p4262165.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