How to hide a link

2009-05-01 Thread taj uddin
Hi In my application there is a need to hide a link. I have used the s:a tag to generate a link and the necessity is to hide this link. can any one pls help out in this regard

Re: How to hide a link

2009-05-01 Thread Richard Sayre
try cssStyle=display:none On Fri, May 1, 2009 at 4:23 AM, taj uddin tajuddi...@yahoo.com wrote: Hi In my application there is a need to hide a link. I have used the s:a tag to generate a link and the necessity is to hide this link. can any one pls help out in this regard

Re: Submitting a Date to an Action

2009-05-01 Thread Richard Sayre
I think I am going to write my own. After experimenting with the date time picker it only seems to convert the date if its in this format mm/dd/yy. In my application the user can choose their own date format. When I have a format like 1 May 2009, the datetime picker value does not get converted.

RE: OGNL in HTML tags

2009-05-01 Thread Jon Pearson
I'm trying to colorize table rows in a JSP based on the result of a function call into the Action. Here's what I want to do: tr class=%{getStatus(deviceID)} ... /tr And have the function String getStatus(long deviceID) { ... } look up the status of a device and return a CSS

RE: OGNL in HTML tags

2009-05-01 Thread Jon Pearson
Dave Newton wrote: tr class=s:property value=%{getStatus(deviceID)}/ Minor addendum: IMO when iterating over a collection of model objects a status lookup like this would be a matter of querying the device, rather than providing a lookup based on the device ID. If device statuses

RE: OGNL in HTML tags

2009-05-01 Thread Jon Pearson
Dave Newton wrote: tr class=s:property value=%{getStatus(deviceID)}/ Minor addendum: IMO when iterating over a collection of model objects a status lookup like this would be a matter of querying the device, rather than providing a lookup based on the device ID. If

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-05-01 Thread Wes Wannemacher
See if you can force Spring to use CGLIB proxies... JDK proxies are interface-based, so unless you are implementing an interface that exposes all of the methods you will interact with (Action interface has no methods, IIRC), then AOP / @Transactional won't work right. Although, carry on with the

Re: Problem with Spring plugin

2009-05-01 Thread Wes Wannemacher
Are you sure that's the right jar? I could be wrong, but version number makes me think that you could be grabbing the OSGI-ified spring jar. -Wes On Fri, May 1, 2009 at 1:21 AM, yarongo...@msn.com wrote: Hi, I'm having some problems using Struts2 and the Spring plugin using Tomcat. I'm

JQuery question and repositioning

2009-05-01 Thread Frans Thamura
hi all i want to know the JQuery repositioning in S2 plugins world is this a JQuery taglib plugins or... any idea all? we here learning jquery and our approach is jquery lib with JSON using JSONplugins is that right? -- -- Frans Thamura Meruvian. Java and Enterprise OSS Mobile: +62 855

Re: JQuery question and repositioning

2009-05-01 Thread Wes Wannemacher
Frans, There will be tags, but it is going to be written to be unobtrusive... So, if you add it to a project, you'll have added abilities, but you won't need to rewrite any pages. There will be tags, but not a lot. As a plugin, I'm concentrating more on testability. If you check the plugin out of

REST Plugin and PreResultListeners

2009-05-01 Thread Stuart Ellidge
Hi all, In our application an interceptor registers a PreResultListener to perform some common calculation prior to rendering the page. The reason this is handled in a PreResultListener is that the action may well modify the basis for the calculation and we need to include the most recent

Re: Submitting a Date to an Action

2009-05-01 Thread Andy Sykes
I wrote my own method based on having three select dropdown boxes for the date - day, month and year. Rather than do it as a type converter, I did it as an interceptor, with three getters/setters in the action (getStartTime_Day, getStartTime_Month, getStartTime_Year). The interceptor uses

Re: result type -- redirect-action vs dispatcher.

2009-05-01 Thread Siddiq Syed
Hi all, I am still struggling with the same problem , Did anybody have any solution/thoughts ? I have a problem with forwarding the request to an action. I am using validations for the fields mention on the form , once validation fails as struts defined it will check for result name Input.

Re: JQuery question and repositioning

2009-05-01 Thread Frans Thamura
i use velocity intensively, :) can help? On Fri, May 1, 2009 at 9:48 PM, Wes Wannemacher w...@wantii.com wrote: Frans, There will be tags, but it is going to be written to be unobtrusive... So, if you add it to a project, you'll have added abilities, but you won't need to rewrite any

number formatting (with commas)

2009-05-01 Thread akoo
Hi guys, I have looked through all of the documentations and am just not having any success formatting numbers (i.e 70333 - 70,333) so I thought i'd ask you guys. here are relevant snippets of my code. s:iterator value=positions tr tds:property value=account/ /td

Re: Submitting a Date to an Action

2009-05-01 Thread Richard Sayre
My date field is one text box with a Date Picker Widget. The converter does the valid date validation for me by attempting to parse the date in the Util class. If it returns null then I know I got a parse exception. I am including my convertFromString code below. I need it to handle both

determine if iphone user?

2009-05-01 Thread Andy
Hi, is there an easy way to tell in an s2 action if the request is coming from an iphone/mobile device? Thanks! _ Insert movie times and more without leaving HotmailĀ®.

Re: determine if iphone user?

2009-05-01 Thread Richard Sayre
I think the HTTP_USER_AGENT header should be similar to: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 If a request comes from the IPhone browser On Fri, May 1, 2009 at 3:06 PM, Andy andrh...@hotmail.com wrote: Hi,

RE: determine if iphone user?

2009-05-01 Thread Andy
Cool, so is there a way to add a getter/setter in my action class to automatically pick up the request header, similar to parameters? Date: Fri, 1 May 2009 15:29:03 -0230 Subject: Re: determine if iphone user? From: richardsa...@gmail.com To: user@struts.apache.org I think the

Re: number formatting (with commas)

2009-05-01 Thread Burton Rhodes
I solved it this way: s:textfield key=netpl value=%{getText('format.money',netpl)} / Then in your class path put a file called package.properties with the following: # used to format dates, numbers in the jsp files (display) format.time = {0,time} format.dateShort = {0,date,MM/dd/}

Re: determine if iphone user?

2009-05-01 Thread Bhaarat Sharma
your action can Implement ServletRequestAware because of the implementation you will have to override setServletRequest method which will set a HttpServletRequest member in your class On Fri, May 1, 2009 at 2:22 PM, Andy andrh...@hotmail.com wrote: Cool, so is there a way to add a

Re: number formatting (with commas)

2009-05-01 Thread Bhaarat Sharma
wont format.money = {0,number,\u00A4###,##0} automatically add a '$' sign in front of the number? On Fri, May 1, 2009 at 2:26 PM, Burton Rhodes burtonrho...@gmail.comwrote: I solved it this way: s:textfield key=netpl value=%{getText('format.money',netpl)} / Then in your class path put a

Re: number formatting (with commas)

2009-05-01 Thread Burton Rhodes
Guess it would help if I read your entire email ;) How about this: format.number= {0,number,\u00A4###,##0} -or- format.number= {0,number,'USD'###,##0} On Fri, May 1, 2009 at 1:26 PM, Burton Rhodes burtonrho...@gmail.com wrote: I solved it this way: s:textfield key=netpl

Re: number formatting (with commas)

2009-05-01 Thread Dave Newton
akoo wrote: format.number = USD{0,number,##0.00} Is it possible to specify characters outside of the format string like that? It's not how you've formatted the money type: format.money = {0,number,\u00A4##0.00} Dave -

Re: number formatting (with commas)

2009-05-01 Thread Chris Pratt
Since the purpose of the s:text tag is to allow things like: error.message=User {0} has not been granted permission to view that page s:text name=error.messages:param value=%{user.id}//s:text I don't see how having USD outside of the curly braces would be a problem, but just in case it is, you

Re: number formatting (with commas)

2009-05-01 Thread akoo
I am not sure actually, it was just an example I pulled the roseindia site. This is all quite new to me. newton.dave wrote: akoo wrote: format.number = USD{0,number,##0.00} Is it possible to specify characters outside of the format string like that? It's not how you've formatted the

Re: number formatting (with commas)

2009-05-01 Thread Dave Newton
akoo wrote: I am not sure actually, it was just an example I pulled the roseindia site. This is all quite new to me. (Be wary of roseindia tutorials.) Chris is right; it's just a positional parameter--not sure what I was thinking when I wrote my original response. Dave

How do I turn off debug statements when using MockStrutsTestCase with JUnit?

2009-05-01 Thread laredotornado
Hi, I'm using the latest version of MockStrutsTestCase to test my Struts 1.3 application. I'm using Ant 1.6. I have Ant Junit tasks that look like ... target name=run-refresh-test depends=build-tests junit dir=${build} fork=true haltonfailure=true

Re: Problem with Spring plugin

2009-05-01 Thread YaronGo
I'm using the spring.jar file from Spring Framework's dist directory. I also tried using version 2.08, and using spring-core.jar, spring-web.jar, spring-context.jar and spring-beans.jar from the modules directory instead of spring.jar, but got the same results. I tried instead to use the spring

Re: Problem with Spring plugin

2009-05-01 Thread Dave Newton
YaronGo wrote: I tried instead to use the spring jars that came with the struts distribution (spring-context-2.5.3.jar, spring-core-2.0.8.jar, spring-beans-2.5.3.jar, spring-web-2.5.3.jar) and got the following: SEVERE: Exception sending context initialized event to listener instance of class

Re: Problem with Spring plugin

2009-05-01 Thread YaronGo
I agree, nevertheless that's the set of jars that came with the struts 2.1.6 release. I would assume that version 2.0.8 would have worked. Maybe it's a problem with the plugin, but again, I'm using the plugin that comes with struts 2.1.6... Thoughts? newton.dave wrote: YaronGo wrote: I

Re: Problem with Spring plugin

2009-05-01 Thread Dave Newton
YaronGo wrote: nevertheless that's the set of jars that came with the struts 2.1.6 release. That doesn't they'll work--please try with Spring libraries that are all the same version. I would assume that version 2.0.8 would have worked. But you tried 2.0.8 mixed with 2.5.3. I'm using

Re: Problem with Spring plugin

2009-05-01 Thread Dave Newton
Dave Newton wrote: that's the set of jars that came with the struts 2.1.6 release. That doesn't they'll work ^ mean Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands,

Re: Problem with Spring plugin

2009-05-01 Thread YaronGo
I'm sorry, I may not have been clear. I have tried with both spring.jar (dist directory) from releases 2.0.8 and 2.5.6), with the module jars (context, web, aop, beans, core, web) for each release (removed spring.jar, added them instead), and with the collection of jars that came with struts

Re: Problem with Spring plugin

2009-05-01 Thread YaronGo
Okay, I get extra points for stupidity here. Instead of adding the plugin to the WEB-INF/lib, I put it in the tomcat lib path. Sorry for the bother! (works now) YaronGo wrote: I'm sorry, I may not have been clear. I have tried with both spring.jar (dist directory) from releases 2.0.8 and