Suggestion on quickstart

2011-05-04 Thread Josh Kamau
Hi Team, I noted that in the documentation, the command for creating a quickstart application is as below: mvn -DarchetypeVersion=5.2.5 -Darchetype.interactive=false -DgroupId=com.example -DarchetypeArtifactId=quickstart -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.tapestry -Dpackage=com.

How can I use dashes instead of underscores in url's for page names?

2011-05-04 Thread marcanti
Hello, I would like to use "-" instead of "_" in my tapestry page url's, how can I do that? I know that Java classes cannot have "-" in the name, but it would be easy for Tapestry to replace them with "_". Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-can-I-u

Re: Tapestry 5.2.5: does not contain a property (or public field) named

2011-05-04 Thread cablepuff
Thanks. That was the problem. i use imageBasePath in html and now works. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-5-does-not-contain-a-property-or-public-field-named-tp4367257p4371470.html Sent from the Tapestry - User mailing list archive at Nabble.co

Re: T5: this is cool - composition over inheritance

2011-05-04 Thread Howard Lewis Ship
On Wed, May 4, 2011 at 11:42 AM, Thiago H. de Paula Figueiredo wrote: > I wouldn't call this composition (IMHO it's a class transformation), but > this is really cool and shows how flexible, reusable and all-around awesome > Tapestry is. :) Semantics. The class transformation, informed by the an

Re: Request getRequestURL method

2011-05-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 May 2011 16:25:18 -0300, Tim Koop wrote: To answer my own question, this works: @Inject private RequestGlobals requestGlobals; javax.servlet.http.HttpServletRequest request = requestGlobals.getHTTPServletRequest(); Better yet: @Inject private HttpServletRequest

Re: Request getRequestURL method

2011-05-04 Thread Tim Koop
To answer my own question, this works: @Inject private RequestGlobals requestGlobals; javax.servlet.http.HttpServletRequest request = requestGlobals.getHTTPServletRequest(); Tim Koop t...@timkoop.com www.timkoop.com On 04/05/201

Re: Request getRequestURL method

2011-05-04 Thread Adam Zimowski
Hi Tim - You can @Inject RequestGlobals and then call getHTTPServletRequest() from it. Adam On Wed, May 4, 2011 at 2:06 PM, Tim Koop wrote: > I'm using some third party Java code that wants to call > request.getRequestURL() where request is a > javax.servlet.http.HttpServletRequest instance.  I

Request getRequestURL method

2011-05-04 Thread Tim Koop
I'm using some third party Java code that wants to call request.getRequestURL() where request is a javax.servlet.http.HttpServletRequest instance. I know enough to put @Inject private org.apache.tapestry5.services.Request request; in my page Java file, but for some reason org.apache.

Re: T5: this is cool - composition over inheritance

2011-05-04 Thread Thiago H. de Paula Figueiredo
I wouldn't call this composition (IMHO it's a class transformation), but this is really cool and shows how flexible, reusable and all-around awesome Tapestry is. :) On Wed, 04 May 2011 15:34:48 -0300, Adam Zimowski wrote: Another lovely day with Tapestry! Inspired by Taha's blog entry o

T5: this is cool - composition over inheritance

2011-05-04 Thread Adam Zimowski
Another lovely day with Tapestry! Inspired by Taha's blog entry on Tapestry Magic, our app instead of this mess: public class OrderHistoryPage extends AuthenticatedPage looks sexy like never before with this: @RequiresLogin(ssoClass= UserUiBean.class, pageClass= Login.class) public class OrderHi

Re: Creating direct download links to files

2011-05-04 Thread LLTYK
Huh, wget has a bug in it where it ignores the Content-Dispostion. https://bugzilla.redhat.com/show_bug.cgi?id=239351 But that would only result in weird filenames being saved. You seem to be not streaming it right. Or maybe something inbetween is dropping the parameters. -- View this message in

Re: tapestry-security users: are you using shiro.ini?

2011-05-04 Thread Andrey Larionov
Please, remove this odd config file On Tue, May 3, 2011 at 02:19, ael wrote: > i cannot understand what is the use of shiro.ini > when you can put all of your users in the database. > > For me shiro.ini is an old style. > > Just my opinion :) > > -- > View this message in context: > http://tapes

Re: automatically add a js library to every page in the app

2011-05-04 Thread Clément Uster
I guess you can override the js stack core from your AppModule. public static void contributeJavaScriptStackSource(MappedConfiguration configuration) { configuration.overrideInstance(InternalConstants.CORE_STACK_NAME, YourJavaScriptStack.class); } and imple

Re: Redirect throws NullPointerException

2011-05-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 May 2011 13:29:20 -0300, Tim Koop wrote: @Inject private Response response; public void pageAttached() { try { response.sendRedirect("http://www.timkoop.com/";); } catch (IOException e) { System.out.println("redirection exce

Re: Redirect throws NullPointerException

2011-05-04 Thread Taha Hafeez
try response.disableCompression() before redirect. regards Taha On Wed, May 4, 2011 at 9:59 PM, Tim Koop wrote: > I'm trying to send a redirect, but I keep getting a NullPointerException > from somewhere in the depths of Tapestry. Firefox does actually redirect > correctly, but still I don'

Redirect throws NullPointerException

2011-05-04 Thread Tim Koop
I'm trying to send a redirect, but I keep getting a NullPointerException from somewhere in the depths of Tapestry. Firefox does actually redirect correctly, but still I don't like the exception being thrown. Anyone have any ideas? Thanks. The Java code in my page class looks like this:

Re: Creating direct download links to files

2011-05-04 Thread olip
Thanks for your response. Actually I have the following problem: I now have tapestry URLS with the following format: http://host/webapp/STREAMPAGE/JOBID/RUNID/PASSWORD when I am accessing this URL in the browser I get the file behind it streamed back. When I use wget to fetch it I get the html

Re: Java based spring configuration

2011-05-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 May 2011 12:51:05 -0300, Magnus Kvalheim wrote: Hi Adam, Hi! In fact at this point the main reason(s) I have for still using it is for it's transaction management. And as our apps run in a servlet container(tomcat) I've not really considered ejb's as an alternative. EJB 3.1 c

Re: resource shared accross threads

2011-05-04 Thread bogdan_cm
Got it, noted, and never again. Thanks for the reply, Bogdan -- View this message in context: http://tapestry.1045711.n5.nabble.com/resource-shared-accross-threads-tp4370064p4370272.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: resource shared accross threads

2011-05-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 May 2011 11:54:16 -0300, bogdan_cm wrote: Hi again, Hi! I have a Index class which declares another object as a private instance variable: private User user = new User(); Never never never never do that (initializing a field on its declaration). Use onActivate()

Re: Java based spring configuration

2011-05-04 Thread Magnus Kvalheim
Hi Adam, Sorry, for (very)late response. Got tied up with some other tasks and forgot all about it... It's not like I'm in love with Spring. In fact at this point the main reason(s) I have for still using it is for it's transaction management. And as our apps run in a servlet container(tomcat) I'

resource shared accross threads

2011-05-04 Thread bogdan_cm
Hi again, I have a Index class which declares another object as a private instance variable: private User user = new User(); This object will hold some attributes of the user. It's constructor will populate it with default values. Index template has the ability to update the attributes

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Yes, that works, but now I've run into yet another issue. I need to add this library to the top of the js stack. I assumed I could do this with decorateClientInfrastructure, but ClientInfrastructure is deprecated and it is not clear how and where I can access and modify the js stack now. On Wed,

Re: automatically add a js library to every page in the app

2011-05-04 Thread Taha Hafeez
Won't this work public class Layout { @Inject private JavaScriptSupport javaScriptSupport; void afterRender(){ if(condition){ javaScriptSupport.importJavaScriptLibrary("..."); } } regards Taha On Wed, May 4, 2011 at 7:51 PM, Ray Nicholus wrote: > Sigh, that didn't work. Surely

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Nevermind, it isn't that difficult. User error. On Wed, May 4, 2011 at 9:21 AM, Ray Nicholus wrote: > Sigh, that didn't work. Surely it can't be this difficult to add a js > library to all pages in Tapestry. I must be doing something wrong. Note > that I cannot use the import in my layouts a

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Sigh, that didn't work. Surely it can't be this difficult to add a js library to all pages in Tapestry. I must be doing something wrong. Note that I cannot use the import in my layouts as I can only add this library conditionally. On Wed, May 4, 2011 at 9:09 AM, Ray Nicholus wrote: > n/m, I f

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
n/m, I found an example at http://tapestry.1045711.n5.nabble.com/Global-stylesheets-and-Javascripts-documentation-proposal-td2433280.html On Wed, May 4, 2011 at 9:05 AM, Ray Nicholus wrote: > I looked at the documentation for contributeMarkupRenderer, and I'm not > even sure what this is, much l

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
I looked at the documentation for contributeMarkupRenderer, and I'm not even sure what this is, much less what I need to do to simply add a js library to each page. Are there any useful examples that explain how to add a js library to a page in this manner? On Wed, May 4, 2011 at 8:44 AM, Taha Ha

Re: automatically add a js library to every page in the app

2011-05-04 Thread Taha Hafeez
You can add it to your layout as @Import(library = "yourlibraryname.js") public class Layout { } or You can also add it by contributing to MarkupRendererFilter regards Taha On Wed, May 4, 2011 at 7:08 PM, Ray Nicholus wrote: > Any idea how I can easily do this? Ideally, I'd like to only ma

Re: getter/setter for textfield component

2011-05-04 Thread bogdan_cm
Interesting. I just did not realize the class property will be assigned the map keys one by one as I loop through them (the documentation clearly states this ). Thanks for the reply, Bogdan. -- View this message in context: http://tapestry.1045711.n5.nabble.com/getter-setter-for-textfield-co

automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Any idea how I can easily do this? Ideally, I'd like to only make this happen if a specific JVM arg is present.

Re: getter/setter for textfield component

2011-05-04 Thread Taha Hafeez
You can't use 'getValueForKey(for_value)' in a template Here is how I would do it private Map something; @Property private String key; public Set getKeys(){ //Somehow you have already loaded the map return something.keySet();//keys } public String getValue(){ return something.g

getter/setter for textfield component

2011-05-04 Thread bogdan_cm
Hi all, I have a textfield component inside a loop. The value of the text component is set like this: The entire loop is enclosed in a . When i try to submit the form, I get the following error: An exception has occurred: Failure writing parameter 'value' of component Index:textfield: Expr

Re: transposed form loop

2011-05-04 Thread Chris Poulsen
Hi, Can't you just prepare/transpose your model in java and keep the template simple? -- Regards, Chris On Wed, May 4, 2011 at 7:28 AM, Paul Stanton wrote: > Hi all, > > I have a strange requirement and i'm not clear on the recommended tapestry > approach... (T5.1.2) > > It seems similar to

Re: transposed form loop

2011-05-04 Thread LLTYK
No, it uses form injector to add exactly one element. If you really love ajax you can put a forminjector in each row, and fire them all at once when you do an add so they can each add a cell... sounds crazy. Even with a regular Loop it's hairy, I'd have a loop for each row, generating X many colu

Re: How to disable Tapestry javascript debugger

2011-05-04 Thread LLTYK
Just blow away Tapestry.error, warning, etc with your own versions. Redirect all messages to console.log(). console.log() should probably be moved to in general, blackbird seems to only be useful for IE6/IE7 and they seem to be winding down. If you're talking about errors that don't appear at al

Re: Help required regarding IPropertySelectionModel in Tapestry 4

2011-05-04 Thread LLTYK
Either give it an initial value in pageBeginRender and don't allow a blank selection, or allow it to be null and do null-safe equals checks in getCityModel (returning an empty city list on null or something). -- View this message in context: http://tapestry-users.832.n2.nabble.com/Help-required-r

Help required regarding IPropertySelectionModel in Tapestry 4

2011-05-04 Thread nazarhussain_s
Hi, I am having a Home.html in which i have two drop downs - Country and City . On selection of countryfrom the first drop down the corresponding cities need to be populated in the second drop down.While running the application I am getting the following error. [ +/- ] Exception: Unable

Re: Modalbox Integration Example

2011-05-04 Thread tompeter
Hi Taha, thanks for your help and code! I found out that it works nice when I am using an inline Modal Box. I did not get it to work with the Modal Box displaying a page though. I implemented it with Inline Modal Box displaying a component now... Thanks and all best, Tom -- View this message in