This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
up until recently, the faces-config.xml has had the locale setting section in it, commented out ie <!-- Set default locale and add supported locales here... <application> <locale-config> <default-locale>en</default-locale> <supported-locale>de</supported-locale> <supported-locale>fr</supported-locale> <supported-locale>es</supported-locale> </locale-config> </application> But in recent builds its not there - there is the new section ie <managed-bean> <managed-bean-name>SessionBean1</managed-bean-name> <managed-bean-class>webapplication55w.SessionBean1</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> but not the locale section. fairly recently the locale section was in this file with this new managed bean section but not now. it seems asking enough for users to need to add these locales manually at all vs vwp doing it for them or at least providing properties or a ui kind of editor for it (rfe has been filed) but at least think that section should be back in the file since it is required to add those locales in certain cases.
Visual Web is now using the same template as NetBeans JSF framework for creating faces-config.xml. Maybe NetBeans JSF framework can add this guideline as well.
couple of notes: - even though the faces-config locale settings might not be needed for other web projects, they are required for vwp ones, thus please add back the locale section of faces-config.xml - please also consider the following: --- if the default-locale section does not need to be the locale the user wants to run in, but that supported-locale will work for that, then please: - uncomment the lines in this whole section - add some other support-locales sections for other commonly used locales so we can make this even easier for users until there can be implemented a way to provide properties and ui kind of editor for users adding supported-locale sections see 93880 on this. see other vwp RFEs to see if any might now be placed into web or other categories instead now - http://www.netbeans.org/issues/buglist.cgi?issue_type=ENHANCEMENT&component=visualweb&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED&email1=&emailtype1=exact&emailassigned_to1=1&email2=&emailtype2=exact&emailreporter2=1&issueidtype=include&issue_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&short_desc=i18n&short_desc_type=substring&long_desc=&long_desc_type=substring&issue_file_loc=&issue_file_loc_type=substring&status_whiteboard=&status_whiteboard_type=substring&keywords=&keywords_type=anytokens&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&namedcmd=fontsize&newqueryname=&order=Reuse+same+sort+as+last+time&Submit+query=Submit+query ken.frank@sun.com
*** Issue 106299 has been marked as a duplicate of this issue. ***
please consider fixing this soon; it adds time for testing in that, for each project created, we need to add the locale section into the faces-config.xml; and we create a lot of projects. that is, its been told that having the locale sections in faces-config.xml is a requirement that users need to do to expect all runtime components to work properly as to their sense of locale; so having that section in the file is required. and not being xml experts, its not clear where that section can be added so that overall syntax is not affected. Also, please add supported-locale sections for at least the sun supported locales - ja zh_CN pt_BR ken.frank@sun.com
also, if that locale section, when added, can be uncommented, that will help also; unless having the default locale of en be a problem for a user running in other locale that is not mentioned in faces-config as a supported locale. ken.frank@sun.com
will this be able to be fixed for nb6, beta 1 ? this is not an issue related to enabling translation; (betas are not translated in any case) but can impact any user who wants to run in another locale. ken.frank@sun.com
I'm going to add locale configuration to the faces model. So then can very easily visual web pack extend through the model the faces-config.xml. I'm going to do it this week.
I have just done a commit, which adds the possibility track locale through the faces config model. So the visual jsf framework now can add the locale through the model, when the web module is extends. Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/JSFConfigVisitor.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JSFConfigVisitor.java,v <-- JSFConfigVisitor.java new revision: 1.5; previous revision: 1.4 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/SupportedLocale.java,v done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/SupportedLocale.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/SupportedLocale.java,v <-- SupportedLocale.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/LangAttribute.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/LangAttribute.java,v <-- LangAttribute.java new revision: 1.2; previous revision: 1.1 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/LocaleConfig.java,v done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/LocaleConfig.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/LocaleConfig.java,v <-- LocaleConfig.java initial revision: 1.1 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/DefaultLocale.java,v done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/DefaultLocale.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/DefaultLocale.java,v <-- DefaultLocale.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/DisplayName.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/DisplayName.java,v <-- DisplayName.java new revision: 1.2; previous revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/Description.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/Description.java,v <-- Description.java new revision: 1.2; previous revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/JSFConfigComponentFactory.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JSFConfigComponentFactory.java,v <-- JSFConfigComponentFactory.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/netbeans/modules/web/jsf/api/facesmodel/Application.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/Application.java,v <-- Application.java new revision: 1.2; previous revision: 1.1 done Checking in test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-application.xml; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-application.xml,v <-- faces-config-application.xml new revision: 1.2; previous revision: 1.1 done Checking in test/unit/src/org/netbeans/modules/web/jsf/xdm/model/JSFConfigModelTest.java; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/JSFConfigModelTest.java,v <-- JSFConfigModelTest.java new revision: 1.14; previous revision: 1.13 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SupportedLocaleImpl.java,v done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/SupportedLocaleImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SupportedLocaleImpl.java,v <-- SupportedLocaleImpl.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java,v <-- JSFConfigQNames.java new revision: 1.6; previous revision: 1.5 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigComponentFactoryImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigComponentFactoryImpl.java,v <-- JSFConfigComponentFactoryImpl.java new revision: 1.5; previous revision: 1.4 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/LocaleConfigImpl.java,v done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/LocaleConfigImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/LocaleConfigImpl.java,v <-- LocaleConfigImpl.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/DisplayNameImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/DisplayNameImpl.java,v <-- DisplayNameImpl.java new revision: 1.2; previous revision: 1.1 done RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/DefaultLocaleImpl.java,v done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/DefaultLocaleImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/DefaultLocaleImpl.java,v <-- DefaultLocaleImpl.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/DescriptionImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/DescriptionImpl.java,v <-- DescriptionImpl.java new revision: 1.2; previous revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java,v <-- SyncUpdateVisitor.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/ApplicationImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/ApplicationImpl.java,v <-- ApplicationImpl.java new revision: 1.2; previous revision: 1.1 done Checking in test/unit/src/org/netbeans/modules/web/jsf/xdm/model/data/goldenfiles/JSFConfigModelTest/gold-application.xml; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/data/goldenfiles/JSFConfigModelTest/gold-application.xml,v <-- gold-application.xml new revision: 1.2; previous revision: 1.1 done
Ken, could you please confirm this: After I switch to other locale by using project properties -> encoding, when I create a new NetBeans web project + JSF framework (non-visual web), I see the same issue there! I.e., I see the following in file faces-config.xml: <?xml version='1.0' encoding='UTF-8'?>
changing project encoding properties does not switch one to another locale at all. one isi still "in" the locale in which they started nb. also, i dont think there is requirement (yet) for faces-config to be seeded with encoding of project locale like there is for jsp and html and more basic xml files. but its not related to this issue - the missing section would not be there no matter what locale user is in; I think just because a different faces-config.xml is used now than was used for creator or vwp - i think it comes from other parts of web team ? ken.frank@sun.com
So adding back the following section will fix the issue? <!-- Set default locale and add supported locales here... <application> <locale-config> <default-locale>en</default-locale> <supported-locale>de</supported-locale> <supported-locale>fr</supported-locale> <supported-locale>es</supported-locale> </locale-config> </application> -->
I think it will - we have filed various rfes on this to make this more user friendly and have a ui that allowed the insertion and changing of locale names. After many mails from the past, I'm still not clear why this file is needed or why we force user to manually insert things in a file just because they are in or want app to run in another locale. Could at least you add lines about ja and zh_CN locales to this file as part of the fix ? Thanks. ken.frank@sun.com
It's fixed in the trunk.
verified: build 0927, ja_JP, XP and S10
Based on information from developers, the situation that led to this issue being filed will exist once again for nb6, thus am reopening it, so it can be proposed for waiver. Not having the section in faces-config.xml, commented out as for creator and vwp pack,IMO seems like a regression and can make it harder for users; there has been confusion in past with users who did not see certain things as per locale, and one reason was need for modifying the locale section of faces-config.xml. Having the section not be in there even if commented out, means the user will be asked to do even more and need to write their own or copy/paste the section from some document. ken.frank@sun.com
I've exchanged some emails with Winston, Po-Ting and Ken on this issue. Here is what I understand: . The right way to address this issue is to provide a new UI in the New Project wizard for the users to select the supported locales that they want to develop the web app for. As the supported locales are specified, the localized (runtime) libraries should be added to the project automatically. . Since this new functionality didn't get into the development plan for 6.0, the new UI was not implemented. So this bug was filed to request a locale-config section to be added into the faces-config.xml as an example for the users to ease the pain. However, this task alone is not enough. The users would have to manually add the localized libraries into the project as well to fully getting this supported locales to work. So, this bug is not really asking for the real fix to the issue. . Moreover, in this release, we no longer have control over faces-config.xml, in order to add anything to this file, we have to use NB API which only allows us to add the real logic, not comments. There is not much that we can technically do about adding the locale-config element as comments into the faces-config.xml without introducing a lot of risks at this time. Since there is manual work around which we have been telling Creator/VWP users to do, I don't see that this is a regression and not a stopper either. Actually I think this would be more of an enhancement than a bug if we decide to go with a real fix to the root cause of this issue. IMHO, I think this bug should be closed as won't fix and open a new enhancement issue for the real fix. Mark, Jayashri, what do you think?
I agree Chau's evaluation. This issue is not a bug but an enhancement. Ken, please keep the bug priority guidelines in mind when you file a bug. An issue with a work around should not a P1. While having a UI to add the supported locales and libraries would be great and makes it easier for users, in the absence of that, its not tedious to configure it by hand. I expect JSF application developers to be familiar with the purpose of faces-config.xml file and JSF spec covers how to configure a JSF app to run in various locales. So this is not Visual web/NetBeans defined but a standard. Thanks -Jayashri
This was filed as a P2, so I apologize for my earlier comment about the priority of the bug. For some reason, I thought this was a P1 and was downgraded. Sorry for the confusion. But that still doesn't change my opinion that this is not a stopper :)
Jayashri, as has been mentioned in this issue and in countless emails, the issue was filed since it was viewed as a regression from previous vwp functionality and that functionality was added to help the users (addition of commented out section of faces-config.xml) and that is why it was reopened when it was stated that the section was to be removed. someone on your team made the original decision to help users out by having this section in the file, and even with this section many forum postings were related to that users did not know that faces-config locale section was needed at all to do certain things, so while you might feel that jsp developers to know about this part, it did not seem reflected by users experience. rfe for a ui on this was filed a long time ago; not sure why it mentions need for another rfe on this but certainly its ok to file another. can this go thru the waiver process and then decision on it will be final ? ken.frank@sun.com
Because adding this comment-out section here is not doable, even mark this as a waiver, we still can't do this fix in the future. I think we should just close this as WONTFIX, and concentrate on the other UI enhancement for post NetBeans 6.0 plan.
BTW, as you said even we had this comment-out hint for the previous releases, we still got lots of forum postings related to this howto. Meaning this approach is not a good/useful one (it's hidden deeply that most users can't find). We should find other scheme for the users and abandon this one.
its past code freeze now but that locale section is still in builds, at least 1106 build; does visual team have an p1 issue filed and following other process for high resistance so that this section will be removed ? http://wiki.netbeans.org/wiki/view/NB6HighResistance please make sure to test vwp when this section is gone to be sure all is ok. ken.frank@sun.com
It's in trunk but not in the 6.0 branch yet. QA will verify it in issue#118937. I will close this one and let's concentrate on issue#93880 for the right approach.