Re: stopOnFirstError
Any suggestion ? EROL TEZCAN [EMAIL PROTECTED] wrote:Hi, I want to alert to user, when the first error occured on the ActionForm . To do this I am using stopOnFirstError ppoperty in struts-config.xml like this But all erros are displayed on the JSP page. My ActionForm ' s type is ValidatorForm and I am using sturts 1.1 How can I define this ? Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
non-web app
Hello all, I need an advice : I have to develop an application which will be called by other apps in the same server -- all the callers are wep apps stored in a tomcat instance. This application is not a web app, but it has to access the same resources (database), so I thought that the easiest would be to store this non-web app in tomcat too. This app has to be launchable : - case 1 : by web apps stored in tomcat - case 2 : by a scheduled task My question is : which framework/technology should I use to develop this app ? What communication ways would you advice me to use in both cases ? I tried to ask this in tomcat user list, but maybe struts user list is more adapted. Thanks ! Philippe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts vs .NET???
Hi, I jump in the middle of this debate (religion war ?). I dont want to add my own opinion... who care ? But as many pragmatic developper we need to follow the requirements of our customers, sometimes .Net, java (struts, jsf,...), VB... So one of our big challenge is capability to maintain ( not a migration !!!) the code of some libraries in both plattform. I should be interrested to have some advice (design, tools,...), experience Regards, Michel Van Asten Projections sa -Message d'origine- De : Rick Reumann [mailto:[EMAIL PROTECTED] Envoyé : mardi 5 juillet 2005 22:24 À : Struts Users Mailing List Objet : Re: Struts vs .NET??? John Henry Xu wrote the following on 7/2/2005 6:43 AM: Is writting lots of getters and setters manually the most productive way in real projects? You keep coming back to this getters and setters thing:) Like I said any editor (even vim:) can create getters and setters. I take it you think Struts is all about getters and setters? Seriously, don't take offense to this, but I'm wondering how many Struts applications you actually coded? I usually have several ActionForms and some beans which do have get/set methods. The beans (value objects/dto's) I'd have even if I was coding an application in Swing/.NET or whatever. So your main thrust here seems to be about ActionForms and get/set methods? Honestly that's such a small part of the whole process I still can't believe you are harping on it. I think we can terminate listening to your posts because of this statement: My experience was Struts have more codes and configuration files than straight forward JSP+Javabean+taglibs approach that was done before. This tells me either: A) You haven't used Struts much OR C) The applications you write using your home-grown approach have to be quite sucky and would be a royal pain to maintain and refactor as requirements change. I make this claim because Struts (and other web application frameworks) provide ALREADY WRITTEN CODE in jars that you'd have to write YOURSELF if you didn't use a framework. So, to quote you, - more lines mean more time and a waste of money. So under your own logic you are costing your company a TON of money and you might want to think about adopting some web framework for your developers to start using. I can get into all the little things web frameworks provide, but here are some simple questions I have for you that maybe you can answer from 'your experience'... Where do your forms submit to? How do you handle/configure where the page forwards to after the request is sent? When you need to change the flow of the application (what page forwards to where) how do you make this change? How do you handle server side validation problems and display messages to the user about these server side problems? If you handled ANY of the above than I will GUARANTEE you that I can take your SAME application, and not change any of your business logic, and end up with code that is CLEANER and, most importantly from your perspective, written in LESS lines. I truly truly would love for you to zip up a sample of one of your web applications and let us check out this 'smaller' code base. Please do it. Pretty please. I'm sorry if I sound a bit hostile, but I've had this 'argument' with so many people over the years. They say stuff like I don't see why use (insert your favorite web framework), you just complicate things and end up with more code and configuration files. Then what happens is I see their code and see all the wasted stuff they are doing that a web framework provides 'out of the box.' I think the problem is these people don't see how the framework saves time because they haven't worked with. Do these frameworks have problems? Yes, they do. I'm not a fan of ActionForms myself, but I do see their place in the Struts world. JSF seems to have gotten rid of them. Some frameworks the learning curve looks too steep for me to invest the time in it (Spring's UI framework seemed to be one of these back in the day when I first considered it... the docs sucked). Others out there seem good, but I'm just too comfortable with Struts to make the change. I can whip out a quality web app using Struts and iBATIS in practically no time at all. Granted, yes, Struts has a learning curve, but once you learn it you can apply it to any app or other apps that are coded with it. Conversely, if we take your JSP+Javabean+taglibs only application it will be much more difficult for a new person to the application to understand (again, you are all about saving money so I'm not sure how you can't see how your home-grown approach will cost you more in the long run). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail:
Re: help with a newbie topic-prepopulating a form
On 7/5/05, Rick Reumann [EMAIL PROTECTED] wrote: Michael Jouravlev wrote the following on 7/6/2005 1:11 AM: On 7/5/05, Rick Reumann [EMAIL PROTECTED] wrote: Use the reset method only for doing things like making sure some boolean fields are set to false. I highly recommend you DO NOT use the reset for 'business type' logic. Having a few default things set there is fine, but for stuff like you are suggesting, you do that in an Action class or DispatchAction method BEFORE you forward to the page. Any particular reason for that? Also, if default values are set in reset(), they will be overwritten by request values if there are any. Right. That's what you *want* to happen - otherwise what would be the point of reset if it never let the user's input overwrite the form's default values? Reset() is called first by struts *then* the form gets populated with any request parameters that match the form properties. Right. This is why reset() is a good place for init values. If there are no request values, init values will be used. Usually, this is the preferred scenario. If values are set right before rendering a page, then request values will be overwritten by default values. NO this does not happen when you leave an Action and forward to a page. It only happens on submit. Are you saying that submit and render operations are served by different actions? Original author did not imply that. Maybe you are confusing 'default' values that the form has with 'pre-poulated' values. A form that is used to edit user information, like the original poster mentioned he wanted, are 'pre-population' values - those you would never want to set in a reset (or even worse a validate) method. I do not see any difference between default and pre-populated values. These are values which are set in HTML form before a user gets chance to change them. I do not care where these values come from: from a property file or a database. Are you suggesting it's a good idea to call business logic (DAOs etc) in order to populate a form bean with information such as an Employee name or Address? Hopefully it's just late and I'm misunderstaning you and you are not saying this:) Why? What is the difference of calling DAO from action class or a form bean? They are used in pair anyway. If by some chance you are, PLEASE do not advise the newbies to do this. This totally defeats the pupose of what ActionForms should be used for and will create all kinds of maintenance headaches, never mind the fact that it's really bad design. Can you explain why is it so bad, besides that it is bad design and defeats pupose of what ActionForms should be used for? What ActionForms should be used for, anyway? It is just a class, which has a simple lifecycle, maintained by Struts. Why the religious fear of not doing something against how it should be used for? If it works, why not? Typically for an edit scenario that the user mentioned, you'd click on a link with a userID, go to your Action, look up the UserObject from backend based on userID, populate your ActionForm with the user information, forward to the page to now alow the information to be edited and submitted. I do almost the same, but because my form bean is used for output only, that is, to prep the JSP, I can stick all code into form bean and forgo action class altogether. Standard ForwardAction works well, but I would prefer if I could return forward mapping right from the form bean. Now, this object is presented to a user, he makes changes, where the request goes? To the same action or to a different one? If to the same, then request values must not be overwritten by pre-populated ones from database. In your example they will be. Whatever, I have a separate initialization event, which signals to the component to pre-populate data. In other cases I use whatever is currently retained in a form bean, which has session scope. Form bean with session scope works like a simple object cache. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts and Generics
Hi there, I'm wondering whether it's possible to use generics with struts. Something like: form-bean name=test type=org.apache.struts.validator.DynaValidatorForm form-property name=users type=java.util.ArrayListtestpackage.User/ /form-bean I tried doing this (with my class names of course) and I get this exception on startup: javax.servlet.ServletException: Can't get definitions factory from context. Thanks, Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Generics
Hello Kent, I'm wondering whether it's possible to use generics with struts. I strongly doubt it, since J2EE isn't using the Java 1.5 SDK, but 1.4 . Now, maybe am I saying something stupid. :-) -- Stéphane Zuckerman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: non-web app
interfaces and pojos? communication: corba (1st choice), rmi, xml over something. On Wed, 2005-07-06 at 08:47 +0200, philippelonchampt wrote: Hello all, I need an advice : I have to develop an application which will be called by other apps in the same server -- all the callers are wep apps stored in a tomcat instance. This application is not a web app, but it has to access the same resources (database), so I thought that the easiest would be to store this non-web app in tomcat too. This app has to be launchable : - case 1 : by web apps stored in tomcat - case 2 : by a scheduled task My question is : which framework/technology should I use to develop this app ? What communication ways would you advice me to use in both cases ? I tried to ask this in tomcat user list, but maybe struts user list is more adapted. Thanks ! Philippe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and Generics
Generics is a Java 5.0 feature... Don't think the features with 5.0 are introduced to Struts framework yet! Thanks Regards, Nitesh _ Disclaimer: Information contained and transmitted by this e-mail is confidential, proprietary, and legally privileged data of Cordiant Technologies that is intended for use only by the addressee. If you are not the intended recipient, you are notified that any dissemination, distribution, or copying of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator. Any views expressed by an individual do not necessarily reflect the view of Cordiant Technologies. The recipient should scan this email and any attachments for viruses as Cordiant Technologies is not liable for the presence of viruses in this email. Cordiant Technologies does not accept liability for any errors or omissions as the internet communications cannot be guaranteed to be timely, secure, error or virus-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. To know more about Cordiant Technologies, please visit http://www.cordiant.com _ -Original Message- From: Kent Boogaart [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 1:11 PM To: user@struts.apache.org Subject: Struts and Generics Hi there, I'm wondering whether it's possible to use generics with struts. Something like: form-bean name=test type=org.apache.struts.validator.DynaValidatorForm form-property name=users type=java.util.ArrayListtestpackage.User/ /form-bean I tried doing this (with my class names of course) and I get this exception on startup: javax.servlet.ServletException: Can't get definitions factory from context. Thanks, Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple RequestProcessor
Hi, I have a problem using a Custom RequestProcessor: in my tomcat context I already have a CustomRequestProcessor that authenticates the user. Now I need to add a new module for my application with a completely different method of authentication. How can I say to the RequestProcessor from which part of the application comes the user? Thanks LuKe -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Problemi di Liquidità? Con Logos Finanziaria 30.000 in 24 ore a dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi clicca qui * Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2907d=6-7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie: Where to put instance for database access?
Hi! I have maybe a simple question: My web-app has to get data out of a database. I have a class DatabaseHandler which holds a connection to the database and provides methods to query it. I would like to have only one instance of this class in my web-app. But I don't know where to put it. Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps hibernate would be a good choice too, but I think its a bit oversized for my application. You see - I am a total newbie concerning the use of databases with struts. Please help!!! Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie: Where to put instance for database access?
Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps hibernate would be a good choice too, but I think its a bit oversized for my application. You see - I am a total newbie concerning the use of databases with struts. Please help!!! Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Newbie: Where to put instance for database access?
Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) is it the same as request.getSession().getServletContext().getAttribute(xxx) ? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Newbie: Where to put instance for database access?
[EMAIL PROTECTED] a écrit : Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) is it the same as request.getSession().getServletContext().getAttribute(xxx) ? Yes. -- Stéphane Zuckerman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie: Where to put instance for database access?
Yes. Check with servlet-APIdoc... Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 11:10 AM To: user@struts.apache.org Subject: AW: Newbie: Where to put instance for database access? Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? getServlet().getServletContext().getAttribute(xxx) is it the same as request.getSession().getServletContext().getAttribute(xxx) ? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
container managed authentification/spanish
Hi, I am having problems with container manager authentification in my struts app. Are somebody understand spanish? Si es asi mejor :-), saludos, pablo.
Reg. Can't find form bean for XXXForm : Error.
Hi All, I have an Action Form associated with a JSP and an Action class. When I try to access the JSP page, it throws the following exception. javax.servlet.ServletException: [ServletException in:XXX/YYY.jsp] Can't find form bean for ZZZForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:565) I checked my entries in struts-config file but they are proper. My environemnt here has struts 1.1 in WSAD 5.0. Can anyone please revert with some directions in this regard..? Thanks and Regards Rajasekaran Iyanu.
Re: help with a newbie topic-prepopulating a form
Michael Jouravlev wrote the following on 7/6/2005 3:22 AM: Can you explain why is it so bad, besides that it is bad design and defeats pupose of what ActionForms should be used for? What ActionForms should be used for, anyway? It is just a class, which has a simple lifecycle, maintained by Struts. Why the religious fear of not doing something against how it should be used for? If it works, why not? Obviously different people will have different ideas for how they should do things and there is something to be said for hey if it works why not, but here are some things to consider... 1) The person asking I believe was a beginner to Struts. Suggesting to have a DAO used in ActionForm is something definitely unorthodox and since the person is new to the framework it is unlikely he'll see many examples of this and it can get confusing if he's seeing things done in some non-orthodox way. (Granted 'orthodox' doesn't always equate to best-practice, but I'll get into why I think it's bad in some other points). 2) Not only is more difficult for a beginner to start doing things in an unorthodox way, it also will be more difficult for someone else that would have to inherit the code to understand. Poll all the gurus that have been doing Struts for many years and ask them if they'd ever expect to see database calls from within an ActionForm. Now, putting the above aside, here are some reasons why it's poor design... 3) You asked what the purpose of the ActionForm was for and first off I must state that I don't like the tie in of ActionForms with Struts. I like the approach JSP takes much better, but since I'm working with Struts here the purpose as I understand it is mainly a) To have a tie in to the html:form tag for pulling out properties using the html tag and b) for providing a mechanism to ensure the user's input remains for when validation fails and you are returned back to the page. There has been debate on this list as to where exactly the ActionForm fits in the architecture, but rarely have I seen it debated that it should serve up business logic making calls to the backend. The typical design rule is usually separation of responsibilities. If you now start having ActionForms deal with making calls to your persistence layer, you know just added one more layer to have to maintain this code. Granted, you could make things 'sort of' clean by making sure to call some delegate or facade that hides the backend call, which I like to do anyway in my Action classes. I think it's a good design practice to try to limit where types of calls are being made. By moving backend calls to the ActionForm you've added a whole other layer to have to maintain those calls (other than say just Actions). 4) Since the ActionForm is used to capture user inputted data, it seems against the grain to have the ActionForm itself populating a state that the user wants to edit. Also, typically ActionForms aren't just used to capture 'edit' data but also data for a fresh add operation. So now, not only have you added backend calls from your ActionForm, but you now added more complex logic to have to decide when to make those calls and when not to (is the form being used for an edit operation or for a fresh add operation?) Actually I'm not even sure how you would accomplish this? You tell me - how are you going to know it's an 'add or edit' operation while in the reset method? You aren't going to want to populate all the employee/user info if it's an 'add', yet somehow you'll have to know this? I guess you'll have to use request.getParameter because you won't be able to use the form fields since they don't get populate until 'after' the reset is called. So you see the kind of mess things become? You have to tell the new person.. Oh wait, don't use the form field here to determine if it's an edit or add, because that property hasn't been populated yet. 5) Another problem is consistency. Most users of Struts understand that they submit a form and it goes to an Action and then you forward somewhere. Pretty basic. So imagine the person that inherits the code where the edit information is done by the ActionForm itself... the developer sees himself click the edit this employee button and a form page comes up populated with the employees info to edit. He realizes something is a bit wrong and he needs to debug the app. More than likely he's going to look first at the Action the form submits to since that's what most of the forms do... but low and behold, he/she doesn't see where the population of the form is taking place since it's being done in the ActionForm itself. 6) Why not have all your forms simply submit to the generic ForwardAction and you can do all the logic in the reset, not just pre-population? You can pull out request parameters and then do what you need to do there... call updates, inserts, whatever. Actually I'd recommend doing this over doing some of this in
Re: Reg. Can't find form bean for XXXForm : Error.
On 7/6/05, Iyanu, Rajasekaran [EMAIL PROTECTED] wrote: Hi All, I have an Action Form associated with a JSP and an Action class. When I try to access the JSP page, it throws the following exception. javax.servlet.ServletException: [ServletException in:XXX/YYY.jsp] Can't find form bean for ZZZForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:565) I checked my entries in struts-config file but they are proper. My environemnt here has struts 1.1 in WSAD 5.0. What does the relevant parts of struts-config look like? Do form definition and action mapping match? What's the scope? The only time I have seen this is when my struts-config has been wrong, but this might not be the case here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Reg. Can't find form bean for XXXForm : Error.
Hi Berg, Thanks for ur prompt reply. Yup, the definitions in Form and Action mapping are the same.. And the scope is request throughout... Any more clues in this regard..? Thanks Rajasekaran Iyanu. -Original Message- From: Kjersti Berg [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 3:56 PM To: Struts Users Mailing List Subject: Re: Reg. Can't find form bean for XXXForm : Error. On 7/6/05, Iyanu, Rajasekaran [EMAIL PROTECTED] wrote: Hi All, I have an Action Form associated with a JSP and an Action class. When I try to access the JSP page, it throws the following exception. javax.servlet.ServletException: [ServletException in:XXX/YYY.jsp] Can't find form bean for ZZZForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:565) I checked my entries in struts-config file but they are proper. My environemnt here has struts 1.1 in WSAD 5.0. What does the relevant parts of struts-config look like? Do form definition and action mapping match? What's the scope? The only time I have seen this is when my struts-config has been wrong, but this might not be the case here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beans throwing exceptions
On 02/07/05, GnomeKing [EMAIL PROTECTED] wrote: I have a bean which occasionally throws an exception My exception is caught in TagUtils.java:962 (struts-1.2.7), saved (967) and then a completely new JspException thrown (968). This exception is then caught on line 894, and saved, and then rethrown... If it is not possible to get the exception because struts hides it, is it possible to save the exception myself? Can I catch the exception in my bean and save it somewhere (then re-throw it to ensure we go to an error page)? Because its in a getter/setter for a bean, I can't see how to get the context - but can I retrieve the context from static methods? or some other way? Is the above error considered a bug in Struts? because if it is, I'm more than happy to report it (I guess if it is a bug, the new JspException should just wrap the caught exception?) Thanks in advance for any suggestions, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reg. Can't find form bean for XXXForm : Error.
On 7/6/05, Iyanu, Rajasekaran [EMAIL PROTECTED] wrote: Hi Berg, Thanks for ur prompt reply. Yup, the definitions in Form and Action mapping are the same.. And the scope is request throughout... Any more clues in this regard..? This page http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html says that: This exception typically occurs because Struts cannot find the form bean it expects for a specific action according to the mapping in the struts-config.xml file. Most often, this is probably because the name given to the form in the name attribute of the form-bean element does not match the name attribute of the associated action's action element. In other words, the action and form should each have a name attribute that matches exactly, including case. It has been reported that this error has been seen when no name attribute is associated with the action. If there is no name attribute in an action element, no form is associated with the action. Others have reported this error as merely a symptom of something completely unrelated (all too common), but the mismatch of name attributes in the form-bean and action elements in the struts-config.xml file is the usual culprit. Maybe someone else has an idea. Maybe if you provide more background, people might get a hint? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect request to home if session is expired
Hi list members, in my Struts-based application I want to test, if the session of the user is expired. If so, I want to forward/redirect the user back to the starting page. But this seems to be a problem, if I call an Action that is associated with an ActionForm in session scope. When I tried to test for an expired session with request.getSession(false) the session is never null, even if I monitor session destruction with a SessionListener and can be sure the session is destroyed. As the source code of RequestProcessor suggests, this is because a new session is created, if the old is expired to put the ActionForm in this session. To get around this situation I associated the ActionServlet with a filter and did the testing for expired sessions there. This works. My remaining question is: Is this in any way a bad design or exists other best practices for this scenario? I'm surely not the only one who ran into this Thanks in advance for any hints. Regards Franz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Michael Jouravlev [EMAIL PROTECTED] wrote: If by some chance you are, PLEASE do not advise the newbies to do this. This totally defeats the pupose of what ActionForms should be used for and will create all kinds of maintenance headaches, never mind the fact that it's really bad design. Can you explain why is it so bad, besides that it is bad design and defeats pupose of what ActionForms should be used for? What ActionForms should be used for, anyway? It is just a class, which has a simple lifecycle, maintained by Struts. Why the religious fear of not doing something against how it should be used for? If it works, why not? Here's the last paragraph of the JavaDoc for the reset() method (emphasis in original): This method is *not* the appropriate place to initialize form value for an update type page (this should be done in a setup Action). You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented. You say the ActionForm is just a class with a simple lifecycle. That lifecycle is more than just a sequence of method invocations, but also the expected behavior of each of those invocations. The documentation (lifecycle specification) clearly defines that the only behavior that is expected during the invocation of the reset() method is to set checkbox values to false. -- Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javascript
Hi This code is not actually translating html:button property=Create value=Create styleClass=NPIButton onclick=javascript:location.href=\'html:rewrite page='/portfoliomgmt'/\' / how do i do it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javascript
Vijay K Anand wrote: Hi This code is not actually translating html:button property=Create value=Create styleClass=NPIButton onclick=javascript:location.href=\'html:rewrite page='/portfoliomgmt'/\' / how do i do it? You can't embed tags in other tags... Off the top of my head try something like: bean:define id=onClickUrljavascript:location.href='html:rewrite page=/portfoliomgmt /'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=onClickUrl% / Cheers, -- Bob Arnott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple RequestProcessor
The appropriate way to use more than one RequestProcessor in Struts is to use modules. Each module has its own request processor. Struts can use part of the request path as a module identifier in much the same way that your servlet container uses a context root to know which servlet will process a request. See http://struts.apache.org/userGuide/configuration.html#dd_config_modules for more information. At 10:42 AM +0200 7/6/05, lk wrote: Hi, I have a problem using a Custom RequestProcessor: in my tomcat context I already have a CustomRequestProcessor that authenticates the user. Now I need to add a new module for my application with a completely different method of authentication. How can I say to the RequestProcessor from which part of the application comes the user? Thanks LuKe -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Problemi di Liquidità? Con Logos Finanziaria 30.000 * in 24 ore a dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi clicca qui * Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2907d=6-7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript
Hi All I used the same way you have said bean:define id=create_portfoliojavascript:location.href='html:rewrite page=/portfoliomgmt/'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=create_portfolio % / html code generated is input type=button name=Create value=Create onclick=javascript:location.href='/portfoliomgmt' class=NPIButton but the problem is .do missing ... Any help brotheres? Bob Arnott wrote: Vijay K Anand wrote: Hi This code is not actually translating html:button property=Create value=Create styleClass=NPIButton onclick=javascript:location.href=\'html:rewrite page='/portfoliomgmt'/\' / how do i do it? You can't embed tags in other tags... Off the top of my head try something like: bean:define id=onClickUrljavascript:location.href='html:rewrite page=/portfoliomgmt /'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=onClickUrl% / Cheers, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Books Recommendations
Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark On 6/30/05, Thai Dang Vu [EMAIL PROTECTED] wrote: 3) Struts! It's not just for H-1Bs! So, I can get a H1B just by learning Struts and use it decently? :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javascript
bean:define id=onClickUrl_javascript_:location.href=''/bean:define html:button property=Create value=Create styleClass=NPIButton / Vijay K Anand [EMAIL PROTECTED] Vijay K Anand [EMAIL PROTECTED] 07/06/2005 10:11 AM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: _javascript_ Hi All I used the same way you have said bean:define id=create_portfolio_javascript_:location.href=''/bean:define html:button property=Create value=Create styleClass=NPIButton % / html code generated is input type=button name=Create value=Create >_javascript_:location.href='' class=NPIButton but the problem is .do missing ... Any help brotheres? Bob Arnott wrote: Vijay K Anand wrote: Hi This code is not actually translating html:button property=Create value=Create styleClass=NPIButton > page='/portfoliomgmt'/\' / how do i do it? You can't embed tags in other tags... Off the top of my head try something like: bean:define id=onClickUrl_javascript_:location.href=''/bean:define html:button property=Create value=Create styleClass=NPIButton / Cheers, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts vs .NET???
Okay, okay, Reumann. Do you want to be right or do you want to be loving? ///;-) Xu really is not all that atuned to computer stuff, even though he is a computer journalist, so you might take him on as your grasshopper? ///;-) On 7/5/05, Rick Reumann [EMAIL PROTECTED] wrote: John Henry Xu wrote the following on 7/2/2005 6:43 AM: Is writting lots of getters and setters manually the most productive way in real projects? You keep coming back to this getters and setters thing:) Like I said any editor (even vim:) can create getters and setters. I take it you think Struts is all about getters and setters? Seriously, don't take offense to this, but I'm wondering how many Struts applications you actually coded? I usually have several ActionForms and some beans which do have get/set methods. The beans (value objects/dto's) I'd have even if I was coding an application in Swing/.NET or whatever. So your main thrust here seems to be about ActionForms and get/set methods? Honestly that's such a small part of the whole process I still can't believe you are harping on it. I think we can terminate listening to your posts because of this statement: My experience was Struts have more codes and configuration files than straight forward JSP+Javabean+taglibs approach that was done before. This tells me either: A) You haven't used Struts much OR C) The applications you write using your home-grown approach have to be quite sucky and would be a royal pain to maintain and refactor as requirements change. I make this claim because Struts (and other web application frameworks) provide ALREADY WRITTEN CODE in jars that you'd have to write YOURSELF if you didn't use a framework. So, to quote you, - more lines mean more time and a waste of money. So under your own logic you are costing your company a TON of money and you might want to think about adopting some web framework for your developers to start using. I can get into all the little things web frameworks provide, but here are some simple questions I have for you that maybe you can answer from 'your experience'... Where do your forms submit to? How do you handle/configure where the page forwards to after the request is sent? When you need to change the flow of the application (what page forwards to where) how do you make this change? How do you handle server side validation problems and display messages to the user about these server side problems? If you handled ANY of the above than I will GUARANTEE you that I can take your SAME application, and not change any of your business logic, and end up with code that is CLEANER and, most importantly from your perspective, written in LESS lines. I truly truly would love for you to zip up a sample of one of your web applications and let us check out this 'smaller' code base. Please do it. Pretty please. I'm sorry if I sound a bit hostile, but I've had this 'argument' with so many people over the years. They say stuff like I don't see why use (insert your favorite web framework), you just complicate things and end up with more code and configuration files. Then what happens is I see their code and see all the wasted stuff they are doing that a web framework provides 'out of the box.' I think the problem is these people don't see how the framework saves time because they haven't worked with. Do these frameworks have problems? Yes, they do. I'm not a fan of ActionForms myself, but I do see their place in the Struts world. JSF seems to have gotten rid of them. Some frameworks the learning curve looks too steep for me to invest the time in it (Spring's UI framework seemed to be one of these back in the day when I first considered it... the docs sucked). Others out there seem good, but I'm just too comfortable with Struts to make the change. I can whip out a quality web app using Struts and iBATIS in practically no time at all. Granted, yes, Struts has a learning curve, but once you learn it you can apply it to any app or other apps that are coded with it. Conversely, if we take your JSP+Javabean+taglibs only application it will be much more difficult for a new person to the application to understand (again, you are all about saving money so I'm not sure how you can't see how your home-grown approach will cost you more in the long run). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re:M Galbreath
We all all sincererly very sorry, we just wanted a slap on the wrist from all the noise. .V Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Books Recommendations
-Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark Shouldnt that be Signing on, or is that just a British phrase :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect request to home if session is expired
Hi, I dont know if is a good design or exists other best practices for this scenario but that i have done is put a session attribute and test in my base action about it. (sorry by my english) bye, pablo. -Mensaje original- De: Franz-Josef Herpers [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 06 de Julio de 2005 10:03 a.m. Para: Struts Users Mailing List Asunto: Redirect request to home if session is expired Hi list members, in my Struts-based application I want to test, if the session of the user is expired. If so, I want to forward/redirect the user back to the starting page. But this seems to be a problem, if I call an Action that is associated with an ActionForm in session scope. When I tried to test for an expired session with request.getSession(false) the session is never null, even if I monitor session destruction with a SessionListener and can be sure the session is destroyed. As the source code of RequestProcessor suggests, this is because a new session is created, if the old is expired to put the ActionForm in this session. To get around this situation I associated the ActionServlet with a filter and did the testing for expired sessions there. This works. My remaining question is: Is this in any way a bad design or exists other best practices for this scenario? I'm surely not the only one who ran into this Thanks in advance for any hints. Regards Franz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Marking fields having errors
Or see the errorClassId attributes on the the form tags. L. Rauf Khan wrote: Hi, In ur application resources file, u can add this errors.header=h3font color=OrangeError List/font/h3ul errors.footer=/ulhr here color = anycolor Regards Khan On 7/5/05, Kalra, Ashwani [EMAIL PROTECTED] wrote: Hi, Does struts has any facility to show fields having validation error in red color or mark it in some way? Thanks Ashwani -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: stopOnFirstError
I'm not sure why stopOnError isn't working for you, but why would you *not* want to show as much validation information as possible? I hate forms that tell me I've filled in one field incorrectly, only to complain about another when I fix the reported error... L. EROL TEZCAN wrote: Any suggestion ? EROL TEZCAN [EMAIL PROTECTED] wrote:Hi, I want to alert to user, when the first error occured on the ActionForm . To do this I am using stopOnFirstError ppoperty in struts-config.xml like this But all erros are displayed on the JSP page. My ActionForm ' s type is ValidatorForm and I am using sturts 1.1 How can I define this ? Erol __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multibox problem
Code where i put the values back: map.put(districtIds, stringArr); where stringArr is an array of what the user selected. - This is not the same as calling setDistrictIds. You need to call setDistrictIds(stringArr) explicitly.
Re: javascript
Use the action attribute instead of the page attribute in your html:rewrite/ tag. See http://struts.apache.org/userGuide/struts-html.html#rewrite for the tag documentation. -- Jeff On 7/6/05, Vijay K Anand [EMAIL PROTECTED] wrote: Hi All I used the same way you have said bean:define id=create_portfoliojavascript:location.href='html:rewrite page=/portfoliomgmt/'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=create_portfolio % / html code generated is input type=button name=Create value=Create onclick=javascript:location.href='/portfoliomgmt' class=NPIButton but the problem is .do missing ... Any help brotheres? Bob Arnott wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multibox problem
Hi- Thanks for the response. The map is in helper class and i dont want my helper class to know anything about struts or actionForm. Thanks, Shyam Apte, Dhanashree (Noblestar) [EMAIL PROTECTED] 07/06/2005 11:45 AM Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' user@struts.apache.org cc: Subject:RE: Multibox problem Code where i put the values back: map.put(districtIds, stringArr); where stringArr is an array of what the user selected. - This is not the same as calling setDistrictIds. You need to call setDistrictIds(stringArr) explicitly.
Re: javascript
Thanks buddy , it is great... Jeff Beal wrote: Use the action attribute instead of the page attribute in your html:rewrite/ tag. See http://struts.apache.org/userGuide/struts-html.html#rewrite for the tag documentation. -- Jeff On 7/6/05, Vijay K Anand [EMAIL PROTECTED] wrote: Hi All I used the same way you have said bean:define id=create_portfoliojavascript:location.href='html:rewrite page=/portfoliomgmt/'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=create_portfolio % / html code generated is input type=button name=Create value=Create onclick=javascript:location.href='/portfoliomgmt' class=NPIButton but the problem is .do missing ... Any help brotheres? Bob Arnott wrote: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M Galbreath
I would like the person who sent this to know that they are the lowest form of life on the planet. Larry On 7/6/05, netsql [EMAIL PROTECTED] wrote: We all all sincererly very sorry, we just wanted a slap on the wrist from all the noise. .V Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie Help
Frasso, Anthony wrote the following on 7/5/2005 5:34 PM: % ProjectsBean projectsBean = new ProjectsBean(); projectsBean.populate(); pageContext.setAttribute(pojectsBean, projectsBean); % Any scope should work. Also make sure the Project object includes the appropriate (JavaBeans compliant) getter methods for the properties you want to displey. L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/~laurie/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javascript
Vijay K Anand wrote: Hi All I used the same way you have said bean:define id=create_portfoliojavascript:location.href='html:rewrite page=/portfoliomgmt/'/bean:define html:button property=Create value=Create styleClass=NPIButton onclick=%=create_portfolio % / html code generated is input type=button name=Create value=Create onclick=javascript:location.href='/portfoliomgmt' class=NPIButton but the problem is .do missing ... If you want the .do bit to automatically be appended for you, then use: html:rewrite action=/portfoliomgmt / http://struts.apache.org/userGuide/struts-html.html#rewrite -- Bob Arnott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: M Galbreath
I probably should not respond, but obviously I could not stop myself from doing so.. 1: How sure can we be that Mark wrote the message about him being fired over this 2: If he did write this, AND the message is true, it seems far fetched that one gets fired over just posting in this thread (although his style is far from respectable) 3: His actions in this forum (as far as I experienced it last week) is likely to trigger others to do something about it.. So he kinda brought it upon himself by provoking a maillist that should be far from name calling and showing lots of disrepect to many of us.. It should be a technical forum on the use of struts. Mark clearly violated several ethics with almost, if not all, of his posts... 4: Maybe he was not allowed to use Intenet during business hours. 5: Yes if this is the sole reason for him being fired, it is a bit over the top and the one who sent the thread summary to his director probably should not have done that. On the other hand, Mark is part of a public function and therefor has to answer to the public and therefor should have highg value of ethics.. His clear way of violating such ethics mgith be reason enough to have distrust in his addition to his public function, which kinda would make it a public's problem.. 6: bad carma? To make a long story short: he would not have anything to worry form this thread if he simply would have been polite and respectfull... Just my two cents... -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: woensdag 6 juli 2005 18:07 To: Struts Users Mailing List Subject: Re: M Galbreath I would like the person who sent this to know that they are the lowest form of life on the planet. Larry On 7/6/05, netsql [EMAIL PROTECTED] wrote: We all all sincererly very sorry, we just wanted a slap on the wrist from all the noise. .V Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Rick Reumann [EMAIL PROTECTED] wrote: 1) The person asking I believe was a beginner to Struts. Suggesting to have a DAO used in ActionForm is something definitely unorthodox and since the person is new to the framework it is unlikely he'll see many examples of this and it can get confusing if he's seeing things done in some non-orthodox way. I would agree with that. 3) You asked what the purpose of the ActionForm was for and first off I must state that I don't like the tie in of ActionForms with Struts. I like the approach JSP takes much better, but since I'm working with Struts here the purpose as I understand it is mainly a) To have a tie in to the html:form tag for pulling out properties using the html tag and b) for providing a mechanism to ensure the user's input remains for when validation fails and you are returned back to the page. So, you use action forms both for input and output. This is great. Change the scope to session, throw in some methods, and you get yourself a backing bean. This is what it should be. There has been debate on this list as to where exactly the ActionForm fits in the architecture, but rarely have I seen it debated that it should serve up business logic making calls to the backend. The typical design rule is usually separation of responsibilities. If you now start having ActionForms deal with making calls to your persistence layer, you know just added one more layer to have to maintain this code. I don't think so. Both action form and action class belong to web/presentation layer, so it does not make a difference for me where to put my code. If, instead of having two classes, Struts had only one class like Webwork, in which action can be stateful, then you would not have any doubts, would you? So consider action class and action form as part of what could be one class. Granted, you could make things 'sort of' clean by making sure to call some delegate or facade that hides the backend call, which I like to do anyway in my Action classes. Yep, me too. So, two lines of code here or there do not make a difference. 4) Since the ActionForm is used to capture user inputted data, it seems against the grain to have the ActionForm itself populating a state that the user wants to edit. I don't have this feeling, but I am not suggesting a new universal rule to access persistence layer from action form. I am merely saying that if it works, why not? Also, typically ActionForms aren't just used to capture 'edit' data but also data for a fresh add operation. So now, not only have you added backend calls from your ActionForm, but you now added more complex logic to have to decide when to make those calls and when not to (is the form being used for an edit operation or for a fresh add operation?) Actually I'm not even sure how you would accomplish this? You tell me - how are you going to know it's an 'add or edit' operation while in the reset method? You aren't going to want to populate all the employee/user info if it's an 'add', yet somehow you'll have to know this? I guess you'll have to use request.getParameter because you won't be able to use the form fields since they don't get populate until 'after' the reset is called. So you see the kind of mess things become? Um, author of original email did not provide any further information on whether this form is used for 'add' too. I supposed, that it was used for editing existing object, and for redisplaying entered data if it is incorrect. To redisplay invalid user data it must not be overwritten by pre-loaded data, thus reset() seems as simple and easy way out, though you may think that it is simple and dirty way out ;) About 'add' and 'edit'. I have two versions of same approach. First, that I used before I switched to DispatchAction, was to replace 'add' with 'create' and then 'edit': first I create empty object using create action, then I redirect to edit action, which shows whatever is in the form bean. Therefore a form bean always works with existing object, either loaded from database or just created. The simplification of this approach is using of dispatch action and redirecting from it to itself. Commands like 'create', 'edit', 'view' are dispatched to handlers, which load or create an object, then handlers redirect to the same action, which displays whatever is in the form. See details here: http://struts.sourceforge.net/strutsdialogs/crudaction.html All CRUD operations are neatly provided by one class, but of course it should be backed by an action form, which does the dirty work ;) You have to tell the new person.. Oh wait, don't use the form field here to determine if it's an edit or add, because that property hasn't been populated yet. 5) Another problem is consistency. Most users of Struts understand that they submit a form and it goes to an Action and then you forward somewhere. Pretty basic. I would rather tell the new person, use Struts Dialogs, this is
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Jeff Beal [EMAIL PROTECTED] wrote: Here's the last paragraph of the JavaDoc for the reset() method (emphasis in original): This method is *not* the appropriate place to initialize form value for an update type page (this should be done in a setup Action). You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented. You say the ActionForm is just a class with a simple lifecycle. That lifecycle is more than just a sequence of method invocations, but also the expected behavior of each of those invocations. The documentation (lifecycle specification) clearly defines that the only behavior that is expected during the invocation of the reset() method is to set checkbox values to false. -- Jeff Jeff, I don't have a blind faith in word written by someone whom I have not even had a drink with. ;-) Michael. -- Dialogs for Struts http://struts.sourceforge.net/strutsdialogs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fired???? was...Re: Struts Books Recommendations
Mark Galbreath wrote the following on 7/6/2005 10:19 AM: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark Whoever did send something is such a loser it's not even funny. At least step forward and admit who you are. I constantly here bigotted stuff on mailing lists and forums, yet I don't go running like a little baby to find out their employeer so I can tattle on them like a 3rd grader. I'd much rather the internet be open for a free exchange of ideas (regardless of whether we agree with them or not) without having to fear someone is going to hunt down who I am and state my comments to my employeer or wife. I can't believe I now have to watch what I say on this mailing list. Guess I will be making up a gmail account that doesn't use my real name just to help protect myself from losers like this person. It's sad the same thing happened to a guy working at Allstate who happened to post that he felt homosexulaity was wrong on a non-company related website http://www.wnd.com/news/article.asp?ARTICLE_ID=44961 The irony is I guess Mark should have said how The US is so evil for being in Iraq or How he hates pro-life Christians and maybe he would have gotten a promotion. Or better yet, what if he was gay and posted all over some homosexual website about how he wanted to do all these sexual things with some other males and farm animals, and I as his employeer, found out about it and found it was offensive so I fired him. I will bet you *anything* that the ACLU would be on my back so fast it wouldn't even be funny and I as the employeer would lose my job for firing him! I just love the double-standards in the U.S. today. A guy can get state funding from the National Endowment of the Arts by putting a crucifix in a jar of urine and calling it 'art', yet at the same time people get fired for off-color comments they make on a mailing list? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fired???? was...Re: Struts Books Recommendations
Take a look at the original email thread to which I responded. Take a look at the addressees of the email. Your answer will lie there. Be careful about whom you tar, since it very well be someone you may justifiably hold in high regard. As for whether that person deserves to be chastised for the consequences of the boorish behavior of others, you may just want to rethink the target of your ire. Finally, what's to say this isn't just another game being played? Carlos At 09:42 AM 7/6/2005, you wrote: Mark Galbreath wrote the following on 7/6/2005 10:19 AM: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark Whoever did send something is such a loser it's not even funny. At least step forward and admit who you are. I constantly here bigotted stuff on mailing lists and forums, yet I don't go running like a little baby to find out their employeer so I can tattle on them like a 3rd grader. I'd much rather the internet be open for a free exchange of ideas (regardless of whether we agree with them or not) without having to fear someone is going to hunt down who I am and state my comments to my employeer or wife. I can't believe I now have to watch what I say on this mailing list. Guess I will be making up a gmail account that doesn't use my real name just to help protect myself from losers like this person. It's sad the same thing happened to a guy working at Allstate who happened to post that he felt homosexulaity was wrong on a non-company related website http://www.wnd.com/news/article.asp?ARTICLE_ID=44961 The irony is I guess Mark should have said how The US is so evil for being in Iraq or How he hates pro-life Christians and maybe he would have gotten a promotion. Or better yet, what if he was gay and posted all over some homosexual website about how he wanted to do all these sexual things with some other males and farm animals, and I as his employeer, found out about it and found it was offensive so I fired him. I will bet you *anything* that the ACLU would be on my back so fast it wouldn't even be funny and I as the employeer would lose my job for firing him! I just love the double-standards in the U.S. today. A guy can get state funding from the National Endowment of the Arts by putting a crucifix in a jar of urine and calling it 'art', yet at the same time people get fired for off-color comments they make on a mailing list? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is a private email address and is explicitly and expressly not intended for addition to or use in any mass distribution list without the author's prior and express written consent. Absent the specified consent, please remove this email address from any such list. Copyright (C) 2004 Cariz
RE: Fired???? was...Re: Struts Books Recommendations
Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. There have been cases in the uk where they have done this as it's much cheaper to hunt out employees who have sent dodgy emails/had a sexual advert popup/etc than to actually pay people redundancy. Note that i agree it's a bit harsh to get the guy fired. Still, who really wants to work for a company that will fire you over a comment you make on a mailing list? Daniel. -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: 06 July 2005 17:42 To: Struts Users Mailing List Subject: Fired was...Re: Struts Books Recommendations Mark Galbreath wrote the following on 7/6/2005 10:19 AM: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark Whoever did send something is such a loser it's not even funny. At least step forward and admit who you are. I constantly here bigotted stuff on mailing lists and forums, yet I don't go running like a little baby to find out their employeer so I can tattle on them like a 3rd grader. I'd much rather the internet be open for a free exchange of ideas (regardless of whether we agree with them or not) without having to fear someone is going to hunt down who I am and state my comments to my employeer or wife. I can't believe I now have to watch what I say on this mailing list. Guess I will be making up a gmail account that doesn't use my real name just to help protect myself from losers like this person. It's sad the same thing happened to a guy working at Allstate who happened to post that he felt homosexulaity was wrong on a non-company related website http://www.wnd.com/news/article.asp?ARTICLE_ID=44961 The irony is I guess Mark should have said how The US is so evil for being in Iraq or How he hates pro-life Christians and maybe he would have gotten a promotion. Or better yet, what if he was gay and posted all over some homosexual website about how he wanted to do all these sexual things with some other males and farm animals, and I as his employeer, found out about it and found it was offensive so I fired him. I will bet you *anything* that the ACLU would be on my back so fast it wouldn't even be funny and I as the employeer would lose my job for firing him! I just love the double-standards in the U.S. today. A guy can get state funding from the National Endowment of the Arts by putting a crucifix in a jar of urine and calling it 'art', yet at the same time people get fired for off-color comments they make on a mailing list? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Michael Jouravlev [EMAIL PROTECTED] wrote: Hmm, the description for CRUDAction does not have a link to the live demo. Here it is: http://www.superinterface.com/strutsdialog/cruditemlist.do This one uses two separate actions: one for the list and another for all crud operations. Thus, browser keeps accumulating history, which is not very clean. There is another version which uses one action for everything, it behaves like a single-page application. It is not online yet. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Michael Jouravlev [EMAIL PROTECTED] wrote: On 7/6/05, Jeff Beal [EMAIL PROTECTED] wrote: Here's the last paragraph of the JavaDoc for the reset() method (emphasis in original): This method is *not* the appropriate place to initialize form value for an update type page (this should be done in a setup Action). You mainly need to worry about setting checkbox values to false; most of the time you can leave this method unimplemented. You say the ActionForm is just a class with a simple lifecycle. That lifecycle is more than just a sequence of method invocations, but also the expected behavior of each of those invocations. The documentation (lifecycle specification) clearly defines that the only behavior that is expected during the invocation of the reset() method is to set checkbox values to false. -- Jeff Jeff, I don't have a blind faith in word written by someone whom I have not even had a drink with. ;-) Michael. -- Dialogs for Struts http://struts.sourceforge.net/strutsdialogs I never asked you to go on blind faith -- I quoted the documentation. Let me do it again: This method is *not* the appropriate place to initialize form value for an 'update' type page. I don't know what word could be more authoritative than the documentation. If it is my words that you don't have blind faith in, than I guess you never will -- I don't drink. ;) -- Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Books Recommendations
Mark, I am sorry to hear it turned out this way. I hope this turns out to be a blessing in disguise and that you go on to get a better job after learning a tough lesson (not that I'm saying the punishment fit the crime -- in my opinion, based solely on postings to this list, it did not). Maybe it wasn't the right job for you anyway. May God be with you. Erik -Original Message- From: Mark Galbreath [EMAIL PROTECTED] Sent: Jul 6, 2005 10:19 AM To: Struts Users Mailing List user@struts.apache.org Subject: Re: Struts Books Recommendations Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark On 6/30/05, Thai Dang Vu [EMAIL PROTECTED] wrote: 3) Struts! It's not just for H-1Bs! So, I can get a H1B just by learning Struts and use it decently? :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fake emails --- Re: M Galbreath
People, it is inconceivable to me that a dumb-witted employer can fire somebody over an email!! Don't these people know that a fake email can be created by anybody? I can make myself look like M. Galbreath in no time at all on email. All he had to say was --- This is not me, somebody is faking my email on this email list. There is no way to PROVE where or from whom, a certain email came from, unless you start looking for IP addresses in the email headers. However, if person forwarded the emails to his boss, and then his boss had a look at the email archives at their corporate/government servers, and found those same emails there... Well that would be a different story Regards, Alex. On 7/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I probably should not respond, but obviously I could not stop myself from doing so.. 1: How sure can we be that Mark wrote the message about him being fired over this 2: If he did write this, AND the message is true, it seems far fetched that one gets fired over just posting in this thread (although his style is far from respectable) 3: His actions in this forum (as far as I experienced it last week) is likely to trigger others to do something about it.. So he kinda brought it upon himself by provoking a maillist that should be far from name calling and showing lots of disrepect to many of us.. It should be a technical forum on the use of struts. Mark clearly violated several ethics with almost, if not all, of his posts... 4: Maybe he was not allowed to use Intenet during business hours. 5: Yes if this is the sole reason for him being fired, it is a bit over the top and the one who sent the thread summary to his director probably should not have done that. On the other hand, Mark is part of a public function and therefor has to answer to the public and therefor should have highg value of ethics.. His clear way of violating such ethics mgith be reason enough to have distrust in his addition to his public function, which kinda would make it a public's problem.. 6: bad carma? To make a long story short: he would not have anything to worry form this thread if he simply would have been polite and respectfull... Just my two cents... -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: woensdag 6 juli 2005 18:07 To: Struts Users Mailing List Subject: Re: M Galbreath I would like the person who sent this to know that they are the lowest form of life on the planet. Larry On 7/6/05, netsql [EMAIL PROTECTED] wrote: We all all sincererly very sorry, we just wanted a slap on the wrist from all the noise. .V Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with a newbie topic-prepopulating a form
On 7/6/05, Jeff Beal [EMAIL PROTECTED] wrote: On 7/6/05, Michael Jouravlev [EMAIL PROTECTED] wrote: Jeff, I don't have a blind faith in word written by someone whom I have not even had a drink with. ;-) Michael. I never asked you to go on blind faith -- I quoted the documentation. Let me do it again: This method is *not* the appropriate place to initialize form value for an 'update' type page. I don't know what word could be more authoritative than the documentation. If it is my words that you don't have blind faith in, than I guess you never will -- I don't drink. ;) No, it is not your words, it is the Bible that you quoted. All it has is a statement without explanation why doing otherwise is wrong. The only book I would follow without asking for explanation would be a nuclear power station operator's manual. In all other cases I have time to sit down and think things over. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Printing Bills
Hi folks, i'm developing a project in struts, this project is about selling management. When the user selects some articles in order to sell them, there is a module with the client name and the articles list. I need to print that object: the bill. I'm in a hurry and I need ur experience in this kind of things. Do u know how to print bills? I mean, it has to have a format because we'll print in a piece of paper which it has a specific place for the client name and a specific place for the list of articles with its prices and quantity. So I don't know how to do this. Please could u share ur experience? Perhaps, is there any project about this?. Thanks in advance -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida
How to access the first item in a Collection in a JSP?
I have a Collection in my ActionForm, and want to access just the first object in that Collection. How can I do this? -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing Bills
Look at jasper for creating a pdf. Rafael Taboada wrote: Hi folks, i'm developing a project in struts, this project is about selling management. When the user selects some articles in order to sell them, there is a module with the client name and the articles list. I need to print that object: the bill. I'm in a hurry and I need ur experience in this kind of things. Do u know how to print bills? I mean, it has to have a format because we'll print in a piece of paper which it has a specific place for the client name and a specific place for the list of articles with its prices and quantity. So I don't know how to do this. Please could u share ur experience? Perhaps, is there any project about this?. Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Fired???? was...Re: Struts Books Recommendations
Daniel Perry wrote the following on 7/6/2005 12:49 PM: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Personally, if I owned a company and someone was using the company email domain name to post on sites such as swingers or transvestitepride, I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access the first item in a Collection in a JSP?
From: Mick Knutson [EMAIL PROTECTED] I have a Collection in my ActionForm, and want to access just the first object in that Collection. How about... %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${form.property[0]}/ -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing Bills
PDF is definitely the way to go While not strictly a struts thing -- the way to do it in my opinion is: text from the article --- XML (data from the article in XML format) --- create an XSL:FO file using some kind of a tool ( http://altova.com/ ) has demo software you can try for this -- XSL:FO + XML + FOP ( http://xml.apache.org/fop/ ) -- PDF !!! Lickity split, 2 weeks of work or so... Cheers, Alex. On 7/6/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks, i'm developing a project in struts, this project is about selling management. When the user selects some articles in order to sell them, there is a module with the client name and the articles list. I need to print that object: the bill. I'm in a hurry and I need ur experience in this kind of things. Do u know how to print bills? I mean, it has to have a format because we'll print in a piece of paper which it has a specific place for the client name and a specific place for the list of articles with its prices and quantity. So I don't know how to do this. Please could u share ur experience? Perhaps, is there any project about this?. Thanks in advance -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida
Re: Printing Bills
So aren't there any other way that PDF? -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida
Re: Printing Bills
On 7/6/05, Aleksandar Matijaca [EMAIL PROTECTED] wrote: PDF is definitely the way to go I would not say that pdf is definitely the way to go. CSS with print media type and points or cm or inches for units (not pixels) should work quite well. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
Michael Jouravlev wrote the following on 7/6/2005 12:26 PM: So, you use action forms both for input and output. This is great. Change the scope to session, throw in some methods, and you get yourself a backing bean. This is what it should be. Well, not really. I should be able to use a POJO/ValueObject not tied to Struts packages. A true backing bean could be used on the backend and front interchangeably. Sure, if I wanted to tie my entire backend to Struts I could be passing around the ActionForm everywhere, but I don't really like doing that (the whole seperation thing again:). I don't think so. Both action form and action class belong to web/presentation layer, so it does not make a difference for me where to put my code. If, instead of having two classes, Struts had only one class like Webwork, in which action can be stateful, then you would not have any doubts, would you? So consider action class and action form as part of what could be one class. I have considered this, and again this is another reason I consider the ActionForm the ugly duckling of Struts:) 4) Since the ActionForm is used to capture user inputted data, it seems against the grain to have the ActionForm itself populating a state that the user wants to edit. I don't have this feeling, but I am not suggesting a new universal rule to access persistence layer from action form. I am merely saying that if it works, why not? One of the reasons is I'm not sure (like I mentioned below) how you reuse this ActionForm under different situations... I often use the same ActionForm in many diffrent cicumstances. I wouldn't want it always being populated (the add was just one example) so you'd need a mechanism to decide when and when not to call the populate and, not only that, but what gets populated might need to change based on what the ActionForm is being used for. For example, you might have a generic UserForm (name and ID - for simplicity)- this form might sometimes be used for dealing with Accounting users or sometimes HR Users. In order to resuse this form in many different circumstances you'd have to have a bunch of conditional logic in your ActionForm. I find it cleaner to avoid that logic. I find it cleaner to bind that userForm to different ActionMappings and thus the resulting Action takes care of knowing what to do, vs putting all the responsibility on the ActionForm knowing how to populate itself. Um, author of original email did not provide any further information on whether this form is used for 'add' too. I supposed, that it was used for editing existing object, and for redisplaying entered data if it is incorrect. To redisplay invalid user data it must not be overwritten by pre-loaded data, thus reset() seems as simple and easy way out, though you may think that it is simple and dirty way out ;) Well, he didn't state he needed it for an add but I think an ActionForm should be flexible enough to support it. (I doubt you'd make a POJO that could be used in 'one way'. In regard to To redisplay invalid user data it must not be overwritten by pre-loaded data, thus reset() seems as simple and easy way out.., I must be confused on what you see happening that I don't. I don't use the reset to pre-populate the form data and never have a problem with anything being over-ridden when valiation fails (There is the problem of request scoped forms that have lists on the page that need to be reset, but that's another topic:).. and I wrote the solution I like here..http://www.reumann.net/struts/articles/request_lists.jsp ). The simplification of this approach is using of dispatch action and redirecting from it to itself. Commands like 'create', 'edit', 'view' are dispatched to handlers, which load or create an object, then handlers redirect to the same action, which displays whatever is in the form. See details here: http://struts.sourceforge.net/strutsdialogs/crudaction.html All CRUD operations are neatly provided by one class, but of course it should be backed by an action form, which does the dirty work ;) Guess I'm too old skool, I like the dirty work called from my Action dispatch (CRUD) methods. So I might have... setUpForEdit(...) { Employee emp = service.getMeEmployee(someID); PropertyUtils.copyProperties( (EmployeeActionForm)form, emp ); //... } edit(..) { Employee emp = new Employee(); PropertyUtils.copyProperties( emp, (EmployeeActionForm)form ); service.updateEmployeee( emp ); //... } add(..) seems pretty clean to me and his been doing the job quite effectively. I would rather tell the new person, use Struts Dialogs, this is so much simpler than to invent everything yourself, which you have to do becuase Struts is so basic. I'll have to check out Struts Dialog sometime. Which is why I developed my library, so newbies can save efforts creating UI. Why would not you take a look at it? But it may seem a little unorthodox for you at first ;) Sounds good.
Re: Printing Bills
There are a number of commercial products out there -- the products I outlined to you are open source, except the altova product... This is actualy much simpler then it seems Rafael -- have look at FOP... Regards, Alex. On 7/6/05, Rafael Taboada [EMAIL PROTECTED] wrote: So aren't there any other way that PDF? -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida
Re: Fired???? was...Re: Struts Books Recommendations
On 7/6/05, Rick Reumann [EMAIL PROTECTED] wrote: I can't believe I now have to watch what I say on this mailing list. You always have to watch what you say and do, Big Brother is watching. Kidding aside, I know this first hand. Weather, football and cars seem to be safe topics. Until you call VW Beetle a gay car, and then realise that your homofobic boss drives it. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. The purpose of any religion including communism is to control the masses, so I do not care much about differences between confessions. By the way, can you tolerate my point of view? ;-) Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing Bills
Rafael Now I understand.. You can use Crystal Reports to pretty print using cascading style stylesheets for formatting but if you want hardcopy used by most of the agencies of the US I would output to PDF Saludos Cordiales! Martin- - Original Message - From: Rafael Taboada [EMAIL PROTECTED] To: Struts List user@struts.apache.org Sent: Wednesday, July 06, 2005 2:13 PM Subject: Re: Printing Bills So aren't there any other way that PDF? -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing Bills
I would either use JasperReports to create a simple report definition, or use IText to create the PDF. When we tried to use FOP, we had to embed the fonts which resulted in HUGE PDFs. On 7/6/05, Martin Gainty [EMAIL PROTECTED] wrote: Rafael Now I understand.. You can use Crystal Reports to pretty print using cascading style stylesheets for formatting but if you want hardcopy used by most of the agencies of the US I would output to PDF Saludos Cordiales! Martin- - Original Message - From: Rafael Taboada [EMAIL PROTECTED] To: Struts List user@struts.apache.org Sent: Wednesday, July 06, 2005 2:13 PM Subject: Re: Printing Bills So aren't there any other way that PDF? -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fired???? was...Re: Struts Books Recommendations
Just to add another perspective. I've been a Struts list lurker for about 3 years and have enjoyed reading the posts. Programmers are often crazy and outrageous (which gives us our charm) , but I had a problem with Mark's remarks about East Indians being faggots. As a guy who has been in IT for the last 15 years, I find myself being directly and negatively affected by the outsourcing of programming and IT jobs to other countries especially India and Mexico. Given the nature of business, the government will need to act in a way that affects everyone at the same time, to balence the situation, (probably through some kind of system of tarriffs). Otherwise, I think our country will be hurt badly now and in the future. I am very resentful of the outsourcing situation. But, as an African-American, I was more bothered by Mark's remarks. While it wasn't directed at me, being neither East Indian nor gay, I was really disturbed by Mark's joking remarks. I can think of times 10 years ago when whites would make racist remarks about blacks, in the presence of blacks and we blacks would have to find the courage and strength to tell the joke teller to stop. Fortunately, as I was composing a response, Frank Z. posted his initial response, letting Mark know he had crossed the line. I'm not a great believer in political correctness, as I've seen that belief be used to suppress all offensive expression. But the downside of attacking the character of the target of your anger is that they get angry or hurt and stop participating. I thought the idea behind the open-source/open-license movement was to get everybody involved. So, I want thank all those who didn't let the shock and awe of Mark's remarks stop them from speaking up. And, if Mark really was fired, was there any other way to make Mark accountable for his behavior? Right now, I can't think of any, but I'd be happy hear suggestions that *really* would have worked with Mark. Regards, Bob Harris --- Daniel Perry [EMAIL PROTECTED] wrote: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. There have been cases in the uk where they have done this as it's much cheaper to hunt out employees who have sent dodgy emails/had a sexual advert popup/etc than to actually pay people redundancy. Note that i agree it's a bit harsh to get the guy fired. Still, who really wants to work for a company that will fire you over a comment you make on a mailing list? Daniel. -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: 06 July 2005 17:42 To: Struts Users Mailing List Subject: Fired was...Re: Struts Books Recommendations Mark Galbreath wrote the following on 7/6/2005 10:19 AM: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark Whoever did send something is such a loser it's not even funny. At least step forward and admit who you are. I constantly here bigotted stuff on mailing lists and forums, yet I don't go running like a little baby to find out their employeer so I can tattle on them like a 3rd grader. I'd much rather the internet be open for a free exchange of ideas (regardless of whether we agree with them or not) without having to fear someone is going to hunt down who I am and state my comments to my employeer or wife. I can't believe I now have to watch what I say on this mailing list. Guess I will be making up a gmail account that doesn't use my real name just to help protect myself from losers like this person. It's sad the same thing happened to a guy working at Allstate who happened to post that he felt homosexulaity was wrong on a non-company related website http://www.wnd.com/news/article.asp?ARTICLE_ID=44961 The irony is I guess Mark should have said how The US is so evil for being in Iraq or How he hates pro-life Christians and maybe he would have gotten a promotion. Or better yet, what if he was gay and posted all over some homosexual website about how he wanted to do all these sexual things with some other males and farm animals, and I as his employeer, found out about it and found it was offensive so I fired him. I will bet you *anything* that the ACLU would be on my back so fast it wouldn't even be funny and I as the employeer would lose my job for firing him! I just love the double-standards in the U.S. today. A guy can get state funding from the National Endowment of the Arts by putting a crucifix in a jar of urine and calling it 'art', yet at the
Re: Newbie: Where to put instance for database access?
Create a singleton class, that holds the instance of a connection in a ThreadLocal class in that singleton -- this way you don't have to keep stuff in the session... Regards, Alex. On 7/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi! I have maybe a simple question: My web-app has to get data out of a database. I have a class DatabaseHandler which holds a connection to the database and provides methods to query it. I would like to have only one instance of this class in my web-app. But I don't know where to put it. Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps hibernate would be a good choice too, but I think its a bit oversized for my application. You see - I am a total newbie concerning the use of databases with struts. Please help!!! Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing Bills
Interesting, we didn't have that problem at all. I just wish that there was a better way of including graphic objects that were created -on-the-fly... Regards, Alex. On 7/6/05, Nick Heudecker [EMAIL PROTECTED] wrote: I would either use JasperReports to create a simple report definition, or use IText to create the PDF. When we tried to use FOP, we had to embed the fonts which resulted in HUGE PDFs. On 7/6/05, Martin Gainty [EMAIL PROTECTED] wrote: Rafael Now I understand.. You can use Crystal Reports to pretty print using cascading style stylesheets for formatting but if you want hardcopy used by most of the agencies of the US I would output to PDF Saludos Cordiales! Martin- - Original Message - From: Rafael Taboada [EMAIL PROTECTED] To: Struts List user@struts.apache.org Sent: Wednesday, July 06, 2005 2:13 PM Subject: Re: Printing Bills So aren't there any other way that PDF? -- Rafael Taboada Software Engineer Cell : +511-97753290 No creo en el destino pues no me gusta tener la idea de controlar mi vida - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
Michael Jouravlev wrote: The only book I would follow without asking for explanation would be a nuclear power station operator's manual. In all other cases I have time to sit down and think things over. Strictly speaking, you shouldn't actually be operating a nuclear power station without already having read the manual and asked those questions... (My Dad used to be the guy they asked, but I imagine a fair number of his students graduated to actually working in power plants without a clue about the why of any of it). -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M Galbreath
Larry Meadors wrote: I would like the person who sent this to know that they are the lowest form of life on the planet. Oh, please. That's why the idiot shouldn't have been using a government email address. I've skipped almost all of this, but at the very least he _did_ make threatening noises. You just can't go doing that on government time. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie: Where to put instance for database access?
You should be using some type of data source or preferrably a connection pool based on a data source. Most web servers include a connection pool implementation and all that's needed is to define the connection pool, define the data source, and then link the two. Your web app will then get a connection from the connection pool when needed, and release it when finished. There is not much overhead when using a connection pool as the connections are created once and then passed around to whomever needs them. You can also specify how many concurrent connections to the database the connection pool contains. Regardless of implementation, each request should be getting and releasing it's own connection, not sharing them between requests as your question seems be saying. If you are sharing a single connection, you will have multiple requests in your web application using the same connection object, which is not allowed and will cause you problems at some point. Since threads are non-deterministic, these errors will be mysterious, hard to duplicate, and very difficult to debug. See http://en.wikipedia.org/wiki/Race_condition#Computing -ed On 7/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi! I have maybe a simple question: My web-app has to get data out of a database. I have a class DatabaseHandler which holds a connection to the database and provides methods to query it. I would like to have only one instance of this class in my web-app. But I don't know where to put it. Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps hibernate would be a good choice too, but I think its a bit oversized for my application. You see - I am a total newbie concerning the use of databases with struts. Please help!!! Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Books Recommendations
You are kidding right? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. http://www.edgetechservices.net/ 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] Skype: jmitchtx On Jul 6, 2005, at 10:19 AM, Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark On 6/30/05, Thai Dang Vu [EMAIL PROTECTED] wrote: 3) Struts! It's not just for H-1Bs! So, I can get a H1B just by learning Struts and use it decently? :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie: Where to put instance for database access?
Depending on the level of usage to the database, I would recommend implementing a connection-pool and requesting a connection each time you need to query the database. If you hold a single connection for your application, you will limit your scalability and hurt performance based on the user load. How you set up this pool is dependent on the database you are using and the resources you have available to that database. I would recommend looking at the Jakarta Commons-pool project. All of the major J2EE Appservers and most of the Java Servlet Container Servers support connection pooling. The only exception that I can think of off the top of my head is Sun iPlanet 6.0 or less. Tomcat will support connection pooling and has a decent how-to on their website. Aleksandar Matijaca [EMAIL PROTECTED] Aleksandar Matijaca [EMAIL PROTECTED] 07/06/2005 03:01 PM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Newbie: Where to put instance for database access? Create a singleton class, that holds the instance of a connection in a ThreadLocal class in that singleton -- this way you don't have to keep stuff in the session... Regards, Alex. On 7/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi! I have maybe a simple question: My web-app has to get data out of a database. I have a class DatabaseHandler which holds a connection to the database and provides methods to query it. I would like to have only one instance of this class in my web-app. But I don't know where to put it. Should it be stored in the ServletContext for application scope? But how do I access this instance from my Actions? Or would it be better to use data-sources? If I should use them, does anybody know a good tutorial on the internet? Perhaps hibernate would be a good choice too, but I think its a bit oversized for my application. You see - I am a total newbie concerning the use of databases with struts. Please help!!! Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] M Galbreath
Oh, please. That's why the idiot shouldn't have been using a government email address. I've skipped almost all of this, but at the very least he _did_ make threatening noises. You just can't go doing that on government time. Yep. If you can't say it to your boss' face, then you shouldn't be writing it/doing it on company time. If you ever read your employment agreement, you'll see that they have the right to monitor anything and everything you do online while at work. Now if he was spouting off the same ignorant, profane stuff on this list from home and he got canned because of THAT, then it'd be a different story. There'd have to be some sort of ethics clause in his contract explicitly prohibiting that type of behavior (highly unlikely). In either case, I doubt we've heard the last of him. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [offlist] Re: Newbie Help
On 7/6/05, Frasso, Anthony [EMAIL PROTECTED] wrote: snip/ Instead of doing what I would expect, it prints out the the text of $(project.projectId} instead of its value. Note that I also tried using your JSP 2.0 recommendation, replacing the c:out tag with just ${project.projectId}. Same result. See Question 1 [ http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions ]. See the rest if you have another minute ;-) c:out's aren't needed. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access the first item in a Collection in a JSP?
Wel, I catually have something like form.cards[0].cardNumber, but it is also not an array. It is a collection. Doesn't matter, it works for both as long as you got a getCardNumber() in there. Wendy Smoak wrote: From: Mick Knutson [EMAIL PROTECTED] I have a Collection in my ActionForm, and want to access just the first object in that Collection. How about... %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${form.property[0]}/ -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations
talk about an OT thread! 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. The key difference here as I see it is how far some people want to take these disagreements. For many conservatives (granted, this is a generalization here... so let's say many conservative politicians instead), it is not enough to simply state I find Y and Z to be offensive but they often want to take it to the next level and say not only are Y and Z offensive, X is the only legitimate option and we should make Y and Z illegal. Consider if I was a vegan (I'm not) and you're a meat-eater. Let's say that I'm passionate about it being morally offensive to kill and consume animals. It's entirely my right to believe that and state my opinion to you and anyone else I can find to try and spread my belief system onto others (as it is your right to do likewise). However, it would be ridiculous for me to try to pass legislation or, God forbid, a constitutional amendment stating that meat consumption is illegal. It would be wrong for me to try to impose my belief system on people who have differing, but still legitimate, beliefs. To me, tolerance doesn't imply that I have to agree with what everyone else says or does - it just means that I am willing to allow them to believe what they want to believe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access the first item in a Collection in a JSP?
Mick- Or you could use map entry.. c:forEach var=entry items=${QUERYRESULT[FormName]} c:out value=${entry.key}/ - c:forEach var=eo items='${entry.value}' ${eo.name.value} /c:forEach /c:forEach HTH, Martin- - Original Message - From: Mick Knutson [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 06, 2005 4:19 PM Subject: Re: How to access the first item in a Collection in a JSP? Wel, I catually have something like form.cards[0].cardNumber, but it is also not an array. It is a collection. Wendy Smoak wrote: From: Mick Knutson [EMAIL PROTECTED] I have a Collection in my ActionForm, and want to access just the first object in that Collection. How about... %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${form.property[0]}/ -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts MVC design (was:: help with a newbie topic-prepopulating a form)
On 7/6/05, Adam Hardy [EMAIL PROTECTED] wrote: I pity the poor noob who asked the original question! Little did he suspect that he would spark off a dialog on advanced MVC design. This debate has come up before and for me, it is one of the weak points of struts - I remember a couple of years back someone on the list complaining that Struts wasn't 'OO' because the data and logic were seperated into Actions and ActionForms. I remember Craig M. almost agreeing. Looking at JSF backing beans, he ultimately agreed. Now there is talk of Struts in the future containing ActionCommands which can be substituted in place of Actions, and strung together in a chain, and presumably can perform View-Controller logic. My previous design used chaining of different actions, like to chain from 'create' to 'edit' to implement 'add new' operation. But now I use a single action class with dispatch-style handlers and redirecting to itself for rendering. Technically, it is not even chaining, because I do not use in-server forwarding, I use redirection. On 7/6/05, Rick Reumann [EMAIL PROTECTED] wrote: Michael Jouravlev wrote the following on 7/6/2005 12:26 PM: So, you use action forms both for input and output. This is great. Change the scope to session, throw in some methods, and you get yourself a backing bean. This is what it should be. Well, not really. I should be able to use a POJO/ValueObject not tied to Struts packages. A true backing bean could be used on the backend and front interchangeably. Sure, if I wanted to tie my entire backend to Struts I could be passing around the ActionForm everywhere, but I don't really like doing that (the whole seperation thing again:). Right, I would like to use a POJO/VO/BO outside Struts too. Let us establish a use case: to use a BO in input/output mode, that is to [semi-]automatically populate it from request, and to have it provide values for JSP page. So, I see two choices for this use case: (A) Define getters and setters for all properties of BO right in the form bean. This way all form bean properties are defined as strings. This helps to retain values from request, even if they are incorrect, because no conversion to native type is made. The values can be validated with standard validate method, and I don't have to worry about consistency of a real BO. I would need to define setters/getters again, and to copy values from/to BO. On the other hand, I would need to copy those values only at init and then at store. If a user makes several submit attempts, I copy nothing to BO. (B) Set up a BO as a property of the form bean. Struts will access it as nested property and will be able to set and read its internal fields. I will need to use qualifiers to access properties of a BO from JSP page. In this case BO should accept string values, and should have built-in validation and conversion mechanisms. In this case I have a pretty isolated BO, which can handle raw string data, and can validate it. I think this way is better for systems where Struts is not the only front end, and there is a lot business logic and business validation on the backend. I often use the same ActionForm in many diffrent cicumstances. I wouldn't want it always being populated (the add was just one example) so you'd need a mechanism to decide when and when not to call the populate and, not only that, but what gets populated might need to change based on what the ActionForm is being used for. For example, you might have a generic UserForm (name and ID - for simplicity)- this form might sometimes be used for dealing with Accounting users or sometimes HR Users. In order to resuse this form in many different circumstances you'd have to have a bunch of conditional logic in your ActionForm. I find it cleaner to avoid that logic. I find it cleaner to bind that userForm to different ActionMappings and thus the resulting Action takes care of knowing what to do, vs putting all the responsibility on the ActionForm knowing how to populate itself. A-ha. You keep your action form clean and multipurpose so you can reuse it. But your action class performs business logic specific for every use case, so you cannot reuse it. If you were to create a library, you would have to provide base action forms, which would be reused or subclassed, but a user of your library would have to define a new action class anyway. Now, let's look at it from another side. The action class is multipurpose, it can be either subclassed or in many cases used as is. This is a clean benefit for a user of a library. The action class provides the event contract, while the action form does the dirty work. The library does not have a clue about real data in every different case, but in might have some knowledge about the protocol, and about lifecycle. So, the library provides an interface which action form implements. This way it behaves according to protocol, but has the concrete logic for a particular business
Re: [offlist] Re: Newbie Help
Thanks for your help, Rahul. My current web.xml file looks like this: ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app ... According to the wiki, it seems that I should be changing it to this: ?xml version=1.0? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 ... Do I have this right? It seems that the web-app tag attributes substitute for the dtd definition file. Is there a good reference for the web-app tag attribute definitions? Regards, Anthony Frasso - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access the first item in a Collection in a JSP?
Worked. Thanks.. Zarar Siddiqi wrote: Wel, I catually have something like form.cards[0].cardNumber, but it is also not an array. It is a collection. Doesn't matter, it works for both as long as you got a getCardNumber() in there. Wendy Smoak wrote: From: Mick Knutson [EMAIL PROTECTED] I have a Collection in my ActionForm, and want to access just the first object in that Collection. How about... %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${form.property[0]}/ -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help with a newbie topic-prepopulating a form
On 7/6/05, Adam Hardy [EMAIL PROTECTED] wrote: Now there is talk of Struts in the future containing ActionCommands which can be substituted in place of Actions, and strung together in a chain, and presumably can perform View-Controller logic. If you look at Shale (with its support for both ViewController and Dialog -- which, among other things, lets you intersperse action states and view states to your heart's desire), you'll find that the future is now :-) http://struts.apache.org/shale/ Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
(OT) Re: Struts vs .NET???
Hi Dakota Jack, very funny. I think someone had suggested to put this thread to OT. BTW, I don't want spend too much time on this and I had said enough about you in my emails. Now I can focus on my job and be more productive by not having to write getters and setters manually. Only when I wrote million line codes I realized how insane to write something machine can produce perfectly to you. That's the difference between us. Jack H. Xu Technology columnist and editor http://www.usanalyst.com http://www.getusjobs.com (The largest free job portal in North America) - Original Message - From: Dakota Jack To: Struts Users Mailing List Subject: Re: Struts vs .NET??? Date: Wed, 6 Jul 2005 07:54:18 -0700 Okay, okay, Reumann. Do you want to be right or do you want to be loving? ///;-) Xu really is not all that atuned to computer stuff, even though he is a computer journalist, so you might take him on as your grasshopper? ///;-) On 7/5/05, Rick Reumann wrote: John Henry Xu wrote the following on 7/2/2005 6:43 AM: Is writting lots of getters and setters manually the most productive way in real projects? You keep coming back to this getters and setters thing:) Like I said any editor (even vim:) can create getters and setters. I take it you think Struts is all about getters and setters? Seriously, don't take offense to this, but I'm wondering how many Struts applications you actually coded? I usually have several ActionForms and some beans which do have get/set methods. The beans (value objects/dto's) I'd have even if I was coding an application in Swing/.NET or whatever. So your main thrust here seems to be about ActionForms and get/set methods? Honestly that's such a small part of the whole process I still can't believe you are harping on it. I think we can terminate listening to your posts because of this statement: My experience was Struts have more codes and configuration files than straight forward JSP+Javabean+taglibs approach that was done before. This tells me either: A) You haven't used Struts much OR C) The applications you write using your home-grown approach have to be quite sucky and would be a royal pain to maintain and refactor as requirements change. I make this claim because Struts (and other web application frameworks) provide ALREADY WRITTEN CODE in jars that you'd have to write YOURSELF if you didn't use a framework. So, to quote you, - more lines mean more time and a waste of money. So under your own logic you are costing your company a TON of money and you might want to think about adopting some web framework for your developers to start using. I can get into all the little things web frameworks provide, but here are some simple questions I have for you that maybe you can answer from 'your experience'... Where do your forms submit to? How do you handle/configure where the page forwards to after the request is sent? When you need to change the flow of the application (what page forwards to where) how do you make this change? How do you handle server side validation problems and display messages to the user about these server side problems? If you handled ANY of the above than I will GUARANTEE you that I can take your SAME application, and not change any of your business logic, and end up with code that is CLEANER and, most importantly from your perspective, written in LESS lines. I truly truly would love for you to zip up a sample of one of your web applications and let us check out this 'smaller' code base. Please do it. Pretty please. I'm sorry if I sound a bit hostile, but I've had this 'argument' with so many people over the years. They say stuff like I don't see why use (insert your favorite web framework), you just complicate things and end up with more code and configuration files. Then what happens is I see their code and see all the wasted stuff they are doing that a web framework provides 'out of the box.' I think the problem is these people don't see how the framework saves time because they haven't worked with. Do these frameworks have problems? Yes, they do. I'm not a fan of ActionForms myself, but I do see their place in the Struts world. JSF seems to have gotten rid of them. Some frameworks the learning curve looks too steep for me to invest the time in it (Spring's UI framework seemed to be one of these back in the day when I first considered it... the docs sucked). Others out there seem good, but I'm just too comfortable with Struts to make the change. I can whip out a quality web app using Struts and iBATIS in practically no time at
Re: Struts MVC design
Michael Jouravlev wrote the following on 7/6/2005 5:03 PM: The action class provides the event contract, while the action form does the dirty work. Well in this case the struts-config file would provide the contract and you could simply use one ForwardAction for everything. You've substituted numerous Actions (or DispatchAction methods) and replaced them with either A) numerous ActionForms (probably sharing the same field names or B) complext logic in single ActionForms to decide on what 'business logic' to do. Did I convince you that having business logic in an action form is better? Action class provides external I/O contract and manages messages and navigation, while action form performs operations on business data, *where it is actually stored* . No you haven't convinced me at all:) I still see no practical benefit to flipping struts inside out like this. Sure it'll work, and I'm not even saying (without a lot more thought:) that it's bad, but it certainly totally turns around the way the framework was designed to work. (I don't think the method names reset and validate would be chosen as method names in an ActionForm if they were designed for doing all kinds of business logic in them. I think if you go this route, you should say it's a different version of Struts.. maybe StrutsWorks or something:) Under the scenario you've proposed I don't see what the point of using any Actions would be? Why not just use the one default FowardAction and do everything in the ActionForm? (In case someone is popping into this thread late, I'm certainly not advocating this:) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts MVC design
On 7/6/05, Craig McClanahan [EMAIL PROTECTED] wrote: On 7/6/05, Adam Hardy [EMAIL PROTECTED] wrote: Now there is talk of Struts in the future containing ActionCommands which can be substituted in place of Actions, and strung together in a chain, and presumably can perform View-Controller logic. If you look at Shale (with its support for both ViewController and Dialog -- which, among other things, lets you intersperse action states and view states to your heart's desire), you'll find that the future is now :-) http://struts.apache.org/shale/ Craig Moved to the new thread. From http://struts.apache.org/shale/features.html#view Each backing bean that implements ViewController will support a boolean property postback, which will be set to true if this view is the one that is processing a form submit previously rendered by the same page, or false if this view was newly navigated to. * How is this different from ASP.NET? * Does not this make Shale page-based instead of front-controller based? MS recognized lack of front controller support in ASP.NET 1.0 and will provide it to the second version. Resource-based apps like Struts Classic can return whatever page they want from the same location, while page-based apps tie resource address to a page, which can lead to unfriendly Back experience. This can be worked around, but why if Struts Classic already provides better approach? Sure, a component should be able to be initialized when needed. It can be done easily with initialization parameter. Shale Dialogs is based on Spring Webflow, which, when I checked the last time, did not support Back button and clean refresh. Hopefully, Shale Dialogs behaves more user-friendly. Nevertheless, Struts Dialogs has WizardAction, which provides support for dialogs and wizards, based on Easy Wizard concept: http://today.java.net/pub/a/today/2005/03/15/webwizard1.htm http://today.java.net/pub/a/today/2005/03/29/webwizard2.htm WizardAction subclasses DialogAction and implements wizard's UI Controller. see the demo: http://www.superinterface.com/strutsdialog/wizardaction.do Notice, that Refresh works, and that you cannot go back to a previous page (unless you use Opera). The above is possible with adding of only two action classes to classic Struts. Michael -- Struts Dialogs http://struts.sourceforge.net/strutsdialogs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Generics
Java generics are a compile-time feature only. The compiler uses your extra information (parameterized types) in order to detect some errors and eliminate the drudgery of some casting for you. However, when you run the JVM it has no knowledge of generics. Therefore, if you have an instance of ListUser it will just be List when it actually gets used. In this context, I do not believe that struts needs to know anything more than type=java.util.List for it to work. Cheers, Mike Michael Taylor TXE Systems, Inc. [EMAIL PROTECTED] Laurie Harper wrote: I'd say it depends on how Struts processes the form bean declaration. Assuming it's using straight reflection, I don't see why generics wouldn't work. However, Kent, you will need to correct your XML: the error you're seeing is becuase what you have can't be parsed (it's not well formed). Give this a try and see if it works: form-property name=users type=java.util.ArrayListlt;testpackage.Usergt;/ L. Nitesh Naveen wrote: Generics is a Java 5.0 feature... Don't think the features with 5.0 are introduced to Struts framework yet! Thanks Regards, Nitesh _ Disclaimer: Information contained and transmitted by this e-mail is confidential, proprietary, and legally privileged data of Cordiant Technologies that is intended for use only by the addressee. If you are not the intended recipient, you are notified that any dissemination, distribution, or copying of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator. Any views expressed by an individual do not necessarily reflect the view of Cordiant Technologies. The recipient should scan this email and any attachments for viruses as Cordiant Technologies is not liable for the presence of viruses in this email. Cordiant Technologies does not accept liability for any errors or omissions as the internet communications cannot be guaranteed to be timely, secure, error or virus-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. To know more about Cordiant Technologies, please visit http://www.cordiant.com _ -Original Message- From: Kent Boogaart [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 06, 2005 1:11 PM To: user@struts.apache.org Subject: Struts and Generics Hi there, I'm wondering whether it's possible to use generics with struts. Something like: form-bean name=test type=org.apache.struts.validator.DynaValidatorForm form-property name=users type=java.util.ArrayListtestpackage.User/ /form-bean I tried doing this (with my class names of course) and I get this exception on startup: javax.servlet.ServletException: Can't get definitions factory from context. Thanks, Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts MVC design
On 7/6/05, Rick Reumann [EMAIL PROTECTED] wrote: Michael Jouravlev wrote the following on 7/6/2005 5:03 PM: The action class provides the event contract, while the action form does the dirty work. Well in this case the struts-config file would provide the contract and you could simply use one ForwardAction for everything. You've substituted numerous Actions (or DispatchAction methods) and replaced them with either A) numerous ActionForms (probably sharing the same field names or B) complext logic in single ActionForms to decide on what 'business logic' to do. I cannot use ForwardAction for everything because I need to dispatch the button click to a handler. DispatchAction (its subclass) provides dispatching of events. My ActionForms do not have complex logic, they have simple methods like crudCreate or crudLoad or crudDelete. These methods are called from action class. Action class itself can be reused in different apps or in the same app, because it is stateless. ActionForm is stateful (has session scope), has specific business code and properties for every particular business object. Generally, actionforms are not shared. Did I convince you that having business logic in an action form is better? Action class provides external I/O contract and manages messages and navigation, while action form performs operations on business data, *where it is actually stored* . No you haven't convinced me at all:) I still see no practical benefit to flipping struts inside out like this. I just explained where benefit is: with your approach you reuse forms, but define specific action classes. I suggest to reuse action classes, but to define specific forms. Is not it the same thing? I don't think so, because action classes can define different contracts, for example for yes/no dialog, or for next/back/cancel wizard of for create/edit/view/delete form. These action classes can be reused. Action form works with specific data, so it is natural, that it should not be reused. I will think of better reasons ;) (I don't think the method names reset and validate would be chosen as method names in an ActionForm if they were designed for doing all kinds of business logic in them. Oops, I see misunderstanding here. I did not say that business logic should be implemented in reset and validate. Not at all. There are intefaces, which are implemented by action forms. I hope you will find time to look at my stuff, because it is explained there and in the source code. I think if you go this route, you should say it's a different version of Struts.. maybe StrutsWorks or something:) You got me: I was thinking of spawning off Struts to something else, but I would like first to convince its power users and committers, that the change I am suggesting is good. If this does not work, I may consider borrowing Struts core, add my stuff to it and call it StrutsWorks ;) I figured, that to do that I need at least 30% of my own code, and now I do not have critical mass yet. Another issue is users, who would learn new controller framework, when there are exciting alternatives like Wicket? Under the scenario you've proposed I don't see what the point of using any Actions would be? Why not just use the one default FowardAction and do everything in the ActionForm? Right, in many cases I would prefer action form to do the dispatching and forwarding to a view. But in other cases I would prefer to reuse standard action class, and to define business methods in a form bean. So, I don't want to *change* everything, I want to *add* new options. Michael. -- Dialogs for Struts http://struts.sourceforge.net/strutsdialogs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need 2 parameters for html:link
I have the following that works almost fine: html:link forward=historicalTransactions paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Then what I get is http://URL?commonEnrollmentID=12345; What I need to be generated is: http://URL?action=historicalcommonEnrollmentID=12345; Because historical is an action method on my LookupDispatchAction that needs to be called when I click this link. Thanks in advance for your help. -- Thanks Mick Knutson (925) 951-4126 HP Consulting Services Safeway (Blackhawk Fastword Project) J2EE Architect --- MMS safeway.com made the following annotations. -- Warning: All e-mail sent to this address will be received by the Safeway corporate e-mail system, and is subject to archival and review by someone other than the recipient. This e-mail may contain information proprietary to Safeway and is intended only for the use of the intended recipient(s). If the reader of this message is not the intended recipient(s), you are notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations
Would all you shad up and get back to talking about how dead struts 1.x is :) Long live Shale and JSF!!! Brandon On 7/6/05, Nick Andros [EMAIL PROTECTED] wrote: talk about an OT thread! 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. The key difference here as I see it is how far some people want to take these disagreements. For many conservatives (granted, this is a generalization here... so let's say many conservative politicians instead), it is not enough to simply state I find Y and Z to be offensive but they often want to take it to the next level and say not only are Y and Z offensive, X is the only legitimate option and we should make Y and Z illegal. Consider if I was a vegan (I'm not) and you're a meat-eater. Let's say that I'm passionate about it being morally offensive to kill and consume animals. It's entirely my right to believe that and state my opinion to you and anyone else I can find to try and spread my belief system onto others (as it is your right to do likewise). However, it would be ridiculous for me to try to pass legislation or, God forbid, a constitutional amendment stating that meat consumption is illegal. It would be wrong for me to try to impose my belief system on people who have differing, but still legitimate, beliefs. To me, tolerance doesn't imply that I have to agree with what everyone else says or does - it just means that I am willing to allow them to believe what they want to believe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need 2 parameters for html:link
On 7/6/05, Mick Knutson [EMAIL PROTECTED] wrote: I have the following that works almost fine: html:link forward=historicalTransactions paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Then what I get is http://URL?commonEnrollmentID=12345; What I need to be generated is: http://URL?action=historicalcommonEnrollmentID=12345; Because historical is an action method on my LookupDispatchAction that needs to be called when I click this link. How about quick and dirty html:link page=URL?action=historical paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need 2 parameters for html:link
Mick Knutson wrote the following on 7/6/2005 6:42 PM: html:link forward=historicalTransactions paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Then what I get is http://URL?commonEnrollmentID=12345; What I need to be generated is: http://URL?action=historicalcommonEnrollmentID=12345; Because historical is an action method on my LookupDispatchAction that needs to be called when I click this link. Thanks in advance for your help. Been a while since I used the html:link tag, but if you decide to use JSTL it would be... c:url var=url scope=page value=/yourAction.do c:param name=action value=historicalTransactions/ c:param name=commonEnrollmentID value=12345/ /c:url a href=${url}Historical Transactions/a More than likely this line would be dynamic for the id: c:param name=commonEnrollmentID value=${someID}/ -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: need 2 parameters for html:link
On 7/6/05, Mick Knutson [EMAIL PROTECTED] wrote: I have the following that works almost fine: html:link forward=historicalTransactions paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Then what I get is http://URL?commonEnrollmentID=12345; What I need to be generated is: http://URL?action=historicalcommonEnrollmentID=12345; Because historical is an action method on my LookupDispatchAction that needs to be called when I click this link. How about quick and dirty html:link page=URL?action=historical paramId=commonEnrollmentID paramName=consumerValidatorForm paramProperty=commonEnrollmentID bean:message key=label.menu.historicalTrx / /html:link Or, if you like JSTL and Struts-EL, something like this might work too? c:url value=URL var=url c:param name=action value=historical / c:param name=commonEnrollmentID value=${consumerValidatorForm.commonEnrollmentID} / /c:url html:link href=${url}/ I believe that the struts-el tag will give you the jsessionid and the struts synchronization token encoding over just the JSTL url tag. Gary Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]
On Wednesday 06 July 2005 19:48, Rick Reumann wrote: Hi, Daniel Perry wrote the following on 7/6/2005 12:49 PM: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Now though I'm clearly not in the position to get fired anytime soon, I still think as long as I'm doing my job right and don't blame the company I work for, what I do in my leisure time is not my employer's business. Including my haircut, age, religious beliefs or whatever. What I sell are my skills, work performance and last but not least a significant part of my lifetime, but neither my soul nor my private life. In Germany, it's not quite that easy to get rid of someone who, lets say, just got older because of working for you. And I think this is just. Stealing silver spoons, including deliberately breaking company rules in terms of e-mail usage and the like is another issue. Personally, if I owned a company and someone was using the company email domain name to post on sites such as swingers or transvestitepride, I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. In Germany, in a major part thanks to the US (I mean it!), religious freedom, for instance, is granted to everyone in our Constitutional Law (Art. 4 GG). Getting fired just because of one's religious views is impossible by law. So I, who believes in Jesus Christ as my personal saviour and follows the Bible as his above-all-worldly-wisdom guide can happily work together with Hindus and common atheists, in- cluding my boss. I can even tell them if they're on the road to eternal doom, the same as they may tell me I'm ridiciously wrong, and still keep my job. And in fact, the Bible is quite intolerant when confronted with modern secularism, but what's my choice? As for general opinions and secular beliefs, we have Art. 5 GG which grants freedom of speech. So there's no need for hypocrisy here at all. On the other hand, I definitely never would use a company e-mail address for anything other than business communication, and whoever deliberately chooses to do otherwise may just have to face the fruits of his dauntness. Or his dumbness, if you will. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. Quality never goes out of style, but good manners may. Possibly a matter of education and attitude. I won't judge. -- Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]
A Christian named Christian... that's original :) On 7/6/05, Christian Bollmeyer [EMAIL PROTECTED] wrote: On Wednesday 06 July 2005 19:48, Rick Reumann wrote: Hi, Daniel Perry wrote the following on 7/6/2005 12:49 PM: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Now though I'm clearly not in the position to get fired anytime soon, I still think as long as I'm doing my job right and don't blame the company I work for, what I do in my leisure time is not my employer's business. Including my haircut, age, religious beliefs or whatever. What I sell are my skills, work performance and last but not least a significant part of my lifetime, but neither my soul nor my private life. In Germany, it's not quite that easy to get rid of someone who, lets say, just got older because of working for you. And I think this is just. Stealing silver spoons, including deliberately breaking company rules in terms of e-mail usage and the like is another issue. Personally, if I owned a company and someone was using the company email domain name to post on sites such as swingers or transvestitepride, I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. In Germany, in a major part thanks to the US (I mean it!), religious freedom, for instance, is granted to everyone in our Constitutional Law (Art. 4 GG). Getting fired just because of one's religious views is impossible by law. So I, who believes in Jesus Christ as my personal saviour and follows the Bible as his above-all-worldly-wisdom guide can happily work together with Hindus and common atheists, in- cluding my boss. I can even tell them if they're on the road to eternal doom, the same as they may tell me I'm ridiciously wrong, and still keep my job. And in fact, the Bible is quite intolerant when confronted with modern secularism, but what's my choice? As for general opinions and secular beliefs, we have Art. 5 GG which grants freedom of speech. So there's no need for hypocrisy here at all. On the other hand, I definitely never would use a company e-mail address for anything other than business communication, and whoever deliberately chooses to do otherwise may just have to face the fruits of his dauntness. Or his dumbness, if you will. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. Quality never goes out of style, but good manners may. Possibly a matter of education and attitude. I won't judge. -- Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]
Unfortunately in the US you can be canned for being too old or having the wrong religious views we have a ton of laws on the books but they are unenforced My question is how do I (an older engineer with politically incorrect views) get work in Germany Vielen Danke, Martin- - Original Message - From: Christian Bollmeyer [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 06, 2005 7:31 PM Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations [OT] On Wednesday 06 July 2005 19:48, Rick Reumann wrote: Hi, Daniel Perry wrote the following on 7/6/2005 12:49 PM: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Now though I'm clearly not in the position to get fired anytime soon, I still think as long as I'm doing my job right and don't blame the company I work for, what I do in my leisure time is not my employer's business. Including my haircut, age, religious beliefs or whatever. What I sell are my skills, work performance and last but not least a significant part of my lifetime, but neither my soul nor my private life. In Germany, it's not quite that easy to get rid of someone who, lets say, just got older because of working for you. And I think this is just. Stealing silver spoons, including deliberately breaking company rules in terms of e-mail usage and the like is another issue. Personally, if I owned a company and someone was using the company email domain name to post on sites such as swingers or transvestitepride, I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. In Germany, in a major part thanks to the US (I mean it!), religious freedom, for instance, is granted to everyone in our Constitutional Law (Art. 4 GG). Getting fired just because of one's religious views is impossible by law. So I, who believes in Jesus Christ as my personal saviour and follows the Bible as his above-all-worldly-wisdom guide can happily work together with Hindus and common atheists, in- cluding my boss. I can even tell them if they're on the road to eternal doom, the same as they may tell me I'm ridiciously wrong, and still keep my job. And in fact, the Bible is quite intolerant when confronted with modern secularism, but what's my choice? As for general opinions and secular beliefs, we have Art. 5 GG which grants freedom of speech. So there's no need for hypocrisy here at all. On the other hand, I definitely never would use a company e-mail address for anything other than business communication, and whoever deliberately chooses to do otherwise may just have to face the fruits of his dauntness. Or his dumbness, if you will. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. Quality never goes out of style, but good manners may. Possibly a matter of education and attitude. I won't judge. -- Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts MVC design
On 7/6/05, Michael Jouravlev [EMAIL PROTECTED] wrote: On 7/6/05, Craig McClanahan [EMAIL PROTECTED] wrote: On 7/6/05, Adam Hardy [EMAIL PROTECTED] wrote: Now there is talk of Struts in the future containing ActionCommands which can be substituted in place of Actions, and strung together in a chain, and presumably can perform View-Controller logic. If you look at Shale (with its support for both ViewController and Dialog -- which, among other things, lets you intersperse action states and view states to your heart's desire), you'll find that the future is now :-) http://struts.apache.org/shale/ Craig Moved to the new thread. From http://struts.apache.org/shale/features.html#view Each backing bean that implements ViewController will support a boolean property postback, which will be set to true if this view is the one that is processing a form submit previously rendered by the same page, or false if this view was newly navigated to. * How is this different from ASP.NET? The ViewController part of Shale is indeed very similar to the way that ASP.NET implements the View Helper design pattern. From a usability perspective, especially for developers not as well versed in object oriented programming concepts, Microsoft got this right -- which was one of the motivations for JSF making the same style easy to accomplish in Java. When you are focused on a particular page, it is very convenient to think of everything that happens related to that page being a response to a particular event -- with all the events for a particular page conveniently represented as public methods on a single backing bean (code behind file in ASP.NET terminology). The prerender() method, as well, performs exactly the same function as the Controller interface in Tiles -- it provides a perfect place to acquire resources that are *only* required if you are the page that is going to be rendered. Struts 1.x supports exactly the same paradigm; it's just not as pretty -- a setup action that preceeds the rendered view action. ViewController doesn't require you to do that extra step (or try to deal with the problematic action chaining issues that plague Struts 1.x, when you submit to the processing action for the previously rendered form, then need to navigate to the setup action for the form about to be rendered). And, if you go on and also use the Dialog feature of Shale, you can have as many different action states (each represented by a method call, expressed as a method binding expression so the business logic classes need have no knowledge of JSF or Shale) as you want in between your views. So, if you like the way a chain of responsibility pattern (like Commons Chain) lets you decompose business processes into fine grained reusable chunks, you can do that too. * Does not this make Shale page-based instead of front-controller based? MS recognized lack of front controller support in ASP.NET 1.0 and will provide it to the second version. No, it makes the *ViewController* part of Shale page based, as it should be :-). The rest of Shale (in particular the controlling filter where you can plug in anything that is supposed to happen once per request, like an authentication filter) is still a front controller. You can impose whatever overall processing you want on each request, simply by composing the Commons Chain command that the filter applies to each request. Besides the biggest difference (from Struts) of being JSF based, this architectural principle is the second major difference in Shale, and it results from the most important lesson I've learned by watching how people use (and misuse) Struts -- the controller framework should consist of fine grained components that can be combined or customized as necessary to meet particular application requirements. If a particular application needs, say, authentication filtering, then plug it in. If that app also needs logging, or tracing, plug that in too (no having to worry about subclassing RequestProcessor and then running into Java's single inheritance limitation. At the same time, it is up to the application architect if they want to build up the specialized processing needed for an individual request by composing with reusable logic blocks. You can do this easily with Shale, either by calling common reusable code chunks from methods like prerender() and destroy() when using ViewController, or by composing the action states in between your views when using Dialog. The front controller managing the entire application need not be involved in figuring out what specialized resources the particular processing path for a given request will need -- although you could even do that in the application level filter, if you really wanted to. Your choice. What's interesting about the current discussion is that things like DispatchAction and LookupAction, as well as the idea of action commands, are all an attempt to retrofit exactly the
Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]
Where do you work!? I am going to notify your boss of you disgruntle behavior on this list!!! No wonder why we have H1Bs. They never complain and just take their 2 cents an hour. And I mean that in the best possible way :p ;-) :D Brandon On 7/6/05, Martin Gainty [EMAIL PROTECTED] wrote: Unfortunately in the US you can be canned for being too old or having the wrong religious views we have a ton of laws on the books but they are unenforced My question is how do I (an older engineer with politically incorrect views) get work in Germany Vielen Danke, Martin- - Original Message - From: Christian Bollmeyer [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 06, 2005 7:31 PM Subject: Re: [OT] Re: Fired was...Re: Struts Books Recommendations [OT] On Wednesday 06 July 2005 19:48, Rick Reumann wrote: Hi, Daniel Perry wrote the following on 7/6/2005 12:49 PM: Hah, it's the business use of web/email they fire you for. Go read your terms of employment, and the reference to IT acceptible use policy that you inadvertantly agreed to. (the below has nothing to do with Mark).. For the record, I'm not against an employer firing an employee for 'whatever' reason they deem fit. If they don't like the way you wear your hair, I think they should have the right to fire you if they want. (The public also has a right to know about it based on the use of the press etc). Now though I'm clearly not in the position to get fired anytime soon, I still think as long as I'm doing my job right and don't blame the company I work for, what I do in my leisure time is not my employer's business. Including my haircut, age, religious beliefs or whatever. What I sell are my skills, work performance and last but not least a significant part of my lifetime, but neither my soul nor my private life. In Germany, it's not quite that easy to get rid of someone who, lets say, just got older because of working for you. And I think this is just. Stealing silver spoons, including deliberately breaking company rules in terms of e-mail usage and the like is another issue. Personally, if I owned a company and someone was using the company email domain name to post on sites such as swingers or transvestitepride, I think I should have right to terminate his or her's employment. What I have a problem with is ... 1) The inconsistency in what is protected. For example everyone today talks about tolerance. But what does this mean? What it ends up meaning is There are no moral absolutes so the only valid belief system protected is one that doesn't espouse moral judgments. But what about being tolerant to the idea that someone might feel otherwise? Why is state sanctioned secularism the only valid religion (and yes secularism is a belief system - a religion). It's sort of funny that those whom often claim to be the most 'tolerant' are often the most vicious when it comes to attacking someone that disagrees with their view of tolerance. There are many views I could state that would get me labeled as being 'intolerant,' yet, somehow it's supposedly not offensive to state All views on X,Y,orZ are equally acceptable. To me, and many others, that later position can be considered extremely offensive. Why is only one view (secular humanism) considered 'non offensive' but other religious views are some how bigoted and intolerant. It's pure hypocrisy. In Germany, in a major part thanks to the US (I mean it!), religious freedom, for instance, is granted to everyone in our Constitutional Law (Art. 4 GG). Getting fired just because of one's religious views is impossible by law. So I, who believes in Jesus Christ as my personal saviour and follows the Bible as his above-all-worldly-wisdom guide can happily work together with Hindus and common atheists, in- cluding my boss. I can even tell them if they're on the road to eternal doom, the same as they may tell me I'm ridiciously wrong, and still keep my job. And in fact, the Bible is quite intolerant when confronted with modern secularism, but what's my choice? As for general opinions and secular beliefs, we have Art. 5 GG which grants freedom of speech. So there's no need for hypocrisy here at all. On the other hand, I definitely never would use a company e-mail address for anything other than business communication, and whoever deliberately chooses to do otherwise may just have to face the fruits of his dauntness. Or his dumbness, if you will. 2) Someone taking the time on the list to 'complain' to someone's employer. Sure you have the right to do so, but I think it's lame. Quality never goes out of style, but good manners may. Possibly a matter of education and attitude. I won't judge. -- Christian. - To unsubscribe, e-mail:
Re: banned
I am absolutely NOT kidding. The point is NOT that I was using my government email address to subscribe to a technical mail list. Nor is it that I was posting irreverent nonsense. The point is that somebody on this list copied selective posts with my government email address in the subject line and then notified the State agency in which I was employed. The archive clearly show who did this, and was a dispicable act and violation of Net ethos. Never before in 20 years of using the Internet for communication have I heard of anybody doing something like this. I signed back on to struts-user to find out what is happening with struts these days. Those of you who have known me on this list (and others, and personally) for years know that my sense of humor (or lack thereof) is abrasive, but never was any harm meant. What is next? DOS attacks on IP addresses by people who disagree with the committers? I was helping people learn struts on this list before most of the present subscribers knew Java; I have an acknowledgement in Chuck Cavaness' O'Reilly book, Programming Struts; I'm the one who started the [FRIDAY] humor posts, remember? Look in the archive for the subject with [EMAIL PROTECTED] in it and you can see for yourself who did this. Watch what you say and where you say it from - you could be next. It looks like I have been banned from the list; Craig says he approves. ~mark James Mitchell wrote: You are kidding right? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. http://www.edgetechservices.net/ 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] Skype: jmitchtx On Jul 6, 2005, at 10:19 AM, Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark On 6/30/05, Thai Dang Vu [EMAIL PROTECTED] wrote: 3) Struts! It's not just for H-1Bs! So, I can get a H1B just by learning Struts and use it decently? :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: banned
I cc'd them on the message I sent to this list in a moment of madness at the rubbish arriving in my inbox and which I now regret. http://www.mail-archive.com/user%40struts.apache.org/msg29119.html Niall - Original Message - From: blah blah blah [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, July 07, 2005 2:06 AM Subject: Re: banned I am absolutely NOT kidding. The point is NOT that I was using my government email address to subscribe to a technical mail list. Nor is it that I was posting irreverent nonsense. The point is that somebody on this list copied selective posts with my government email address in the subject line and then notified the State agency in which I was employed. The archive clearly show who did this, and was a dispicable act and violation of Net ethos. Never before in 20 years of using the Internet for communication have I heard of anybody doing something like this. I signed back on to struts-user to find out what is happening with struts these days. Those of you who have known me on this list (and others, and personally) for years know that my sense of humor (or lack thereof) is abrasive, but never was any harm meant. What is next? DOS attacks on IP addresses by people who disagree with the committers? I was helping people learn struts on this list before most of the present subscribers knew Java; I have an acknowledgement in Chuck Cavaness' O'Reilly book, Programming Struts; I'm the one who started the [FRIDAY] humor posts, remember? Look in the archive for the subject with [EMAIL PROTECTED] in it and you can see for yourself who did this. Watch what you say and where you say it from - you could be next. It looks like I have been banned from the list; Craig says he approves. ~mark James Mitchell wrote: You are kidding right? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. http://www.edgetechservices.net/ 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] Skype: jmitchtx On Jul 6, 2005, at 10:19 AM, Mark Galbreath wrote: Thanks to whomever emailed last weeks nonsense thread to the Director of the Board of Elections. It made me look like a racist and I was fired this morning. The State is also looking into whether my use of an official email address for that discussion is in violation of state law. You did your work well, you low-life bastard. Signing off Mark On 6/30/05, Thai Dang Vu [EMAIL PROTECTED] wrote: 3) Struts! It's not just for H-1Bs! So, I can get a H1B just by learning Struts and use it decently? :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]