I use Primefaces 2.2 together with Spring 3.0.5 and it is working pretty good so far but today I ran into the following problem. I wanted to include the p:button component but when I do that I get the following exception:
java.lang.ClassCastException: org.primefaces.optimus.navigationhandler.ViewIdBasedNavigationHandler cannot be cast to javax.faces.application.ConfigurableNavigationHandler
at org.primefaces.component.button.ButtonRenderer.findNavigationCase(ButtonRenderer.java:114)
at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:90)
at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:56)
at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:38)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:879)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)
at ...
The ViewIdBasedNavigationHandler is configured in my faces-config.xml and all other primefaces components have been working so far. As far as I see the ViewIdBasedNavigationHandler class is derived from javax.faces.application.NavigationHandler and not from javax.faces.application.ConfigurableNavigationHandler so the ClassCastException makes sense. But due to the fact that I cannot find other users having the same problem I guess I am missing something.
Any ideas?
Jens
You don't need ViewIdBasedNavigationHandler, I suggest removing it or old optimus project if you have it. JSF 2.0 has view id based implicit navigation built-in.
Related
Here I am, again. With another question concerning cakephp-2.5 and the plugin 'highcharts'.
I've been looking at the demo's an all the different things I could find were the extendings from the controllers. But... that isn't required because it's a plug, am I right?
So, I have included th plugin to my loadings inside the bootstrap file, and when I'm trying to render my HighChart I'm receiving the following error;
Error: Chart: "1" could not be found. Ensure that Chart Name is the same string that is passed to $this->HighCharts->render() in your view.
But the demos are working fine! Any idea what I f*cked up? The names are the same, I even renamed them to 'asd' ( both! ) and it still doesn't work. ^^"
I know this is an incredibly late response but for the benefit of those still experiencing problems with this, the CakePHP 2.* Highcharts plugin has been updated and is compatible up to CakePHP version 2.5.7.
Do note however that in order to maintain product name consistency throughout the repo, all previous references to "HighCharts" have been changed to "Highcharts" and "high_charts" is now simply "highcharts" . So for eg. you now have to call $this->Highcharts->render() where before you would have used $this->HighCharts->render().
The plugin was not yet compatible with CakePHP 2.5. Right now as we speak the developer is working on a new release for 2.5. :)
In CakePHP 2.5, you can avoid the error above and render your chart by calling it.
For example from within index() within your controller, use:
$this->bar();
In this example, bar() is the name of the function containing your chart.
I am new to struts so this could be a basic concept I am facing problem with.
I have a code which access the ID of util:copyTag inside scriptlet:
<%# taglib uri="/WEB-INF/tlds/copytag.tld" prefix="util" %>
...
...
<util:copyTag id="tablebuffer" >
....
</util:copyTag>
<%
Hashtable h=new Hashtable();
String Key = "key1";
h.put(Key,tablebuffer);
%>
When using this code in eclipse, line h.put(Key,tablebuffer); gives a red marker with popup text:
Multiple annotations found at this line:
- tablebuffer cannot be resolved to a
variable
- tablebuffer cannot be resolved to a
variable
Is it possible to use the ID as a variable, or is there some other way to do this. Actually I was given this code and told that code works fine. However when I configured the code in Eclipse I am facing the mentioned issue.
Kindly help me with this issue.
The only possible answer is:
Never use Scriptlets anymore: they're a bad practice.
Never use Struts1 anymore: it is EOL.
Apache Struts 1 End-Of-Life (EOL) Announcement
The Apache Struts Project Team would like to inform you that the Struts 1.x web framework has reached its end of life and is no longer officially supported.
[...]
We plan to start a new project based on Struts 1. Can we still do so?
Basically yes, but we would not recommend doing so. As long as no code line is written it is very easy to conceptually select an alternative web framework such as Struts 2.
Also, Struts 2 is easier and more powerful... really, if you are starting something new (and not maintaining a huge S1 project), switch to it, or to the alternatives (JSF 2, Spring MVC, and so on)
This is a mystery to me, can anyone shed some light on to the possible cause here ?
java.lang.NullPointerException
com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.processVisitorFieldValidatorAnnotation(AnnotationValidationConfigurationBuilder.java:485)
com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.processAnnotations(AnnotationValidationConfigurationBuilder.java:208)
com.opensymphony.xwork2.validator.AnnotationValidationConfigurationBuilder.buildAnnotationClassValidatorConfigs(AnnotationValidationConfigurationBuilder.java:781)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:283)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:371)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:102)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:141)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:133)
com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.validate(AnnotationActionValidatorManager.java:128)
Or maybe yess :)
I found out this answer
Struts 2 Validation w/ annotations getting a null exception
it doens't mention the versions but according to the release dates and the date of the answer, it could be the same problem.
Check out the solution provided (specifies everything in the base Validators.xml) and see if it works
Looks like the DOCTYPE for validators.xml had changed. Updating URL-reference fixed it.
In a Struts2 application, I'm seeing this error even though there are no issues in the functionality. But I'm seeing some delay in executing every action. This delay is valid for simple actions which return a JSP page with a search box in it. I'm using Struts 2.3.1.1 and xwork-core-2.3.1.1.
ERROR finder.ClassFinder: Unable to read class [WEB-INF.classes.com.***.***.ConfigManagement]
Could not load WEB-INF/classes/com/***/***/ConfigManagement.class - [unknown location]
at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:785)
Thanks in advance..
This got resolved with the latest Struts (2.3.12) update along with the relevant library files. I should have missed some of the libraries in the previous version of the Struts.
I've just created my first Preview 5 error and it doesn't seem to place nice with Resharper. All the C# in the Views are coming up with errors, things like <%= Html.Password("currentPassword") %> has the "currentPassword" highlighted with the following error: Argument type "System.String" is not assignable parameter type "string".
IList errors = ViewData["errors"] as IList; has the IList highlighted as "Can not resole symbol 'string'"
Has anyone seen this?
Did you try latest nightly build of ReSharper 4.1? In some cases the bug in 4.1 manifests itself with numerous ambiguity errors, and it has been fixed within the follow up build.
If anyone finds this blog, the fix suggested above worked for me - I downloaded the latest 4.1 build, and the ambiguous reference problem is gone.
Sometimes this can occur when you don't fully qualify your Inherits attribute of your #Page directive. Even if it is in your web.config be sure and fully qualify your Inherits directive for R#. (At least as of build 4.1.943).
This bug has been reported here:
http://www.jetbrains.net/jira/browse/RSRP-96241