S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Bionicoder
Hi, I want to disable validation for certain Struts 2 method. For example, in the following action class, public class CustomerAction extends ActionSupport { private Customer customer; public String input() { return INPUT; } public String save() {

Re: Retrieving last inserted ID

2007-11-27 Thread Omkar Patil
Unni, I'm not sure if this is related to Struts2. CustomerFacadeLocal looks like an application specific class for your application. You'll need to find out what api this class provides within your application - Omkar Unnikrishnan wrote: Hi I am new to Struts 2. I would like to know

Re: S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Ted Husted
How is the validation for the list alias being declared? Is there also an XML file? -Ted. On Nov 27, 2007 3:16 AM, Bionicoder [EMAIL PROTECTED] wrote: Hi, I want to disable validation for certain Struts 2 method. For example, in the following action class, public class CustomerAction

[S2] Image Generation

2007-11-27 Thread LEONARD Julien (Consulting for ACCOR Hotels)
Hello all, I want to develop an action that return an image. This image is based on a image file and a text put in the middle of the image. I've look at JasperReports and I think that is to complicated for my use. I think that I can do this with a simple xslt-fo and FOP to create a PDF, but I

how do i auto resize the dropdown part of s:select in IE

2007-11-27 Thread Vijay SM
how do i auto resize the dropdown part of s:select in IE because its wrking file in Mozilla but in IE the dropdowns parts cuts the records I am usibf the following code : s:select name=customerFile.source list=%{lead} cssStyle=width:110px onchange=autoPopulate_customerFile_source(this);

Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil
Julien, I could be completely off-mark here. If I understand correctly you are planning to generate a PDF (or an image) and then send it to the browser. This can be achieved using the Stream Result. Here is the code snippet from the S2 documentation - result name=success type=stream

Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil
I'm sorry the example is messed up as it contains xml. Here is the link for it - http://struts.apache.org/2.x/docs/stream-result.html Omkar Patil wrote: Julien, I could be completely off-mark here. If I understand correctly you are planning to generate a PDF (or an image) and then send

Re: bean:write on a Collection

2007-11-27 Thread Omkar Patil
Are you using struts1 or struts2? - Omkar Minghui Yu wrote: In my Action, I have: request.setAttribute(book, book); book is a Book object, which has a getAuthors method. getAuthors returns a collection (SetString) in JSP page, I want to list authors one by one. How shall I do?

Re: bean:write on a Collection

2007-11-27 Thread Minghui Yu
struts 1. I barely made it work by using jsp and bean:define. bean:define id=test name=book type=org.lonetree.tc.core.Book / % IteratorString itr=test.getAuthors().iterator(); while (itr.hasNext()) { out.println(itr.next()); out.println(br); } % I'd like

Re: bean:write on a Collection

2007-11-27 Thread Dave Newton
JSTL's c:forEach ... / or, if you must, logic:iterate ... /. d. --- Minghui Yu [EMAIL PROTECTED] wrote: struts 1. I barely made it work by using jsp and bean:define. bean:define id=test name=book type=org.lonetree.tc.core.Book / % IteratorString itr=test.getAuthors().iterator();

Re: Issue with Type Conversion and Select Boxes

2007-11-27 Thread mgainty
Hi Gunnar- Are you implementing with com.opensymphony.xwork2.ValidationAwareSupport..if so could you post the code? Also Could you post struts.xml, struts-validation.xml and any ActionClass-validation.xml as well as struts-conversion.xml? Also in struts-default.xml please display the interceptor

Re: [S2] Image Generation

2007-11-27 Thread Ted Husted
There's also an example on the Ajax page. * http://struts.apache.org/2.x/docs/ajax.html The Ajax example is returning text, but it could just as easily stream back a PDF. -- HTH, Ted http://www.husted.com/ted/blog/ On Nov 27, 2007 6:37 AM, Omkar Patil [EMAIL PROTECTED] wrote: I'm sorry the

Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan
I've been struggling for this problem for several days. Please help me out. I'm using Javascript to dynamically generate something like below: code input type=text name=additionalInterests[0].addressLine2 value=s:property value='additionalInterests[0].addressLine2'/ id=address2_0 size=26

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Richard Sayre
I don't see any javascript in your post but if you are creating an imput element this should work as long as the javascript is on your jsp page in script tags: text = document.createElement(input'); text.setAttribute('type','text'); text.setAttribute('value','s:property .../'); The key is to

RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread Hernandez, David
Dave is right as usual, but you could always redirect whatever.js to a dynamically generated whatever.jsp file. Additionally, there's no reason you can't write: script var x = s:property value=x /; /script inside a JSP file. You're going to have to be more specific, panpan . . .

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan
Thank you Dave. Ok, I see. Do you anyway I can do to solve my problem? thanks! newton.dave wrote: --- panpan [EMAIL PROTECTED] wrote: I've been struggling for this problem for several days. Please help me out. Okay. Non-JSP pages aren't compiled into servlets. A JavaScript file

RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan
David, thank you. How to redirect whatever.js to a dynamically generated whatever.jsp file. I have a main.js which has my function for this purpose code function createInput(name,value,id,size,adressLine2,className) { var newInput = document.createElement('input'); newInput.type=text;

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan
Hi Richard, thank you! I have a seperate main.js for those functions. I've posted my code in my other post. I'll try to use single quotes. Thanks again. Richard Sayre wrote: I don't see any javascript in your post but if you are creating an imput element this should work as long as the

RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread Hernandez, David
Sorry panpan, I didn't see the original msg. Most easily, you can change your .js file to .jsp And script src=whatever.jsp / I don't see any reason that wouldn't work. Kind of cheesy though. You can map the URL (/whatever.js) to a servlet which forwards to the whatever.jsp file if you want it to

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Dave Newton
--- panpan [EMAIL PROTECTED] wrote: I've been struggling for this problem for several days. Please help me out. Okay. Non-JSP pages aren't compiled into servlets. A JavaScript file isn't a JSP page, hence is not compiled into a servlet, hence has zero notion of custom tags. d.

Empty pages returned for actions - how do I debug this?

2007-11-27 Thread Joachim Ansorg
Hi all, I'm still new to Struts 2. I like the framework as a whole. A part which I find quite difficult to use is the debugging support. But I guess I'm missing something. I have sometime the problem that Struts returns an empty page. Nothing, no html at all. No exception in the log, even

Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
We are using the validaiton interceptor but not client side javascript validation. However we are still seeing lots of onsubmit=customOnsubmit_registration(); return true; appearing in the views. On form submission you get a js error as the function does not exist. Why is this appearing and is

RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan
David, that is a good idea. I'll try it. Hernandez, David wrote: Sorry panpan, I didn't see the original msg. Most easily, you can change your .js file to .jsp And script src=whatever.jsp / I don't see any reason that wouldn't work. Kind of cheesy though. You can map the URL

Re: Retrieving last inserted ID

2007-11-27 Thread Gary Affonso
Unnikrishnan wrote: Hi I am new to Struts 2. I would like to know how to retrieve last inserted id. I have page called welcome where I have 3 fields (name, telephone, email) my execute method is as follows. public String execute() throws Exception { CustomerFacadeLocal

Re: Unnecessary onsubmit

2007-11-27 Thread Dave Newton
With the regular s:form... tag without the validation attribute set?! d. --- Martin Gilday [EMAIL PROTECTED] wrote: We are using the validaiton interceptor but not client side javascript validation. However we are still seeing lots of onsubmit=customOnsubmit_registration(); return true;

Re: Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
I've not used a validation attribute. An example: @s.form namespace=/ action=registration!save method=post The stack just has the standard interceptor ref interceptor-ref name=validation Is this an old issue, I get the same alert in JIRA all the time (WebWork?) - Original message -

Re: Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
Sorry ignore. Someone had been using a theme written for WebWork which had this customOnsubmit in. It seems to have changed in the new form.ftl in 2.0.11 to be simply return true;, which is better. - Original message - From: Martin Gilday [EMAIL PROTECTED] To: Struts Users Mailing List

S2: concat doesn't work.

2007-11-27 Thread panpan
In one of my JSP page, I have javascript section code script type=text/javascript var name = 's:property value=additionalInterests[1].bankName/'; alert(Name: + name); /script/code It's working. I can see the valud of the Name. But the below is not working if replace 1 with a

download button displays 2.1.0 ?

2007-11-27 Thread Giovanni Azua
hi, I was surprised to see under http://struts.apache.org/2.x/ the download button is already displaying 2.1.0 ... is that correct? or is it in the process of being correct? :) regards, Giovanni - To unsubscribe, e-mail:

RE: S2: concat doesn't work.

2007-11-27 Thread Hernandez, David
You're getting confused about the role of Javascript in your application, panpan. Javascript does not execute at the same time as Java. Java can generate dynamic javascript on the server and send it to a client. The javascript then executes on the client (web browser). You cannot have javascript

Re: S2: concat doesn't work.

2007-11-27 Thread Dave Newton
--- panpan [EMAIL PROTECTED] wrote: But the below is not working if replace 1 with a variable code script type=text/javascript var number = 1; var name = 's:property value=additionalInterests['+number.toString()+'].bankName/'; alert(Name: + name); /script/code JavaScript

Re: download button displays 2.1.0 ?

2007-11-27 Thread Dave Newton
No. --- Giovanni Azua [EMAIL PROTECTED] wrote: hi, I was surprised to see under http://struts.apache.org/2.x/ the download button is already displaying 2.1.0 ... is that correct? or is it in the process of being correct? :) regards, Giovanni

RE: S2: concat doesn't work.

2007-11-27 Thread panpan
Hi David, Thank you for your explaination. I just started to work on Javascript recently and have lots of things to learn. Why is the first example working? It's a Struts2 tag insice the Javascript. There are not much differences between the first example and the second example except the

Re: S2: concat doesn't work.

2007-11-27 Thread panpan
Thanks, Dave. That explains the problem I had for this example. newton.dave wrote: --- panpan [EMAIL PROTECTED] wrote: But the below is not working if replace 1 with a variable code script type=text/javascript var number = 1; var name = 's:property

Re: [S2] Image Generation

2007-11-27 Thread Martin Gainty
agreed If you want a simple, easy to configure and works great in Tomcat PDF Rendering Engine use FOP 0.94 http://www.eu.apache.org/dist/xmlgraphics/fop/source/ Ping me offline if you have any questions with fop.. M-- - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Martin Gainty
an available option is to treat your content as Character Data script type=text/javascript /* ![CDATA[ */ // content goes here /* ]] */ /script Interestingly enough the JavascriptValidatorTag has a cdata attribute available for JS methods when XHTML=true

Re: S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Bionicoder
Hi Ted, Thanks for reply. Actually there is no validation XML for list method. Also I delete validation XML files for other method too. However the validation still take effect. that is the thing confuse me. Thanks again, BC Ted Husted wrote: How is the validation for the list alias being

similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis
Greetings to all, i have the following scenario. I want to deploy 5 apps that have exactly the same classes (in jars). Only db access, static files and property files change. In short all WEB-INF/lib jar files are the same. So the question is : option1) If i put the jars under the

Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso
Leonidas Papadakis wrote: Greetings to all, i have the following scenario. I want to deploy 5 apps that have exactly the same classes (in jars). Only db access, static files and property files change. In short all WEB-INF/lib jar files are the same. So the question is : option1) If i put the

Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread MassimoH
My copy arrived in the mail over the weekend after having it on pre-order for months. So far, so good! Great job! Ian Roughley wrote: 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 :-) -- View this

Problem opening a file in Mozilla using window.open()

2007-11-27 Thread Varun Ratra
Hello, I hope someone can help me on this. I am using Struts version 2.0.9 in my project. Using struts tags in JSP I am trying to open a doc from a file system. The tag is as follows: s:a href=%{onlineManualUrl} ${pageContext.request.contextPath}/s:text name= /s:text

Re: similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis
Dear Gary, thanks for your answer. Actually my main concern is memory usage. I recently had java.lang.OutOfMemory issues when i had in total 7 similar apps. Unfortunately i had java 1.4.2. + tomcat 5.0.28 that made difficult to run a profiler. I switched to java 6 + tomcat 5.5.25 and the

[OT] Re: Problem opening a file in Mozilla using window.open()

2007-11-27 Thread Dave Newton
You might want to try asking on a forum focused on browser issues. d. --- Varun Ratra [EMAIL PROTECTED] wrote: Hello, I hope someone can help me on this. I am using Struts version 2.0.9 in my project. Using struts tags in JSP I am trying to open a doc from a file system. The tag is

Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread Martin Gainty
Massimo can you tell us the ISBN? thx M-- - Original Message - From: MassimoH [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, November 27, 2007 4:18 PM Subject: Re: [ANN] Practical Apache Struts2 Web 2.0 Projects My copy arrived in the mail over the weekend after having it

dynamic form action

2007-11-27 Thread Kate Fox
I have a lot of pages that have the same form fields included on them. I would like this to be very simple and for it to be simple to add more pages like this. I was thinking that I could have the form be embedded in the super class that all the pages implement, but I get an exception when I

Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Serge Bornow
Hello All, I am quite new to Struts 2, i cannot figure out a problem i am having, i hope someone might give me a hint. I took this code from a Tutorial: |s:tabbedPanel id=test s:div id=one label=Tab 1 theme=ajax labelposition=top This is the first panel. RoseIndia.ntbr

Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread Dave Newton
--- Ian Roughley [EMAIL PROTECTED] wrote on Sat Nov 24: Sure: * ISBN10: 1-59059-903-9 * ISBN13: 978-1-59059-903-7 --- Martin Gainty [EMAIL PROTECTED] wrote: Massimo can you tell us the ISBN? thx M-- - Original Message - From: MassimoH [EMAIL PROTECTED] To:

Re: Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Dave Newton
The usual cause of not finding the JavaScript files is that your S2 filter isn't mapped to /* or that the struts.serve.static property is set to false. d. --- Serge Bornow [EMAIL PROTECTED] wrote: Hello All, I am quite new to Struts 2, i cannot figure out a problem i am having, i hope

Configuring Struts to use UTF-8 character encoding

2007-11-27 Thread Adam Gordon
Anyone know if there's a configuration parameter somewhere in Struts 1.2.9 that configures the requests to use UTF-8 character encoding? Everything I've found on the web says that Tomcat uses ISO-8859-1 as the default character encoding and that the fix is to add a filter that simply sets the

Re: Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Serge Bornow
Dave, I had the filter mapping set to /*.action and did not have that property. It works now, thank you kindly. Serge Dave Newton wrote: The usual cause of not finding the JavaScript files is that your S2 filter isn't mapped to /* or that the struts.serve.static property is set to false. d.

Tree ui component with each node having a checkbox (struts 2.0.9)

2007-11-27 Thread akash agrawal
Hi, Can someone tell me how to build a tree with each node having a check box, so that user can input their choices by selecting/unchecking each node in the tree and input can be collected in the action? Thanks in advance, -Akash - Be a better pen pal.

Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso
Leonidas Papadakis wrote: Also if apart from the dependency libraries, if you gather all your classes in a jar file isn't it easier to overwrite one file so that all apps will receive the update at once ? In our case we rarely want each instance to be updated at the same time. We're

Upgradation problem from 2.0.8 to 2.1.0

2007-11-27 Thread Shoaib Gauhar
Hello, I have been using version 2.0.8 for the last couple of months. It was running quite fine. But, now, i need to upgrade it to 2.1.0. I have downloaded the struts-2.1 ZIP file from http://people.apache.org/builds/struts/2.1.0/ I only replaced freemarker,xwork and struts-2-core jar from the

Re: similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis
ok so at the end of the day you are in favor of one instance of tomcat per application... I think i will adapt this solution since although you can restart an application from tomcat's manager, i have the feeling that a corrupted jvm will not clear correctly... Regarding the virtual hosts,

Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Shoaib Gauhar
Regarding my previous mail, i have some how narrowed down the problem. Below is my action as described in my struts.xml. action name=LibraryItemFormInsertAction class=com.netsol.action.LibraryItemFormAction result

Re: Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Jeromy Evans
All interceptor names have been converted to camelcase. eg. token-session to tokenSession Take a look at the migration trouble-shooting guide: http://cwiki.apache.org/confluence/display/S2WIKI/Troubleshooting+guide+migrating+from+Struts+2.0.x+to+2.1.x and contribute to the notes if you've

Re: Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Shoaib Gauhar
Thanks. it works fine now. From now on i will be reading the trouble-shooting first before migrating anything. Regards, Shoaib - Original Message From: Jeromy Evans [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, November 28, 2007 12:12:04 PM