s:select and pre-selection

2008-02-29 Thread Daniel Baldes
Hi, I have a select box: s:select name=user.property list=availableObjects listKey=id listValue=name / availableObjects is a list of objects having an id and a name property, where id is of type long. user.property is 'converted' to its id (as String) by a type converter. Now,

How to add page links dynamically

2008-02-29 Thread Sanjeewa Saman
Hi all, I want to add my page links in the top of the each page, that mean I need to add the parent page details in sub pages on top like, Home titlepage2 subtitle pageetc.. please c the image bellow Can somebody suggest me a way to do this. When I call struts2 actions I get this

RE: about current action name acsess

2008-02-29 Thread hns
Nice guidance! i want to ask just one thing how do i get if(postLoginURL != null !postLoginURL.isEmpty()) return redirect; it means i have to set if(ActionContext.getContext().get(postLoginURL) != null ActionContext.getContext().get(postLoginURL).isEmpty()) or another thing i

RE: about current action name acsess

2008-02-29 Thread Kedar Choudhary
postLoginURL is coming from form post of login form(login.jsp). LoginAction.java private String postLoginURL; //getter/setter -Original Message- From: hns [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 2:09 PM To: user@struts.apache.org Subject: RE: about

RE: about current action name acsess

2008-02-29 Thread hns
Thanks i have put setter and getter for postLoginURL but using eclipse debugger i have found that postLoginURL is remains empty i dont know why so my result becomes success instead of redirect what is an issue? please help me? -- View this message in context:

RE: about current action name acsess

2008-02-29 Thread Kedar Choudhary
Have you put s:hidden name=postLoginURL value=%{#postLoginURL}/s:hidden in login form? Check the source of rendered login page to see if this hidden input is properly set to the URL we want to redirect. Regards, Kedar -Original Message- From: hns [mailto:[EMAIL PROTECTED] Sent:

RE: about current action name acsess

2008-02-29 Thread hns
Thanks yes i have put hidden field already as per you told but it can not show any param of requestURL in url i think i can not get any value of %{#postLoginURL} what actually happens i dont know how can i check value of postLoginURL is available upto login.jsp or not can i use

Re: good tutorial recommendation

2008-02-29 Thread hns
if u are using struts 2.0.11 then struts-blank.war is primer for application another helpful sites are also available in struts docs named title articles this is wondurful links for struts help after basics u can use mailreader.war for profession development -- View this message in context:

RE: expression validator

2008-02-29 Thread Sanjeewa Saman
Hi, You can override the default functionality and use , create the validator.xml such that is can compare strings. Refer the following site , http://struts2issues.blogspot.com/ this will give a complete idea of doing it. Thanks . -Original Message- From: mojoRising [mailto:[EMAIL

good tutorial recommendation

2008-02-29 Thread Rilawich Ango
Hi all, Anyone can recommend a good tutorial to develop web application using struts and eclipse as a GUI? thanks, ango - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: about current action name acsess

2008-02-29 Thread hns
please help i am waiting for your reply -- View this message in context: http://www.nabble.com/about-current-action-name-acsess-tp15736383p15756791.html Sent from the Struts - User mailing list archive at Nabble.com. - To

RE: good tutorial recommendation

2008-02-29 Thread Deepak Kumar
Hello, Please check http://www.roseindia.net/struts and http://www.roseindia.net/struts/struts2 Thanks -Original Message- From: Rilawich Ango [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 4:23 PM To: user@struts.apache.org Subject: good tutorial recommendation Hi all,

Re: good tutorial recommendation

2008-02-29 Thread Lukasz Lenart
Hi, You can use also maven2 (2.0.8) mvn archetype:create and you will have some option to chose (8, 19-23) Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To unsubscribe, e-mail: [EMAIL PROTECTED] For

persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Vinicius Cubas Brand
Hello. I am having a problem with the usage of hibernate and its persistence mechanism. I have an Action with a method for creation of an entity type and other method for updating. This action implements a Preparable and in its method prepare() I verify if the entity is being created or

Re: persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Toni Lyytikäinen
Hard to say where the problem lies without having a look at the DAO code. Are you using OpenSessionInViewFilter or similar mechanism for lazy loading in the view? If yes, try setting the param singleSession to false like this: filter-nameOSIVFilter/filter-name filter-class

Re: How to add page links dynamically

2008-02-29 Thread Richard Sayre
I think what you are looking for is caled bread crumbs. There is a plug in to help with this http://cwiki.apache.org/S2PLUGINS/breadcrumbs-plugin.html On Fri, Feb 29, 2008 at 5:04 AM, Sanjeewa Saman [EMAIL PROTECTED] wrote: Hi all, I want to add my page links in the top of the each

RE: persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Kedar Choudhary
I think you will get better answer to your question in hibernate mailing list, as the issue is related to hibernate rather than struts. To disable 'auto-saving' behavior, you can evict the object from hibernate session. So in your prepare method, call session.evict(operator). Then, to save the

Struts2 TestNG issue

2008-02-29 Thread Diwant Vaidya
Hi all, I am running a test case (code at: http://paste-it.net/6849) The MockConfiguration object that gets used is returning an UnsupportedMethodException. Is the class deprecated? What class should I use? Can someone point me to a working TestNG + Struts2 Action example that tests the full

Re: s:select and pre-selection

2008-02-29 Thread Richard Sayre
I have a select that populates with a int,string id/value combo. To get the s:select to select the proper option I had to crate another value in my action (int myId). This would be set to the id of the option to select. Then I had to set the name attribute of my select to myId (name=myId). On

Re: good tutorial recommendation

2008-02-29 Thread stanlick
There is a really good Struts 2 book http://www.manning.com/dbrown/available at Manning. Scott On Fri, Feb 29, 2008 at 4:53 AM, Rilawich Ango [EMAIL PROTECTED] wrote: Hi all, Anyone can recommend a good tutorial to develop web application using struts and eclipse as a GUI? thanks, ango

RE: expression validator

2008-02-29 Thread Deepak Kumar
Hi, Here is very good example with running source code. http://www.roseindia.net/struts/struts2/struts-2-client-side-validation-exam ple.shtml Thanks -Original Message- From: Sanjeewa Saman [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 4:36 PM To: 'Struts Users Mailing

Re: about current action name acsess

2008-02-29 Thread Jeromy Evans
hns wrote: please help i am waiting for your reply Kedar's example looks really good. Double-check that you've done everything he's asked Put a breakpoint inside your interceptor to see if postLoginURL is being built correctly. Assist your debugging by forcing it to return redirect every

Re: s:select and pre-selection

2008-02-29 Thread Daniel Baldes
Daniel Baldes wrote: Hi, I have a select box: s:select name=user.property list=availableObjects listKey=id listValue=name / Ok, I found it myself: s:select name=user.property value=%{user.property.id} list=availableObjects listKey=id listValue=name / this works. It

sitemesh problem

2008-02-29 Thread hns
hi i have one default namespace / and another /webmail css applied to decorator is worked in / but it can not work at /webmail what is problem? -- View this message in context: http://www.nabble.com/sitemesh-problem-tp15759026p15759026.html Sent from the Struts - User mailing list archive at

Re: good tutorial recommendation

2008-02-29 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: There is a really good Struts 2 book http://www.manning.com/dbrown/available at Manning. A disclaimer is probably in order. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: expression validator

2008-02-29 Thread Dave Newton
--- Deepak Kumar [EMAIL PROTECTED] wrote: Here is very good example with running source code. http://www.roseindia.net/struts/struts2/struts-2-client-side-validation-example.shtml Hmm, that doesn't seem to do client-side expression validation either, unless I missed it. Perhaps you can point it

Re: good tutorial recommendation

2008-02-29 Thread stanlick
disclaimer : Don Brown, Chad Davis and I have an affiliation with this manuscript. How's that David? On Fri, Feb 29, 2008 at 8:16 AM, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: There is a really good Struts 2 book http://www.manning.com/dbrown/available at Manning.

Invoking action method from javascript

2008-02-29 Thread Paranoid_Fabio
Hello. I've an action that populates a table with some info. In each row, there's a button to delete the entry and the associated object from the DB. In my action class I've a list (something like a queue) of the ID that will be removed after the user clicks on the apply button. So, all I want to

Re: expression validator

2008-02-29 Thread Dave Newton
--- mojoRising [EMAIL PROTECTED] wrote: Thanks. But I still don't understand...According to the link you mentioned it is not possible to do what I was trying to. So, what is the point of this validator if it doesn't do client side validation? Because there are other places to do validation,

RE: Struts serving both HTML requests and web service?

2008-02-29 Thread Allen, Daniel
Ok, thanks. As long as I know I'm not going in a completely ridiculous direction, I'll make it work. ~Dan -Original Message- From: Randy Burgess [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 6:18 PM To: Struts Users Mailing List Subject: Re: Struts serving both HTML

Re: Invoking action method from javascript

2008-02-29 Thread Dave Newton
--- Paranoid_Fabio [EMAIL PROTECTED] wrote: I don't want to invoke a removeAction for every click...but I think it's the only way..isn't it? You could keep a JavaScript variable containing a comma- (or whatever-) separated list of IDs to remove and submit that value on submission, parse the

Re: Invoking action method from javascript

2008-02-29 Thread Paranoid_Fabio
Ok. Thank you. I will try this way. Paranoid_Fabio wrote: Hello. I've an action that populates a table with some info. In each row, there's a button to delete the entry and the associated object from the DB. In my action class I've a list (something like a queue) of the ID that will be

Re: expression validator

2008-02-29 Thread Martin Gainty
declare the field validator such as the field-name declared in validators in FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xm l validators field name=requiredStringValidatorField field-validator type=requiredstring param name=trimtrue/param

Re: good tutorial recommendation

2008-02-29 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: disclaimer : Don Brown, Chad Davis and I have an affiliation with this manuscript. How's that David? That's awesome, Stanley. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Invoking action method from javascript

2008-02-29 Thread Richard Sayre
you can say, document.location.href = 's:url action=myRemoveAction?myId=' + myId; This will cause the whole page to refresh, so you should probably have a prepare method if you have any data that needs to be populated on that page (ie your table). I personally would use Ajax to make the call,

Re: expression validator

2008-02-29 Thread mojoRising
Thanks. But I still don't understand...According to the link you mentioned it is not possible to do what I was trying to. So, what is the point of this validator if it doesn't do client side validation? And, are you saying that it is not possible to do a simple 'equals' test in client side

Re: expression validator

2008-02-29 Thread Dave Newton
--- Martin Gainty [EMAIL PROTECTED] wrote: [...] AFAICT this doesn't do client-side expression validation either. See, there is no client-side expression validation. My comment was directed at the Roes Indai person who implied that their tutorial would help the person with the original question,

Re: Invoking action method from javascript

2008-02-29 Thread Paranoid_Fabio
Thank you. In fact I don't have a removeAction, but only a removeMethod() in the same action that display and populate the list. Because I don't want to remove the element from the DB on click, I only want to add the clicked ID to a remove queue. Then all the remove queue will be processed by a

Re: expression validator

2008-02-29 Thread Randy Burgess
One of the things I love about Struts is that you get validation without writing any real validation code. Admittedly it would be nice if you got client side validation for expressions. As you know you can create a custom validator and for the client side stuff you would have to edit

Re: expression validator

2008-02-29 Thread Nuwan Chandrasoma
Hi, yes. this is what i did for one of the project i am bit involved. 1. wrote a custom validator public class PasswordConfirmValidator extends FieldValidatorSupport { private static Log log = LogFactory.getLog(PasswordConfirmValidator.class); private String fieldName2; public

Re: Actions without extending ActionSupport?

2008-02-29 Thread nobody
Dave Newton wrote: in some ways I like being coupled to static methods even less because it's not injectable. Not true. FacesContext is injectable with if you use Seam, Spring IoC, or Guice. Perhaps the native IoC container in JSF will provide this injectability natively in JSF 2.0. Jeromy

[OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread Dave Newton
Ah, I get it now. How many email addresses do you have, anyway? I'm definitely too easy to troll. --- nobody [EMAIL PROTECTED] wrote: Dave Newton wrote: in some ways I like being coupled to static methods even less because it's not injectable. Not true. FacesContext is injectable

Re: action security

2008-02-29 Thread Brian Relph
I was able to use the ParameterNameAware interface after all ... I needed to rebuild my project, it wasn't updating in my workspace for some reason. I have also created a new AnnontationParameterInterceptor, along with a class-level annontation and a field-level annontation. As of now, the

Re: Actions without extending ActionSupport?

2008-02-29 Thread stanlick
Hey nobody dude -- If S2 is not for you, why do you spend so much time here? On Fri, Feb 29, 2008 at 10:37 AM, nobody [EMAIL PROTECTED] wrote: Dave Newton wrote: in some ways I like being coupled to static methods even less because it's not injectable. Not true. FacesContext is

Re: [OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread nobody
newton.dave wrote: Ah, I get it now. How many email addresses do you have, anyway? I'm definitely too easy to troll. I am very sorry I was rude and used a BugMeNot user on Nabble to continue to spam the struts-user mailing list. It shows a lack of class and I will stop using this and

Re: [OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread stanlick
Hey Dave -- How many more times do you want to answer the POJO/ActionSupport question? I have recently finished writing a nifty little S2/Db4o web application that allows for quiz taking on your favorite subjects. It randomizes questions, maintains global statistics [so you can quickly see how

Re: action security

2008-02-29 Thread Dave Newton
--- Brian Relph [EMAIL PROTECTED] wrote: I have also created a new AnnontationParameterInterceptor, along with a class-level annontation and a field-level annontation. As of now, the annotations just store a boolean value of whether to allow the field to be set, and for the class, what the

Re: [OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: How many more times do you want to answer the POJO/ActionSupport question? A million; how could I possibly get tired of such fun? Would you be willing to help me seed it with your top ten puzzlers from this list? Sounds pretty cool--I'd put out a general call

Re: [OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread stanlick
Thanks bro. I'll hit it after I make a QDoba run. On Fri, Feb 29, 2008 at 11:57 AM, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: How many more times do you want to answer the POJO/ActionSupport question? A million; how could I possibly get tired of such fun? Would

Re: [OT] Re: Actions without extending ActionSupport?

2008-02-29 Thread Clown Boots
newton.dave wrote: Ah, I get it now. How many email addresses do you have, anyway? My arguments stand whether or not I use the same email address. I don't like registrations so I try to use bugmenot.com for things like that. The name attached to my post has nothing to do with the legitimacy of

Struts1 forms with empty Strings

2008-02-29 Thread Andy
Hi, I was wondering if there is a way to configure Struts1 so Form beans return null values instead of empty String values when a user does not enter data in a text field, for example. The problem is that Hibernate then saves empty Strings to the database instead of nulls. I would like to

Re: Struts1 forms with empty Strings

2008-02-29 Thread Dave Newton
--- Andy [EMAIL PROTECTED] wrote: I was wondering if there is a way to configure Struts1 so Form beans return null values instead of empty String values when a user does not enter data in a text field, for example. The problem is that Hibernate then saves empty Strings to the database instead

RE: Looping in Struts2

2008-02-29 Thread Jaarthy
Already tried out,but could not find a solution.that's why posted here... Any help would be appreciated. Aarthy newton.dave wrote: --- Jaarthy [EMAIL PROTECTED] wrote: Can we pass dynamic values to the begin and end in c:forEach tag? Sure. Might have been quicker to just try it. Dave

Dead code parser/finder for Struts

2008-02-29 Thread Adam Gordon
Does anyone know if there's a server side library that can parse JSP pages (or the generated Java file) and look for dead Struts code? We subbed out a project and recently took back control of the code due to various issues one of which was very poor code quality. Looking through their JSP

RE: Looping in Struts2

2008-02-29 Thread Dave Newton
--- Jaarthy [EMAIL PROTECTED] wrote: Already tried out,but could not find a solution.that's why posted here... Any help would be appreciated. Okay, well. Not too much to go on. What specific problem are you having? What have you tried? Post a snippet. Post some code. The S2 request wrapper

[OT] Re: Dead code parser/finder for Struts

2008-02-29 Thread Dave Newton
--- Adam Gordon [EMAIL PROTECTED] wrote: Does anyone know if there's a server side library that can parse JSP pages (or the generated Java file) and look for dead Struts code? Any of the typical code walkers should be able to deal with the generated JSP, but it probably wouldn't be capable of

Re: [OT] Re: Dead code parser/finder for Struts

2008-02-29 Thread Adam Gordon
Dave- Dude, it's bad. They had a team of developers each with varying degrees of experience which ranged from no knowledge of Struts/EL (those developers used.scriptlets.*shudder*) while others used Struts/JSTL tags for almost everything when EL tags would not only have sufficed

Re: [OT] Re: Dead code parser/finder for Struts

2008-02-29 Thread Manos Batsis
Dave Newton wrote: shouldn't be *that* hard (depending on how well-formed the JSP/HTML is, perhaps?) Bingo. We use the XML JSP syntax and have done similar tasks in the past using XSLT or even SAX filters. I've never encountered XML syntax users outside my company though. Manos

Re: [OT] Re: Dead code parser/finder for Struts

2008-02-29 Thread Dave Newton
--- Adam Gordon [EMAIL PROTECTED] wrote: Dude, it's bad. I feel your pain. In fact, I revel in it ;) It's pretty hard to mechanically find problems in JSP-space, though, and I personally don't know of any generic tools that allow it (if you do find any, please follow up!) My approach would

Re: Struts1 forms with empty Strings

2008-02-29 Thread Martin Gainty
//easiest solution would be to set all the attribute default values to null e.g. public class TestFormBean extends ActionForm { private String stringProperty=null; private Object[] arrayProperty=null; public String getStringProperty() { return (stringProperty); }

Re: Struts1 forms with empty Strings

2008-02-29 Thread Dave Newton
--- Martin Gainty [EMAIL PROTECTED] wrote: //easiest solution would be to set all the attribute default values to null Isn't that the default value for a String field? [1] Does this prevent and empty value from the HTML form being set on the ActionForm? Dave [1]

Re: Struts1 forms with empty Strings

2008-02-29 Thread Randy Burgess
Since Strings are immutable you get a new String whenever an operation is performed on said String, so that seems to me that you would still get the empty string. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Dave Newton [EMAIL PROTECTED] Reply-To: Struts

Struts2 vs JSF

2008-02-29 Thread Frans Thamura
hi there i am a webwork user, and now because WW become S2, so i am part of this community, and honestly i am blank of S1 :) and i got Matt's comparison here, and i think that will be awesome if we can share it here. I found that like it or not, JSF have a lot of promotion esp from Sun and

Re: Struts2 vs JSF

2008-02-29 Thread Nils-Helge Garli Hegvik
There was a pretty long conversation about this earlier [1]. Maybe you can find some useful information there. [1] - http://www.nabble.com/Is-Struts-still-a-better-choice-over-JSF-as-on-today---to11801750.html On Fri, Feb 29, 2008 at 11:00 PM, Frans Thamura [EMAIL PROTECTED] wrote: hi there

[friday] Re: Struts2 vs JSF

2008-02-29 Thread Musachy Barroso
Search for Snatch fight in youtube, and you will get a felling of what Struts 2 would do to JSF in a fight :) musachy On Fri, Feb 29, 2008 at 5:00 PM, Frans Thamura [EMAIL PROTECTED] wrote: hi there i am a webwork user, and now because WW become S2, so i am part of this community, and

Re: [friday] Re: Struts2 vs JSF

2008-02-29 Thread Frans Thamura
On Sat, Mar 1, 2008 at 5:12 AM, Musachy Barroso [EMAIL PROTECTED] wrote: Search for Snatch fight in youtube, and you will get a felling of what Struts 2 would do to JSF in a fight :) cannot get it

Re: [friday] Re: Struts2 vs JSF

2008-02-29 Thread Dave Newton
--- Musachy Barroso [EMAIL PROTECTED] wrote: Search for Snatch fight in youtube, and you will get a felling of what Struts 2 would do to JSF in a fight :) I was *really* scared to see what that would bring up (snatch, in the US, is a somewhat derogatory term for... uh... female parts). Turns

Re: [friday] Re: Struts2 vs JSF

2008-02-29 Thread Ray Clough
I have quite a lot of experience with S2 and JSF which I'd like to share. Although on many levels the technologies are different, we have managed to make them work together with profound benefits to each. First a caveat: our use of JSF as served from S2 is in a limited fashion. There are

Re: [friday] Re: Struts2 vs JSF

2008-02-29 Thread Martin Gainty
interesting ...can you implement ajax functionality such as theme='ajax' from dojo? Martin- - Original Message - From: Ray Clough [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, February 29, 2008 6:08 PM Subject: Re: [friday] Re: Struts2 vs JSF I

Re: [friday] Re: Struts2 vs JSF

2008-02-29 Thread Ray Clough
Yes, but only for those pages which use S2 view components. We have some pure S2 pages, also some pure JSF pages (but not with S2 Controller fcns), also pure S1 pages, and all pages use Tiles. Quite a complex deployment descriptor, as you might imagine. - Ray C. mgainty wrote:

Re: about current action name acsess

2008-02-29 Thread hns
Thanks to you and also thanks to kedar for great logic but i dont know why postLoginURL remains empty in my case so i have choose way of session it works fine right now but i dont know about future problems of it i have done like this Inside interceptor i wrote if

Re: about current action name acsess

2008-02-29 Thread hns
After Inspecting postLoginURL I have found that entry of ctx hashtable PostLoginURL remains in it but it can not come at Login.java(getter and setter of PostLoginURL) so i think some thing missing in it or wrong at login.jsp so value can not come after submitting form at login.java -- View this