| Author |
Message |
|
|
In JSF if I create a file with name messages.properties I can to modified the
default messages. For example I use required="true" it displayed the following
message:"Validation Error: Value is required" if I want change this message I put in my
messages.properties this message: javax.faces.component.UIInput.REQUIRED=Campo obrigatório.
But if I do it with IceFaces it doesn't work.
Is there anything that I can do?
Thanks
Daniel
|
 |
|
|
When I increase a css it only works after giving a refresh in the browse.
What can this be?
Daniel
|
 |
|
|
I am trying to use the component of input with the following structure:
<ice:inputText id="idData" value="#{beanSessionModel.mensagem.data}">
<f:convertDateTime pattern="dd/MM/yyyy"/>
</ice:inputText>
But when I enter with a date it presents the following message:
java.lang.IllegalArgumentException: argument type mismatch
What it could be?
|
 |
|
|
I am with two problems in relation to the ice:selectInputDate:
1 - when I use renderAsPopup = true " it doesn't allow to the user to type in the inputText render.
2 - when I use renderAsPopup = true " the inputText doesn't obey the tag f:convertDateTime pattern = dd/mm/yyyy ":
Example:
<ice:selectInputDate popupDateFormat = dd/mm/yyyy " value =" #{beanSessionModel.date} " renderAsPopup = true ">
<f:convertDateTime pattern = dd/mm/yyyy " />
does it exist something what I can do?
Thanks
Daniel
</ice:selectInputDate>
|
 |
|
|
Work fine.
Thanks
Daniel
|
 |
|
|
|
Does not iceFaces support ISO-8859-1? Because i need the accents.
|
 |
|
|
How do I do to present graphic accents as: ç á, with ICEFaces?
I'am using:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
but it is not working
Thank you
Daniel
|
 |
|
|
|
Yes it is exactly that the problem. With myFaces it doesn't expand.
|
 |
|
|
|
I sent a email with an example code. This problem occours with MyFaces.
|
 |
|
|
|
which emai I should send?
|
 |
|
|
maybe the problem is in my web. xml, I have been adding in mine web-inf/lib the libraries of MyFaces follow my web. xml:
//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>ICEfaces Component Showcase</display-name>
<description>sac2</description>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX </param-name>
<param-value>.iface</param-value>
<description>
By default, MyFaces automatically converts certain extensions to
.jsp. For ICEfaces, our own PersistentFacesServlet is triggered
by the .jspx extension.
</description>
</context-param>
<context-param>
<param-name>com.icesoft.faces.debugDOMUpdate</param-name>
<param-value>false</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>javax.faces.application.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.uploadDirectory</param-name>
<param-value>upload</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>false</param-value>
</context-param>
<!--<context-param>-->
<!--<param-name>com.icesoft.faces.concurrentDOMViews</param-name>-->
<!--<param-value>true</param-value>-->
<!--</context-param>-->
<!-- Source Code reader serverlet-->
<servlet>
<servlet-name>SourceCode Reader</servlet-name>
<servlet-class>com.icesoft.icefaces.samples.showcase.SourceCodeLoaderServlet</servlet-class>
</servlet>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Persistent Servlet -->
<servlet>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Blocking Servlet -->
<servlet>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SourceCode Reader</servlet-name>
<url-pattern>/sourcecodeStream.html</url-pattern>
</servlet-mapping>
<!-- Persistent Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>10</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
This is My faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<managed-bean>
<managed-bean-name>sessionBean</managed-bean-name>
<managed-bean-class>manageBeans.SessionBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>requestBeanJSF</managed-bean-name>
<managed-bean-class>manageBeans.RequestBeanJSF</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>sessionBeanComponent</managed-bean-name>
<managed-bean-class>manageBeans.SessionBeanComponent</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/login.iface</from-view-id>
<navigation-case>
<from-outcome>principal</from-outcome>
<to-view-id>/pages/principal.iface</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/login.iface</from-view-id>
<navigation-case>
<from-outcome>main</from-outcome>
<to-view-id>/main.iface</to-view-id>
</navigation-case>
</navigation-rule>
<lifecycle/>
<application>
<locale-config/>
</application>
<factory/>
</faces-config>
|
 |
|
|
I synthesized an example:
Have only 3 pages.
1) - index.jspx
<html>
<head>
</head>
<body>
<jsp:forward page="login.iface" />
</body>
2) - login.jspx
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
>
<html>
<f:loadBundle basename="visao.messages" var="msgs" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" pageEncoding="UTF-8"/>
<title><ice:outputText value="#{msgs.labelTitulo}" /></title>
<ice:outputText value="#{styleBean.style}" escape="false"/>
</head>
<body>
<ice:form id="loginForm">
<ice:commandButton value="Login" action="main"/>
</ice:form>
</body>
</html>
3) - main.jspx
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
>
<html>
<f:loadBundle basename="visao.messages" var="msgs" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" pageEncoding="UTF-8"/>
<title><ice:outputText value="#{msgs.labelTitulo}" /></title>
<ice:outputText value="#{styleBean.style}" escape="false"/>
</head>
<body>
<ice:form id="mainForm">
<ice:tree
id="tree1"
value="#{treeMenuEsquerdo.model}"
hideRootNode="false"
readonly="false"
cssImageDirectory="#{styleBean.imageDirectory}"
action="#{treeMenuEsquerdo.treeSelectionAction}"
binding="#{treeMenuEsquerdo.treeComponent}"
/>
<ice:outputText
value="#{treeMenuEsquerdo.selectedNode}"/>
</ice:form>
</body>
</html>
</f:view>
</f:view>
</html>
*** Here is then Bean
package componentes;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import com.icesoft.faces.component.custom.treeview.IceUserObject;
import com.icesoft.faces.component.custom.treeview.Tree;
public class TreeMenuEsquerdo{
private String selectedNode = "";
private DefaultTreeModel model;
private Tree treeComponent;
public TreeMenuEsquerdo(){
IceUserObject rootObject = new IceUserObject("", "Root", true, "root node tooltip");
DefaultMutableTreeNode rootTreeNode = new DefaultMutableTreeNode(rootObject);
model = new DefaultTreeModel(rootTreeNode);
boolean branchExpanded = false;
boolean leafExpanded = false;
for (int i = 0; i < 3; i++) {
branchExpanded = !branchExpanded;
IceUserObject branchObject = new IceUserObject("", "branch-0." + i, branchExpanded, "branch tooltip " + i);
DefaultMutableTreeNode branchNode = new DefaultMutableTreeNode(branchObject);
rootTreeNode.add(branchNode);
for (int j = 0; j < 2; j++) {
IceUserObject leafObject = new IceUserObject("", "leaf-0." + i + "." + j, leafExpanded, "leaf tooltip " + j);
DefaultMutableTreeNode leafNode = new DefaultMutableTreeNode(leafObject);
branchNode.add(leafNode);
leafExpanded = !leafExpanded;
}
}
}
public String treeSelectionAction() {
selectedNode = treeComponent.getSelectedNode().toString();
return treeComponent.getSelectedNode().toString();
}
/*
* GETTERS AND SETTERS
*/
public DefaultTreeModel getModel(){return model;}
public void setModel(DefaultTreeModel model){this.model = model;}
public String getSelectedNode(){return selectedNode;}
public void setSelectedNode(String selectedNode){this.selectedNode = selectedNode;}
public Tree getTreeComponent(){return treeComponent;}
public void setTreeComponent(Tree treeComponent){this.treeComponent = treeComponent;}
}
please when you have an answer it informs me.
Thanks
Daniel
|
 |
|
|
I have 2 pages login.jspx and principal.jspx in
principal.jspx have a "ice:tree", but when i interact
with it, then console apresents the following mistake:
_________________________________________________________
java.lang.ClassCastException: org.apache.html.dom.HTMLTableSectionElementImpl
at com.icesoft.faces.renderkit.dom_html_basic.CommandLinkRenderer.a(Unknown Source)
at com.icesoft.faces.renderkit.dom_html_basic.CommandLinkRenderer.encodeBegin(Unknown Source)
at com.icesoft.faces.renderkit.dom_html_basic.LinkRenderer.encodeBegin(Unknown Source)
at com.icesoft.faces.component.ext.renderkit.LinkRenderer.encodeBegin(Unknown Source)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:307)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(Unknown Source)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(Unknown Source)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(Unknown Source)
at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(Unknown Source)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:319)
at com.icesoft.faces.component.custom.b.c(Unknown Source)
at com.icesoft.faces.component.custom.borderlayout.LayoutRenderer.a(Unknown Source)
at com.icesoft.faces.component.custom.borderlayout.LayoutRenderer.a(Unknown Source)
at com.icesoft.faces.component.custom.borderlayout.LayoutRenderer.a(Unknown Source)
at com.icesoft.faces.component.custom.borderlayout.LayoutRenderer.encodeEnd(Unknown Source)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Unknown Source)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Unknown Source)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Unknown Source)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Unknown Source)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Unknown Source)
at com.icesoft.faces.webapp.parser.Parser.parse(Unknown Source)
at com.icesoft.faces.application.D2DViewHandler.a(Unknown Source)
at com.icesoft.faces.application.D2DViewHandler.renderView(Unknown Source)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.a(Unknown Source)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.a(Unknown Source)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
What can do this ?
Message was edited by: projetus
Message was edited by: projetus
|
 |
|
|
|
Besides WTP some does exist plugin that you recommend to work with eclipse and ICEFaces? Do you indicate or have preference for some IDE?
|
 |
|
|
work fine.
thanks
|
 |
|
|