Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: If the submit button is used inside a form (href is not required on this case), the form will be submitted asynchronously: This is note true. It can never submit from inside a form. This will never anything. It will never make any thing. I am using

Re: autocompleter help

2007-06-24 Thread Musachy Barroso
Do you want the options on the second autocompleter to be pre-populated like in the first one %{'a','b'}? musachy On 6/23/07, Pedro Herrera [EMAIL PROTECTED] wrote: Hi, In the struts-showcase is showed an example of autocomplete.

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Musachy Barroso
Sometimes it helps to just ask what is wrong with my setup? instead of stating this does not work (which might be true, but not on this case). Consider looking at the examples in showcase. regards musachy On 6/23/07, Mansour [EMAIL PROTECTED] wrote: From the documentation

Re: extending a template

2007-06-24 Thread Musachy Barroso
http://cwiki.apache.org/WW/extending-themes.html musachy On 6/23/07, Mansour [EMAIL PROTECTED] wrote: Hello every one: I couldn't find an answer to this simple question on struts doc site. I need to modify the template for the submit button and remove the tr tag surrounding it in ajax theme.

Re: autocompleter help

2007-06-24 Thread Pedro Herrera
yes ... Musachy Barroso wrote: Do you want the options on the second autocompleter to be pre-populated like in the first one %{'a','b'}? musachy On 6/23/07, Pedro Herrera [EMAIL PROTECTED] wrote: Hi, In the struts-showcase is showed an example of autocomplete.

Re: extending a template

2007-06-24 Thread Mansour
I am not sure if that's what I need. As I mentioned in my original post, I have extracted the ajax them to /template/ajax and modified the template submit.ftl. The problem now is how to reference this template from my JSP. I DON'T want to change the theme. I need it to be ajax for this page.

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: --- Mansour [EMAIL PROTECTED] wrote: If the submit button is used inside a form (href is not required on this case), the form will be submitted asynchronously: This is note true. It can never submit from inside a form. This will never anything. It will never make any

Re: Making Fields editable depending on role

2007-06-24 Thread Archer
Thank you very much for your help... Regards Viplav Kallepu On 6/22/07, Angelo zerr [EMAIL PROTECTED] wrote: Hi, I think you can be interested with FormView http://formview.sourceforge.net/which is taglib to manage state of your fields (hidden, visible,...). With FormView you can manage

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: --- Mansour [EMAIL PROTECTED] wrote: How do I know if there is traffic on the wire? Use Live HTTP Headers, Firebug, Ethereal, etc. I used Live HTTP Headers, and there's nothing on the wire. There's no request. Did you say that the action worked in a

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Now this wont make any sense. I added the theme attr to the form, and it's working on all the buttons except the first one in the list! Here' my code: table id=row thead tr thTask Id/th thService Name/th thUnit Count/th thRate/Unit/th

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: No, there are no msgs in the debug mode. None? s:iterator value=taskList status=stat id=row s:form action=updateTask id=form_${id} This should cause a form ID collision, which shows a debug msg, since you'll have multiple forms with the same ID. My

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: How do I know if there is traffic on the wire? Use Live HTTP Headers, Firebug, Ethereal, etc. Did you say that the action worked in a non-Ajaxily? d. Shape Yahoo!

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Dave Newton [EMAIL PROTECTED] wrote: This should cause a form ID collision, which shows a debug msg, since you'll have multiple forms with the same ID. Whoops, didn't see you were iterating over tasks, which presumably have an ID, so I assume the form IDs are being generated properly? d.

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave, the generated IDs are correct. There's the resulting HTML , I dont see what's wrong with this. table id=row thead tr thTask Id/th thService Name/th thUnit Count/th

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: --- Dave Newton [EMAIL PROTECTED] wrote: This should cause a form ID collision, which shows a debug msg, since you'll have multiple forms with the same ID. Whoops, didn't see you were iterating over tasks, which presumably have an ID, so I assume the form IDs are

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
Are you using the standard S2 tags or your modified/extended tags? I'm currently submitting forms under both 2.0.6 and 2.0.8 Ajaxily with no issues, using both button and normal s:submit.../ tags, updating divs w/ the results, seeing the logging from within my Actions, etc. My guess is it will

Re: extending a template

2007-06-24 Thread Zarar Siddiqi
You might want to post your JSP code. But I thinks specifying the 'template' and 'theme' attributes of your JSP tag should do the trick. I blogged about this a while back: http://arsenalist.com/2007/04/11/struts-2-form-control-templates/ Also make sure that when you extract your

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave, I am using the standard S2 tags. I have deleted the whole folder for the templates. The submit was working fine when not embeded in form. Now, it's ok, except for the first element. Did you try to iterate over a list and create a form for each of them to update ? My problem now, is the

Re: autocompleter help

2007-06-24 Thread Musachy Barroso
You can linked them if the second one will have its options loaded using ajax. musachy On 6/24/07, Pedro Herrera [EMAIL PROTECTED] wrote: yes ... Musachy Barroso wrote: Do you want the options on the second autocompleter to be pre-populated like in the first one %{'a','b'}? musachy

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: I have deleted the whole folder for the templates. Did you clear your browser cache? Did you try to iterate over a list and create a form for each of them to update? Yes. My problem now, is the first element (ONLY) not submitting. I guess it would

actions defined in a package are visible in other packages??

2007-06-24 Thread Roberto Nunnari
Hello. Another question. In my struts.xml I have a few packages. One with name=default contains the actions located at the context root. Another package with name=user, which I access with namespace=user in the s:url tags has other actions. Now, I just noticed that actions defined in package

Re: [S2] Action with wildcard not found and strange behavior of s:form

2007-06-24 Thread Zarar Siddiqi
The only mysterious part here is figuring out why you would want to use ! in your action name. The default behavior of Struts 2 is for the URL http://localhost:8080/actionName!myMethod.action to actually execute myMethod instead of execute() when the action is called so you don't need to make

s:form does not render html when JSP is processed.

2007-06-24 Thread jwpronto
Hi, I am new to struts2 and trying to generate a simple helloWorld form. I managed to get HelloWorld/helloWorld.jsp working fine but when I add an s:form tag to the jsp no html is rendered for the form tag. JSP: %@ taglib prefix=s uri=/struts-tags % html head titleHello

Re: s:form does not render html when JSP is processed.

2007-06-24 Thread Dave Newton
--- jwpronto [EMAIL PROTECTED] wrote: li s:url action= Register /li Is that in your HTML? d. Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.

Re: [S2] + Spring - WebApplicationContext?

2007-06-24 Thread Zarar Siddiqi
That'll work but if you want to use one line to get it, use this: http://www.springframework.org/docs/api/org/springframework/web/context/support/WebApplicationContextUtils.html#getRequiredWebApplicationContext(javax.servlet.ServletContext)

[OT] Re: Reloading .war files automatically in Tomcat 6

2007-06-24 Thread Dave Newton
--- Session A Mwamufiya wrote: now I need to find a tweak of some sort for Tomcat 6, so that I don't need to restart the server every time I make a change to the war file. Is there a way to have Tomcat reload the war file as soon as it changes? Maybe checking the Tomcat documentation would

Re: autocompleter help

2007-06-24 Thread Pedro Herrera
ok. but How I do this ? I need an example for the second combo be filled with names and keys too. How I do this with autocomplete? What I need to change in options.ftl ?? I need a complete example Thanks Pedro Musachy Barroso wrote: You can linked them if the second one will have

Re: actions defined in a package are visible in other packages??

2007-06-24 Thread Roberto Nunnari
oops.. I should have read the docs a bit more before posting.. sorry.. for the noise! -- Robi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [S2] + Spring - WebApplicationContext?

2007-06-24 Thread Martin Gilday
I might be missing the point here. But why do you want to get hold of an application contect directly? You just want to pull out beans from it to use in your actions? You would be much better off using the Struts 2 Spring integration to have it populate your actions for you. No messy util

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
This is funny. I am getting this msgs only on IE for windows and for linux. And things are working fine. DEBUG: DEPRECATED: dojo.style replaced by dojo.html.style -- will be removed in version: 0.5 DEBUG: DEPRECATED: dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.*

Re: [OT] Re: Reloading .war files automatically in Tomcat 6

2007-06-24 Thread Session A Mwamufiya
I actually followed this link, and here is what I defined in my server.xml file: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false When I make changes and have my ant build place the new war file in the

Re: [OT] Re: Reloading .war files automatically in Tomcat 6

2007-06-24 Thread Dave Newton
IIRC there was a short thread on this topic on struts-user a few months ago; I'd check those and/or post to a Tomcat list/forum. --- Session A Mwamufiya [EMAIL PROTECTED] wrote: I actually followed this link, and here is what I defined in my server.xml file: Host name=localhost

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: Is there anything else in your action (an action property) called id? NO, there's no property called id, but there's are many ids for other beans (I.E. invoice.id , task.id ...etc). --- Mansour [EMAIL PROTECTED] wrote: This is funny. I am getting this msgs only

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
Is there anything else in your action (an action property) called id? --- Mansour [EMAIL PROTECTED] wrote: This is funny. I am getting this msgs only on IE for windows and for linux. And things are working fine. DEBUG: DEPRECATED: dojo.style replaced by dojo.html.style -- will be

FileUpload confusion

2007-06-24 Thread Nicolas Doye
Hi all, I've tried ripping off the file upload action from WebWork in Action and from Struts 2.0.8's showcase. Here are some things that are confusing me: 1. What are the correct entry points/methods for the Action? WWiA suggests that we use execute(). The showcase example has upload() and

Re: Making Fields editable depending on role

2007-06-24 Thread Pierre Goupil
Hello, This tool looks great. But can you use it for links too ? I mean, to display or hide a link (or anything else) depending upon the role of the user ? I've browsed through the doc and it doesn't seem clear. Cheers, Pierre 2007/6/24, Archer [EMAIL PROTECTED]: Thank you very much for

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
This problem is really odd. All the items in the list posts to the same action, and all the code was generated in loop. HOW can this happen ? all the submit buttons can submit a request except the first one in the list! There's no js event fired !! Mansour wrote: Dave Newton wrote: Is

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
Is the generated HTML the same in both browsers? (Just as a sanity check.) --- Mansour [EMAIL PROTECTED] wrote: This problem is really odd. All the items in the list posts to the same action, and all the code was generated in loop. HOW can this happen ? all the submit buttons can submit a

Interceptor Stack Help

2007-06-24 Thread Sarr, Nathan
Hello, I have been having a little trouble with the interceptor stack but I have quite a bit of info, so I'm hoping someone can help me out. Here it goes: I created my own interceptor stack with the following: [code] interceptor-stack name=crudStack

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: s:if test=#stat.odd == true tr class=odd /s:if s:else tr class=even /s:else Btw, I would change this to (minus whatever syntax / attribute name errors I'm about to make): s:set name=foo value=${#stat.odd ? 'odd' : 'even'/ tr class=${foo} ...

Re: s2: Base url in jsp's

2007-06-24 Thread Zarar Siddiqi
If you're just trying to get the context path, you can just use ${pageContext.request.contextPath}. That way you can just write: link rel=stylesheet type=text/css href=${pageContext.request.contextPath}/css/myStyles.css / If you're using Freemarker, its even easier, just use ${base} like this:

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: --- Mansour [EMAIL PROTECTED] wrote: s:if test=#stat.odd == true tr class=odd /s:if s:else tr class=even /s:else Btw, I would change this to (minus whatever syntax / attribute name errors I'm about to make): s:set name=foo value=${#stat.odd ? 'odd' : 'even'/ tr

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
So... is it the same? The first thing I'd try is generated well-formed HTML by using the S2 tags outside of your own table: use the s:form.../ etc. tags on a plain page w/o your extra table markup. - Original Message From: Mansour [EMAIL PROTECTED] To: Struts Users Mailing List

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Yes. You did it ! You isolated the issue. It's working without any table tags. This works fine and send the request as expected: s:iterator value=taskList status=stat id=row s:form action=updateTask id=form_${row.id} method=post theme=ajax s:textfield

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
Probably because the HTML being generated was invalid; isn't that why you were trying to customize the form tag templates? - Original Message From: Mansour [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Sunday, June 24, 2007 7:37:34 PM Subject: Re:

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: Probably because the HTML being generated was invalid; isn't that why you were trying to customize the form tag templates? No, not really. I was trying to customize it so that I can remove the tr from that are surrounding the button, and therefore I can put it on the

Parameter interception

2007-06-24 Thread stanlick
If I call an action with an id=20 parameter and that action contains both a field called id and a bean that contains an id field, both fields are being set to 20. Does the parameter setter logic set everything on the action object hierarchy that it can find with the same name? -- Scott [EMAIL

Action state

2007-06-24 Thread stanlick
I have a parent child scenario where the parent id is being passed to the child action. Since the actions are instantiated on each request, I am losing the parent id as soon as there is a subsequent request on the child action! Is there a straightforward technique for preserving the parent id

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote: Dave Newton wrote: Probably because the HTML being generated was invalid; isn't that why you were trying to customize the form tag templates? No, not really. I was trying to customize it so that I can remove the tr from that are surrounding the button,

Re: Parameter interception

2007-06-24 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: If I call an action with an id=20 parameter and that action contains both a field called id and a bean that contains an id field, both fields are being set to 20. Does the parameter setter logic set everything on the action object hierarchy that it can find

Parameters Interceptor

2007-06-24 Thread stanlick
Can someone enlighten me on the following excerpt from the -- Scott [EMAIL PROTECTED]

Re: Parameters Interceptor

2007-06-24 Thread stanlick
Can someone enlighten me on the following excerpt from the Apache Struts 2 Documentation Parameters Interceptor http://struts.apache.org/2.x/docs/parameters-interceptor.html Similiarily it's possible to use action.setPrimaryKey() property set call to actually load the model class from

Re: Action state

2007-06-24 Thread climbingrose
You can either use a hidden field to resubmit the parent id to the child action: s:hidden name=parentId/ In child action: public Integer getParentId() { return parentId; } public void setParentId(Integer parentId) { this.parentId = parentId; } Or you can store parent id in session and

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: --- Mansour [EMAIL PROTECTED] wrote: Dave Newton wrote: Probably because the HTML being generated was invalid; isn't that why you were trying to customize the form tag templates? No, not really. I was trying to customize it so that I can remove

Re: Parameters Interceptor

2007-06-24 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: Similiarily it's possible to use action.setPrimaryKey() property set call to actually load the model class from persistent storage. Without any assumption on parameter order you have to use patterns like 'Preparable'. I thought it meant that once you have a

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Dave Newton
From: Mansour [EMAIL PROTECTED] And here's the result: table id=rows form namespace=/ id=form_2 name=updateTask action=/fe/updateTask.action method=post table class=wwFormTable That's still not valid HTML; now you have a form and table immediately after a table tag. d

Re: Submitting a form with ajax submit inside the form

2007-06-24 Thread Mansour
Dave Newton wrote: From: Mansour [EMAIL PROTECTED] And here's the result: table id=rows form namespace=/ id=form_2 name=updateTask action=/fe/updateTask.action method=post table class=wwFormTable That's still not valid HTML; now you have a form and table immediately after a

Re: autocompleter help

2007-06-24 Thread Musachy Barroso
All you have to do is make sure that the url used to load the second autocompleter returns a JSON that has keys and values, like it is explained here: http://struts.apache.org/2.x/docs/ajax-tags.html musachy On 6/24/07, Pedro Herrera [EMAIL PROTECTED] wrote: ok. but How I do this ? I

[S2] login action w/FORM authentication?

2007-06-24 Thread Jon Wilmoth
Is it possible to use an action as the webapp's login page? I've tried the following web.xml/struts.xml entries with S2.0.8 Tomcat 5.5.23, but get a 404 The requested resource (/mywebapp/login.action) is not available message. login-config auth-methodFORM/auth-method

Minimized Window State NOT working

2007-06-24 Thread tom tom
Hi, In Struts2 portlets development, It looks to us that the minimize does not work as expected, When we presss the minimize button instead of minimizing it shows the same content. to my understanding it should not render anything at all. We trying this on uPortal. Can some one else try these