Changing The Result Page

2011-02-01 Thread Richard Sayre
I am making a mobile site for my current web application. I have a huge number of actions that return to JSP pages. I have a mobile detection class written. Is there a way that I can change the result page if the user is on a mobile device? I want to avoid having to write this in all my

Re: Changing The Result Page

2011-02-01 Thread Richard Sayre
listener? Dave On Tue, Feb 1, 2011 at 12:50 PM, Richard Sayre richardsa...@gmail.com wrote: I am making a mobile site for my current web application.  I have a huge number of actions that return to JSP pages.  I have a mobile detection class written. Is there a way that I can

DOJO Rendering

2010-11-03 Thread Richard Sayre
Due to the deprecation of the DOJO plugin I have been trying to recreate all of my web site GUI without using Struts 2 tags. When I create a Tabbed Pane, the web site loads, then the Tabbed Pane renders in view of the user. Before the UI renders it looks like a mess. When I used the struts 2

Re: Performance issue with large data(such as images)

2009-06-10 Thread Richard Sayre
Thanks, Rich, I''m happy to help. If I use BLOB, I have to make a lot of change to my code. Therefore, I have to persist it as String. I used base64 to encode and decode the byte[] into String. Because I resize the images to small ones. I use a VARCHAR length about 10k~20k to persist the

Re: Performance issue with large data(such as images)

2009-06-10 Thread Richard Sayre
I should have also mentioned that there are security issues with persisting to the hard drive. I would recommend saving to the database and loading the images as needed. Do not save them to session. I do not think you will have a performance problem. Rich

Re: Performance issue with large data(such as images)

2009-06-09 Thread Richard Sayre
You should persist the images as bytes, in a binary field or something similar. 1. Because the image is large, it's not efficient to store it in objects(beans). Well this depends on the Bean. Is the bean stored in session? If yes then it will take up some memory. If you dont have alot of

Re: Problem with displayTag

2009-06-09 Thread Richard Sayre
You need to set hte requestURI attribute see http://displaytag.sourceforge.net/1.2/displaytag/tagreference.html#display-el:table On Mon, Jun 8, 2009 at 12:11 PM, Bhaarat Sharmabhaara...@gmail.com wrote: Hi guys, I'm starting displaytag for the first time. I have a simple Struts2 action that

Design Question Global Properties

2009-06-01 Thread Richard Sayre
I have some global properties in my application that I need to access from several of my JSP pages. In my application I have a base action which all of my actions use. I was thinking of putting a getGlobalProperties method in that action that return an instance of an Singleton that holds my

OGNL Check for Enum in a list of Strings

2009-05-29 Thread Richard Sayre
I have a String array and I am trying to see if there is a value in it. Using: s:if test='foo' in myArray works. I want to use the value of an enum in place of foo. I tried s:if test=@my.package.mye...@enum_value in myArray which didn't work. Using the String literal works: s:if

Re: Keep Action Properties over multiple requests

2009-05-26 Thread Richard Sayre
Is it possible to specify all action properties in session param tag using regex or wildcards? On Mon, May 25, 2009 at 8:39 AM, Nils-Helge Garli Hegvik nil...@gmail.com wrote: Yes, the ScopeInterceptor should be able to handle this case. Nils-H On Mon, May 25, 2009 at 1:02 PM, Richard

Keep Action Properties over multiple requests

2009-05-25 Thread Richard Sayre
I have an action that does some server side logic, based on that logic I want to present the user with a Yes/No message. If they click yes I want to save the data the user filled out before the Yes/No message. Is it possible to carry action properties over multiple requests? I found the

Re: Struts newbie - Advice on file downloading

2009-05-13 Thread Richard Sayre
Hi, I have the following defined: action name=generatePdf class=com.abc.ReportAction method=generateReport result name=success type=stream param name=contentTypeapplication/pdf/param param name=inputNamefileStream/param param

Changing the default attribute value for a tag

2009-05-13 Thread Richard Sayre
I want to have all of s:url tags use forceAddSchemeHostAndPort=true Is there a way to set this property globaly? I couldn;t find anything in struts.properties. Thanks, Rich - To unsubscribe, e-mail:

Re: Converter trying to set String on int field

2009-05-12 Thread Richard Sayre
I upgraded to the latest version of Struts 2 and then it worked. On Mon, May 11, 2009 at 3:01 PM, Richard Sayre richardsa...@gmail.com wrote: It is also happening in a Date field I have.  If no dates are entered in the text box then I get the same error.  If I provide a date then the conversion

Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
I have a bunch of check boxes called userId. In my action I have int userId[] and setUserId(int[] ids) When I select a checkbox the conversion works normally. When I dont check any boxes on the form and submit, I get the following: 2009-05-11 10:54:28,606 [http-8080-6] DEBUG []: - Property:

Re: Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
any suggestions on how to handle this it would be greatly appreciated Thanks Rich On Mon, May 11, 2009 at 11:10 AM, Richard Sayre richardsa...@gmail.com wrote: I have a bunch of check boxes called userId. In my action I have int userId[] and setUserId(int[] ids) When I select a checkbox

Re: Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
...@aol.com wrote:  I bet it has something to do with a null not being assignable to an int. Chris -Original Message- From: Richard Sayre richardsa...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Mon, 11 May 2009 11:44 am Subject: Re: Converter trying to set

Re: How to hide a link

2009-05-01 Thread Richard Sayre
try cssStyle=display:none On Fri, May 1, 2009 at 4:23 AM, taj uddin tajuddi...@yahoo.com wrote: Hi In my application there is a need to hide a link. I have used the s:a tag to generate a link and the necessity is to hide this link. can any one pls help out in this regard

Re: Submitting a Date to an Action

2009-05-01 Thread Richard Sayre
be this will help. Thank you. Regards, Kishan.G Senior Software Engineer. www.spansystems.com -Original Message- From: Richard Sayre [mailto:richardsa...@gmail.com] Sent: Thursday, April 30, 2009 4:14 PM To: Struts Users Mailing List Subject: Re: Submitting a Date to an Action Thank you

Re: Submitting a Date to an Action

2009-05-01 Thread Richard Sayre
). The interceptor uses reflection when it encounters a Date setter (with a suitable annotation) in the action to look up these fields and parse them into a Date for setting. Lets me do validation at the same time. Andy. On 1 May 2009, at 12:44, Richard Sayre wrote: I think I am going to write my

Re: determine if iphone user?

2009-05-01 Thread Richard Sayre
I think the HTTP_USER_AGENT header should be similar to: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 If a request comes from the IPhone browser On Fri, May 1, 2009 at 3:06 PM, Andy andrh...@hotmail.com wrote: Hi,

Re: Submitting a Date to an Action

2009-04-30 Thread Richard Sayre
formatedDate;   } } On Thu, Apr 30, 2009 at 1:19 AM, Richard Sayre richardsa...@gmail.comwrote: I have an Action with a date attribute private Date myDate; public void setMyDate(Date myDate) { this.myDate = myDate; } I have a form that has a date picker (not the struts 2 date picker

Re: Submitting a Date to an Action

2009-04-30 Thread Richard Sayre
formatedDate;  } } On Thu, Apr 30, 2009 at 1:19 AM, Richard Sayre richardsa...@gmail.comwrote: I have an Action with a date attribute private Date myDate; public void setMyDate(Date myDate) { this.myDate = myDate; } I have a form that has a date picker (not the struts 2 date picker

Submitting a Date to an Action

2009-04-29 Thread Richard Sayre
I have an Action with a date attribute private Date myDate; public void setMyDate(Date myDate) { this.myDate = myDate; } I have a form that has a date picker (not the struts 2 date picker) that populates a text field. When I submitt the form to my action the property does not get set because

Reusing GUI and Actions

2009-04-22 Thread Richard Sayre
I have a form in my web application that can be accessd from different places (Namespaces) in the web app. It looks something like this /Admin/EditSchedule.action /MySchedules/NewSchedule.action /Create/NewSchedule.action /Create/EditSchedule.action The are subtle differences in how the data is

Re: Set Unchecked Value in the Checkbox Interceptor

2009-04-15 Thread Richard Sayre
. On Wed, Apr 15, 2009 at 8:29 AM, Richard Sayre richardsa...@gmail.com wrote: The Struts 2 docs says the following about the Checkbox Interceptor: setUncheckedValue - The default value of an unchecked box can be overridden by setting the 'uncheckedValue' property. Where in code can I call

Re: Set Unchecked Value in the Checkbox Interceptor

2009-04-15 Thread Richard Sayre
the name is already there from a check box that has been submitted. I will have to find another way to achieve this since my check box list is dynamic and can be any size. I will post some code when I finish. Rich On Wed, Apr 15, 2009 at 9:05 AM, Richard Sayre richardsa...@gmail.com wrote

Set Unchecked Value in the Checkbox Interceptor

2009-04-15 Thread Richard Sayre
The Struts 2 docs says the following about the Checkbox Interceptor: setUncheckedValue - The default value of an unchecked box can be overridden by setting the 'uncheckedValue' property. Where in code can I call the setUncheckedValue(String uncheckedValue) from? The problem I am facing is the

Re: Why does s:file break an ajax form?

2009-02-19 Thread Richard Sayre
I have encountered the same problem. While I have not fixed it with Ajax yet, the reason it does not work is because you can not submit a file through Ajax. You need to use an iFrame to submit file uploads. On Tue, Feb 17, 2009 at 7:14 PM, Jon Wilmoth jonwilm...@yahoo.com wrote: I'm curious to

AJAX Valiadation in 2.0.x

2009-01-22 Thread Richard Sayre
I am following this article to get Ajax validation working. http://www.javaworld.com/javaworld/jw-10-2008/jw-10-struts2validation.html?page=1 I was wondering if it is nessessary to use the XML for validation with Ajax? I was hoping to use some validation on the server side action to do this.

Re: AJAX Valiadation in 2.0.x

2009-01-22 Thread Richard Sayre
Here is a solution I came up with so far. I wrote an action to validate. This calls my validateData() method. I Used the JSON plug in to return the fieldsErrors collection to dojo. Here is some javascript: Please note when looking at this that I have modified the original template that

Re: AJAX Valiadation in 2.0.x

2009-01-22 Thread Richard Sayre
On Thu, Jan 22, 2009 at 11:12 AM, Dave Newton newton.d...@yahoo.com wrote: Richard Sayre wrote: First I wrote a method called validate. At this point I found out that I was overriding the ActionSupport method. When I tried to find more information on this method I couldn't. When I search

OGNL and Java Methods String Arguments

2008-08-28 Thread Richard Sayre
I'm trying to call the String replace method from OGNL. I can't find any specific examples on how to do this. I tried the following as a test: [EMAIL PROTECTED]@toString() This worked ok. My problem is I don't know how to pass string literals to the method. Here is my current code:

Re: Character Encoding and s:textarea

2008-07-04 Thread Richard Sayre
PROTECTED] wrote: Richard Sayre wrote: I have a form containing text areas. When I copy a bunch of character data such as: 2öÂnJ1ÈÏúÄp8éÎdìåmðh4uæEÍÉieÔWán2ÅìbØÉÅÀ1JÎZÏôsC5LòÚAPúÜaÃÙPC5üÆCJWCOzùÙtÒQqùét into the text are, it displays normally. When I save the data, the database stores

Character Encoding and s:textarea

2008-07-03 Thread Richard Sayre
I have a form containing text areas. When I copy a bunch of character data such as: 2öÂnJ1ÈÏúÄp8éÎdìåmðh4uæEÍÉieÔWán2ÅìbØÉÅÀ1JÎZÏôsC5LòÚAPúÜaÃÙPC5üÆCJWCOzùÙtÒQqùét into the text are, it displays normally. When I save the data, the database stores the characters properly, when the data returns

Re: Struts 2 Performance

2008-06-09 Thread Richard Sayre
self. I'm not sure what to search for to find information on this. Can you point me to any articles or documentation? Thank you, Rich On Fri, May 30, 2008 at 5:05 PM, Laurie Harper [EMAIL PROTECTED] wrote: Richard Sayre wrote: Hi, I have a few questions regarding performance in Struts 2

Re: Struts 2 Performance

2008-06-09 Thread Richard Sayre
with your own. Dave --- On Mon, 6/9/08, Richard Sayre [EMAIL PROTECTED] wrote: From: Richard Sayre [EMAIL PROTECTED] Subject: Re: Struts 2 Performance To: Struts Users Mailing List user@struts.apache.org Date: Monday, June 9, 2008, 10:53 AM Thank you for the dojo info. I did a custom build

Multiple Results or How should I handle this?

2008-05-01 Thread Richard Sayre
I have an Action that could display several pages based on some info passed to it. Basically, its a preview action that will show the proper preview page based on some input. The way I am think of doing it is to use custom results to redirect to the proper preview page: if (preview1) {

Re: File Upload Size

2008-03-20 Thread Richard Sayre
No it doesn't On Wed, Mar 19, 2008 at 2:14 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: Does your action implements ValidationAware interface? Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To

File Upload Size

2008-03-19 Thread Richard Sayre
I set the file upload max size in the struts.properties to 15MB. When I upload a file over 15MB my action returns input. Is there any way I can check to see if the file is over the max size set in the properties file and handle what result I want to happen myself? I seems that it returns input

Re: File Upload Size

2008-03-19 Thread Richard Sayre
. I checked the source and I could not find where this is being implemented. I have s:fielderror/ on my page which i return input to, but as I said earlier my upload action is hanging. On Wed, Mar 19, 2008 at 1:12 PM, Richard Sayre [EMAIL PROTECTED] wrote: I set the file upload max size

Setting disable attribute dynamically

2008-03-13 Thread Richard Sayre
If the disable attribute is present in a HTML tag it will be disable, no matter what the value of the attribute is. So if I have a s:select and I say disabled=false it will be disabled (renders disabled=disabled). But if we have a text, and we set readonly=false it will not be editable. On my

Re: Setting disable attribute dynamically

2008-03-13 Thread Richard Sayre
I made a slight error readonly=%{fullAccess} with s:textfield does not work but input type=text name=description id=description s:if test=!fullAccessreadonly=true/s:if / works. On Thu, Mar 13, 2008 at 10:48 AM, Richard Sayre [EMAIL PROTECTED] wrote: If the disable attribute is present

Re: s:property in s:* not interpreted

2008-03-13 Thread Richard Sayre
try: s:a theme=ajax href=%{copyImageGallery} targets=dataImageDiv%{id}/Copy/s:a if id is on the stack, you can get it with OGNL On Thu, Mar 13, 2008 at 10:49 AM, matthieu martin [EMAIL PROTECTED] wrote: Hi all ! I have a little issue and I find no clues on the web, so i'm turning myself

Re: Setting disable attribute dynamically

2008-03-13 Thread Richard Sayre
yesOrNo) { this.yesOrNo = yesOrNo; } } (2) The JSP: Is Struts2 good?: s:textfield name=choice readonly=%{yesOrNo} value=Yes, it is../s:textfield regards, Rushikesh On Thu, Mar 13, 2008 at 3:24 PM, Richard Sayre [EMAIL PROTECTED] wrote: I made a slight error readonly

Re: How to add page links dynamically

2008-02-29 Thread Richard Sayre
I think what you are looking for is caled bread crumbs. There is a plug in to help with this http://cwiki.apache.org/S2PLUGINS/breadcrumbs-plugin.html On Fri, Feb 29, 2008 at 5:04 AM, Sanjeewa Saman [EMAIL PROTECTED] wrote: Hi all, I want to add my page links in the top of the each

Re: s:select and pre-selection

2008-02-29 Thread Richard Sayre
I have a select that populates with a int,string id/value combo. To get the s:select to select the proper option I had to crate another value in my action (int myId). This would be set to the id of the option to select. Then I had to set the name attribute of my select to myId (name=myId). On

Re: Invoking action method from javascript

2008-02-29 Thread Richard Sayre
you can say, document.location.href = 's:url action=myRemoveAction?myId=' + myId; This will cause the whole page to refresh, so you should probably have a prepare method if you have any data that needs to be populated on that page (ie your table). I personally would use Ajax to make the call,

Re: Struts 2 and SOA

2008-02-27 Thread Richard Sayre
Thank you everyone for your input. I will research a little further to see how I am going to do this. On Tue, Feb 26, 2008 at 5:17 PM, Randy Burgess [EMAIL PROTECTED] wrote: From: Richard Sayre [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 26 Feb

Struts 2 and SOA

2008-02-26 Thread Richard Sayre
If I have a struts application, is it posssible to expose some of the functionality as a Web Service? After reading some SOA documents on the Sun website, it is possible to expose servlets as web services. Is this possible with Strus and J2EE? Is there a document that I can read on it? Are there

Re: Struts 2 and SOA

2008-02-26 Thread Richard Sayre
Could you elaborate a bit. Would the POJO contain the Business logic for calling My DAO and other classes? Would the POJO replace the action functionality? Then my action would use a POJO to do all of the work? So any logic in MyAction.save() would go into POJO.save() which would then be

Re: Struts 2 and SOA

2008-02-26 Thread Richard Sayre
business logic as a web service. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Richard Sayre [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 26 Feb 2008 11:05:48 -0330 To: Struts Users Mailing List

Re: [s2] Date format in TextField

2008-02-26 Thread Richard Sayre
I'm not sure if I understand you correctly but... I want to display editable dates in textfields. This should be as simple as using a textfield (input type=text) as your date field I cannot use JavaScript, so datetimepicker isn't an option. So the user will have to manually enter the date

Re: decorator is not working after ajax call

2008-02-26 Thread Richard Sayre
When is you page disappearing? After you click Submit? You submit is not using Ajax. If you want to update your div when you submit the form then you could write a function that notifies your listen topic rather than submitting the form. Rich On Tue, Feb 26, 2008 at 7:22 AM, Prashant Khanal

Re: Struts 2 and SOA

2008-02-26 Thread Richard Sayre
I dont see any need for .NET interoperability in the future, but it would hurt to have that option. I like your typo more than what you actually meant ;) Ha ha, that is quite funny. Another thing to look at is the RESTful plugin. It allows the same action to serve back data in

Re: Submit, ajax, targets and action

2008-02-26 Thread Richard Sayre
If I understand you correctly, You could write you own submit function(s) that does its own ajax with dojo function submitFunctionA() { var kw = { url:'s:url action=myAction/', load:function(type, data, evt) { //up to you what

Re: Submit, ajax, targets and action

2008-02-26 Thread Richard Sayre
Sorry this posted too early... I updated the code so it submits the form fields with the ajax request: let me know if it helps. Rich function submitFunctionA() { var kw = { url:'s:url action=myAction/', load:function(type, data, evt) {

Re: Struts 2 and SOA

2008-02-26 Thread Richard Sayre
service? Thank you for your input, Rich On Tue, Feb 26, 2008 at 3:05 PM, Randy Burgess [EMAIL PROTECTED] wrote: From: Richard Sayre [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 26 Feb 2008 14:08:18 -0330 To: Struts Users Mailing List user

reflect.InvocationTargetException

2008-02-20 Thread Richard Sayre
Hi All, I am getting the following error in my Struts 2 application. class java.lang.reflect.InvocationTargetException : null None of my classes are showing up in the stack trace. But it is happening at the same spot in my application. Has anyone encountered this before? Any suggestons on

Populate Form from DAO

2008-02-01 Thread Richard Sayre
Struts 2 allows us to automatically populate our forms if we name our fields correctly, which is wonderful. My actions usually go something like this execute () { MyObject o = myDAO.getRecord(id); member1 = o.getMember1(); member2 = o.getMember2(); } MyObject is a JO for hold a row

Re: Populate Form from DAO

2008-02-01 Thread Richard Sayre
Julien (Consulting for ACCOR Hotels) [EMAIL PROTECTED] wrote: Did you try : MyObject theObject; (geter and setter on theObject) execute () { theObject = myDAO.getRecord(id); } And in the JSP : s:property value=theObject.member1/ -Message d'origine- De : Richard Sayre

Re: How to improve dojo performance in Struts 2.0.9

2007-12-11 Thread Richard Sayre
Is the $resources$ directory WEB-INF? On Oct 6, 2007 8:51 AM, Jeromy Evans [EMAIL PROTECTED] wrote: I thought I'd share the instructions I prepared for creating a dojo 0.4.2 custom profile for Struts 2.0.9. The objective is to bundle all the required dojo resources into dojo.js to avoid the

Re: DisplayTag - show image by condition

2007-12-05 Thread Richard Sayre
You have to make your own decorator: I assume your table is populated with a 'Member' list or something similar. In your table decorator create a method that returns the image based on the condition: public class MemberListDecorator extends TableDecorator { public String getType() {

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

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

Submit all Checkboxes

2007-10-31 Thread Richard Sayre
I have a variable amount of check boxes with the same name. I want to submit all of the check boxes weather they are checked or not. Right now I only get an of array for the ones that are checked. My form has x number of 'Name' text fields x number of 'Activate' check boxes for another. The

Re: Submit all Checkboxes

2007-10-31 Thread Richard Sayre
I am using struts 2. Right now when I submit I only get the values of the checked boxes by default. On 10/31/07, Dave Newton [EMAIL PROTECTED] wrote: Which version of Struts? S2 has this capability built-in. S1 can use the same technique by including a hidden form field. d. --- Richard

Re: Exception Logging

2007-10-14 Thread Richard Sayre
. I use a similar fragment in the JSP to email a copy of the stacktrace to the administrator if the exception page is ever displayed. Hope that helps, Jeromy Evans Richard Sayre wrote: I am trying to log the exception that get cought by the struts exception handler. So far I have .jsp

Exception Logging

2007-10-13 Thread Richard Sayre
I am trying to log the exception that get cought by the struts exception handler. So far I have .jsp page that shows the exception: An Exception Has occured! br/br/ s:property value=%{exception}/ br/br/ = s:property value=%{exceptionStack }/ I am going to

Re: Exception Logging

2007-10-13 Thread Richard Sayre
I thought I would add this part of the stack trace in case it helps: SEVERE: Error finishing response java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:689)

Re: How can i get Exception message and StackTrace ?

2007-10-12 Thread Richard Sayre
Hi, You can use s:property value=%{exception}/ s:property value=%{exceptionStack }/ to get that information. Rich On 10/11/07, jignesh(india) [EMAIL PROTECTED] wrote: Hello, Thanks in advanced.! Do anyone help me,how can i get exception message,StackTrace into my user

Re: Exception Handling and Logging

2007-10-12 Thread Richard Sayre
-- including the user -- in the handler. Paul Richard Sayre wrote: After reading the Mail Reader walk through, it would seem the best practice for handling exceptions is throwing them back to your Action and having a result mapped to handle each specific exception. Is this the best way to do

Re: [s2.0.9] Is there a better way to do this...

2007-09-06 Thread Richard Sayre
I use the prepare method to populate my lists. See the Prepareable interface.I also would put this in Action B. Is there a specific reason why you are using 2 actions? On 9/6/07, Al Sutton [EMAIL PROTECTED] wrote: Here's a problem I've come across a couple of times and the solution I have

Sanitize Text

2007-08-23 Thread Richard Sayre
I was wondering what the best approach would be for taking form data passed to an Action and removing 'special characters' from the data. I am having issues with users pasting text from word docs etc. We only support ISO-8859-1 as of now and there are some characters that Word will replace such

Re: Action within Action result

2007-08-22 Thread Richard Sayre
Hi You need to use a different result type: action name=action class=com.rs.MyAction result type=redirect-action param name=actionNameanotherAction/param /result /action On 8/21/07, Sawan [EMAIL PROTECTED] wrote: Hello Experts, I want to

Re: Tabbed Panel and Ajax

2007-08-17 Thread Richard Sayre
can publish, and the div will reload its content automagically. (check showcase and documentation for examples) musachy On 8/16/07, Richard Sayre [EMAIL PROTECTED] wrote: I seem to have it working now. There was a form wrapped around the tabbed panel. My Ajax function was setting the inner

Tabbed Panel and Ajax

2007-08-16 Thread Richard Sayre
I have a tabbed panel set up as follows s:tabbedPanel id=questionPanel doLayout=true cssClass=questionTabPanelDesign s:div id=questionTab label=Question theme=ajax Static Content... /s:div s:div id=udfTab label=UDF theme=ajax listenTopics=/editUdfs Static link a

Re: Tabbed Panel and Ajax

2007-08-16 Thread Richard Sayre
Barroso [EMAIL PROTECTED] wrote: so you are saying that the tabs work fine before clicking on the link, but they don't work after that? What are you doing in editUdf()? Is there any error when you set debug=true on head? (or any javascript error in general?) musachy On 8/16/07, Richard

XSLT Result matching pattern

2007-08-14 Thread Richard Sayre
I am new to regular expressions and I am trying to have my XSLT result only show certain elements that are in the XML. here is some if the XML: result actionsErrors/ actionsMessages/ questionTree ... /questionTree user ... /user session ... /session /result I only want the

Re: LookandFeel

2007-08-07 Thread Richard Sayre
I asked this same question and got this answer: There are several threads on this topic. You need to set the templateCssPath to the url of the css file. You will have to take a look at the current css to know what you have to overwrite:

Re: Exception Handling and Logging

2007-08-06 Thread Richard Sayre
this information? On 8/2/07, Paul Benedict [EMAIL PROTECTED] wrote: My applications do not catch any errors. I let them bubble out of the Action and into an ExceptionHandler object for logging. You can log whatever you want -- including the user -- in the handler. Paul Richard Sayre wrote: After

Re: Exception Handling and Logging

2007-08-06 Thread Richard Sayre
file. On 8/6/07, Dave Newton [EMAIL PROTECTED] wrote: --- Richard Sayre [EMAIL PROTECTED] wrote: Do I open a file stream on the JSP page or is there a better way to log this information? Use commons-logging and / or Log4J? d

Re: Custom user roles and Action

2007-08-06 Thread Richard Sayre
I wrote a LoadApplication action that executes after my user has logged in. It checks the database to see what roes they have and it fills the session with a few variables such as admin = true; designer = false; etc. by default they are all false. Then I wrote an interceptor that checked

Re: Custom user roles and Action

2007-08-06 Thread Richard Sayre
thinkng to do the same with filter is it possible? I am using DispatchAction alot is it possible to allow a function action like list and to deny create tnx but i have never work with interceptor Richard Sayre wrote: I wrote a LoadApplication action that executes after my user has logged

Re: Defining a validate() method

2007-08-06 Thread Richard Sayre
addFieldError(fieldName,message); will add a specific field error. If you are using the XHTML theme, the error will appear above the field. This should set and clear the validation message for you. If you are using the simple theme you have to add the s:fielderror tag. On 8/6/07, Session A

Re: Defining a validate() method

2007-08-06 Thread Richard Sayre
with addFieldError. I would like to see more information on writing validators and how a include the javascript to generate for that validator On 8/6/07, Richard Sayre [EMAIL PROTECTED] wrote: addFieldError(fieldName,message); will add a specific field error. If you are using the XHTML theme

s:action stopping the result it is called form

2007-08-02 Thread Richard Sayre
The following jsp is a Result in an action called 'listTypes'. %@ include file=/includes/header.jsp% h1s:property value=pageTitle//h1 br/ s:action name=getTypeParamTree executeResult=true/ %@ include file=/includes/footer.jsp% getTypeParamTree result is xslt and is configured as follows:

Re: display validation error to simple theme

2007-08-02 Thread Richard Sayre
Use the s:fielderror/ tag On 8/2/07, Pedro Herrera [EMAIL PROTECTED] wrote: Hi, How I show the erros(validation) when using simple theme ? Herrera -- View this message in context: http://www.nabble.com/display-validation-error-to-simple-theme-tf4208443.html#a11971725 Sent from the

Re: Number Validator

2007-07-31 Thread Richard Sayre
value can be converted into an integer, i didn't check the code but i supose something like that: Integer.parseInt(...) maybe you are using intRange instead El lun, 30-07-2007 a las 14:30 -0330, Richard Sayre escribió: Is there a way to use the XML validation to check to see if a field

s:tree help

2007-07-31 Thread Richard Sayre
Is it possible to add a checkbox to each node of the Tree? Is it possible to add a different icon for each node of the tree? Perhaps something similar to the Display Tag table decorator? Thank you, Rich - To unsubscribe,

Number Validator

2007-07-30 Thread Richard Sayre
Is there a way to use the XML validation to check to see if a field is a number? I used integer to check for min and max but if I enter any text into the field it passes the validation. Thanks, Rich - To unsubscribe, e-mail:

Re: How to format the actionerrors and actionmessages in the jsp page?

2007-07-29 Thread Richard Sayre
For clarification the following line: #include /${parameters.templateDir}/xhtml/validationarea.ftl / was added to the first line of form.ftl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Exception Handling and Logging

2007-07-29 Thread Richard Sayre
After reading the Mail Reader walk through, it would seem the best practice for handling exceptions is throwing them back to your Action and having a result mapped to handle each specific exception. Is this the best way to do this? If I use this method how can I log the stack of each exception

Submitting a variable amount of form data

2007-07-29 Thread Richard Sayre
I have a form that can have 1 to many 'Name' text fields. In struts 2 how do I set up the action so it can automatically grab the values that are in those fields? If I had 1 name field I would just put a name variable in the Action Class and create a setter and getter for it. How do I do this

Re: How to format the actionerrors and actionmessages in the jsp page?

2007-07-29 Thread Richard Sayre
Hi, I had the same problem. I did not like the way the error were being displayed (In a new row above the field that has the error) To do this I have to chenge the XHTML template First I removed the validation from the controlheader-core #-- REMOVED We have our own Error area #if

Re: [S2] Multiple Submits with different actions in a Form

2007-07-25 Thread Richard Sayre
I'm not sure if this is what your are looking for, it is doing the control logic on the client side. Instead of using s:submit to submit the form you could make 3 input buttons: input type=button onClick=doAction1()/ input type=button onClick=doAction2()/ input type=button

Tree Tag

2007-07-24 Thread Richard Sayre
I am using the tre tag to display a tree of items. I got a very basic tree showing. Is it possible to have the tree node do something when you click it? I tried onclick but it didnt seem to render that attribute into the HTML. Is it possible to add some extra html to each node (for example a

Change the Tabbed Panel look

2007-07-23 Thread Richard Sayre
How do you change the look of the tabbed panel? I assume you have to override some css or something similar but I can not find any information on it. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Setting application properties

2007-07-20 Thread Richard Sayre
You could read the global properties from a file or DB when the application first loads into an object of your choice (A Map for Key,Value) . Then put this object in session. On 7/19/07, SimonK [EMAIL PROTECTED] wrote: Thanx for you reply. The 'problem' with this solution is that I then have

Re: Loading Screen!!

2007-07-19 Thread Richard Sayre
Look at the walking tour of the mail reader application. http://planetstruts.org/struts2-mailreader/Welcome.do It uses a loading page to redirect to an action. The loading page is just a plain html page the has a META HTTP-EQUIV=Refresh CONTENT=2;URL=My.action tag. I made a similar page with

  1   2   >