[JBoss JIRA] (RF-12022) showcase - UAgentInfo is not serialized
by Juraj Huska (JIRA)
Juraj Huska created RF-12022:
--------------------------------
Summary: showcase - UAgentInfo is not serialized
Key: RF-12022
URL: https://issues.jboss.org/browse/RF-12022
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: showcase
Affects Versions: 4.2.0.Final
Environment: -showcase,
-Tomcat 6,7,
-arquillian tests
Reporter: Juraj Huska
Priority: Trivial
When running functional tests for showcase with Arquillian on Tomcat 6 or 7, I am encountering following exception during showcase undeploying process:
{code}
WARNING: Cannot serialize session attribute userAgent for session E4F43AA62674D093726971AC8361F9F8
java.io.NotSerializableException: org.richfaces.demo.ui.UAgentInfo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:678)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882)
at org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1390)
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:382)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
{code}
UAgentInfo is used by UserAgentProcessor(session scoped bean) and therefore IMHO should be serialized. When I made it serialize-able, the exception disappeared. I did not notice any broken functionality by this exception, and same for the fixed one showcase, only cleaner test output.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12200) Support wildcard or regex on CDK cdk:passThrough and cdk:passThroughWithException
by Paul Dijou (JIRA)
Paul Dijou created RF-12200:
-------------------------------
Summary: Support wildcard or regex on CDK cdk:passThrough and cdk:passThroughWithException
Key: RF-12200
URL: https://issues.jboss.org/browse/RF-12200
Project: RichFaces
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.1.Final
Environment: All
Reporter: Paul Dijou
When using cdk:passThrough or cdk:passThroughWithException, you can specify which attributes are concerned. It would be great if there was the possibility to use wildcards instead, like :
{code}
cdk:passThrough="style on*"
{code}
This one will pass the {{style}} attribute but also all attributes starting with "on" (ultimate usefull for all onclick, onmouseover, ...).
We could also think about supportting any king of regex instead. But it might be a little more complex to use.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12187) CDK: improve messages for errors in parsing XML configs
by Lukáš Fryč (JIRA)
Lukáš Fryč created RF-12187:
-------------------------------
Summary: CDK: improve messages for errors in parsing XML configs
Key: RF-12187
URL: https://issues.jboss.org/browse/RF-12187
Project: RichFaces
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.1.Final
Reporter: Marek Novotny
Assignee: Lukáš Fryč
Fix For: 4.3.0.Milestone1
CDK fails with following output:
{code}
[INFO] --- maven-cdk-plugin:4.2.0.Final:generate (default) @ jboss-seam-ui ---
[ERROR] XML error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
{code}
which hides the real issue.
Add {{exception.getMessage()}} to those messages to reveal real issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12230) [CDK] c:foreach in a cast component will result on a List<Object> instead of List<UIComponent>
by Paul Dijou (JIRA)
Paul Dijou created RF-12230:
-------------------------------
Summary: [CDK] c:foreach in a cast component will result on a List<Object> instead of List<UIComponent>
Key: RF-12230
URL: https://issues.jboss.org/browse/RF-12230
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.1.Final
Environment: All
Reporter: Paul Dijou
Look at the following code :
{code:xml}
<cdk:object type="javax.faces.component.UIComponent" name="prependFacet"
value="#{component.getFacet('prepend')}"/>
<c:choose>
<c:when test="#{prependFacet.family eq 'javax.faces.Panel'}">
<c:forEach var="child" items="#{component.getFacet('prepend').getChildren()}">
{code}
I'm using a {{<cdk:object>}} to assign my facet to a var. Then I make some test and finally, I want to iterate over the children of my facet. This will result on this Java code on the renderer :
{code:java}
UIComponent prependFacet = component.getFacet("prepend");
if (isEqual(prependFacet.getFamily(),"javax.faces.Panel")) {
for (UIComponent child: component.getFacet("prepend").getChildren()) {
{code}
That's perfect! But now, since I have a var for my facet, why not using it in the {{<c:forEach>}}? Seems natural. So I change my code to :
{code:xml}
<cdk:object type="javax.faces.component.UIComponent" name="prependFacet"
value="#{component.getFacet('prepend')}"/>
<c:choose>
<c:when test="#{prependFacet.family eq 'javax.faces.Panel'}">
<c:forEach var="child" items="#{prependFacet.getChildren()}">
{code}
Only the last line is different from the previous one. What does the generated Java code looks like? That:
{code:java}
UIComponent prependFacet = component.getFacet("prepend");
if (isEqual(prependFacet.getFamily(),"javax.faces.Panel")) {
for (Object child: prependFacet.getChildren()) {
{code}
Whaaaaat?! Why is it a "Object" in the "for" loop and not a "UIComponent" anymore? Of course, the component is now broken since I'm calling {{UIComponent}} methods inside the loop.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12231) [CDK] EL empty method doesn't work for Collection
by Paul Dijou (JIRA)
Paul Dijou created RF-12231:
-------------------------------
Summary: [CDK] EL empty method doesn't work for Collection
Key: RF-12231
URL: https://issues.jboss.org/browse/RF-12231
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.1.Final
Environment: All
Reporter: Paul Dijou
Let's say I want to test if a component doesn't have any children. I write thise code :
{code:xml}
<c:if test="#{empty(component.getChildren())}">No children!</c:if>
{code}
Seems logic, right? If the List is empty, then it means there is no children. The generated Java code is the following :
{code:java}
if (isEmpty(component.getChildren())) {
responseWriter.writeText("No children!",null);
}
{code}
And the "isEmpty" method :
{code:java}
private static boolean isEmpty(Object object)
{
return object == null || object.toString().length() == 0;
}
{code}
This method will *always* returns {{false}}, even if the list is empty. Why? Because the list will not be null and an empty list toString() renders "{{[]}}", so "{{object.toString().length()}}" will be eval to "2", which is different from "0". So based on these test, the component will *always* have children.
The "isEmpty" method should adapt its test depending on the type of object. It's an instance of Collection, calling "isEmpty()" is probably better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12232) [CDK] Support "varStatus" attribute on c:forEach
by Paul Dijou (JIRA)
Paul Dijou created RF-12232:
-------------------------------
Summary: [CDK] Support "varStatus" attribute on c:forEach
Key: RF-12232
URL: https://issues.jboss.org/browse/RF-12232
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.1.Final
Environment: All
Reporter: Paul Dijou
Right now, when using {{<c:forEach>}} tag on a CDK template.xml, you will have a "for" loop in Java code. There is no way to do simple logic in the template like knowing your current index inside the loop, etc...
An idea would be to support the {{varStatus}} attribute from the original {{<c:forEach>}}. This attribute maps to the name of a bean which contains util methods and evolve at each iteration of the loop.
Here is a sample:
{code:xml}
<c:forEach var="child" items="#{component.getChildren()}" varStatus="status">
// Inside code
</c:forEach>
{code}
Would generate something like:
{code:java}
LoopTagStatus status = new LoopTagStatus();
for(UIComponent child : component.getChildren()) {
// Inside code
status.next();
}
{code}
The javadoc of the original {{LoopTagStatus}} from JSTL is [here|http://docs.oracle.com/javaee/5/jstl/1.1/docs/api/javax/servlet/jsp/...]. Our LoopTagStatus would have the method and one more : the {{next()}} method. This one would increment the current index of the LoopTagStatus in order to be updated for the next iteration.
We could also add any other usefull methods to this bean.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (RF-12249) CDK: generates both get* and is* methods for boolean/Boolean expressions
by Lukáš Fryč (JIRA)
Lukáš Fryč created RF-12249:
-------------------------------
Summary: CDK: generates both get* and is* methods for boolean/Boolean expressions
Key: RF-12249
URL: https://issues.jboss.org/browse/RF-12249
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: cdk
Affects Versions: 4.2.0.Final
Reporter: Paul Dijou
Generate both "get..." and "is..." method for Boolean and boolean attributes
If you have an attribute like :
{code:java}
@Attribute
abstract public boolean isClosable();
{code}
This will generate a "isClosable()" method of course. But, then, trying to access it in a template like :
{code:xml}
<c:if test="#{alert.closable}">
{code}
Will crash since JSF try to call the "getClosable()" method. The workaround is to write :
{code:xml}
<c:if test="#{alert.isClosable()}">
{code}
But it would be nicer if the "geClosable()" method was generated in the same time of the "isClosable()" method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months