Problem with logic:equal?
I have this code in my jsp page: logic:iterate id=elem name=annList tr logic:equal name=elem property=status value=0 td class=text bean:write name=elem property=annCreated //td td class=text bean:write name=elem property=filnavn //td td class=text html:radio property=checked idName=elem value=annID//td /logic:equal logic:equal name=elem property=status value=10 bean:define id=username name=UserContainer scope=session property=user.username / logic:equal name=elem property=caseworker value=%= (String) username % td class=text bean:write name=elem property=annCreated //td td class=text bean:write name=elem property=filnavn //td td class=text html:radio property=checked idName=elem value=annID//td /logic:equal logic:notEqual name=elem property=caseworker value=%= (String) username % td class=textdis bean:write name=elem property=annCreated //td td class=textdis bean:write name=elem property=filnavn //td td class=textdis bean:write name=elem property=caseworker //td /logic:notEqual /logic:equal /tr /logic:iterate But this just gives me an error message telling me that cannot resolve symbol symbol : variable username But this variable has been defined, hasn't it?? Any suggestions? Regards, BTJ
RE: client side sorting.
I used client sorting the way it is used at http://www.glendinning.org/webbuilder/sortTable you can see the source by doing view source at this page. But when I used it. Suppose I am having 6 rows. then it is actually swapping 1 6, 2 5, 3 4. Please help as to what may be the reason behind this kind of behaviour. Why i am not getting all the rows sorted properly. Regards and Thanks Imran. On Thu, 11 Sep 2003 Paul McCulloch wrote : If you can live with a server side solution then the display taglib does this much more. Paul -Original Message- From: imran ali [mailto:[EMAIL PROTECTED] Sent: 11 September 2003 16:23 To: Struts Users Mailing List Subject: client side sorting. Hi All, I have a struts page with a table of many rows. contents of rows comes from a collection of forms. I have to sort contents of table based on which column user is clicking. How can I acieve it using struts, java script etc. Thanks Regards Imran. Imran ___ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Imran ___ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JFace and Struts?
Hi there, Would you please give me a discription about using JFace with Struts or is there any web site or documents on this topics? Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with logic:equal is actually a problem with bean:define and Weblogic 8.1
I tried just running bean:define id=username name=UserContainer property=user.username / Test: %= username % in a jsp file under Tomcat and that works ok, but doing the same under Weblogic 8.1 with SP 1, generates a cannot resolve symbol error. Is this a bug in WL or am I doing something wrong? BTJ On Sun, 2003-09-14 at 13:46, Bjørn T Johansen wrote: I have this code in my jsp page: logic:iterate id=elem name=annList tr logic:equal name=elem property=status value=0 td class=text bean:write name=elem property=annCreated //td td class=text bean:write name=elem property=filnavn //td td class=text html:radio property=checked idName=elem value=annID//td /logic:equal logic:equal name=elem property=status value=10 bean:define id=username name=UserContainer scope=session property=user.username / logic:equal name=elem property=caseworker value=%= (String) username % td class=text bean:write name=elem property=annCreated //td td class=text bean:write name=elem property=filnavn //td td class=text html:radio property=checked idName=elem value=annID//td /logic:equal logic:notEqual name=elem property=caseworker value=%= (String) username % td class=textdis bean:write name=elem property=annCreated //td td class=textdis bean:write name=elem property=filnavn //td td class=textdis bean:write name=elem property=caseworker //td /logic:notEqual /logic:equal /tr /logic:iterate But this just gives me an error message telling me that cannot resolve symbol symbol : variable username But this variable has been defined, hasn't it?? Any suggestions? Regards, BTJ
tbody colour change.
Hi During the client side sorting, I have to replace existing tbody with a new sorted tbody in Java Script. var newTbody = document.createElement('tbody'); for (var i=0, length=rowArray.length; ilength; i++) { newTbody.appendChild(rowArray[i]); } table.replaceChild(newTbody, tbody); Actually I want rows to have a particular color after sorted. So is there any way to specify bgcolor of rows in this method. Thanks Regards Imran. Imran ___ Meet your old school or college friends from 1 Million + database... Click here to reunite www.batchmates.com/rediff.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JFace and Struts?
MyStrutsGroup wrote: Hi there, Would you please give me a discription about using JFace with Struts or is there any web site or documents on this topics? The JSF specification hasn't been finalized yet, and, AFAIK, there aren't any HOWTOs available. For more about JSF and Struts in general, see http://jakarta.apache.org/struts/faqs/kickstart.html#jsf I'm updating the link to Struts Faces now. You can find it here: http://archive.apache.org/dist/jakarta/struts/old/release/struts-faces/ There's an OS implementation of JSF underway, but it's under the LGPL rather than an Apache license. =:( http://sourceforge.net/projects/myfaces -Ted. Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about properties in the struts configuration file
There's the set-property element which can be used to set an aribrary property on the Java object being deployed. To access those properties, you should go through the object. So if you are using set-properties on an ActionMapping, you cast the ActionMapping to your subclass and then use the properties getter. MyActionMapping myMapping = (MyActionMapping) mapping; String myProperty = myMapping.getMyProperty(); -Ted. Marco Tedone wrote: Hi, I can see that for each action, is possible to define some properties via the property element. Now, I cannot see any method in the ActionConfig file which returns those properties. Is there anything I'm missing? Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RemoveAttributeAction always failure
You also need to specify the scope or * for any scope. See the Javadoc and the source code for details. http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/RemoveAttributeAction.java?rev=HEADcontent-type=text/vnd.viewcvs-markup -Ted. Lázaro Miguel Fung wrote: Hi. I can't make org.apache.struts.scaffold.RemoveAttributeAction works. this is my action config, action path=/logoff parameter=clientData type=org.apache.struts.scaffold.RemoveAttributeAction forward name=success path=/login.vm redirect=false/ /action Thanks LFung - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validating dates as Dates, or Strings?
Matt Raible had an article about how to compare if two Strings match. I was going to see if you could use the same technique here, but it's down right now. http://tinyurl.com/6jnv Though, you don't need to use the Struts Validator for everything. You can also call your own custom validations too. ActionErrors errors = super.validation(mapping,request); // Your validations here return errors; So you could also compare your dates the old fashioned way and use the Struts Validation for whatever else. -Ted. Mick Knutson wrote: I have a Value Object with java.sql.Dates, and I use String's on the front end. I do a simple conversion, but I now need to compare a starting and ending Date. How can I do this with the Validation? --- Thanks Mick Knutson http://www.baselogic.com +001(805) 563-0666 Office +001 (708) 570-2772 Fax --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design question
If the values are not going to change during the life of the application, I would suggest using a plugin to set them at startup. See the MailReader Example application for some sample code. -Ted. deepaksawdekar wrote: I am displaying some dropdown boxes on my jsp. I have to take the values for them from ApplicationResource file. I have writen a separate file which will read the properties file and return me the values in array list. Now I have to set this arraylist to the property of my form bean, now the question is should i assign this arraylist in action class execute method or will it good option to assign this value in from bean constructor, since the value are not going to change dynamically. Please suggest me which is better option 1. set values in action execute method 2. set values in constructor of form bean. Thanks and Regards Deepak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please Help Me To Understand forward
The first snippet redirects to a Struts ActionForward named welcome. This places controls within the Struts controller where it can be managed from the struts-config. In the global-forwards section, the ActionForward element for welcome is mapped to the page /do/Menu. This application uses prefix mapping, so any request for /do/* is sent to the Struts ActionServlet. The Struts ActionSerlvet then looks for a matching ActionMapping. The matching ActionMapping in this case is /Menu (the URI stripped of the prefix or suffix registered to the Servlet). If you look again, I think you will find this ActionMapping: action path=/Menu name=menuForm type=org.apache.struts.scaffold.ExistsAttributeAction parameter=application;HOURS forward name=success path=.article.Menu/ forward name=failure path=/do/MenuCreate/ /action Here, if the attribute exists, the page will be rendered by the .article.Menu Tile. Otherwise, control will go the /MenuCreate action first. The .article.Menu tile (in tiles-def.xml) assembles the page using these instructions: definition name=.article.Menu extends=.article.Base put name=title value=article.Menu.title/ put name=content value=/article/content/menu.jsp/ put name=navbar value=/article/common/navbarMenu.jsp/ /definition The menu.jsp is the main content page, but other pages are also used to create the final response. -Ted. Caroline Jen wrote: I am studying the code in Artimus_1_1 to make sure that I understand how things actually work. I am lost at the beginning of the application. Please kindly help me. The index.jsp of the application contains two lines: code: -- %@ taglib uri=/tags/struts-logic prefix=logic % logic:redirect forward=welcome/ --- Does this redirect forward tells the browser to submit a new request to the path with logical name welcome? I then searched the config.xml file, code: --- global-forwards !-- default forwards -- forward name=baseStyle path=/article/assets/styles/base.css/ !-- MENU forwards -- forward name=welcome path=/do/Menu/ forward name=cancel path=/do/Menu redirect=true/ forward name=done path=/do/Menu/ ... /global-forwards --- The path of the logical name welcome is do/Menu (note it is upper case Menu). The other place that do/Menu appears in the config.xml is: action path=/MenuCreate name=menuForm type=org.apache.struts.scaffold.ProcessAction parameter=org.apache.artimus.article.MenuCreate forward name=success path=/do/Menu/ forward name=failure path=.article.Menu/ /action There is no Menu ActionServlet in the application. There is a menu.jsp (note it is lower case menu) file in the application. Does this application display menu.jsp when it is first launched? Apparently, it does. This menu.jsp is in the artimus_1_1/WEB-INF/src/pages/article/content folder. I am confused - does /do/Menu locate the menu.jsp 1. in the /src/pages/article/content folder? 2. regardless upper or lower cases? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Junit in Action - http://www.manning.com/massol/, Struts in Action - http://husted.com/struts/book.html, JSP Site Design - http://www.amazon.com/exec/obidos/ISBN=1861005512. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to output value in text field?
How about if you do with html-el html-el:text value=${yourbeanname.yourvalue} property=yourproperty / -Original Message- From: Paul McCulloch [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 5:00 PM To: 'Struts Users Mailing List' Subject: RE: how to output value in text field? Why not set the default value on the form bean in an Action and let html:text render it for you? Paul -Original Message- From: Rick Col [mailto:[EMAIL PROTECTED] Sent: 11 September 2003 17:27 To: [EMAIL PROTECTED] Subject: how to output value in text field? Hi, I am trying to output a default value in a textfield. I did something like this: html:text property=myValuebean:write name=myValue//html:text It should work, but it does not seem to work. What did I do wrong? regards, __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - 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: JFace and Struts?
Hey Leon, I have to put together a comprehensive listing of JavaServer Faces resources on my website at the following URL. http://www.jamesholmes.com/JavaServerFaces/ Hope that helps, -James -Original Message- From: MyStrutsGroup [mailto:[EMAIL PROTECTED] Sent: Sunday, September 14, 2003 9:10 AM To: Struts Users Mailing List Subject: JFace and Struts? Hi there, Would you please give me a discription about using JFace with Struts or is there any web site or documents on this topics? Leon - 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: sslext can only get it to post
Hi Stephane, Here is how the system currently appears to work: 1. User is on shopping cart page, clicks checkout, the form is submitted unencrypted to the ShoppingCartAction (which is fine since it isn't supposed to be secure). 2. ShoppingCartAction does its magic (saves cart changes, for instance) and then forwards to the checkout JSP. 3. checkout.jsp has an sslext:pageScheme tag in it that says it is supposed to be secure. The current request was not secure, so the tag creates a redirect to the secure port with all the request parameters appended to the URL as a query string. By the time the app figures out that you want to go to the checkout, it is too late so sslext can't really help too much. The request has already been sent, and it wasn't secure. Some design changes are needed to make the switch to the https port in what I consider to be an acceptable manner. Here are some possible solutions: 1. I don't like this one, but you could have JavaScript submit the shopping cart form to ShoppingCartAction securely by changing the action to an absolute URL that starts with https when the user clicks the checkout button. There is an sslext:rewite tag that would be useful for this purpose. 2. If you have a checkout button other places on the site (not a form submit, but rather a simple link to some kind of CheckoutAction), you could have the ShoppingCartAction redirect to the CheckoutAction when it is done processing the changes in the cart. I am not sure if sslext will work its magic on forwards, which in this case is actually going to be a redirect by setting redirect=true on the forward. If sslext doesn't fix the redirect, I believe we can get Steve (sslext author) to make this change. It should work that way, IMO. Even if it doesn't switch on the redirect, it will switch with a second redirect so long as CheckoutAction is specified as a secure action. This would require the least amount of changes to the current actions if you already have a simple checkout link, and for that reason is my favorite solution if it would work for you. NOTE: This would be the app making the redirect to a different page, which is totally okay in my opinion -- my aversion to redirects is limited only to sslext doing the redirect itself to correct the port that the current request came in on. 3. If you don't have a simple checkout link, you could rework the app to make this work. This is a good idea anyway to encourage users to get to the checkout. The checkout action would need to access the contents of the cart from the session (since that information won't be coming in on the request), perhaps by accessing the shopping cart ActionForm from the session. Perhaps one of the property copying utilities from commons-beanutils would be useful for copying the cart contents to the checkout ActionForm. Once you get the simple checkout link working, just do a redirect to it as described in #3 above. 4. You could remove the sslext:pageScheme tag from checkout.jsp, which would avoid the redirect upon entering the page. The form on that page will submit the form securely since you have the sslext:form tag there and the action it submits to has been configured to be secure in struts-config.xml. However, this is one of those cases where users are likely to prefer that the form page itself is already secure, even though it isn't technically necessary. A note on the pageScheme tag: If all your pages are Struts actions and you use sslext:form and sslext:link to navigate to your secure actions, there is no need for the sslext:pageScheme tags. Configuring the actions in struts-config.xml is all that is needed (which I also prefer for its simplicity). The tag is convenient if you have directly-accessed JSPs and things that need to be secured and you dip the site one level deeper into the SSL bin, but otherwise they are of no value. -Max - Original Message - From: Stephane Grenier [EMAIL PROTECTED] To: Max Cooper [EMAIL PROTECTED]; Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, September 12, 2003 5:40 PM Subject: Re: sslext can only get it to post Hello Max. Thank you for the information. You cleared up some vagueness in my understanding. However let me expand more into the details. The thing is I'm not sure how to actually implement what you have just said, I actually think that is what I'm currently doing which it is obviously not... If you don't mind I'm sending you my relevant chunks of code. I would like to have the shopping cart page not secure, but once moving to the checkout section to start the ssl security. Struts-config.xml form-beans form-bean name=ShoppingCartForm type=com.rana.release.forms.ShoppingCartForm / form-bean name=CheckoutForm type=com.rana.release.forms.ssl.CheckoutForm / /form-beans action-mappings type=org.apache.struts.config.SecureActionConfig action path=/ShoppingCartAction type=com.rana.release.actions.ShoppingCartAction name=ShoppingCartForm