[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [wtp-jsf-dev] A problem found in FacesConfigArtifactEdit
|
I
agree; I can't see any reason why this member needs to be static, and of course
there are good reasons why it shouldn't be.
Thanks,
- Ian
Hi,
I encountered a problem
in using FacesConfigArtifactEdit. I
find the reason is that the variable sFileName in this
class is static. But I think the instances of this class shouldn't share this
value, so I changed it to non-static, then the problem disappeared. Is there
anyone could take a look and tell me if this is right? Thanks.
My programs like this:
String facesConfig1 =
"WEB-INF/faces-config.xml";
String
facesConfig2 = "WEB-INF/face2.xml";
List configFiles = new ArrayList();
configFiles.add(facesConfig1);
configFiles.add(facesConfig2);
List artifactEditList = new ArrayList();
for (int i = 0, n =
configFiles.size(); i < n; i++) {
FacesConfigArtifactEdit artifactEdit =
FacesConfigArtifactEdit.getFacesConfigArtifactEditForRead(
project, (String) configFiles.get(i));
artifactEditList.add(artifactEdit);
}
//.....
for (int i = 0, n = artifactEditList.size(); i < n; i++) {
FacesConfigArtifactEdit artifactEdit =
(FacesConfigArtifactEdit)artifactEditList.get(i);
FacesConfigType
facesConfig = artifactEdit.getFacesConfig();
// problem comes, the "facesConfig" always be the model loaded from
"WEB-INF/face2.xml";
}
Vincent. Shi
Sybase Software (China) Co., Ltd
Email:
shao-feng.shi@xxxxxxxxxx