| Author |
Message |
|
|
Does anyone have a suggestion as to why the action listeners do not get called in this example?
This example is basically a modified cut and paste from the MEnu example in the Showcase.
|
 |
|
|
Using IF2-Beta2, glassfish 3, NetBeans 6.9.1
I have a menu as a composite component.
The menu displays correctly, but for some reason the actionListener does not get called when I select the menuItem.
I have a print statement as the first line in the actionlistener and it does not get written to the server log file.
Any idea what I am doing wrong?
Thanks.
Here is the portion of the menu that contains the menu items in question:
Code:
<ice:menuItem value="Enrollment" styleClass="menuPanel"
id="enrollmentPnl" onclick="return false;">
<ice:menuItem id="enrollStaffLink" styleClass="menuPanelGrid"
actionListener="#{menuSessionBean.enrollStaffLink_actionListener}"
value="Enroll Staff" />
<ice:menuItem id="staffProfileLink" styleClass="menuPanelGrid"
value="Staff Profile"
actionListener="#{menuSessionBean.primaryListener}"/>
<ice:menuItem id="enrollFamilyLink" styleClass="menuPanelGrid"
value="Enroll Family"
actionListener="#{menuSessionBean.primaryListener}"/>
<ice:menuItem id="familyProfileLink" styleClass="menuPanelGrid"
value="Family Profile"
actionListener="#{menuSessionBean.primaryListener}"/>
</ice:menuItem>
Here is the session bean action listener that does not get called.
Code:
public void enrollStaffLink_actionListener( ActionEvent e ) {
System.out.println("<MenuSessionBean.enrollStaffLink_Action>");
lsb.logMsg("<MenuSessionBean.enrollStaffLink_Action>");
// esb.setTabSelectedStaff( "tab1"); Uncomment when esb converted
setMenuAction( "enrollStaff");
// esb.initGeneralInfo(); Uncomment when esb converted
clearOkMsg();
redirect("EnrollStaffPage.xhtml");
}
|
 |
|
|
I'm in the process of doing the same conversion ICEfaces 1.8.2 /NetBeans 6.5 to ICEfaces 2, NetBeans 6.9.1.
One of the posts (tsutsu) said to make this work you need to create aproject without ICEfaces and then add ICEfaces libraries you created.
Any chance of getting some more details on how to do that?
|
 |
|
|
Using ICEFaces 2.0, facelets, JSF2, Glassfish 3, NetBeans 6.9
I'm curious to know if anyone has been able to successfully use ICEfaces with PrimeFaces?
PrimeFaces has a couple interesting components that I would like to add to my appliation, but when I attempt to add the Resource Servelet to the web.xml file, I get an error that says:
Code:
SEVERE: DPL8015: Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive [web].
Line 42 Column 54 -- Duplicate unique value [Resource Servlet] declared for identity constraint of element "web-app".
SEVERE: DPL8005: Deployment Descriptor parsing failure : Duplicate unique value [Resource Servlet] declared for identity constraint of element "web-app".
SEVERE: Exception while deploying the app
java.io.IOException: org.xml.sax.SAXParseException: Duplicate unique value [Resource Servlet] declared for identity constraint of element "web-app".
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170)
Is there any way around this?
Thanks
|
 |
|
|
I have an application that updates a clock on my web page from the server by using a PersistentFacesState inside a timer thread.
The run method for the thread is below.
Basically, I get the PersistentFacesState and call it's render() method to do the refresh.
The time and data are formatted in the getter methods for the bean properties bound to the data and time components.
My question is with ICEfaces 2.0, the PersistentFacesState is no longer available.
Can someone either give an example or point me in the direction of a replacement mechanism for this?
Thanks.
Code:
import com.icesoft.faces.webapp.xmlhttp.PersistentFacesState;
public void run() {
try {
PersistentFacesState state = PersistentFacesState.getInstance();
while (0 != pollInterval) {
Thread.sleep( 500 );
if( state != null ) {
try {
state.render();
}
catch( Exception ex ) {
}
}
else {
System.out.println("<TimerSessionBean.run> null PersistentFacesState");
break;
}
}
}
catch (Exception e) {
System.out.println("<TimerSessionBean.run> error in main Try/Catch = " + e.getMessage()); // Line 195
}
}
|
 |
|
|
It looks like the beforePhase property can be used to do prerender stuff, but I have one question.
In my facelets environment, I only have the <f:view> component in my template so the same method gets called every time I change pages.
Does anyone know how to identify the page that is about to be drawn?
|
 |
|
|
I was overwhelmed by the lack of response to my NetBeans6.8/6.9 and ICEfaces questions, so I have decided to give up on trying to implement ICEfaces in JSF2.0.
I have backed off to NetBeans 6.7 and ICEfaces 1.8.2 using facelets.
I have a page with a menu that has a submenu under one of the main menu items.
When displayed, the submenu is detached from the main menu (see attached file).
The problem is that if you try to move from the main menu to the sub-menu display, you lose focus and the sub-menu disappears.
As a result, you cannot access the sub-menu items.
I am using the deault icefaces xp style sheet.
I have also tried the showcase_style.css stylesheet used with the component showcae with the same results.
What am I doing wrong?
Here is my question?
How can I get a submenu to display attached to the main menu item so you can move the mouse to the submenu list?
Here is my header.xhtml that contains the menu:
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
>
<body>
<ui:composition>
<f:subview id="headerSubView">
<ice:form id="headerForm">
<table width="100%" >
<tr>
<td align="left">
<ice:menuBar id="mainMenuBar" orientation="horizontal" >
<ice:menuItem action="homePage" id="homeItem" value="Home" />
<ice:menuItem action="family" id="enrollMenu" value="Enrollment" />
<ice:menuItem id="locationMenu" value="Locations" action ="locationMapPage">
<ice:menuItem action ="locationMapPage" id="locationMap" value="Location Map" />
<ice:menuItem action ="locationAddPage" id="locationAdd" value="Add Location" />
<ice:menuItem action ="locationEdit" id="locationEdit" value="Edit Location" />
</ice:menuItem>
<ice:menuItem action="loginPage" id="permissionsItem" value="Do-Wa Diddy" />
<ice:menuItem action="invite1" id="invite1Item" value="Diddy-Dum" />
<!--ice:menuItem action="invite2" id="invite2Item" value="Diddy-Do" /-->
</ice:menuBar>
</td>
<td align="right">
<!--ice:panelGroup rendered="#{identity.loggedIn}" -->
<ice:panelGroup rendered="true" >
<ice:outputText value="Welcome: appUser.fullName" />
<span style="margin-left: 3px; margin-right: 3px">|</span>
<!-- s:link id="logout" action="#{identity.logout}" value="Logout" / -->
</ice:panelGroup>
</td>
<td align="right">
<ice:outputConnectionStatus style="margin-right: 25px" />
</td>
</tr>
</table>
</ice:form>
</f:subview>
</ui:composition>
</body>
</html>
Here is the login page that displays the header page with menu.
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:w="http://www.principlesoft.com/webportal"
>
<body>
<ui:composition template="mainTemplate.xhtml">
<ui:define name="center">
<ice:form id="loginForm">
<table align="center">
<tr>
<td colspan="0"><ice:messages globalOnly="true" /></td>
</tr>
<tr>
<td><ice:outputLabel for="username">User Name:</ice:outputLabel></td>
<td><ice:inputText id="username" value="identity.username" style="width: 165px;" /></td>
</tr>
<tr>
<td><ice:outputLabel for="password">Password:</ice:outputLabel></td>
<td><ice:inputSecret id="password" value="identity.password" style="width: 165px;" /></td>
</tr>
<tr>
<td></td>
<td><ice:commandButton id="loginButton" value="Login" /></td>
</tr>
</table>
</ice:form>
</ui:define>
</ui:composition>
</body>
</html>
Here is the template.
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view id="mainTemplateView"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!--<link href="xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css" />-->
<link href="css/xp-corrected.css" rel="stylesheet" type="text/css" />
<link href="css/truVu.css" rel="stylesheet" type="text/css" />
<title>
<ui:insert name="title">TruVu</ui:insert>
</title>
</head>
<body>
<!-- hit ctrl+shift+k for facelets debug popup screen to open -->
<!--<ui:debug hotkey="K" rendered="#{initParam.debugMode}" />-->
<!--<ui:debug hotkey="K" rendered="#{initParam.debugMode}" />-->
<table>
<tr>
<td id="top">
<ui:insert name="top">
<ui:include src="header.xhtml"></ui:include>
</ui:insert>
</td>
</tr>
<tr>
<td id="center">
<ui:insert name="center">Center</ui:insert>
</td>
</tr>
<tr>
<td id="bottom">
<ui:insert name="bottom">
<ice:panelGroup>
<ice:outputText value="Powered by"/>
<!--ice:outputLink value="http://www.principlesoft.com" target="_blank"-->
<ice:outputText value="Bovine Methane"/>
<!--/ice:outputLink-->
</ice:panelGroup>
</ui:insert>
</td>
</tr>
</table>
</body>
</html>
</f:view>
|
 |
|
|
Using NetBeans 6.8 with ICEfaces 2.0 (from plugin), Glassfish 3
I'm not having any luck with even the most simple application.
I have a simple page with one ice:commandButton and one ice:outputText component.
The object is to push the button and add some canned text to the outputText component.
For some reason, I can't even make this simple task work.
The project was created just using the ICEfaces framework
I selected to use ICEfaces 2.0 and checked the ICEfaces 1.8.2a support checkbox.
Here is my xhtml page
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<!--
Document : welcomeICEfaces
Created on : Apr 26, 2010, 2:56:49 PM
Author : jarzabekd
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<title>ICEfaces 2</title>
<h:outputScript name="jsf.js" library="javax.faces"/>
</h:head>
<h:body>
<div id="header">
</div>
<div id="content">
<ice:form id="iceForm">
<ice:commandButton id="btn" value="Push Me" />
<ice:outputText value="#{MySessionBean.labelText}"/>
</ice:form>
</div>
</h:body>
</html>
Here is my session bean with the single labelText property:
Code:
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;
@ManagedBean(name="MySessionBean")
@SessionScoped
public class MySessionBean {
/** Creates a new instance of MySessionBean */
public MySessionBean() {
}
public void buttonAction( ActionEvent e )
{
if( labelText.isEmpty() )
labelText = "Button Pushed";
else
labelText = "";
}
protected String labelText = "";
public void setLabelText( String s ) { labelText = s; }
public String getLabelText() { return labelText; }
}
When I start the deploy the project, I get this warning in the server log:
WARNING: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession (key: MySessionBean, value class: MySessionBean).
When I push the button, I would expect the text "Button Pushed" to be displayed in the outputText field, but nothing happens and I get this warning in the server log:
WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /ICETest1, because request parameters have already been read, or ServletRequest.getReader() has already been called
This is driving me nuts, I have been doing this type of stuff using JSF rather than Facelets for a while with no problems.
What is the problem I am having with Facelets?
What am I doing wrong?
Thanks.
|
 |
|
|
I posted the menubar part in the components forum, thinking it might be a bug, but I figured I'd post it here to see if anyone else is having similar problems.
Menubar/MenuItem Problem:
Using NetBeans 6.8 and ICEfaces plugins for the ICEfaces 2.0 part and NetBeans 6.7 and ICEfaces plugins for the 1.8.2 part.
I am trying to put together an application using ICEfaces 2.0 and am experiencing a problem with the menuBar/menuItem components.
I have a test program that uses JSF1.2 and ICEfaces 1.8.2 and an application I am trying to build with JSF2.0 and ICEfaces 2.0 (with compatibality package for adding 1.8.2 components).
I have the same code in both projects for the menu component.
Code:
<ice:menuBar orientation="horizontal">
<ice:menuItem value="Open">
<ice:menuItem value="New"/>
<ice:menuItem value="Old"/>
</ice:menuItem>
<ice:menuItem value="Done"/>
</ice:menuBar>
First of all, in both, the orientation parameter does not seeem to work, but that is not the point - it may be syntax on my part.
The issue is that in the NB6.7/IF1.8.2 project, the menu expands showing the sub menu items for the "Open" menuItem. Whereas, in the NB6.8/IF2.0 project, the menu does not expand to show the submenu items for the "Open" menuItem.
Is this a known issue, or do I need to do something special for the NB6.8/IF2.0 project?
GMap issue:
I am not able to get the GMap component to work in either NB6.7/IF1.8.2 or NB6.8/IF2.0.
In NB6.7/IF1.8.2, I get the "Powered by Google" and the rest of the decoration at the bottom, but nothing else.
In NB6.8/IF2.0, I do not even get that, just the component outline.
I have the Google map key registered in the web.xml file as indicated by the component suite demo. I am using a key that works in a current NB6.5.1/IF1.8.1 project.
Here is what I have in my .xhtml file for the component definition - it should draw the component and the controls. I hard-coded a location just to try to get it to work.
Code:
<ice:gMap id="gmap" style="width:400px; height:400px; border: solid 1px; border-color: black" latitude="51.04507" longitude="-114.06319" rendered="true">
<ice:gMapControl id="largectrl" name="GLargeMapControl" rendered="true"/>
<ice:gMapControl id="scalectrl" name="GScsleControl" rendered="true"/>
<ice:gMapControl id="typectrl" name="GMapTypeControl" rendered="true"/>
</ice:gMap>
Is anyone else experiencing similar issues with these two components?
Does anyone see what I am doing wrong?
Thanks.
|
 |
|
|
Using NetBeans 6.8 and ICEfaces plugins for the ICEfaces 2.0 part and NetBeans 6.7 and ICEfaces plugins for the 1.8.2 part.
I am trying to put together an application using ICEfaces 2.0 and am experiencing a problem with the menuBar/menuItem components.
I have a test program that uses JSF1.2 and ICEfaces 1.8.2 and an application I am trying to build with JSF2.0 and ICEfaces 2.0 (with compatibality package for adding 1.8.2 components).
I have the same code in both projects for the menu component.
Code:
<ice:menuBar orientation="horizontal">
<ice:menuItem value="Open">
<ice:menuItem value="New"/>
<ice:menuItem value="Old"/>
</ice:menuItem>
<ice:menuItem value="Done"/>
</ice:menuBar>
First of all, in both, the orientation parameter does not seeem to work, but that is not the point - it may be syntax on my part.
The issue is that in the NB6.7/IF1.8.2 project, the menu expands showing the sub menu items for the "Open" menuItem. Whereas, in the NB6.8/IF2.0 project, the menu does not expand to show the submenu items for the "Open" menuItem.
Is this a known issue, or do I need to do something special for the NB6.8/IF2.0 project?
Thanks.
|
 |
|
|
Just want to get a handle on the timeframe for an ICEfaces 2.0 plugin for NB 6.9.
I need to ask this because I am being forced away from JSF1.2 into JSF2.0 and facelets.
I know I could use the Current ICEfaces beta 2.0 on NB 6.8, but I ran into an issue with composite components in NB6.8 that is supposedly fixed in NB 6.9.
Just trying to wrap my head around a new technology for me.
The obvious next question is are there plans in the works for visual editing for ICEfaces 2.0 in the NB environment?
I really depended on visual editing for a lot of very complex pages that would have been quite a bit more tedious to create without the visual feedback.
Thanks.
|
 |
|
|
Will ICEfaces 1.8.2 work with NetBeans 6.8 or do I need to use ICEFaces 2.0 and move to JSF 2.0?
Also, does ICEfaces 2.0 have all the components that were available in 1.8.2?
Thanks.
|
 |
|
|
I started using JSF a while back with the NetBeans IDE (never any straight JSP work).
The natural migration path was to use the ICEfaces VWP supported plugins.
This provided a very easy migration of my standard JSF projects to ICEfaces.
All the framework was in place, I just had to change the components.
In that environment, you create a new page and the IDE would create a Page.JSP page and an associated Page.java PageBean file to support the page related stuff.
This included navigation - you pushed a button, and in the button action method in the Page Bean, you returned a string that directed you to the next page.
Now, if I create a new project in NB6.7 or 6.8, I get an ICEfaces Page.jspx and Page.xhtml file.
There is no supporting Page Bean.
That means there is no button action method to redirect you to the next page.
How do you manage to do navigation without an associated page bean?
I am confused - this looks more like an old style JSP environment that I never did develop in.
Any hints or, better yet, tutorial examples of multi-page ICEfaces projects in the "New" environment?
Thanks.
|
 |
|
|
|
It would be very helpful for a basic tutorial on getting started in a Non-Visual Web Project environment. Something that is usable with Netbeans 6.7 or 6.8 would go a long way to getting me off the ground in this environment.
|
 |
|
|
ICEfaces dropped support for the visual editor in NetBeans after NetBeans 6.5.
I have a couple questions:
1) Are there any plans to reinstate visual editor support for NetBeans?
2) Are there any IDEs that have ICEfaces visual editor support - maybe MyEclipse?
Thanks.
|
 |
|
|