[S2] Autocompleter FATAL exception raised: [object Error]?

2007-04-26 Thread wolverine my
Hi! I have the following JSP with AJAX tag and the debug is true: <%@ taglib prefix="s" uri="/struts-tags" %> AJAX the struts.xml looks like the following: and here is my action class: package com.dummy.test.ajax; public class AjaxTest extends ActionS

[S2] Type Conversion Problem in documentation

2007-04-26 Thread Struts2 Fan
Hi all, I have a problem with this type-conversion thing. http://struts.apache.org/2.x/docs/type-conversion.html I am trying to dynamically fill a table. I have a bean Person and Person has "List". What I did - step by step. 1 - I defined "List houseList" in the PersonAction class. (Also G

Bug with integer param in struts.xml with 2.0.8 svn head

2007-04-26 Thread Tlvenn
Hi, i just spotted a bug in the following case: foo.jspa?id=${bar.id} I end up in : /foo.jspa?id=1,748 (notice the comma) instead of /foo.jspa?id=1748 Best regards Chris -- View this message in context: http://www.nabble.com/Bug-with-integer-param-in-struts.xml-with-2.0.8-svn-head-tf3655247.

Re: [s2] ajax tags for doing popup/overlay form?

2007-04-26 Thread Musachy Barroso
The ajax tags don't support overlays, or floating panels. regards musachy On 4/26/07, Allen Gilliland <[EMAIL PROTECTED]> wrote: i'm guessing that this is a pretty common problem but i couldn't find any examples on the struts2 docs, i would like to know how best to go about doing a popup/overl

Re: OGNL

2007-04-26 Thread Ted Husted
I believe you would need to include the name of the action object as part of the # reference, as we do with the session and request objects. The idea behind the root object is that we don't need to refer to the object by name, since it is the "root". WW2 and S2 extend the OGNL notion of a root ob

RE: OGNL

2007-04-26 Thread Dave Newton
--- Big Stick <[EMAIL PROTECTED]> wrote: > That's my point Dave! I think this doc needs to be > updated. > > ...references to Action properties can omit the # > marker... To what, "must" omit? d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has

RE: OGNL

2007-04-26 Thread Big Stick
That's my point Dave! I think this doc needs to be updated. ...references to Action properties can omit the # marker... -Original Message- From: "Dave Newton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: 4/26/07 5:24 PM Subject: Re: OGNL --- [EMAIL PROTECTED] wrote: > I en

S2: ParametersInterceptor setParameters error

2007-04-26 Thread Annie_Wang
Hi, I'm trying to write a very simple web app to do login using Struts2 and tiles. But when I submit the login form, I get the following errors: ERROR 14:22.42 [http-8080-2] ParametersInterceptor - ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'p

S2: How to get namespace of currently executed action from interceptor?

2007-04-26 Thread Dmitriy Kuznetsov
Hi. I have interceptor that logs requests to actions. In it's intercept(ActionInvocation) method i easily find the name of currently executed action using following code: public String intercept(ActionInvocation actionInvocation) { String actionName = actionInvocation.getInvocationContext(

Re: OGNL

2007-04-26 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > I encountered a situation today that seems to > disprove the following documentation. I have an > Action class with a property that my JSP can only > access if I DO NOT include the #. If I prepend the > #, it is not found. > > "The Action instance is always pushed

Struts 2 changing locale from an action

2007-04-26 Thread Jim Young
Can anybody tell us how to change the locale from an action in Struts 2. We have users that log-on and in their profile is the language that they wish the web site to be displayed in. I have not be able to find out how to change the locale. All the examples for changing the locale for Struts

OGNL

2007-04-26 Thread stanlick
I encountered a situation today that seems to disprove the following documentation. I have an Action class with a property that my JSP can only access if I DO NOT include the #. If I prepend the #, it is not found. "The Action instance is always pushed onto the value stack. Because the Action i

How to disable a submit button with ajax

2007-04-26 Thread King, Leon C
Hi all, I have a non-ajax button that I want to disable when my 'ajax' autocompleter(s) change values. (I DIDN'T go with the 'ajax' submit button because it doesn't work with IE 6) How would I do this? Is this even possible? CODE SNIPPET below:

Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell
Dave Newton-4 wrote: --- Skip Hollowell <[EMAIL PROTECTED] > wrote: > I will work more in depth now that I know this > is the functionality I have been searching for. You should just be able to use the stat.index value in yo

[s2] ajax tags for doing popup/overlay form?

2007-04-26 Thread Allen Gilliland
i'm guessing that this is a pretty common problem but i couldn't find any examples on the struts2 docs, i would like to know how best to go about doing a popup/overlay form using struts2 + ajax. so for example, if the user is on a page and clicks a link like "add category" that link would popu

Re: Struts/FormDef formatting question

2007-04-26 Thread Hubert Rabago
Yeap, that's what I'd do. Hubert On 4/26/07, Givler, Eric <[EMAIL PROTECTED]> wrote: The problem I'm having with it is how to use the converter when the DB type is java.lang.String, and the conversion target type (for the form) will be java.lang.String? Apologies on this -- I didn't notice t

Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote: > I will work more in depth now that I know this > is the functionality I have been searching for. You should just be able to use the stat.index value in your tags. Doesn't mean you *can*, just that *I* think you should! > My apologies for RTFM questi

RE: Struts/FormDef formatting question

2007-04-26 Thread Givler, Eric
The problem I'm having with it is how to use the converter when the DB type is java.lang.String, and the conversion target type (for the form) will be java.lang.String? Apologies on this -- I didn't notice the source and destination types. Even if they are the same data types, I can at least s

[Struts Workflow] using attributes on a jsp?

2007-04-26 Thread Cassie . Morgan
Hello, I'm just getting started with this Struts Workflow, and am learning as I debug. I cannot seem to get one thing right no matter what I try. It seems like I can save an object into the workflow to use on the next page. This looks like it internally saves the object in the session, remov

Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell
Dave, Thanks for the pointer. I was there, and quite frankly, I couldn't get it. I will work more in depth now that I know this is the functionality I have been searching for. My apologies for RTFM questions. Skip Dave Newton-4 wrote: --- Skip Hollowell <[EMAIL PROTECTED]

Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote: > I can't seem to find any looping constructs that > would get me the index [...] http://struts.apache.org/2.x/docs/iterator.html d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spa

[S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell
I have two Arrays (account.amt and account.date) and while they are both the same size, I don't know what that size is until the page gets em. If I really needed to I guess I could also put a size field into account. But what is the best way to loop over them and grab these values? I can eas

RES: [S2] s:div tag question.

2007-04-26 Thread Alberto Chiang
Hi all again! Well I did some research and i found that the tabbedPanel component belongs to the dojo framework and this "feature" is currently marked as an improvement *sight* to be released yet (version 0.9). Maybe I will have a go to struts-menu or something like thisdoes anyone know any go

Re: Struts/FormDef formatting question

2007-04-26 Thread Hubert Rabago
Then you'll have to have code to convert between the two. If you're using Formdef, you can put this logic in Converter and associate that converter with the field in the form you're using. If not, you'll have to handle this within your Action when you prepopulate your outgoing form or parse the

Re: How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Musachy Barroso
http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 4/26/07, Martin Gainty <[EMAIL PROTECTED]> wrote: is there a way to make sure all of these parameters as well as the step by step instructions are placed in the docs Thanks! Martin-- This email message and any files transmitted with

Re: How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Martin Gainty
is there a way to make sure all of these parameters as well as the step by step instructions are placed in the docs Thanks! Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If

Re: How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Musachy Barroso
yes, all the values will be sent, but there is a "formFilter" attribute where you can specify a function that will be called for each element, and you just need to return true, for the ones that you want to be submitted. The function has one parameter, which will be the element. musachy On 4/26/

Re: How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Olivier THIERRY
Thanks a lot, I can call my action now. One more question ... When I set the formId attribute for the div, does it mean that all values in the form will be sent to my action ? If it is the case, is there a way to send only the value of my textfield ? Olivier 2007/4/26, Musachy Barroso <[EMAIL P

Handling redirect to Login page on session timeout for ajax requests

2007-04-26 Thread Gajbhe, Laxman \(Contractor\)
Hi, I've an authentication interceptor that checks for authentication and forwards to login page if the user is not logged in. This works fine. Problem is if session is timed out and user clicks on a page where the request is ajax driven, login page gets rendered as an ajax content. For

RE: Struts/FormDef formatting question

2007-04-26 Thread Givler, Eric
Thanks for the quick response. The field in the db is to be stored stripped of formatting. However, the display and entry of the field should include the formatting. -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Thursday, April 26, 2007 11:21 AM To: Struts Users

Re: Struts/FormDef formatting question

2007-04-26 Thread Hubert Rabago
Your form field will come in as String. If you'll be storing the data as string as well, maybe you don't need any more conversion between the two. Hubert On 4/26/07, Givler, Eric <[EMAIL PROTECTED]> wrote: I was reading on the Formdef site about using a formatter (converter) for handling a ph

Struts/FormDef formatting question

2007-04-26 Thread Givler, Eric
I was reading on the Formdef site about using a formatter (converter) for handling a phone number for dynamic form beans in Struts. I have a situation that is very similar to this but I'm not sure how to go about writing it. The existing table has numeric phone fields which will not be changed

Re: How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Musachy Barroso
I think it will be easier (and work) like this: 1. set href in your div, pointing to your action 2. set formId in your div pointing to the form that has the text field 3. add listenTopic to your div 4. publish the topic of 3. when the user types in the textbox musachy On 4/26/07, Olivier THIERR

How to fill a div from an Ajax call when a onchange event is fired ?

2007-04-26 Thread Olivier THIERRY
Hi, I used to use Struts 1.x and I just begin to use Struts 2.x I am very interested with the Ajax feature, but I can't make it work ... What I need to do looks very classical to me : - The user types an employee code in a text box - When the onchange event is fired, I call a Struts action with

Re: Form submission

2007-04-26 Thread Hubert Rabago
There are differences in how a user interacts with html:button and html:submit. For instance, pressing enter on some fields can trigger a submit button, but not a regular button. You can get the best of both worlds letting your javascript method determine whether the submit should happen at all

Re: struts examples not working

2007-04-26 Thread Niall Pemberton
Would also be good to know which version of Struts you are talking about. Niall On 4/26/07, Laurie Harper <[EMAIL PROTECTED]> wrote: hardc0d3r wrote: > i have jdk 1.6 and tomcat 5.5 installed and i tried to run the examples of > struts by putting the war files in the webapps directory. when i t

Re: [S2] s:div tag question.

2007-04-26 Thread Dave Newton
--- Martin Gainty <[EMAIL PROTECTED]> wrote: > Im confused by your use of 2 different themes > (simple theme for TabbedPanel but ajax theme for the > div tag) If you stick with theme="ajax" what happens? > If you stick with theme="simple" what happens? The should not be theme="ajax" and dynamic

Re: [S2] s:div tag question.

2007-04-26 Thread Martin Gainty
Good Morning Alberto- Im confused by your use of 2 different themes (simple theme for TabbedPanel but ajax theme for the div tag) If you stick with theme="ajax" what happens? If you stick with theme="simple" what happens? Martin This email message and any files transmitted with it contain con

[S2] s:div tag question.

2007-04-26 Thread Alberto Chiang
Hi all, I'm currently using the tag whitin the tag , and im wondering if there is a bug with the attribute disabled in the s:div tag, since i didn't succeed to disabled some tabs at al . Is this a bug or there is a work around on this? Code: A

Re: [S2] Autocompleter and JSON list

2007-04-26 Thread Musachy Barroso
Yes, you might want to use the JSON plugin: http://cwiki.apache.org/S2PLUGINS/json-plugin.html musachy On 4/26/07, wolverine my <[EMAIL PROTECTED]> wrote: In my action class, what is the way to format my the values into JSON string? Do I need to construct the string in JSON format? On 4/26/

Re: struts 1.x website needs fixing badly

2007-04-26 Thread Ted Husted
Looking at the source for the FAQ

Re: [S2] Autocompleter and JSON list

2007-04-26 Thread Dave Newton
--- wolverine my <[EMAIL PROTECTED]> wrote: > Now, to return the list dynamically (e.g. read from > the database), I will have to retrieve the values > from the database, Yeah. > [...] store it in the session You don't need to store it in session. d.

Re: [s2] Extending struts.xml

2007-04-26 Thread MLENEVEUT
Hi, I have some errors too, in 2.1.0 (build 25/04) version. I had to add the tiles type () in the default-struts.xml, because it was not inherite from my struts.xml The bad configuration : struts.xml :

Re: struts Multipart

2007-04-26 Thread Lance
Sounds like a classpath issue to me. Try searching your webapp for multiple struts.jar or commons-fileupload.jar. Are they both in the same dir? (WEB-INF/lib probably) Michel Van Asten wrote: Hi, I got a strange problem... I got this error message When I try to do an upload in my applicatio

struts Multipart

2007-04-26 Thread Michel Van Asten
Hi, I got a strange problem... I got this error message When I try to do an upload in my application any idea ? javax.servlet.ServletException: Cannot find multipart class "org.apache.struts.upload.CommonsMultipartRequestHandler", exception: org.apache.struts.upload.CommonsMultipartRequestHandle

Re: Response already committed

2007-04-26 Thread Lance
I just re-read your email... pls ignore my last reply. My s2 knowlege is very minimal but chances are that an ajax action is triggered by an XmlHttpRequest. In this case, you don't want to redirect this request. What you want to do is send something (javascript) back to the calling page tellin

Re: Response already committed

2007-04-26 Thread Lance
It sounds like you are still redirecting after the repsponse is comitted. If you attempt to do this on tomcat, an error will be reported then instead of redirecting, the redirect page will be included at the end of the current page. Gajbhe, Laxman (Contractor) wrote: Lance, Thanks for your