Articles in the category «misc» :
Duplicate Id Error Message with JSF 1.1 and 1.2
Today I spent quite some time to figure out why the following piece of code causes a Duplicate Id Error Message.
...
<rich:columns value="#{myBean.listWithFields}" var="field" index="myIndex">
<h:inputText id="#{field.identifier}" value="#{field.value}" rendered="#{field.inputField}"/>
<h:outputText id="#{field.identifier}" value="#{field.value}" rendered …Where To Place Struts 2 struts.xml
Contrary to most of other configuration files, placing the struts.xml configuration file in the WEB-INF folder does not work.
But you can place it, eg. in the root source folder of your application.
I spent about two hours after cleaning/building my test project in Eclipse without realizing, that …
Use Of @Factory with Seam
Using "normal" JSF one has often the problem of returning properties somewhat more complex than simple Strings or native data types. In these cases, the generation may for example need a connection to the database which increases the costs additionally. Usually, you would place the construction in the getter method …
Property Files containing HTML encoded messages with JSF 1.1 and 1.2
Just use the escape attribute to avoid HTML code to be encoded again.\
For example with the following JSF fragment
...
<h:outputText value="#{messages['TITEL']}" escape="false"/>
...
this part of the message.properties is displayed correct
TITEL=About Ü and Ö
Wrong Accessibility Of Inner Class Members in Bean Class Causes PropertyNotFoundException with JSF 1.1 and 1.2
If you get the Exception
...
javax.faces.el.PropertyNotFoundException
...
the specified property cannot be found in the bean.
First thing is to check the accessors and their accessibility. In my case I had all needed accessors and their accessibility, but they were specified in an Inner Class within the bean …
Exception java.lang.ClassCastException: com.sun.faces.config.WebConfiguration
Exception java.lang.ClassCastException: com.sun.faces.config.WebConfiguration cannot be cast to com.sun.faces.config.WebConfiguration while deploying EAR in JBOSS AS.
If you get the exception mentioned above while you try to deploy your EAR file on the JBoss Application Server, it might help to remove the …
How To Use HTML Comments in JSF Files with JSF 1.1 and 1.2
Using in comments in JSF web pages seems to be a kind of a problem. At least using Apache MyFaces (http://myfaces.apache.org) / Apache MyFaces Tomahawk (http://myfaces.apache.org/tomahawk/) or JBoss Seam (http://www.seamframework.org), because these two implementation just don’t interpret comments as comments …
Mysterious NullpointerException While Unit Testing with TestNG and Seam
If you get the above Exception while using testng to test your JBOSS Seam application within the Eclipse IDE, try to remove the line //<!DOCTYPE suite SYSTEM “http://beust.com/testng/testng-1.0.dtd”>// from your XML test configuration file, eg. your XML file looks like
<!DOCTYPE suite SYSTEM "http …Unit Testing with Embedded TestNG and Seam
You may come across the a bunch of exceptions complaining about a FAILED CONFIGURATION (see below), try to move the bootstrap folder to a path containing no whitespaces. See this entry on bug list.
[testng] FAILED CONFIGURATION: @BeforeSuite startSeam
[testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments …