Re: Pls convert this code using struts2 tags

2008-12-22 Thread Nils-Helge Garli Hegvik
Yikeshow hard is it to read curly braces and numbers... Could someone please sponsor me a pair of new glasses? Your "Index" values should read: "%{#idx.index + 3}" etc (note the number is inside the expression). Actually, I think you can skip the curly braces as well. Nils-H On Mon, Dec 22,

RE: https://issues.apache.org/struts/browse/WW-2430

2008-12-22 Thread Ravichandra C
Hi, To the extent my knowledge goes Ajax cannot handler fileuploads. Even if it does it does it by an iframe. I recommend u to go with an iframe. DOJO has many problems I faced with ajax validations.. and now I do it with my own framework. Regards, Ravi -Original Message- From: Ramakri

https://issues.apache.org/struts/browse/WW-2430

2008-12-22 Thread Ramakrishna R Allam
Hi All, I am facing an issue with the ajax div and file upload in the same form (getting object HTMLDocument in place of the ajax div). But when use iframe to display the file upload, I am able to display both. But not able to submit the file as it is in the iframe. - this looks like a wro

Re: How to assign a index value of to a int variable.

2008-12-22 Thread Nils-Helge Garli Hegvik
This works for me: Nils-H On Tue, Dec 23, 2008 at 6:00 AM, taj uddin wrote: > Hi, > > In my application I want to assign the value of the status attribute of > tag to the int variable. > In clear(explanation):-I have the this code(below) > > > I have tried to get the index val

Re: About Struts Rest Plugin

2008-12-22 Thread Luis Gervaso
The reflection impl import java.lang.reflect.Method; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Result; public class RestAction extends HttpBaseAction { @Action(value="/rest/*", result...@result(name=HttpBaseAction.SUCCES

Re: About Struts Rest Plugin

2008-12-22 Thread Luis Gervaso
OK with convention plugin is possible to do code from RestAction @Action(value="/rest/*", result...@result(name=BaseAction.SUCCESS, location="/WEB-INF/content/rest-success.jsp")} ) public final String execute() { System.out.println(); System.out.println("PARENT : "

Re: About Struts Rest Plugin

2008-12-22 Thread Luis Gervaso
I have been trying to figure the solution, I'm using convention plugin and i need to map first every first child of http://www.domain.com/myapp/restController/to a "restaction" so http://www.domain.com/

How to assign a index value of to a int variable.

2008-12-22 Thread taj uddin
Hi, In my application I want to assign the value of the status attribute of tag to the int variable. In clear(explanation):-I have the this code(below) I have tried to get the index value of the current iteration with the help of index() method. where #idx.index() gives the index value. N

Re: [S2] apply i18n on java entity from DB

2008-12-22 Thread Steven Yang
> > Thanks a lot No problem about the code I get your point clearly. I will definitely take this in to consideration. I guess I need to look back into my design patterns as well ha If anyone else have any thoughts or suggestion please fill free to hit me Thanks

About Struts Rest Plugin

2008-12-22 Thread Luis Gervaso
I'm wondering why not the behaviour of the rest plugin is ... *For example* URL: http://www.domain.com/myapp/restController/resource1/resource2/resource3/resource4/resource5 creates a mapping parent & child i.e: parentId: resource1/resource2/resource3/resource4 childId: resource5 these can be

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Dave Newton
You said it was an issue if you had an s:file tag. Since you don't need an s:file tag, it shouldn't be an issue. If you still think it's an issue post the code and configs--I upload files all the time without any difficulties, so it's probably something straight-forward. Dave --- On Mon, 12/22

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Milan Milanovic
Dear Dave, newton.dave wrote: > >> btw - do you maybe know why when file tag is in the tag, >> form action doesn't redirect ? > > Not without further information. I have no issues uploading files. Since > you're not uploading a file, this shouldn't be an issue for you anyway. > > Well, it

how to access differenct form ?

2008-12-22 Thread shrimpywu
for all the action form, i create a super class for them, and contain some info that i want to show onto page, suppose the menu, in the super class, i got an variable say : private Menu menu, in the page, i want to create a jspf for menu, and all the page just need to include it. but for differe

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Dave Newton
> I'm asking here for choosing file on the disk, not downloading. ... The file is going from the web application to the client, right? That's downloading. > btw - do you maybe know why when file tag is in the tag, > form action doesn't redirect ? Not without further information. I have no is

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Milan Milanovic
Dear Dave, newton.dave wrote: > > --- On Mon, 12/22/08, Milan Milanovic wrote: >> I'm asking if S2 have some file chooser tag for this? > > No! File downloading is handled by the client! > > Actually, I'm asking here for choosing file on the disk, not downloading. newton.dave wrote: > >>

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Dave Newton
--- On Mon, 12/22/08, Milan Milanovic wrote: > I'm asking if S2 have some file chooser tag for this? No! File downloading is handled by the client! > Can you post here any link for S2 "stream" response that I can see? http://struts.apache.org/2.x/docs/stream-result.html > I need to enable "down

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Milan Milanovic
Dear Dave, thanks on response. newton.dave wrote: > > The tag is for uploading files. Period. It's not a > general-purpose "enter a filename here" tag. > > We just went through this (or at least tried to) with somebody else. > You're getting the enctype message because a file upload demands

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Dave Newton
The tag is for uploading files. Period. It's not a general-purpose "enter a filename here" tag. We just went through this (or at least tried to) with somebody else. You're getting the enctype message because a file upload demands a multipart encoding. There is no tag for *downloading* a file.

Re: [S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Milan Milanovic
And one more thing, when I click submit button on the form which contains it doesn't redirect to the page I defined in struts.xml for that form action, it just remain on the page with the form? -- Thx, M. Milan Milanovic wrote: > > Hi, > > I need to use tag just to select file in the system

RE: Bean Properties are lost

2008-12-22 Thread Biesbrock, Kevin
I would guess, then, maybe chaining the actions or storing the collections in a session variable. Another idea would be to make the collection a character delimited string and store that in a hidden input. Don't know what the best way is, though. I'm interested to know the most efficient way as

RE: Bean Properties are lost

2008-12-22 Thread Richa Pandharikar
I had tried to set the collection as a hidden property, but then I was getting "invalid value" error when I submit the form. Please not I do not have any validation rules configured for the hidden properties. - Richa -Original Message- From: Biesbrock, Kevin [mailto:biesbrock.ke...@aoin

RE: I'm stuck

2008-12-22 Thread Dai Le
I've compiled the project both with the jdk 1.6._05 and jdk 1.5.0_17 they both work fine deploying the project to Tomcat 6.0.18. When I try to deploy it to Tomcat 6.0.16, which is the version on my live server, the application fails and I get the same error: javax.servlet.ServletException: javax.

RE: Bean Properties are lost

2008-12-22 Thread Martin Gainty
Kevin- if your scope is local that is the problem..the default scope is page *(so as soon as you switch page the variable is lost)* try a more comprehensive scope such as application instead Take a look at ScopeInterceptor to access the scoped atrributes http://struts.apache.org/2.x/docs/scope-i

RE: Bean Properties are lost

2008-12-22 Thread Biesbrock, Kevin
Make sure you're putting everything in your jsp. If the field doesn't need to be displayed, use the tag. The problem is with your internal mail server. Your company's spam filter is viewing your email as spam; whether it be the destination or content in your message, I don't know. See if the

Re: Pls convert this code using struts2 tags

2008-12-22 Thread Nils-Helge Garli Hegvik
I aparently cannot read, your indexes does look correct after all, although maybe not needed... Sorry about that. I also didn't notice until now that parts of the code is outside the s:iterator loop. Seeing some of the generated html that doesn't work compared to what does work could help. Nils-H

[S2] Using tag for choosing file (no uploading)

2008-12-22 Thread Milan Milanovic
Hi, I need to use tag just to select file in the system, but not to upload this file, I just want to get path to it, so that I can parse it in my action class. However when I put this tag in the tag and try to select file, file was selected but I get an error in console about "missing multipart

Re: Pls convert this code using struts2 tags

2008-12-22 Thread Nils-Helge Garli Hegvik
That's hard to say considering I know nothing about what result you expect, and what the rendered html actually looks like. But from your code, it looks like the "Index1", "Index2" and "Index3" variables might not have the value you expect them to be. And do you really need to store the index in a

Re: [S2] apply i18n on java entity from DB

2008-12-22 Thread Dimitar Vlasev
Hi Steven, I don't know what's the best practice but I'll give you my quick thoughts. It seems you have to implement some sort of logic (choosing the right name). The main question is where is the best place to put this kind of logic? IMO this kind of problems are solved using the "decorator patt

Re: Pls convert this code using struts2 tags

2008-12-22 Thread Nils-Helge Garli Hegvik
Take a look at the s:set and s:property tags. Nils-H On Mon, Dec 22, 2008 at 10:56 AM, taj uddin wrote: > Hi > > I am working on application where i have to convert the code developed in > struts1.2 to struts2.0. > Here is the struts1.2 code: > //Sub Menu for 2nd Main Menu Item ("ABC"): >

Pls convert this code using struts2 tags

2008-12-22 Thread taj uddin
Hi I am working on application where i have to convert the code developed in struts1.2 to struts2.0. Here is the struts1.2 code:  //Sub Menu for 2nd Main Menu Item ("ABC"):     menus[1] = new menu(180, "vertical", 0, 0, -1, -1, "", "#ce122d

Re: How to convert output of into int?

2008-12-22 Thread Steven Yang
> > just print the property on your jsp or page actually for example var i = ; will become var i = 9; then your javascript will interpret it as an int

Re: Step by Step Struts 2 tutorial

2008-12-22 Thread Steven Yang
Great Thanks a lot My company is just gonna start to use S2. I can sure use your demos to teach my colleges good job

How to convert output of into int?

2008-12-22 Thread taj uddin
Hi, In my application i should pass the output of tag into a method which accepts only int-type parameter. So, is there any scope to convert the output of tag(which is usually a String) into the int value. For ex:-In my application I'm passing the output of tag into a javascript's addIte

How to convert output of into int?

2008-12-22 Thread taj uddin
Hi, In my application i should pass the output of tag into a method which accepts only int-type parameter. So, is there any scope to convert the output of tag(which is usually a String) into the int value. For ex:-In my application I'm passing the output of tag into a javascript's addIte