| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 11/09/2010 23:55:51
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
This has already been reported to ICEfaces support, I repeat it here to get additional community assistance and also in case others have had the same problem.
Product Version Number: ICEfaces-2.0.0.Beta1-Netbeans-6.9.final
Application Server: Sun GlassFish 3.0.1
Development IDE: Sun NetBeans6.9.1
mojarra-2.0.3-FCS
I have followed the ICEfaces-2.0.0.Beta1-Netbeans-6.9.final
instructions to install the plugins, and on new Web Application project creation ICEfaces is available as a Framework for selection. However,
after creating a Web Application with _ONLY_ ICEfaces selected
as framework (but not JavaServer Faces), JavaServer Faces also
appears under Used Frameworks in the Project Properties dialog.
If under Used Frameworks with JavaServer Faces selected I choose the Libraries tab, it shows that "Use default library which comes with Server (JSF 2.0)" is selected, but it is readonly. There is another radio button choice Registered Libraries showing a pulldown with ICEFaces Facelets 1.8.2.a showing, but one can't select it. (see 1st attached image).
I can run the welcomeICEfaces.xhtml, but it does not show any ICE style widgets, it seems to fall back to core components. For example, the ice:selectInputDate widget displays as a simple h:inputText would.
(see 2nd attached image).
I've constructed a minimal date test example using Netbeans6.9.1:
Code:
@ManagedBean
@SessionScoped
public class TestBean {
/** Creates a new instance of TestBean */
public TestBean() {
}
private Date date = new Date();
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
From ice_date_test.xhtml:
Code:
<ice:form id="iceForm">
<panelGrid columns="1">
<ice:outputLabel id="popupSelectedDateTxt" value="Selected Date: " />
<ice:outputText value="#{testBean.date}">
<f:convertDateTime pattern="MM/dd/yyyy"/>
</ice:outputText>
<ice:selectInputDate id="date" value="#{testBean.date}"
renderAsPopup="true">
<f:convertDateTime pattern="MM/dd/yyyy"/>
</ice:selectInputDate>
<ice:messages />
</panelGrid>
</ice:form>
My web.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>upload</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>ice_date_test.xhtml</welcome-file>
</welcome-file-list>
</web-app>
I even looked into the nbproject/project.properties and nbproject/project.xml to see whether I can find anything that might be forcing it to take the core JSF instead of ICEfaces.
Very glad for feedback from anybody who is successfully using ICEfaces with Netbeans6.9(.1).
Webel
|
| Filename |
ecosmartICE_JavaServerFaces_always_shows_forces_default_not_use_icefaces_date_test.png |
Download
|
| Description |
Running project shows non-ICE inputtext widget instead of ICEfaces ice:selectInputDate widget. |
| Filesize |
26 Kbytes
|
| Downloaded: |
65 time(s) |
|
| Filename |
ecosmartICE_JavaServerFaces_always_shows_forces_default_not_use_icefaces.png |
Download
|
| Description |
Project Properties dialog showing Java Server Faces framework included (although never explicitly chosen) in a netbeans Web Application, with readonly radio button stuck on default JSF. |
| Filesize |
54 Kbytes
|
| Downloaded: |
60 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/09/2010 01:32:49
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
Replying to self.
My conclusion that the web app is somehow "falling back" to core widgets is wrong, after trying some other ICEfaces tags I realised they are working, but the images (resources) are not showing and there is no styling.
For example, HTML result for the prev month button in an ICE non-popup calendar:
Code:
<img id="iceForm:date2_img_60" class="iceGphImg iceSelInpDateMovePrev" width="17" height="16" title="Show previous month: August" style="border: medium none ;" src="/ecoSmartICE2/xmlhttp/css/xp/css-images/spacer.gif" alt="Show previous month: August"/>
I do not know why every such case is showing spacer.gif, I'd have expected one of the other images.
The image resources are in icefaces-compat.jar under:
com.icesoft.faces.resources ..
Example:
com.icesoft.faces.resources.css.xp.css-images/cal_button.gif
I found some relevant reports:
Netbeans 6.5 + IceFaces - And Where Is The Calendar Icon?
Problems with ice:selectInputDate with facelets
How ICEFaces Loads Its CSS GIF files
After installing the ICEfaces integration for Netbeans6.9 and creating a web application it wrote the following into my web.xml:
Code:
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
However that seems to be failing silently (not finding the image resources).
A number of examples elsewhere had in web.xml file:
Code:
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
But I'm not sure what the corresponding servlet class should be.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/09/2010 01:49:31
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
I've tried the following taken from the web.xml of the ICEfaces tutorial downloads:
Code:
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
I get:
java.lang.ClassNotFoundException: com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet
Could somebody please provide a correct web.xml for getting ICEfaces working with correct resolution of resources.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/09/2010 01:53:18
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
There is no com.icesoft.faces.webapp.xmlhttp package or
com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet in:
ICEfaces 2.0 Beta1 Compatibility - icefaces-compat.jar.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 14/09/2010 11:37:55
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 421
Offline
|
I assume you select Library "ICEfaces 2.0 Beta1".
you need to check "ICEfaces 1.8 Compatibility Mode" to use existing ICEfaces component. Otherwise use stock RI component as new ICEfaces 2.0 only components haven't been released yet.
com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet is required in ICEfaces 1.8.2. Not ICEfaces compat mode under icefaces 2.0.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 16/09/2010 04:58:24
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
> I assume you select Library "ICEfaces 2.0 Beta1".
Under Project Properties>Frameworks>Used Frameworks it shows
ICEfaces, and under Libraries tab it shows ICEfaces 2.0 Beta1.
> you need to check "ICEfaces 1.8 Compatibility Mode" to use existing
> ICEfaces component. Otherwise use stock RI component as new ICEfaces
> 2.0 only components haven't been released yet.
Sorry, please explain. I have downloaded ICEfaces 2.0 Beta1 to use with JSF2.0, surely I can use 2.0 components ! What is the point of the ICEfaces 2.0 Beta1 download ?
I do not know what you mean by "existing ICEfaces components".
Don't the ICEfaces 2.0 Beta1 components exist ?
You've provided a Netbeans6.9 integration for it, what components
(please specify in reply) am I supposed to be able to use ?
For example, I want to be able to use the date picker: ice:selectInputDate. Surely it should work (with correct resource finding) out-of-the-box, following the instructions, as I have.
>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet is required in >ICEfaces 1.8.2. Not ICEfaces compat mode under icefaces 2.0
OK, well I want to use ICEfaces 2.0 Beta1 with JSF2.
I've waited some days for help and still can't use the framework properly.
Can you please in next reply give exact instructions for use of ICEfaces 2.0 Beta1 with JSF2 vs. Netbeans 6.9.1, or please offer some diagnostics so we can find out why it is not working properly.
Otherwise I think your integration with Netbeans6.9 and compat mode is broken.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 16/09/2010 10:42:27
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 421
Offline
|
Sorry, please explain. I have downloaded ICEfaces 2.0 Beta1 to use with JSF2.0, surely I can use 2.0 components ! What is the point of the ICEfaces 2.0 Beta1 download ?
I do not know what you mean by "existing ICEfaces components".
Don't the ICEfaces 2.0 Beta1 components exist ?
You've provided a Netbeans6.9 integration for it, what components
(please specify in reply) am I supposed to be able to use ?
For example, I want to be able to use the date picker: ice:selectInputDate. Surely it should work (with correct resource finding) out-of-the-box, following the instructions, as I have.
ICEfaces has 2 sets of components; one set is the components which can be used in both ICEfaces 1.8 (current release version) and 2.0 (currently beta1). Another set (called sparkle) is ICEfaces 2.0 only and it hasn't been released yet and will be released with ICEfaces 2.0 beta2.
ICEfaces for netbeans supports both ICEfaces 1.8.2 and 2.0 beta1. If you use ICEfaces 2.0beta1, be sure to check "ICEfaces 1.8 Compatibility Mode" as shown in attached screenshot in order to use the first set of icefaces components mentioned above, which includes ice:selectInputDate in icefaces 2.0 beta1 with jsf ri 2.0 project.
Hope this help
|
| Filename |
compat.png |
Download
|
| Description |
|
| Filesize |
48 Kbytes
|
| Downloaded: |
65 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/09/2010 19:40:42
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
I attach 1st a screenshot of the property dialog frameworks for an existing project, with ICEfaces configuration selected, and it shows ICEfaces 1.8 Compatibility Mode.
Please note that:
- this configuration is readonly.
- JavaServer Faces is ALWAYS included under Used Frameworks, even though it was not explicitly selected during project creation.
The 2nd attachment shows (for comparison with yours) the Web Application project creation stage for a fresh project, proving I'm selecting the correct compatibility mode. I can't attach a 3rd file, but when one opens the Project Property dialog for the newly created project one gets the same as above, namely under Frameworks both ICEfaces and JavaServer Faces, and under configuration of ICEfaces the selected ICEfaces 1.8 Compatibility Mode in readonly mode.
Under libraries it shows ICEfaces 2.0Beta2.
I then perform the simplest date property test with a simple TestBean with a date property and as reported above it does not show the resources and style for the date input.
Code:
<ice:selectInputDate id="date1" value="#{testBean.date1}" renderAsPopup="true"/>
This runs however it does NOT show the calendar icon for the popup,
and it one types ENTER into the date input area a calendar select widget
appears below the date input area, however that calendar select widget does not have any prev/next buttons or other images or skinning, it is unstyled.
The resources are NOT being found.
This is using the web.xml exactly as generated by your ICEFaces plugin and the Netbeans6.9.1 Web Application creation.
Could you PLEASE to save me wasting any further time on what should be a very simple task:
1. Download a fresh Netbeans6.9.1 (I'm on a Mac BTW).
2. Choose Glassfish 3.0.1 as the server.
3. Install your ICEfaces-2.0.0.Beta1-Netbeans-6.9.final
3. Repeat this exercise of testing ICEfaces on a minimal project with (at least) the date widget bound to a simple test bean.
The report back here whether it worked, because it surely does not work for me.
|
| Filename |
icefaces_ProjectProperties_ICEfaces_test_2.png |
Download
|
| Description |
Web Application creation dialog with ICEfaces 2 showing compatibility mode for ICEfaces1.8 (readonly configuration).
|
| Filesize |
77 Kbytes
|
| Downloaded: |
56 time(s) |
|
| Filename |
icefaces_ProjectProperties_ICEfaces.png |
Download
|
| Description |
Project Property dialog for existing project with ICEfaces 2 showing compatibility mode for ICEfaces1.8 (readonly configuration). |
| Filesize |
45 Kbytes
|
| Downloaded: |
51 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/09/2010 19:46:42
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
Further evidence:
For:
Code:
<ice:selectInputDate id="date1" value="#{testBean.date1}" renderAsPopup="true"/>
1st image shows date input field without any popup image (firefox firebug reveals there is other markup here with missing resources like calendar icon).
2nd image shows calendar appears after typing ENTER/RETURN into date input field.
The image resources and styling are not being found.
|
| Filename |
icefaces_Date_widget_not_skinned_before_enter.png |
Download
|
| Description |
date input field without any popup image |
| Filesize |
32 Kbytes
|
| Downloaded: |
53 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/09/2010 19:47:32
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
sorry, 2nd attachment was missing.
|
| Filename |
icefaces_Date_widget_not_skinned_after_enter.png |
Download
|
| Description |
|
| Filesize |
50 Kbytes
|
| Downloaded: |
48 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/09/2010 20:03:32
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
And this is the generated web.xml for a fresh Netbeans6.9.1 Web Application with your ICEFaces2 plugin and ICEfaces2 selected as framework:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>upload</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/icefaces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>welcomeICEfaces.jsf</welcome-file>
</welcome-file-list>
</web-app>
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/09/2010 13:11:50
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 421
Offline
|
1.JavaServer Faces is ALWAYS included under Used Frameworks, even though it was not explicitly selected during project creation.
For existing JSF project, of course JSF framework is always under used framework.
For new ICEfaces project, after ICEfaces framework is added, the ICEfaces project creation process triggers JSF framework to be added silently. There is nothing wrong with that.
2. For adding ICEfaces to existing JSF project, ICEfaces configuration is read-only.
I cannot reproduce it on Windows. I suspect it may be related to a timing issue we had before. I wonder if you can try to wait a while after JSF project is created before adding ICEfaces framework to the project. If it works, please report here. We will investigate.
3. missing icon for <ice:selectInputDate id="date1" value="#{testBean.date1}" renderAsPopup="true"/>
You need specify css for icefaces compat components. For example add
<ice:outputStyle href="./xmlhttp/css/rime/rime.css"/>
or link tag to specify ICEfaces built-in css resources in head tag.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/09/2010 18:02:16
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
Thanks for specific feedback.
May I note that the following is not mentioned in the guide ICEfaces Project Integration for Netbeans v6.9:
You need specify css for icefaces compat components. For example add
<ice:outputStyle href="./xmlhttp/css/rime/rime.css"/>
or link tag to specify ICEfaces built-in css resources in head tag.
In fact the guide says:
ICEfaces page is basically the same as JSF page but with ICEfaces component namespace.
It would be worth adding that the style file reference must also be added, not just the namespace, even it the inclusion of a style file is mentioned in other documentation.
I looked at http://www.icefaces.org/docs/v1_8_2/ICEfacesGettingStartedGuide.pdf (which is not as far as I can tell distributed with the ICEfaces-2.0.0.Beta1-Netbeans-6.9.final).
I word search for outputStyle or rime.css does not yield a single hit !
In both the Netbeans integration guide and in the Getting Started Guide the need for explicit inclusion of a style file reference needs to be made much clearer, especially when the URL for that style file also relies on Resource Servlet translation.
Also in the Netbean integration guide it states:
In Frameworks view, select ICEfaces ( Do NOT select JavaServer Faces Framework here .)
Hence the questions about JavaServer Faces being automatically included (and yes I realise it makes sense that it is included). Again, in the Netbeans integration guide it would be worth adding that the JavaServer Faces framework will be automatically added.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 21/09/2010 12:11:31
|
liming.wu
Joined: 26/10/2004 00:00:00
Messages: 421
Offline
|
Thanks for your suggestions.
Regarding JavaServer Faces framework will be automatically added, we did mentioned n Frameworks view, select ICEfaces ( Do NOT select JavaServer Faces Framework here .)
, we do have some reasons. One reason for example ICEfaces plugin detects your selected server and JavaEE level to determine if required jsf jars need to be added. And also ICEfaces plugin may add ICEfaces favored revision of JSF RI jar files. On GF 3, if j2ee 1.4 is selected, we even add JSF 1.2 to run with ICEfaces 1.8. Action with explicitly adding JSF framework is different than silently triggering adding action. That is one of the reason we do recommend not to check the JSF framework checkbox.
Regarding css resource, icefaces components do require explicitly specified css resources. You can add yours or use ICEfaces built-in CSS theme such as XP, rime, etc. But you are right. Thank you for your suggestion and we will add outputstyle into template pages.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 21/09/2010 19:13:05
|
webel
Joined: 11/09/2010 17:35:18
Messages: 13
Offline
|
thanks, have read reply.
|
|
|
 |
|
|