Bug 103085

Summary: I18N - locale listing section of faces-config.xml is not there anymore
Product: obsolete Reporter: Ken Frank <kfrank>
Component: visualwebAssignee: _ potingwu <potingwu>
Status: RESOLVED WONTFIX QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: kaa, non_migrated_user, potingwu
Version: 6.xKeywords: I18N
Target Milestone: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Report:

Description Ken Frank 2007-05-02 03:26:04 UTC
up until recently, the faces-config.xml has had the locale setting section in
it, commented out

  <!-- Set default locale and add supported locales here...

But in recent builds its not there - there is the new section ie

but not the locale section.

fairly recently the locale section was in this file with this new managed bean
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.
Comment 1 _ potingwu 2007-05-02 17:32:52 UTC
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.
Comment 2 Ken Frank 2007-05-02 17:50:55 UTC
couple of notes:

- even though the faces-config locale settings might not be needed for other web
they are required for vwp ones, thus please add back the locale section of

- 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 -

Comment 3 _ potingwu 2007-06-11 23:53:33 UTC
*** Issue 106299 has been marked as a duplicate of this issue. ***
Comment 4 Ken Frank 2007-07-18 18:12:22 UTC
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 -

Comment 5 Ken Frank 2007-07-18 18:14:03 UTC
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.

Comment 6 Ken Frank 2007-08-23 02:53:26 UTC
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.

Comment 7 Petr Pisl 2007-08-23 13:40:54 UTC
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. 
Comment 8 Petr Pisl 2007-08-24 11:53:31 UTC
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
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/SupportedLocale.java,v
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
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
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/LocaleConfig.java,v
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
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/DefaultLocale.java,v
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
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
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
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  <-- 
new revision: 1.5; previous revision: 1.4
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
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  <-- 
new revision: 1.2; previous revision: 1.1
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
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SupportedLocaleImpl.java,v
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
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
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  <-- 
new revision: 1.5; previous revision: 1.4
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/LocaleConfigImpl.java,v
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
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
RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/DefaultLocaleImpl.java,v
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
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
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
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
Checking in test/unit/src/org/netbeans/modules/web/jsf/xdm/model/data/goldenfiles/JSFConfigModelTest/gold-application.xml;
 <--  gold-application.xml
new revision: 1.2; previous revision: 1.1
Comment 9 _ potingwu 2007-09-11 19:03:28 UTC
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'?>
Comment 10 Ken Frank 2007-09-11 23:40:18 UTC
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 ?

Comment 11 _ potingwu 2007-09-12 00:49:53 UTC
So adding back the following section will fix the issue?

  <!-- Set default locale and add supported locales here...
Comment 12 Ken Frank 2007-09-12 00:55:01 UTC
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 ?


Comment 13 _ potingwu 2007-09-25 16:58:19 UTC
It's fixed in the trunk.
Comment 14 kaa 2007-10-04 16:59:55 UTC
verified: build 0927, ja_JP, XP and S10
Comment 15 Ken Frank 2007-11-07 02:03:31 UTC
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.

Comment 16 Ch Nguyen 2007-11-07 05:10:00 UTC
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?
Comment 17 Jayashri Visvanathan 2007-11-07 15:56:43 UTC
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.

Comment 18 Jayashri Visvanathan 2007-11-07 16:13:21 UTC
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 :)
Comment 19 Ken Frank 2007-11-07 16:22:54 UTC

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 ?

Comment 20 _ potingwu 2007-11-07 17:13:41 UTC
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.
Comment 21 _ potingwu 2007-11-07 17:18:18 UTC
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.
Comment 22 Ken Frank 2007-11-07 17:30:25 UTC
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 ?


please make sure to test vwp when this section is gone to be sure all is ok.

Comment 23 _ potingwu 2007-11-07 17:37:09 UTC
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.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo