RE: struts validation and dispatch action
From what I have done before, you can sub-class the action and override the validate to do a conditional validation, this way you still get to keep the validation in action mapping or you can move the entire validation to your action. -Original Message- From: Sonam Belbase [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:56 PM To: Struts Users Mailing List Subject: struts validation and dispatch action Hi, I've noticed that since validation is defined in the action mapping, it will apply to all methods of a dispatch action. But what if only one method in the dispatch action requires field X to be populated/selected and another method doesn't care. Is there a way to apply struts validation to only one dispatch action method and not all of them? Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] MMS firstam.com made the following annotations on 12/15/2003 02:06:34 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaValidationForm
Hi, Is there a way to make DynaValidationForm not to do the validation based on a certain attribute other than sub-classing it? That's not that difficlt to do, but I was wondering if there is a better way, here is my scenario. I have an account table and I have one form and one action for all the usecases associated with account (add/edit/update/view/list/delete). For edit scenario, I need to retrieve the row in one interaction and update in the other. I am relying on the form that gets created when edit is called and setting all the fields to that form. This worked fine until I introduced validation. With validation, during the first interaction, it tries to validate and returns the form back. I want it not to validate for the first request. thanks, Vishu MMS firstam.com made the following annotations on 11/13/2003 12:05:44 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Show validation error messages next to the corresponding inpu t fields
use the errors tag under html taglib. When you instantiate an ActionError and add it to ActionErrors, you can specify a key, which can be linked to an entry in ResourceBundle. errors tag will pick that up. you can also use html formatting around the entry in ResourceBundle, so it can go with rest of your formatting. -Original Message- From: Kevin Wang [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 6:23 PM To: Struts Users Mailing List Subject: Show validation error messages next to the corresponding input fields Does anybody know how to do this? I know I can get ActionErrors which is an array of messages.. but is there a way I can put the messages in place with their input fields? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] MMS firstam.com made the following annotations on 11/12/2003 06:26:48 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quick form property question
% String theTab = ((cast_to_type)pageContext.getAttribute(name_of_the_form)).getProperty() ; % -Original Message- From: Sonam Belbase [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 3:51 PM To: Struts Users Mailing List Subject: Quick form property question Hi, Inside a html:form/html:form section I have some java code: % String theTab = ; % how do I get theTab to have the value of a property on the form such as: html:hidden property=currentTab / Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] MMS firstam.com made the following annotations on 11/06/2003 04:06:58 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: quick html:link question
No. -Original Message- From: Sonam Belbase [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 3:02 PM To: Struts Users Mailing List Subject: quick html:link question Does html:link have to be within a html:form/html:form section? Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] MMS firstam.com made the following annotations on 10/30/2003 03:03:05 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hi Ted, any more on html:control?
Did you take a look at Middlegen(http://sourceforge.net/projects/middlegen/)? It's pretty close to what you are describing. In fact it goes couple steps backwards and forwards generating JSPs/Struts action classes directly from database. It has plug-ins for EJB and JDO. If have a site with simple forms, it saves you a lot of time by generating all the forms with get/set. -Original Message- From: Sonam Belbase [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 4:14 PM To: Struts Users Mailing List Subject: Hi Ted, any more on html:control? Hi Ted, Has the html:control you mention below been implemented already or is it in the works at all? Thanks, SB Ted Husted wrote: Shishir K. Singh wrote: Is there a way that I can create a form dynamically based on some XML configurable file. The configurable file will say what kind of input type it is. Eg text, checkbox etc and accordingly, I create the form input types and then display the fields. AFAIK, there's no such beast right now, though I keep thinking there should be. Essentially, the idea would be to represent the entire form and all of its fields as a JavaBean (or Map of JavaBeans, or Map of Maps), which could be instantiated by an XML file. Not unlike the XML form element the Validator uses, only more so. A JSP Tag (or Velocity Tool) could then render the control based on the properties of the JavaBean form. So instead of having something like html:input property=xyz ... / you'd have something like html:control property=xyz ... / The tag would then lookup the xyz property, and then the controlType property on the xyz JavaBean, and use that value to decide which control to render (input, select, ... ). For extra credit, there could also be tag/tool that could write a plain-vanilla version of the entire form as a simple table. I end up doing this myself eventually, but keep hoping someone will beat me to it =:) -Ted. -- 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. Shishir K. Singh wrote: Hello, Is there a way that I can create a form dynamically based on some XML configurable file. The configurable file will say what kind of input type it is. Eg text, checkbox etc and accordingly, I create the form input types and then display the fields. Eg My JSP looks like this right now (I am using tiles and this is the content section ) %@ taglib uri=/core prefix=c % %@ taglib uri=/struts-tiles prefix=tiles % %@ taglib uri=/struts-html prefix=html % brbr html:form action=/createContentAction table width=60% border=0.5 c:forEach var=lines items=${contentForm.map.lines} tr tdc:out value=${lines.attributeName}/ /td tdhtml:text indexed=true name=lines property=attributeValue//td /tr /c:forEach tr tdhtml:submit//td /tr /table /html:form tr tdhtml:submit//td /tr /table /html:form Basically my intent is to load some predefined attributes (by parsing an XML file) and creating the Form on the fly using indexed DynaActionForm (contentForm) . I have been able to get the fields up in the form, but only as text input fields as I am using html:text tags. However, my input type can be check boxes, or select type and I would like that to be configurable instead of hard coding in the JSP. Is this doable ?? Any hints/tips would be appreciated. TIA Shishir - 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] -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] MMS firstam.com made the following annotations on 10/23/2003 04:29:28 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED
RE: quick html:link question
Try request.getParameter() -Original Message- From: Sonam Belbase [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 11:43 AM To: Struts Users Mailing List Subject: quick html:link question Hi, If I've got % String choice = hello; % bean:define id=nameOfButton value=%=choice% / html:link action=dcIndicator target=templateFrame paramId=choice paramName=nameOfButton Click here /html:link why does request_.getAttribute(choice); in my action retrieve null? Is this the right way to retrieve values of params you pass with html:link to an action? Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. MMS firstam.com made the following annotations on 10/22/2003 11:52:56 AM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Portals and managing UI changes
Hi, I have been using Struts for a while and is working great. Now some of our customers are planning to integrate their sites into a portal along with personalization. My choice was to refactor the sites using Tiles. I also have to provide an admin interface to personalizable items. I have a plan for the database level/application level changes to support these items, but I can't arrive at a design that would work without problems on UI side. Some of the issues are: 1. Changing the structure of pages our UI designer is used to and replace with tags his WYSIWUG editor can't render (this may be just an editor issue) 2. As the no. of personalizable points increase, it makes the above problem worse and I quickly approach the complexity of having different sites for each customer and update all the sites. Are there any better ways to approach this? thanks, Vishu MMS firstam.com made the following annotations on 09/17/2003 04:38:30 PM -- THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]