DO NOT REPLY [Bug 31817] - The Chinese Encoding Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31817. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31817 The Chinese Encoding Problem --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 06:31 --- I suspect you are saving text in the properties files in GB2312 directly. If so, you need to convert the file to use Java's Unicode escape sequence \u by running native2ascii as in: % native2ascii -encoding gb2312 foo_gb2312.txt foo.properties Do you still have the problem after doing this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31817] - The Chinese Encoding Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31817. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31817 The Chinese Encoding Problem [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 11:00 --- Following up on the last comment - if you read the Javadoc for java.util.Properties, it is simply defined to be serialized as ISO-8859-1. There's no provision for defining any other encoding. If you want to use a file format with some other encoding, it is possible to use XML as a source of Message Resource Bundles. One of the near-term structural goals for Struts is to finish the development of commons-resources and replace Struts' message handling with that, which, ideally, will help to open up things even more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31803] - Struts-Faces and Validator framework (of Struts 1.2.4)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31803. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31803 Struts-Faces and Validator framework (of Struts 1.2.4) --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 12:05 --- Also check out Bug#31809 (related to the xml for validation.) It sounds like you are getting a different stack trace than I was but you never know. Also I am using Tomcat 5.0.28 and struts 1.2.4 jars and I am not having this problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31803] - Struts-Faces and Validator framework (of Struts 1.2.4)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31803. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31803 Struts-Faces and Validator framework (of Struts 1.2.4) --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 12:23 --- What is the JSF version I have to use for this? 1.0 or 1.1_01? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31827] New: - Bug in validation part
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31827. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31827 Bug in validation part Summary: Bug in validation part Product: Struts Version: 1.2.4 Platform: All OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Validator Framework AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] There where some bug in struts version 1.2.4 validation part. in validation xml file I have field property=userName depends=required,minlength,maxlength msg name=required key=errors.registration.userName/ msg name=minlength key=errors.registration.userNameRange / msg name=maxlength key=errors.registration.userNameRange / arg name=minlength key=userName position=0/ arg name=maxlength key=userName position=0 resource=true/ arg name=minlength key=${var:minlength} position=1 resource=false/ arg name=minlength key=${var:maxlength} position=2 resource=false/ arg name=maxlength key=${var:minlength} position=1 resource=false/ arg name=maxlength key=${var:maxlength} position=2 resource=false/ var var-nameminlength/var-name var-value5/var-value /var var var-namemaxlength/var-name var-value10/var-value /var /field and in jsp page I retrieve error messages with struts tag html:errors bundle=en/ it retrieve message required correct from en bundle, but arg name=minlength key=userName position=0/ message part has not been get from that bundle (en bundle) for that arg it was returned only empty string... my message resources organized in separate bundles.. en, ru, etc.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31803] - Struts-Faces and Validator framework (of Struts 1.2.4)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31803. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31803 Struts-Faces and Validator framework (of Struts 1.2.4) --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 13:46 --- I am using 1.1_01. There are a few problems I have noticed with the example (that do not seem to be related to your problem) I will be posting a new bug shortly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSF and Tiles Solution
[follow-up to a discussion from the user list] I think I have a potential solution to a problem I've been having trying to integrate JSF and Tiles. At first I tried integrating JSF and Tiles without the struts-faces package (since I wasn't concerned with having Actions talk to faces, etc.) If you are just relying on Tiles for layout and using faces for everything else, you are left with a single problem. The problem is that the form generated by JSF will try to post to the layout page instead of whatever the original URL was that triggered Tiles. I came up with something that will fix this and depends on using only one (modified) class from struts-faces. The catch is that it requires struts-chain. Actually, it can probably be done without struts-chain, but struts-chain makes it easier to plug-in whatever functionality is needed. In the end, I envision it to be possible to integrate struts and faces to varying degrees depending on what functionality you need. What I did was to add a new command, TilesFacesPreProcessor (TFPP), just before the TilesPreProcessor command. TFPP checks to see if a certain attribute is present in the request. If that attribute is null, it adds that attribute to the request with a value of the URI of the request (minus the leading / char). This way we have a record of the original URI. It only does this if the attribute is null in case one of your Tiles inserts is itself a struts request. The other part of the solution is to modify the ViewHandlerImpl in the struts-faces package. I overrode the getActionURL method and had it check for the value in the request. If there was a value there, I return that as the actionURL, otherwise, I pass the request on to the decorated ViewHandler. I can submit some code for people to look at, but first I wanted to get a sense of what people thought about this idea. It's the best I could come up with. Let me know what you think, sean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31351] - JSF 1.1_01 and Struts-faces Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31351. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31351 JSF 1.1_01 and Struts-faces Problem --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 14:47 --- Thinks craig, It's OK. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31829] New: - [struts-faces] Exception in second example
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31829. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31829 [struts-faces] Exception in second example Summary: [struts-faces] Exception in second example Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Struts-Faces Library AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I encountered the following exception when pressing the register link. It appeared to work (on the browser), but I got the following stack trace in my log file: javax.faces.FacesException: #{loggedOff.register}: javax.faces.el.EvaluationException: java.lang.IllegalStateException at com.sun.faces.application.ActionListenerImpl.processAction (ActionListenerImpl.java:78) at org.apache.struts.faces.application.ActionListenerImpl.processAction (ActionListenerImpl.java:131) at javax.faces.component.UICommand.broadcast(UICommand.java:312) at javax.faces.component.UIViewRoot.broadcastEvents (UIViewRoot.java:267) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307) at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute (ApplyRequestValuesPhase.java:79) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
property element in logic tag
Hi, Can anyone see why the following will would not work logic-el:match name=PersonStatus property=person.countryCode.countryCode value=${CountryCode.countryCode} PersonStatus is a session object that contains a nested object countryCode of type CountryCode and the class CountryCode contains a string m_countryCode. There is also a session object CountryCode that is an arraylist of different country codes e.g. UK is United Kingdom, IE is Ireland etc I tried using bean:write =PersonStatus property=person.countryCode.countryCode and kept getting the error Null property value for 'countryCode', but I've done system.out checks and the object is set with values. Thanks Suzy
Re: JSF and Tiles Solution
I'd definitely like to see the code. Craig On Thu, 21 Oct 2004 10:07:25 -0400, Sean Schofield [EMAIL PROTECTED] wrote: [follow-up to a discussion from the user list] I think I have a potential solution to a problem I've been having trying to integrate JSF and Tiles. At first I tried integrating JSF and Tiles without the struts-faces package (since I wasn't concerned with having Actions talk to faces, etc.) If you are just relying on Tiles for layout and using faces for everything else, you are left with a single problem. The problem is that the form generated by JSF will try to post to the layout page instead of whatever the original URL was that triggered Tiles. I came up with something that will fix this and depends on using only one (modified) class from struts-faces. The catch is that it requires struts-chain. Actually, it can probably be done without struts-chain, but struts-chain makes it easier to plug-in whatever functionality is needed. In the end, I envision it to be possible to integrate struts and faces to varying degrees depending on what functionality you need. What I did was to add a new command, TilesFacesPreProcessor (TFPP), just before the TilesPreProcessor command. TFPP checks to see if a certain attribute is present in the request. If that attribute is null, it adds that attribute to the request with a value of the URI of the request (minus the leading / char). This way we have a record of the original URI. It only does this if the attribute is null in case one of your Tiles inserts is itself a struts request. The other part of the solution is to modify the ViewHandlerImpl in the struts-faces package. I overrode the getActionURL method and had it check for the value in the request. If there was a value there, I return that as the actionURL, otherwise, I pass the request on to the decorated ViewHandler. I can submit some code for people to look at, but first I wanted to get a sense of what people thought about this idea. It's the best I could come up with. Let me know what you think, sean - 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: property element in logic tag
try person.countryCode.m_countryCode , if there is a getter getM_CountryCode(). Iam assuming you are trying to access this variable. -Original Message- From: Suzy Fynes [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 12:55 PM To: [EMAIL PROTECTED] Subject: property element in logic tag Hi, Can anyone see why the following will would not work logic-el:match name=PersonStatus property=person.countryCode.countryCode value=${CountryCode.countryCode} PersonStatus is a session object that contains a nested object countryCode of type CountryCode and the class CountryCode contains a string m_countryCode. There is also a session object CountryCode that is an arraylist of different country codes e.g. UK is United Kingdom, IE is Ireland etc I tried using bean:write =PersonStatus property=person.countryCode.countryCode and kept getting the error Null property value for 'countryCode', but I've done system.out checks and the object is set with values. Thanks Suzy
DO NOT REPLY [Bug 31351] - JSF 1.1_01 and Struts-faces Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31351. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31351 JSF 1.1_01 and Struts-faces Problem --- Additional Comments From [EMAIL PROTECTED] 2004-10-21 17:23 --- I'm glad it works, but I ran into a different problem with the fix ... it litters my log file with exceptions when JSF tries to release a FacesContext instance that has already been released. I'll see what I can do to get rid of those. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31842] New: - [struts-faces] Simple JSF integration with Tiles
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31842. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31842 [struts-faces] Simple JSF integration with Tiles Summary: [struts-faces] Simple JSF integration with Tiles Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Struts-Faces Library AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have come up with a relatively painless way to integrate Tiles and Struts. Its designed to be used with the new strtus-chain project. It consists of a new command to be added to the struts-chain as well as two classes in struts- faces (Constants and ViewHandlerImpl). The rest of struts-faces is not needed if all you are interested in is Tiles and struts-faces. I'm sure there is room for improvement but I think I'm onto something here. Tried it on a simple application and it works great! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31842] - [struts-faces] Simple JSF integration with Tiles
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31842. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31842 [struts-faces] Simple JSF integration with Tiles --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 01:19 --- Created an attachment (id=13176) [struts-faces] [patch] ViewHandlerImpl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31817] - The Chinese Encoding Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31817. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31817 The Chinese Encoding Problem --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 01:22 --- To Joe Germuska: I think the problem is generated as follow. 1.The property file use the locale relate encoding to encode the word(like me,it use the gb2312) 2.When the resource file is reading into the struts,it will convert this word in the standart format(ISO-8859-1) 3.And if i specified the charset in my jsp file like this([EMAIL PROTECTED] contentType=text/html;charset=gb2312%),it then will convert the word which using the ISO-8859-1 charset to gb2312,and the problem happen. I think this process may happen in each locale where they didn't use the ISO- 8859-1 or compatible charset as the default charset. And I think if we add an additional step2.5 between the step2 and step3,and doing the convertion from ISO-8859-1 back to the original locale relate charset,the problem can solve easily,and this method has no affect to the locale where use ISO-8859-1 as the default charset. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31842] - [struts-faces] Simple JSF integration with Tiles
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31842. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31842 [struts-faces] Simple JSF integration with Tiles --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 01:22 --- Created an attachment (id=13177) [struts-faces] [patch] Constants - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31842] - [struts-faces] Simple JSF integration with Tiles
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31842. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31842 [struts-faces] Simple JSF integration with Tiles --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 01:24 --- Created an attachment (id=13178) [struts-faces] New Class: FacesTilesPreProcessor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31817] - The Chinese Encoding Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31817. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31817 The Chinese Encoding Problem --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 02:56 --- You *must* use native2ascii to convert resource files that are in a native encoding other than ISO-8859-1. It's not an option; see the Javadocs for the java.util.Properties class. Normally the conversion from a native encoding to ISO-8859-1 is performed as part of an application's build process. Note that Ant has a native2ascii task that you can easily use to do this, so it's not a big deal to make repeated changes to the resource files. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: rev 55303 - in struts/trunk/struts-faces: core-library/src/conf core-library/src/java/org/apache/struts/faces/renderer core-library/src/java/org/apache/struts/faces/taglib example1-webapp/src/java/org/apache/struts/webapp/example example1-webapp/src/web example1-webapp/src/web/WEB-INF example2-webapp/src/java/org/apache/struts/webapp/example2 example2-webapp/src/web example2-webapp/src/web/WEB-INF sysclient-app/src/java/org/apache/struts/faces/sysclient
Author: craigmcc Date: Thu Oct 21 19:56:53 2004 New Revision: 55303 Modified: struts/trunk/struts-faces/core-library/src/conf/struts-faces.xml struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/ErrorsRenderer.java struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/FormRenderer.java struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/WriteRenderer.java struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java struts/trunk/struts-faces/example1-webapp/src/java/org/apache/struts/webapp/example/SaveRegistrationAction.java struts/trunk/struts-faces/example1-webapp/src/web/WEB-INF/struts-config.xml struts/trunk/struts-faces/example1-webapp/src/web/registration.jsp struts/trunk/struts-faces/example1-webapp/src/web/staticJavascript.jsp struts/trunk/struts-faces/example1-webapp/src/web/subscription.jsp struts/trunk/struts-faces/example2-webapp/src/java/org/apache/struts/webapp/example2/SaveRegistrationAction.java struts/trunk/struts-faces/example2-webapp/src/web/WEB-INF/struts-config.xml struts/trunk/struts-faces/example2-webapp/src/web/registration.jsp struts/trunk/struts-faces/example2-webapp/src/web/subscription.jsp struts/trunk/struts-faces/sysclient-app/src/java/org/apache/struts/faces/sysclient/LogonTestCase.java Log: Clean up remaining rendering issues and correct logic errors in the two sample applications. Everything now works on Tomcat 5.0.28, JSF RI 1.1_01. Details of changes: core-library: * JavascriptValidatorTag.java - Update behavior to match the Struts 1.2.4 mechanisms. * WriteRenderer.java - Do not emit a span around the text if the component has an automatically assigned id (_idXXX). * ErrorsRenderer.java - Change behavior when no property attribute is specified to match the corresponding html:errors/ tag: render *all* messages instead of just global ones. * FormRenderer.java - Create a name attribute containing the name of the form bean, since this is what the Javascript implementing client side validations expects. * struts-faces.xml - Update tag library description for errors tag to match the revised behavior. example1-webapp: --- * SaveRegistration.java - If cancel key was pressed, go back to the welcome screen instead of the main menu. This avoids an NPE if you followed the register link off the welcome screen. * subscription.jsp - Add onclick handler on the cancel button to turn off the client side validation as well. * registration.jsp - Add onclick handler on the cancel button to turn off the client side validation as well. * struts-config.xml - Add forward definition for new cancel behavior. * staticJavascript.jsp - Use the struts-faces version of the javascript tag. example2-webapp: --- * Same changes as for example1-webapp. * Fix the forwarding from registration.jsp (the delete, edit, and create buttons) to correctly go to the subscription tile. sysclient-app: - * Update test cases for new behavior of errors and form renderers. Modified: struts/trunk/struts-faces/core-library/src/conf/struts-faces.xml == --- struts/trunk/struts-faces/core-library/src/conf/struts-faces.xml(original) +++ struts/trunk/struts-faces/core-library/src/conf/struts-faces.xmlThu Oct 21 19:56:53 2004 @@ -387,7 +387,7 @@ rtexprvaluefalse/rtexprvalue description Component of the component for which to render errors. If not -specified, only global messages are rendered. +specified, all messages (regardless of property) are displayed. /description /attribute Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/ErrorsRenderer.java == --- struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/ErrorsRenderer.java (original) +++ struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/renderer/ErrorsRenderer.java Thu Oct 21 19:56:53 2004 @@ -84,6 +84,10 @@ throw new NullPointerException(); } +if (log.isDebugEnabled()) { +log.debug(encodeEnd() started); +} + // Look up availability of our predefined resource keys MessageResources resources = resources(context, component); if (Beans.isDesignTime() (resources == null)) { @@ -112,6 +116,9 @@ Iterator messages = context.getMessages(property); while (messages.hasNext()) { FacesMessage message = (FacesMessage) messages.next(); +if (log.isTraceEnabled()) { +log.trace(Processing FacesMessage: + message.getSummary()); +} if
DO NOT REPLY [Bug 31845] New: - [struts-chain] chain-config.xml needs to be updated
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31845. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31845 [struts-chain] chain-config.xml needs to be updated Summary: [struts-chain] chain-config.xml needs to be updated Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Once #31844 is resolved, this chain-config file should be updated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: rev 55305 - struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib
Author: craigmcc Date: Thu Oct 21 20:46:28 2004 New Revision: 55305 Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java Log: Revert the big changes because it would not compile against Struts 1.1. However, also tweak the generated JavaScript function names to be sensitive to the different Commons Validator versions included with 1.1 and 1.2.4. Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java == --- struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java (original) +++ struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/taglib/JavascriptValidatorTag.java Thu Oct 21 20:46:28 2004 @@ -1,7 +1,5 @@ /* - * $Id$ - * - * Copyright 2001-2004 The Apache Software Foundation. + * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -19,7 +17,6 @@ package org.apache.struts.faces.taglib; import java.io.IOException; - import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -27,12 +24,10 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.StringTokenizer; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.webapp.UIComponentTag; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.PageContext; @@ -43,70 +38,28 @@ import org.apache.commons.validator.Form; import org.apache.commons.validator.ValidatorAction; import org.apache.commons.validator.ValidatorResources; -import org.apache.commons.validator.util.ValidatorUtils; +import org.apache.commons.validator.ValidatorUtil; import org.apache.commons.validator.Var; - import org.apache.struts.Globals; -import org.apache.struts.action.ActionMapping; import org.apache.struts.config.ModuleConfig; import org.apache.struts.faces.component.FormComponent; -import org.apache.struts.taglib.TagUtils; import org.apache.struts.util.MessageResources; +import org.apache.struts.util.RequestUtils; import org.apache.struts.validator.Resources; import org.apache.struts.validator.ValidatorPlugIn; - /** * Custom tag that generates JavaScript for client side validation based * on the validation rules loaded by the codeValidatorPlugIn/code - * defined in the struts-config.xml file. + * defined in the struts-config.xml file. This is based on the code in + * the corresponding class of the Struts HTML tag library, modified as needed + * to reflect differences in the way JavaServer Faces renders field + * identifiers. * * @version $Rev$ $Date$ - * @since Struts 1.1 */ public class JavascriptValidatorTag extends BodyTagSupport { -/** - * A Comparator to use when sorting ValidatorAction objects. - */ -private static final Comparator actionComparator = new Comparator() { -public int compare(Object o1, Object o2) { - -ValidatorAction va1 = (ValidatorAction) o1; -ValidatorAction va2 = (ValidatorAction) o2; - -if ((va1.getDepends() == null || va1.getDepends().length() == 0) - (va2.getDepends() == null || va2.getDepends().length() == 0)) { -return 0; - -} else if ( -(va1.getDepends() != null va1.getDepends().length() 0) - (va2.getDepends() == null || va2.getDepends().length() == 0)) { -return 1; - -} else if ( -(va1.getDepends() == null || va1.getDepends().length() == 0) - (va2.getDepends() != null va2.getDepends().length() 0)) { -return -1; - -} else { -return va1.getDependencyList().size() - va2.getDependencyList().size(); -} -} -}; - -/** - * The start of the HTML comment hiding JavaScript from old browsers. - * @since Struts 1.2 - */ -protected static final String HTML_BEGIN_COMMENT = \n!-- Begin \n; - -/** - * The end of the HTML comment hiding JavaScript from old browsers. - * @since Struts 1.2 - */ -protected static final String HTML_END_COMMENT = //End -- \n; - // --- Properties /** @@ -126,15 +79,6 @@ * lt;scriptgt; lt;/scriptgt; around the javascript. */ protected String formName = null; - -/** - * formName is used for both Javascript and non-javascript validations. - * For the javascript validations, there is the possibility that we will - * be rewriting the formName (if it is a ValidatorActionForm instead of just - * a ValidatorForm) so
DO NOT REPLY [Bug 31220] - s:message and s:errors error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31220. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31220 s:message and s:errors error [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 04:58 --- Both of these issues have been addressed in nightly build 20041022. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: rev 55309 - struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application
Author: craigmcc Date: Thu Oct 21 22:48:39 2004 New Revision: 55309 Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesRequestProcessor.java struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java Log: Refine the context.release() patch from Piero Colagrosso. We must call context.release() *only* if we were the ones that actually created a new FacesContext. Otherwise, the context object will be released twice (once by us, and once by the JSF runtime) with undefined results -- with the JSF RI, for example, this combination triggers an IllegalStateException error in the servlet container's logs. Also, applied the same mechanism to the non-Tiles request processor as well, to avoid the potential for creating dangling FacesContext instances that are never cleaned up. Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesRequestProcessor.java == --- struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesRequestProcessor.java (original) +++ struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesRequestProcessor.java Thu Oct 21 22:48:39 2004 @@ -120,6 +120,7 @@ FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = // FIXME - alternative lifecycle ids lf.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); +boolean created = false; FacesContext context = FacesContext.getCurrentInstance(); if (context == null) { if (log.isTraceEnabled()) { @@ -148,10 +149,16 @@ log.trace( Rendering view for ' + uri + '); } lifecycle.render(context); -if (log.isTraceEnabled()) { -log.trace( Marking request complete for ' + uri + '); +if (created) { +if (log.isTraceEnabled()) { +log.trace( Releasing context for ' + uri + '); +} +context.release(); +} else { +if (log.isTraceEnabled()) { +log.trace( Rendering completed); +} } -context.responseComplete(); } Modified: struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java == --- struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java (original) +++ struts/trunk/struts-faces/core-library/src/java/org/apache/struts/faces/application/FacesTilesRequestProcessor.java Thu Oct 21 22:48:39 2004 @@ -120,6 +120,7 @@ FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = // FIXME - alternative lifecycle ids lf.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); +boolean created = false; FacesContext context = FacesContext.getCurrentInstance(); if (context == null) { if (log.isTraceEnabled()) { @@ -129,7 +130,8 @@ FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(request, uri); context = fcf.getFacesContext(servlet.getServletContext(), wrapper, - response, lifecycle); + response, lifecycle); +created = true; } // Create a new view root @@ -144,11 +146,30 @@ log.trace( Rendering view for ' + uri + '); } lifecycle.render(context); +if (created) { +if (log.isTraceEnabled()) { +log.trace( Releasing context for ' + uri + '); +} +context.release(); +} else { +if (log.isTraceEnabled()) { +log.trace( Rendering completed); +} +} + +} + + +// Override default processing to provide logging +protected void internalModuleRelativeForward +(String uri, HttpServletRequest request, HttpServletResponse response) +throws IOException, ServletException { + if (log.isTraceEnabled()) { -log.trace( Marking request complete for ' + uri + '); +log.trace(Performing internal module relative forward to ' + + uri + '); } -// context.responseComplete(); -context.release(); +super.internalModuleRelativeForward(uri, request, response); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31097] - Struts-faces renders blank pages when refreshing page.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31097. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31097 Struts-faces renders blank pages when refreshing page. [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 05:52 --- The 20041022 nightly build of struts-faces contains a fix that specifically addresses the blank page problem, for both Tiles and non-Tiles based applications. With this fix, I can no longer reproduce the problem, so I'm going to mark this bug as fixed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31351] - JSF 1.1_01 and Struts-faces Problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31351. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31351 JSF 1.1_01 and Struts-faces Problem [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 05:54 --- The 20041022 nightly build of struts-faces contains a better version of the original fix for the underlying problem. I can no longer reproduce the error scenario, so I'm going to mark this bug as FIXED. Please re-open it if the 20041022 (or later) nightly build still fails for you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31803] - Struts-Faces and Validator framework (of Struts 1.2.4)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31803. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31803 Struts-Faces and Validator framework (of Struts 1.2.4) [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-10-22 05:57 --- As of the 20041022 nightly build, the interaction with the validator framework now works for both Struts 1.1 and Struts 1.2.4 -- this required slight differences in the way that the client side validation methods were generated. I'm going to mark this bug as FIXED on that basis. Please try this version in your environment, and reopen it if there are still problems. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Apache Struts Wiki] Updated: StrutsFacesRelease101
Date: 2004-10-21T22:58:19 Editor: CraigMcClanahan [EMAIL PROTECTED] Wiki: Apache Struts Wiki Page: StrutsFacesRelease101 URL: http://wiki.apache.org/struts/StrutsFacesRelease101 Remove outstanding bugs that have been resolved, update test matrix Change Log: -- @@ -18,9 +18,6 @@ == Outstanding Bug Review == || '''ID''' || '''Summary''' || '''Status''' || '''Prevents Release''' || -|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=31097 31097] || Struts-Faces renders blank pages when refreshing pages || Fixed in nightly build 20041016, asking reporter to verify || No (fixed) || -|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=31220 31220] || lt;s:messagegt; and lt;s:errorgt; error || WORKSFORME, asking reporter to try a more recent build || Yes if reproducible || -|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=31351 31351] || JSF 1.1_01 and Struts-faces Problem || Same root cause as 31097, so fixed in nightly build 20041016, asking reporter to verify || No (fixed) || == Preparation Checklist == @@ -59,8 +56,10 @@ || '''#''' || '''J2SE Version''' || '''Container Version''' || '''Struts Version''' || '''JSF Version''' || '''Status''' || || 1. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.1 || JSF RI 1.1_01 || PASS || || 2. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.2.4 || JSF RI 1.1_01 || PASS || -|| 3. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.1 || MyFaces 1.0.7 || FAIL || -|| 4. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.2.4 || MyFaces 1.0.7 || FAIL || +|| 3. || 1.4.2_03 || Tomcat 5.0.28 || Struts 1.1 || JSF RI 1.1_01 || PASS || +|| 4. || 1.4.2_03 || Tomcat 5.0.28 || Struts 1.2.4 || JSF RI 1.1_01 || PASS || +|| 5. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.1 || MyFaces 1.0.7 || FAIL || +|| 6. || 1.4.2_03 || Tomcat 5.0.25 || Struts 1.2.4 || MyFaces 1.0.7 || FAIL || MyFaces 1.0.6 and 1.0.7 have bugs that cause test failures. See [http://sourceforge.net/tracker/index.php?func=detailaid=1018239group_id=69709atid=525508 this bug report] and [http://sourceforge.net/tracker/index.php?func=detailaid=1019250group_id=69709atid=525508 this one too] for more details. These bugs will not hold up a release of Struts-Faces. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]