Re: Using struts with WLS6.2?

2002-05-14 Thread Sobkowski, Andrej
We are running Struts with Weblogic 6.1sp2 with no particular problems. AFAIK, there shouldn't be major problems setting up the environment... The only issue we have (still) is with file upload. All the rest works smoothly.. asd asd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]...

[OT?] Design - Business validations vs. Form validations

2002-03-26 Thread Sobkowski, Andrej
All, this may be somewhat OT, but it may be worth a short discussion (though this message is pretty long) :) We're using Struts (of course!) as part of a J2EE architecture that also includes EJB. To clearly separate the validation processes, we use the Struts Validator to perform the

[ANN] New ActionForm-to-Value Object (and back) mapper

2002-03-22 Thread Sobkowski, Andrej
Hello, the new version of the Form-to-VO and VO-to-Form mapper is now available at http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp It allows you to perform in ONE line of code the mapping between ExampleForm +getLastName:String +setLastName(String) +getDateOfBirth:String

RE: Validating an ActionForm conditionnally

2002-03-22 Thread Sobkowski, Andrej
this, it probably doesn't have the servlet reference set on it. ServletContext application = getServlet().getServletContext(); Otherwise what you are doing should be fine. David --- Sobkowski, Andrej [EMAIL PROTECTED] wrote: Hello, I've been using the Struts Validator (nightly build

Validating an ActionForm conditionnally

2002-03-22 Thread Sobkowski, Andrej
Hello, I've been using the Struts Validator (nightly build of November) with no problems for a few months (great work!). Now I need to call the validation method of a specific nested form based on a condition: ParentForm +useChild: boolean +getChildForm:ChildForm If useChild returns true, I

RE: Forms with childforms

2002-01-11 Thread Sobkowski, Andrej
Hello, check out Arron's nested tags site: http://www.keyboardmonkey.com/struts In general, there's nothing you _need_ to do to use nested forms, it's a built-in functionality of Struts (I'm using a nightly build of the end of November). In other words, when you define your JSP property

RE: iterate over bean attributes

2002-01-11 Thread Sobkowski, Andrej
What about using reflection? You can automatically loop on all your get methods and store them in a Collection without having to do it manually. The problem with this is that you can't control the ordering... I don't know if it's acceptable for you. Another good thing of automatic reflection is

RE: Nesting Beans/Iterators/Logic tags whatever else...

2002-01-11 Thread Sobkowski, Andrej
Arron, I use it and I like it :) Andrej -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 9:01 PM To: Struts Users Mailing List Subject: Nesting Beans/Iterators/Logic tags whatever else... Some people on this list have been

RE: Mail Filter

2001-12-19 Thread Sobkowski, Andrej
Hmm, not sure this is the place to ask this kind of questions... Anyways, here you go. Define a rule saying that: - when a message arrives... - ... any messages coming from [EMAIL PROTECTED] should be moved to a separate folder ... - ... except the ones addresses directly to you or where you are

[ANN] Mapper ActionForm-to-Value Object and back

2001-12-17 Thread Sobkowski, Andrej
Hi All, after reading a lot about problems related to mapping an ActionForm (somehow a set of String properties mapping the data on the Presentation layer) to more business-oriented objects (Value Objects for example), I've written a simple mapper that will allow you to: - keep 'em separated

RE: [ANN] Mapper ActionForm-to-Value Object and back

2001-12-17 Thread Sobkowski, Andrej
Sorry, it looks like the ZIP file is corrupted. I'll fix it tonight so that the code is available tomorrow. The documentation should cover most of the details required to understand the main principles of the package. Thanks. Andrej -Original Message- From: Sobkowski, Andrej [mailto

RE: Weblogic problem...

2001-12-14 Thread Sobkowski, Andrej
The _Struts library_ (struts.jar) must be in your Weblogic classpath (and it's not in your case, as it doesn't find org.apache.struts.action.Action. Three solutions: - add struts.jar to your system CLASSPATH - add struts.jar to your Weblogic classpath by modifying the startup script (something

RE: Weblogic problem...

2001-12-14 Thread Sobkowski, Andrej
Small addition to my previous message (sorry, I responded without reading with too much attention): - if yours is a *.war archive only, then adding struts.jar to your WEB-INF/lib directory should work. My previous suggestions are still valid but may not solve the problem. - if yours is a *.ear,

RE: Weblogic problem...

2001-12-14 Thread Sobkowski, Andrej
, or as an .ear with a web app component. It's not then visible to the EJBs, since the EJB classloader is a parent of the web classloader, but that shouldn't matter - EJBs don't have any business using Struts classes, right? Sean - Original Message - From: Sobkowski, Andrej [EMAIL

RE: How can I assign a value from a bean:write tag to a variable?

2001-12-12 Thread Sobkowski, Andrej
Tony, I suppose you can use bean:define bean:define id=localMessageId value=messageId / % String newMessageId = http:/localhost?messageId= + localMessageId; % OR a href=http://abc?messageId=%= localMessageId %.../a I haven't tried it but... HTH Andrej -Original Message-

RE: Form validation before pop-up window openning

2001-12-12 Thread Sobkowski, Andrej
Xavier, I would probably handle it in multiple steps (veeery personal opinion): - save calls the Action that performs the validation - if the validation fails, return the same page with errors on top (for example) without opening the pop-up - if the validation succeeds, you can return the same

RE: Generate Javascript popup from Action

2001-12-12 Thread Sobkowski, Andrej
Anthony, the Action itself has no idea of the front end (the HTML/Javascript pages). It would work just as well if the presentation layer was a Java Swing GUI or whatever. So I'd say that no, you can't open a JS window from your Action. What you can do is playing with the Action execution and

RE: Similar Question as - Different web apps and struts

2001-12-12 Thread Sobkowski, Andrej
Would it be possible to simulate a common session via - for example - an external Stateful Session EJB? All the applications could retrieve the simulated session via JNDI and the application server will take care of making it available between clusters, distributed environments and so on. The

RE: Proper use of ActionMessages and html:messages/ ?

2001-12-12 Thread Sobkowski, Andrej
Tom, you may want to try with the following: table logic:messagesPresent message=true tr html:messages id=message message=true tdbean:write name=message//td /html:messages /tr /logic:messagesPresent /table Please note the message=true attribute in html:messages. Without

Small addition to - RE: Struts Validator (dumb?) question

2001-12-06 Thread Sobkowski, Andrej
the validation process distinct from the Action; if possible, the call to the validate(..) method should be hidden and automated. If it's not possible, I guess I'll survive... :) Thanks. Andrej -Original Message- From: Sobkowski, Andrej [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 06, 2001

Struts Validator (dumb?) question

2001-12-06 Thread Sobkowski, Andrej
Hello All, I'm trying to use the Struts validator but it doesn't seem to be working in my - relatively common - case. I have a modify.jsp page that is displayed upon calling /modifyAction?command=init (using the DispatchAction). No validation must be performed at this point. The user then

RE: Action an overkill ??

2001-12-05 Thread Sobkowski, Andrej
Hello, two comments/questions: - in my opinion, sorting data is somehow business processing. Suppose that you have a long list of results that is paged (ie. retrieved in chunks from the data store). Sorting the data using a different criteria may involve re-accessing the data store to retrieve a

RE: Sending the actionformbean to the next JSP page

2001-12-05 Thread Sobkowski, Andrej
Hi, are you sure it's jsp:getProperty name=thisCr property=getModel.title/ and not (note the change getModel - model) jsp:getProperty name=thisCr property=model.title/ I guess you want to call yourBean.getModel.setTitle(..). My 2c.. HTH Andrej -Original Message- From: [EMAIL

RE: Re-using JavaBeans as ActionForm Beans

2001-12-04 Thread Sobkowski, Andrej
Hello, mixing your ActionForms with your business objects is not optimal. You will lose the ability to use more business-related types such as java.util.Date (ActionForms mainly allow String only) - and also somehow break the layered architecture (separation vs business processing). Check out

RE: Quickly change page to prevent user to click several times on a link

2001-12-04 Thread Sobkowski, Andrej
Use tokens (chech out the *Token*(..) methods in the Action class) to ensure that the user submits the form only once... Andrej -Original Message- From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 10:09 AM To: Struts-User Subject: Quickly

RE: Problem with Index

2001-12-04 Thread Sobkowski, Andrej
Beth, I haven't compiled the following but I guess you should use either Integer.valueOf(String).intValue() OR Integer.parseInt(String) that return an int instead of String.valueOf(int) that returns a String. A second suggestion would be to use the logic JSP tags greaterThan or similar. Ex:

RE: Custom Errors

2001-12-04 Thread Sobkowski, Andrej
errors.add(customerror, new ActionError(error.customFileError, , 9); with error.customFileError = Can't process file {0}. Error in line {1} HTH Andrej -Original Message- From: Régis Melo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 8:00 AM To: [EMAIL

RE: Design question - Action Form vs Business Delegates/Value Obj ects

2001-11-23 Thread Sobkowski, Andrej
eform = (EmployeeForm) form; employeeManager.add(eform.getEmployeeVO()); } } etc... very simplified example, but hopefully this is a bit clearer... I use this all the time, and would be interested to hear what other ppl think as well... cheers dim On Thu, 22 Nov 2001, Sobkowski, Andrej

RE: Design question - Action Form vs Business Delegates/Value Obj ects

2001-11-23 Thread Sobkowski, Andrej
this all the time, and would be interested to hear what other ppl think as well... cheers dim On Thu, 22 Nov 2001, Sobkowski, Andrej wrote: Michelle, thanks for your reply... but I'm not sure I understand your answer. Probably my message wasn't clear. To use

Design question - Action Form vs Business Delegates/Value Objects

2001-11-22 Thread Sobkowski, Andrej
Hello, we're working on a quite large project with J2EE (including EJBs) and we're using Struts (we're still in the early phases). To design a clean application, I've defined different object conversions: * Request phase - the ActionForm is converted to a Value Object - the Value Object is

RE: comments

2001-11-22 Thread Sobkowski, Andrej
Careful: !-- jsptag / -- The JSP tag will be evaluated (though not shown on the browser since the results will be commented out. And yes, they'll be visible by the client. %-- jsptag / --% The JSP is not evaluated and the commented part will not be sent to the resulting HTML page At least I

RE: Design question - Action Form vs Business Delegates/Value Objects

2001-11-22 Thread Sobkowski, Andrej
to the back end (no unnecessary handling of the data). HTH, Michelle From: Sobkowski, Andrej [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Design question - Action Form vs Business Delegates/Value Objects Date: Thu, 22

RE: html:form and javascript popup calendar

2001-11-20 Thread Sobkowski, Andrej
Hi, you can try something like: !-- This is JS stuff - see link below if interested -- script language='JavaScript' src='/javascript/AnchorPosition.js'/script script language='JavaScript' src='/javascript/PopupWindow.js'/script script language='JavaScript'

How to reuse HTML code?

2001-11-14 Thread Sobkowski, Andrej
Hello, This may be OT but... I'm trying to find the best way to define reusable HTML components in Struts since we have a lot of pages with quite a few common pieces. For example, I'd like to reuse: - a date field with a popup Javascript calendar - a set of phone fields (regional code, number,

RE: properties file in action class

2001-11-14 Thread Sobkowski, Andrej
Hello, I guess you could subclass ActionServlet and overwrite an existing initABC() method: public class MyActionServlet extends ActionServlet { ... protected void initOther throws ServletException { super.initOther(); // don't forget this one.. :) myInit(); } protected void

RE: multiple html:submit buttons with different names?

2001-11-13 Thread Sobkowski, Andrej
Rob, here's an message I sent a few days ago. It relies on Javascript which isn't optimal... but it does the job. Andrej START COPY-AND-PASTE Why don't you separate the value displayed from the action sent using a Javascript method: script language=javascript function

Tip: Struts and Javascript's error on page with submit()

2001-11-13 Thread Sobkowski, Andrej
Hello, I just wanted to post this message as I've wasted 2 hours trying to understand what was wrong and I finally got it. There have been many messages related to using Javascript to submit to different actions so I hope someone will find the following useful. * Situation (that generates an

RE: Force login...

2001-11-02 Thread Sobkowski, Andrej
Hello All, by using a JSP tag to check if the user is logged, aren't you mixing somehow logic and presentation? In theory, you should provide a way that is independent of the fact that you store your user in the session (though Struts does it that way). Furthermore, you may need to not only

RE: Problem with multilingual submit button with request parameters

2001-11-02 Thread Sobkowski, Andrej
Why don't you separate the value displayed from the action sent using a Javascript method: script language=javascript function submitWithAction(action) { document.yourFormName.action.value=action; } /script input type=hidden name=action (this can be generated with html:hidden) html:submit