Re: beandisplay hide label if value is null?

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 19:44:24 -0300, briano wrote: Is there an way with the beandisplay component to have it not show the labels (and values) if the value is null or empty? Use the BeanModelSource to get a BeanModel, change it, then pass it to BeanDisplay. -- Thiago H. de Paula Figueiredo

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 16:01:46 -0300, bhorvat wrote: java.lang.RuntimeException: Exception constructing service 'ResteasyRequestFilter': Error building service proxy for service 'Application' (at org.tynamo.resteasy.Application(Collection) (at Application.java:14) via org.tynamo.resteasy.Reste

Re: Conditionally (IE) including javascript

2012-07-18 Thread Alex Kotchnev
I'll give George's suggestion a go tomorrow. It seems like I should be able to do this from the layout components that pages use, so that I don't have to add the code to each page. Cheers, Alex K On Wed, Jul 18, 2012 at 4:51 PM, trsvax wrote: > For this particular case I suspect you just want t

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Taha Siddiqi
The exception usually occurs if you don't have a public constructor for your service implementation. Can you share the code for implementation if that is not the case. Taha On Jul 19, 2012, at 12:31 AM, bhorvat wrote: > > Kalle Korhonen-2 wrote >> >> >> Are you using T5.3? If so, your JAX

beandisplay hide label if value is null?

2012-07-18 Thread briano
Is there an way with the beandisplay component to have it not show the labels (and values) if the value is null or empty? For example: Label1 -- Value1 Label2 -- Null Label3 -- Value3 Would display as: Label1 -- Value1 Label3 -- Value3 If not then is there another way to dynamically do this

Re: Tapestry 5.3.4

2012-07-18 Thread Angelo C.
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. -

Tapestry 5.3.4 at JavaLobby

2012-07-18 Thread Howard Lewis Ship
As always, these release announcements are a good time to show your love in a visible way. http://java.dzone.com/announcements/apache-tapestry-534 I would love to see some posts that covered a few of these points - Tapestry keeps gettings easier/faster/better - Upgrades are easy (there's a persis

Re: Conditionally (IE) including javascript

2012-07-18 Thread trsvax
For this particular case I suspect you just want this on every page in the site. If so the simplest way would be just include the following in your layout.tml file -- View this message in context: http://tapestry.1045711.n5.nabble.com/Conditionally-IE-

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread bhorvat
The more I read up on this basic authentification, I get the impression that that is something that should be passed to me from some other source, so is tynamo the one from which I should get this information, any idea how? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T

Re: Conditionally (IE) including javascript

2012-07-18 Thread George Christman
My bad, I should of read your question a bit more thoroughly. This is by far the an elegant solution, but would accomplish your goals. Use request.getParameter("User-Agent") to get your browser type and surround javaScriptSupport with a conditional statement. @Inject @Path("${tapestry.scriptacu

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread bhorvat
Kalle Korhonen-2 wrote > > > Are you using T5.3? If so, your JAX-RS annotations (as mentioned in > http://tynamo.org/tapestry-resteasy+guide) won't work any better - you > have to add your annotations to the service interface. > > Yea I am using 5.3. So if I read it and understood it, I need

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Kalle Korhonen
On Wed, Jul 18, 2012 at 10:58 AM, bhorvat wrote: > I have tried to change the method into > So my question about cookies remains, the problem is that this rest services > will be access using the python code, and not the browser (I assume that > browser helps in this case). So how do I then receiv

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Kalle Korhonen
On Wed, Jul 18, 2012 at 10:47 AM, bhorvat wrote: > This configuration that Taha suggested seems to do the trick. The error is > gone. I say seems because without it would work sometimes (not sure why > though). > The annotation however dont seem to work. Even if I put them they dont > restrict the

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread bhorvat
I have tried to change the method into @GET @Path("/{id}") public User getUser(@PathParam("id") Long id) { if (securityService.isAuthenticated()) { return systemManager.getUser(id); } return null; } and this seems to work, if I dont go to login

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread bhorvat
This configuration that Taha suggested seems to do the trick. The error is gone. I say seems because without it would work sometimes (not sure why though). The annotation however dont seem to work. Even if I put them they dont restrict the access to the method. Any idea why? @RequiresAuthenti

Re: Conditionally (IE) including javascript

2012-07-18 Thread Alex Kotchnev
George, yep, I had seen this example on conditionally including stylesheets. However, I was wondering how to do the same w/ javascript... Cheers, Alex K On Wed, Jul 18, 2012 at 12:23 PM, George Christman wrote: > You could do something like this, > > @Inject > @Path("context:css/ie-o

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Alex Kotchnev
Lance, thanks for the sample mixin code : I hadn't created any mixins previously and this was a great start. It works like a charm. Thiago, I did think of using the Validation decorator; however, at least for now it looked a bit of an overkill as I'm not 100% sure if this is going to be the

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 13:17:51 -0300, Lance Java wrote: For the incoming ones (requested URLs), it works by changing the Request Yes, I saw that... I'm not sure I agree with that approach. If a downstram process Example please. :) was trying to calculate URL's relative to the current path

Re: Conditionally (IE) including javascript

2012-07-18 Thread George Christman
You could do something like this, @Inject @Path("context:css/ie-only.css") private Asset ieOnlyStylesheet; // add an IE-only style sheet if browser is IE 7 || IE 8 void afterRender() { this.js.importStylesheet( new StylesheetLink(ieOnlyStylesheet,

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
> For the incoming ones (requested URLs), it works by changing the Request Yes, I saw that... I'm not sure I agree with that approach. If a downstram process was trying to calculate URL's relative to the current path (to send to the browser), it would get the calculation wrong. -- View this messag

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Kalle Korhonen
On Wed, Jul 18, 2012 at 6:42 AM, Alejandro Scandroli wrote: > I don't think just adding ResteasyRequestFilter after StoreIntoGlobals > is going to solve the issue. > If both SecurityConfiguration and ResteasyRequestFilter are configured > as "after:StoreIntoGlobals" how does Tapestry knows which o

Re: Select component and sorting order

2012-07-18 Thread sub
Thanks Thiago, it is working now. Here is what I did: -- Page.java: -- @Property private Country country; @Property @SuppressWarnings("unused") private SelectModel countryModel; private Country[] getSortedCountries() { SortedMap map = new TreeMap();

Re: Tapestry 5.3.4

2012-07-18 Thread George Christman
Stephan, I'm having the same issue with yuicompressor -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-4-tp5714512p5714563.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 10:32:49 -0300, Lance Java wrote: Has anyone thought of a ValidationDecorator? Nope... never heard of it... time to jump into the tapestry code / javadocs again ;) Or the mailing list archives. We've had some interesting threads involving ValidationDecorator already.

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 10:31:51 -0300, Lance Java wrote: If anyone wants to grab its sources, check https://github.com/thiagohp/tapestry-url-rewriter. Peeking at the code, it looks like you needed to decorate ComponentEventLinkEncoder too It does, but just for outgoing links (the ones generat

Re: Lightweight TapestryTools update site

2012-07-18 Thread Nicolas Barrera
I 'm running Ubuntu 12.04 LTS so it's woking for you in your environment :S, I 'm afraid I 'm doing something wrong... perhaps someone else has already test it in a linux environment and can tell us, well If you get to know about an issue and fix it please send an announcement here. thanks, and

Re: Lightweight TapestryTools update site

2012-07-18 Thread Gavin Lei
Thanks for your work, Nicolas :-) You are in Windows or Mac? I will double check this issue. In my test of Eclipse Juno in Win 7, everything works well. If it appears here, i will fix it soon. 2012/7/18 Nicolas Barrera : > Hi Gavin, > > thanks for the quick > > As I told you I 'm using maven and

Re: Lightweight TapestryTools update site

2012-07-18 Thread Gavin Lei
Hi Nicolas, Thank you for your feedback, TapestryTools' auto-complete feature need tapestry-core-*.jar which contains "org.apache.tapestry5.corelib.components" in your eclipse project build path. I think this is not a Juno version issue, please check your build path. Right click project -> proper

Re: Tapestry Tynamo Rest and security integration questions

2012-07-18 Thread Alejandro Scandroli
I also think Taha has the right answer. I don't think just adding ResteasyRequestFilter after StoreIntoGlobals is going to solve the issue. If both SecurityConfiguration and ResteasyRequestFilter are configured as "after:StoreIntoGlobals" how does Tapestry knows which one should be first. I think y

Re: Lightweight TapestryTools update site

2012-07-18 Thread Nicolas Barrera
Hi Gavin, I wanted to ask this prior to open a new issue... I 'm testing TapestryTools 1.0.0.201207172033 with Eclipse Juno Version: Juno Release / Build id: 20120614-1722 and although tapestrytools seems to be working fine, auto-complete features aren't popping out when writing wrote: > Tapes

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
> Has anyone thought of a ValidationDecorator? Nope... never heard of it... time to jump into the tapestry code / javadocs again ;) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-class-to-a-div-based-on-field-validation-status-tp5714526p5714553.html Sent from the

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
> If anyone wants to grab its sources, check https://github.com/thiagohp/tapestry-url-rewriter. Peeking at the code, it looks like you needed to decorate ComponentEventLinkEncoder too Whatever happens, we need access to the core behaviour so that we can perform some string manipulation on it. The

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 06:38:44 -0300, Lance Java wrote: I think I would do it via a mixin on the textfield. Has anyone thought of a ValidationDecorator? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsub

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 04:58:31 -0300, Lance Java wrote: I do this by decorating the ComponentEventLinkEncoder as I found that the LinkTransformer API was not adequate. I really need to take some time to get the old URL rewriter API, which is better suited than LinkTransformer in some scenar

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
eg: package foo.bar.mixins; @MixinAfter public class ControlGroupDecorator { @InjectContainer private Field field; @Environmental(false) private ValidationTracker tracker; private Element controlGroup; public void afterRender(MarkupWriter writer) { // need

Re: Adding a class to a div based on field validation status

2012-07-18 Thread Lance Java
I think I would do it via a mixin on the textfield. Where the ControlGroupDecorator walks up the DOM to the first div with a class="control-group" and adds the error class if necessary (using the t:id of the textField to see which errors to check for). -- View this message in context: http://

Re: Tapestry 5.3.4

2012-07-18 Thread Stephan Windmüller
On 17.07.2012 18:09, Howard Lewis Ship wrote: > Following a successful vote, we're happy to announce the release of > Tapestry 5.3.4. Am I the only one having problems with the maven dependencies? | [WARNING] The POM for com.google.code.maven-play-plugin.com.yahoo.platform.yui:yuicompressor:jar:

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
I have written a sample application which takes a URL of the form "http://host:port/context//foo/bar" and transforms it to "http://host:port/context/foo/bar";. It also sets a "Mode" environmental to contain the . This environmental can then be accessed in pages and components. In your case, the mod

Re: Adding a dynamic sub directory to URL

2012-07-18 Thread Dusko Jovanovski
Take a look at http://tynamo.org/tapestry-routing+guide It's a tynamo module written for this purpose. On Wed, Jul 18, 2012 at 3:04 AM, dkeenan wrote: > This looks perfect! Tapestry is outstandingly good. > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Adding-a