Re: Checkbox selection problem

2007-11-20 Thread John Doe
Solution still needed. Forgot to say, I'm using struts 1.2.7 On Nov 19, 2007 11:08 AM, John Doe [EMAIL PROTECTED] wrote: Hi, I have a form declared in my struts config : *form-bean name=resourceForm type= org.apache.struts.validator.DynaValidatorForm form-property

Re: Checkbox selection problem

2007-11-20 Thread John Doe
I've found solution. You can avoid this problem if you will add hidden field with the same name as the checkbox. Like this : *html:checkbox name=resource property=isProcessed/ html:hidden property=isProcessed value= / * On Nov 20, 2007 11:12 AM, John Doe [EMAIL PROTECTED] wrote: Solution

RE: [s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread LEONARD Julien (Consulting for ACCOR Hotels)
Hello Try like this : s:if test=myVar == 'myvalue' XXX /s:if s:set name=otherVar value=%{myVar} / s:if test=%{#otherVar == 'myvalue'} YYY /s:if -Message d'origine- De : GF [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 novembre 2007 10:59 À : user@struts.apache.org Objet : [s2][ognl]

Re: [s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread GF
Ok, thank you again. On Nov 20, 2007 11:21 AM, LEONARD Julien (Consulting for ACCOR Hotels) [EMAIL PROTECTED] wrote: In fact belong my experience of Struts2, the good way to make an expression is with %{ }. And for all variables declared in JSP (s:set, or status of s:iterator ) are

RE: [s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread LEONARD Julien (Consulting for ACCOR Hotels)
In fact belong my experience of Struts2, the good way to make an expression is with %{ }. And for all variables declared in JSP (s:set, or status of s:iterator ) are accessible with a #. Maybe these variables are in pageContext and not the valueStack, and # is the way to acces to the

[s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread GF
I have this code: s:if test=myVar == 'myvalue' XXX /s:if s:set name=otherVar value=%{myVar} / s:if test=otherVar == 'myvalue' YYY /s:if This code shows XXX but doesn't show YYY. How can I satisfay the second test? Thank you.

Re: How to preselect a radio button in Struts 2

2007-11-20 Thread Pankaj Gupta
Hey, I tried it out tr td class=tccValueFields:radio label=Courtesy Call Requested name=courtesyCallFlag list=#{'Yes':'Yes','No':'No'} listKey=#{'No'} listValue=No/nbsp;nbsp;nbsp;nbsp;nbsp; /td /tr But it didn't worked. I tried s:radio list=#{1:'Yes', 2:'No'}

Access the value stack

2007-11-20 Thread slideharmony
How can I access the value stack in my action in order to store objects(that I want to retrieve in my jsps)? -- View this message in context: http://www.nabble.com/Access-the-value-stack-tf4842284.html#a13853727 Sent from the Struts - User mailing list archive at Nabble.com.

Getting the login name from client pc

2007-11-20 Thread Ehteshamul Haque
I have a web application. Some one is browsing it from his PC. I want to rack him. I need to get his login name of his PC(Windows OS). Its a intranet application. Thanks. Ehteshamul Haque

Re: [s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread GF
Wow. Now It works. Can you explain me the difference with my version? Or have you any good link to some guide to understand what I did wrong? Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Problem with struts2 iterator and ognl

2007-11-20 Thread sagarlotiya
Hi, I have a iterator and i am loop through it in my jsp file and iterator contains textbox. Problem occurs when i am try to set the values directly on Model through ognl. any one has idea how to do that ? e.g. s:iterator id=product value=%{products} status=stat s:textfield

Re: Access the value stack

2007-11-20 Thread Omkar Patil
One way is by having following code in your action - ValueStack valueStack = ActionContext.getContext().getValueStack(); -Omkar slideharmony wrote: How can I access the value stack in my action in order to store objects(that I want to retrieve in my jsps)? -- View this message in

what about the concept of action forms in struts2

2007-11-20 Thread vijay vijay
Hi do we have the concepts like dynavalidator form and other forms in struts2 . thnak you

User validation

2007-11-20 Thread slideharmony
Hello, i have a question: shoud I put user validation (with username and password) into an action or an interceptor? If I have a LoginInterceptor that validate the user, what's the utility to have a LoginAction too? thanks -- View this message in context:

javascript update tag value property

2007-11-20 Thread victor sosa
Hi, I am trying to update a textfield when the select is changed using javascript event onchange, so How I can do that? Which is the best practices here? Here is my code, any Ideas? script type=text/javascript function getVolumenInicial() { var

Re: [s2][ognl] s:set .. and s:if .. with a string.

2007-11-20 Thread Martin Gainty
# and @ are both OGNL directives as in #foo.blah // returns foo.getBlah() and in the case of statics @[EMAIL PROTECTED] http://struts.apache.org/2.0.11/docs/ognl-basics.html M-- - Original Message - From: LEONARD Julien (Consulting for ACCOR Hotels) [EMAIL PROTECTED] To: Struts Users

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Musachy Barroso
Do you have a quickstart schema in your db? musachy On Nov 20, 2007 12:43 AM, Lewis Li [EMAIL PROTECTED] wrote: Hi! I'm doing the tutorial Struts 2 + Spring 2 + JPA + AJAX located at http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html. I have installed and configured MySQL

[s2] conditional validation

2007-11-20 Thread lbastil
Is there any way with the build in declarative validation possibilities in struts 2 (annotations, xml) to do something like conditional validation in the following sense: in the action class I have a model class, where on action method one i want to validate a special subset of model attributes

S2: how to go back and populate values the user input

2007-11-20 Thread panpan
Hi all, thank you for any helps. I'm new to struts2. I just got the below problem. In the first page, the user inputs the values in the fields which is a List variable additionalInterests from the Action. In the second page, I have a link go back which goes back to the first page to repopulate

S2: how to go back and populate values the user input

2007-11-20 Thread panpan
Hi all, thank you for any helps. I'm new to struts2. I just got the below problem. In the first page, the user inputs the values in the fields which is a List variable additionalInterests from the Action. In the second page, I have a link go back which goes back to the first page to repopulate

Re: [S2] Struts/JPA Design Practices

2007-11-20 Thread Ted Husted
Hopefully that's the sort of stuff you're interested in hearing about. Yes, thanks! By custom interceptors I meant strategies like Open Session In View, which can be used to implement One Transaction Per Request *

Re: opening a new window if validated

2007-11-20 Thread Pavel Sapozhnikov
Hey Adam thanks. So basically one of the things I did was when I am on page x I validate using client side JS validation either written myself or html:javascript doesn't really metter but both of those two methods pop up an alert and doesn't actually put it right in the page like html:errors does.

Re: Access the value stack

2007-11-20 Thread Dave Newton
You don't need to access the value stack directly in order to access action properties in a JSP. The action itself is pushed on to the stack allowing any member with a public getter method to be accessed. Action: public class MyAction { private String _foo = Hello; public String getFoo()

Re: Problem with struts2 iterator and ognl

2007-11-20 Thread Dave Newton
What do you mean by not going through the action? d. --- sagarlotiya [EMAIL PROTECTED] wrote: Hi, I have a iterator and i am loop through it in my jsp file and iterator contains textbox. Problem occurs when i am try to set the values directly on Model through ognl. any one has idea

Re: User validation

2007-11-20 Thread Dave Newton
So there's a form for them to log in from? d. --- slideharmony [EMAIL PROTECTED] wrote: Hello, i have a question: shoud I put user validation (with username and password) into an action or an interceptor? If I have a LoginInterceptor that validate the user, what's the utility to have a

Re: javascript update tag value property

2007-11-20 Thread victor sosa
ANY IDEAS, how to? victor sosa wrote: Hi, I am trying to update a textfield when the select is changed using javascript event onchange, so How I can do that? Which is the best practices here? Here is my code, any Ideas? script type=text/javascript function

Re: [s2] conditional validation

2007-11-20 Thread Dave Newton
Create two validation XML files, one for each method. You can differentiate between them in a couple different ways, the easiest may be to just create two action mappings, one for each method. d. --- lbastil [EMAIL PROTECTED] wrote: Is there any way with the build in declarative validation

Warn: No configuration found for the specified action under struts2.0.11

2007-11-20 Thread red phoenix
I have some configure,and it runs well under struts2.0.9,but it raise warning under struts2.0.11,my files are follows: /*struts.xml*/ ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN

Struts 1.1 Archived Website link broken

2007-11-20 Thread pmularien
On this page: http://struts.apache.org/downloads.html#PriorReleases The Struts 1.1 website link is wrong. It links to: http://struts.apache.org/1.1/index.htm It should link to (note .html instead of .htm): http://struts.apache.org/1.1/index.html Could someone please fix this? If I should enter

domain name used soehow as namespace

2007-11-20 Thread Ivan Žučenko
Hi all, title of my question may sound a bit wired.. but.. I want to run my service for web but also on .mobi and so.. I want one package in struts.xml dedicated to mobi actions... in other worlds I have myDomain.com which is handled by actions of one package + tiles then myDomain.com/ajax for

Re: [s2] conditional validation

2007-11-20 Thread lbastil
Hm, but as I have model driven action, for both methods (even if I want to validate different attributes later on) the first I have to use is VisitorFieldValidator with appendPrefix=false for the model attribute of the action class. So at this level there is no difference, thats why I cannot see

Problem with s:param

2007-11-20 Thread slideharmony
Hi, I want to pass a request parameter with this code in order to use it inside an interceptor. this is jsp code: s:url id=url action=. s:param name=login_attempt value=no/ /s:url s:a href=%{url}Sign up!/s:a in the interceptor class I use the following code: public String

Re: Struts 1.1 Archived Website link broken

2007-11-20 Thread Antonio Petrelli
2007/11/20, pmularien [EMAIL PROTECTED]: On this page: http://struts.apache.org/downloads.html#PriorReleases The Struts 1.1 website link is wrong. It links to: http://struts.apache.org/1.1/index.htm It should link to (note .html instead of .htm): http://struts.apache.org/1.1/index.html

Re: Struts 1.1 Archived Website link broken

2007-11-20 Thread pmularien
That was fast -- thank you :) Antonio Petrelli-3 wrote: Committed the change, you will see it in the next site deploy. Thanks for the report! Antonio -- View this message in context: http://www.nabble.com/Struts-1.1-Archived-Website-link-broken-tf4843948.html#a13859453 Sent from

Re: Problem with s:param

2007-11-20 Thread slideharmony
thanks, I have tried it, but it doesn't work yet! I can't understand.. newton.dave wrote: --- slideharmony [EMAIL PROTECTED] wrote: in the interceptor class I use the following code: final ActionContext context = invocation.getInvocationContext (); Map request =

Re: [s2] conditional validation

2007-11-20 Thread Dave Newton
You said you wanted different validation for different methods in an action, yes? action name=meth1 class=foo.FooClass method=method1 .../ action name=meth2 class=foo.FooClass method=method2 .../ FooClass-meth1-validation.xml First set of validations

validation errors

2007-11-20 Thread Brian Relph
Can I reference action errors / messages in a similar way to field errors? I have a custom validator for a date field that is split into month/day/year fields, but i want the errors for it to appear next to inputs. Here are my validators: field name=ssn field-validator type=requiredstring

Re: Problem with s:param

2007-11-20 Thread Dave Newton
--- slideharmony [EMAIL PROTECTED] wrote: in the interceptor class I use the following code: final ActionContext context = invocation.getInvocationContext (); Map request = (Map)context.get(request); context.getParameters() will give you request parameters. d.

Re: validation errors

2007-11-20 Thread Brian Relph
I realized that since this was a custom validator, I can add the error message to the fieldErrors with whatever key i choose - so i can now reference that error message. What about for other validators, like the expression validator, is there a way to specify a key for it? I think the expression

Re: concatenate Strings in tag attributes

2007-11-20 Thread Gary Affonso
Anton Pussep wrote: value=%{'/jsp/'+#parameters.file[0]} I thought I tried that one out already, but apparently I remembered wrong, since it really works, which is great! Anyway, for my part this is very inconvenient. Also I don't know a way to pass an array to request parameters. Thus IMHO

[ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-20 Thread Ian Roughley
I'm pleased to announce the release of my newest book, Practical Apache Struts2 Web 2.0 project. And, no, I didn't pick the name :-) Where Starting Struts2 was high level and provided pointers for further exploration, this book dives deep into the framework providing a practical guide and

Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-20 Thread Frank W. Zammetti
Congratulations Ian! I know how it feels to finally finish such an undertaking and see the end result. Kudos! I'm sure it's a fantastic book too (wink-wink). Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN:

Struts 2 Session Timeout

2007-11-20 Thread Richard Sayre
I noticed while developing my application that Struts 2 (I think) will recreate your session when it times out. I have several name spaces used in my packages such as: 1. /Admin 2. /Design 3. / While I am hitting actions in the /Admin or /Design area of my application, if the session times out

RE: [s2] Prepare and Parameter Interceptors

2007-11-20 Thread Mark Steyn
Thanks for your help Gary. I got to the bottom of the problem, or at least got around it in the end. After Struts created objects based on the submitted form values, I was using the ids of those objects to create corresponding objects instantiated with values from a database. I then used the

Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-20 Thread Musachy Barroso
yeah, kudos to Ian. I should try writing one so I could have a fancy signature ;) musachy On Nov 20, 2007 2:04 PM, Frank W. Zammetti [EMAIL PROTECTED] wrote: Congratulations Ian! I know how it feels to finally finish such an undertaking and see the end result. Kudos! I'm sure it's a

Re: combining Struts-2 with Struts-1 application.

2007-11-20 Thread Leena Borle
Hi, I followed simple approach suggested by Ted which says, The simplest thing is to let the Struts 1 portion answer the *.do URIs and let the Struts 2 portion answer the *.action URIs. Everyone can share session and application scope as needed. One page can submit to the other portion, just

[S2] How to forward to another struts mapping

2007-11-20 Thread alexworden
Hi, I'm trying to process a request to URL-A with Action-A, then display a home page of URL-B in Struts 2. However, in order to display the view of URL-B, I need to invoke Action-B first. I also want any ActionErrors from Action-A to be present in the view of URL-B. How do I do this? It used

[S2] Tooltip and simple theme

2007-11-20 Thread Jiang, Jane (NIH/NCI) [C]
Hi, I have an application developed ready for test. Now I have added requirement for tooltips for a few components. I just noticed that tooltip is only available in xhmtl theme. How should I implement tooltips in simple theme? Thanks a lot for your help, Jane -Original Message-

RE: [S2] Tooltip and simple theme

2007-11-20 Thread Hernandez, David
I would try rendering with XHTML and then copying and pasting the resultant Tooltip code into my simple themed page. -Original Message- From: Jiang, Jane (NIH/NCI) [C] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 4:22 PM To: Struts Users Mailing List Subject: [S2] Tooltip

Re: [S2] Tooltip and simple theme

2007-11-20 Thread Jim Cushing
You can use the title property, which generates a title attribute in the HTML. Most browsers will render this like a tool tip when the user hovers over the element. On Nov 20, 2007, at 4:21 PM, Jiang, Jane (NIH/NCI) [C] wrote: Hi, I have an application developed ready for test. Now I

Re: jQuery plugin for Struts 2?

2007-11-20 Thread Ted Husted
On Nov 20, 2007 1:53 PM, name withheld wrote: I've been working with Struts 2 for a few months and have some questions that I was hoping you would be interested in discussing with me. I see that Struts 2 uses Dojo for it's Ajax capabilities. I prefer jQuery and have contemplated making a

Re: [s2] Prepare and Parameter Interceptors

2007-11-20 Thread Gary Affonso
Mark Steyn wrote: Thanks for your help Gary. I got to the bottom of the problem, or at least got around it in the end. After Struts created objects based on the submitted form values, I was using the ids of those objects to create corresponding objects instantiated with values from a database.

Re: jQuery plugin for Struts 2?

2007-11-20 Thread Dave Newton
FWIW, I'm working on a minimal jQuery plugin that should be up on GoogleCode within a couple of weeks, including some jQueryUI support. d. --- Ted Husted [EMAIL PROTECTED] wrote: On Nov 20, 2007 1:53 PM, name withheld wrote: I've been working with Struts 2 for a few months and have some

Re: user Digest 20 Nov 2007 22:05:01 -0000 Issue 7714

2007-11-20 Thread Adrian Marrero
Hi, I am having difficulty using struts: html:select property=attributes multiple=true Goal: I would like to be able to select multiple fields from the drop down box, retrieve them in my servlet, and use them elsewhere. Problem: When I retrieve the String [] in my servlet and I view its

Re: user Digest 20 Nov 2007 22:05:01 -0000 Issue 7714

2007-11-20 Thread Dave Newton
Consider creating a more descriptive subject line. --- Adrian Marrero [EMAIL PROTECTED] wrote: struts-config.xml form-property name=selectedAttributes type=java.lang.String / I thought you wanted an array? CustomData cd = (CustomData)form; String [] attr = cd.getSelectedAttributes();

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Lewis Li
Yes, I created a database named quickstart before running the script. A database is the same as a schema. Can you successfully run the script with your MySql? Lewis - Original Message - From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent:

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Dave Newton
Remove all the single quotes and try; it works for me fine that way. MySQL documentation is available http://dev.mysql.com/doc/#manual. d. --- Lewis Li [EMAIL PROTECTED] wrote: Yes, I created a database named quickstart before running the script. A database is the same as a schema. Can

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Lewis Li
Thanks, Dave. It finally works now. I can't believe the officical Struts 2 tutorial has such a silly error. Did the tutorial authors ever try running the script themselves? Lewis - Original Message - From: Dave Newton [EMAIL PROTECTED] To: Struts Users Mailing List

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Dave Newton
--- Lewis Li [EMAIL PROTECTED] wrote: I can't believe the officical Struts 2 tutorial has such a silly error. Did the tutorial authors ever try running the script themselves? Everybody runs under different environments, different settings, different toolchains, etc. The framework and its

Re: Problem with struts2 iterator and ognl

2007-11-20 Thread sagarlotiya
Hi, not going through the action means that, directly set on Model bean without going through action. Otherewise what happen, first we have to get the value in our action using reqest.getParameter() or through getter/setter using paramPrepareParamStack and then set these values on Model from

Having query on action chaining

2007-11-20 Thread vijay vijay
Hi, i am want to work on action chaining can any one give me links for it. vijay

Re: jQuery plugin for Struts 2?

2007-11-20 Thread emartin24
Ted Husted wrote: On Nov 20, 2007 1:53 PM, name withheld wrote: I've been working with Struts 2 for a few months and have some questions that I was hoping you would be interested in discussing with me. I see that Struts 2 uses Dojo for it's Ajax capabilities. I prefer jQuery and have

Re: jQuery plugin for Struts 2?

2007-11-20 Thread Nuwan Chandrasoma
i would like to see one :) emartin24 wrote: Ted Husted wrote: On Nov 20, 2007 1:53 PM, name withheld wrote: I've been working with Struts 2 for a few months and have some questions that I was hoping you would be interested in discussing with me. I see that Struts 2 uses Dojo for

Fwd: How to preselect a radio button in Struts 2

2007-11-20 Thread Pankaj Gupta
Hey, I tried it out tr td class=tccValueFields:radio label=Courtesy Call Requested name=courtesyCallFlag list=#{'Yes':'Yes','No':'No'} listKey=#{'No'} listValue=No/nbsp;nbsp;nbsp;nbsp;nbsp; /td /tr But it didn't worked. I tried s:radio list=#{1:'Yes', 2:'No'}