AjaxLoading, AjaxState image loading… , processing
Para entender como capturar el estado de las peticiones en Ajax y agregar una imagen tipo: cargando….
http://www.javabeat.net/tips/89-use-a4jstatus-to-display-status-of-the-reque.html
Eventos Richfaces
Componentes Richfaces, marcados con el atributo ‘event’:
<a4j:support event=”onviewactivated” reRender=”ciudadNacimientoDecorate” id=”c169″ ajaxSingle=”true”/>
<rich:contextMenu event=”oncontextmenu” attachTo=”pic” submitMode=”none”>
<a4j:support event=”onlistchanged” reRender=”toolBar” />
<rich:componentControl event=”onRowClick” for=”menu” operation=”show”
MySQL, configuracion caracteres especiales
Esta configuracion es necesaria en modo local para evitar que los acentos y otros caracteres no se desplieguen de forma equivocada.
Configurar char set de MySQL
Configurar char set de MySQL
/etc/mysql/my.cnf
[client] default-character-set = utf8 [mysqld] skip-character-set-client-handshake default-character-set = utf8 character-set-server = utf8 collation-server = utf8_general_ci init-connect = SET NAMES utf8 [mysqldump] default-character-set = utf8 [mysql] default-character-set = utf8 Verificar: mysql> shwo variables like 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ #Then set charset mysql>set character_set_database=utf8 mysql> show variables like 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+
Configuracion Netbeans para manejo de menoria y evitar PermGen
Para evitar permgen y que el IDE ralentezca, cambiar el archivo:
HOME/netbeans6.7/etc/netbeans.conf la linea siguiente:
netbeans_default_options=” -J-Dcom.sun.aas.installRoot=\”/home/nicolai/Apps/SUNWappserver\” -J-client -J-Xss2m -J-Xms64m -J-Xmx786m -J-XX:PermSize=64m -J-XX:MaxPermSize=300m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled –fontsize 9″
HTMLTree some operations
Some ops for the HTMLTree
public HtmlTree getLineaEstructuraRepresentante () {
if (lineaEstructuraRepresentante == null) {
TreeNodeImpl a1 = new TreeNodeImpl();
a1.setData(new LineaEstructura());
TreeNodeImpl aa = new TreeNodeImpl();
TreeNodeImpl raiz = new TreeNodeImpl();
raiz.addChild(“1″, a1);
aa.setData(new LineaEstructura());
TreeNodeImpl bb = new TreeNodeImpl();
lineaEstructuraRepresentante = new HtmlTree();
lineaEstructuraRepresentante.setSwitchType(“client”);
lineaEstructuraRepresentante.setValue(raiz);
lineaEstructuraRepresentante.setVar(“item”);
HtmlTreeNode htmlTreeNode = new HtmlTreeNode();
HtmlOutputText htmlOutputText = new HtmlOutputText();
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.codigo}”, String.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.nombre}”, String.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.totalGrupo}”, String.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.textoTotal}”, String.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.deCuentaContable}”, CuentaContable.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
htmlOutputText.setValueExpression(“value”,
getFacesContext().getApplication().getExpressionFactory().createValueExpression
(
getFacesContext().getELContext(), “#{item.hastaCuentaContable}”, CuentaContable.class));
htmlTreeNode.getChildren().add(htmlOutputText);
lineaEstructuraRepresentante.getChildren().add(htmlTreeNode);
}
return lineaEstructuraRepresentante;
}
NPE (DatabasePersistencePolicy.java:165)
JBOSS AS 4.2.3.GA
java.lang.NullPointerException at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolicy.java:165)
I’ve solved CLEANING UP the folowing dirs:
jboss/server/default/tmp
jboss/server/default/data
jboss/server/default/work
but there are other issues that can happen, if that’s the case follow:
https://jira.jboss.org/jira/browse/JBPORTAL-1855
http://www.guj.com.br/posts/list/91367.java
http://www.techienuggets.com/Detail?tx=12989
http://markmail.org/message/xqioiwxqrjbkr5hv
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4100705#4100705
Good Luck!
JBoss AS with Chainsaw
Para utilizar chainsaw con el Servidor de Aplicaciones JBoss AS, agregue las siguientes lineas al archivo: jboss/server/{server}/conf/jboss-log4j.xml
<appender name=”SOCKET”>
<param name=”remoteHost” value=”localhost”/>
<param name=”port” value=”4445″/>
<param name=”locationInfo” value=”true”/>
</appender>
Y al final del archivo entre los tags <root>
<appender-ref ref=”SOCKET”/>
Con esto ejecuta chainsaw y agrega un reciver (old style) de socket al puerto 4445
PermGen, OutOfMemoryException cuando se implanta (deploy/redeploy) en el Servidor de Aplicacione JBoss?
Articulo completo:
http://www.jboss.org/community/wiki/OutOfMemoryExceptionWhenRedeploying
O puedes agregar el siguiente fix a tu archivo run.conf:
$JBOSS_HOME/bin/run.conf
agregar a la linea JAVA_OPTS algo asi, recuerda si existe algo ya escrito dentro de la linea simplemente agregar estas lineas dentro de la comillas:
JAVA_OPTS="-server -Xms128m -Xmx128m"
Por ultimo tambien puedes ver: http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
Seam Framework, FacesMessages enqueued, mensajes no se muestran!
FacesMessages no se muestran!
[lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
Fix: Agrega esta linea a tu codigo dentro de tu XHTML.
<h:messages globalOnly=”true”/>





