Vaadin Grid: Converter$ConversionException when trying to edit - grid

I'm trying to make my grid editable grid.setEditorEnabled(true);
but when I run the application and double-click on any cell it throws the following exception
Caused by: com.vaadin.data.util.converter.Converter$ConversionException: Unable to convert value of type java.lang.Integer to presentation type class java.lang.String. No converter is set and the types are not compatible.
at com.vaadin.data.util.converter.ConverterUtil.convertFromModel(ConverterUtil.java:116)
at com.vaadin.ui.AbstractField.convertFromModel(AbstractField.java:714)
at com.vaadin.ui.AbstractField.convertFromModel(AbstractField.java:699)
at com.vaadin.ui.AbstractField.setPropertyDataSource(AbstractField.java:635)
any idea to what could be the cause? I checked this thread here but I wasn't able to fix the issue
Ivy.xml
<!ENTITY vaadin.version "latest.release">
JPAContainer 3.2.0
(I used same structure as the container in the demo 'jpaaddressbook')
thanks in advance for your help

Related

How to remove the 'WARNING: CSS Error parsing':

There is a warning everytime I run the program, I don't know where the problem is because at [1, 19] of all of my css files I have a comment. I tried to fix this by removing the comment and it made no difference. Please help.
WARNING: CSS Error parsing '*{-fx-font-family: ;}: Unexpected token ';' at [1,19]
[]1
In javaFx you can use CSS with two ways : you can customise your fxml file by using scene builder or by according a css file.I had the same problem ,when the JavaFX CSS parser encounters a syntax error, a warning message is emitted which conveys as much information as is available to help resolve the error. For example
WARNING: com.sun.javafx.css.parser.CSSParser declaration Expected
'' while parsing '-fx-background-color' at ?[1,49]
The cryptic '?[1,49]' pertains to the location of the error. The
format of the location string is
[line, position]
If the error is found while parsing a file, the file URL will be given. If the error is from an inline style (as in the example above), the URL is given as a question mark. The line and position give an offset into the file or string where the token begins. Please note that the line and position may not be accurate in releases prior to JavaFX 2.2.
Applications needing to detect errors from the parser can add a listener to the errors property of com.sun.javafx.css.StyleManager. This is not public API and is subject to change.
I think you add a value by using scene builder and you are adding ; to your value and this is not acceptable in scene builder you need to remove ;.
To resolve your problem ,go to your fxml file in your IDE ,i think you are using Netbeans and click right button of mouse --> edit , you can find your warning.

Unable to reference System.Web.UI.DataVisualization.Charting;

I need to create a Pie Chart. I am getting the error as The type name 'Charting' does not exist in the type 'System.Web.UI.DataVisualization'.
I am not able to find System.Web.UI.DataVisualization.Charting in the references.
Can someone help me please.
Click on Add References in your project and in the .NET Components tab add the System.Web.DataVisualization dll. This should solve your problem.

Microsoft InfoPath Error? Cannot open

Just wondering if anyone can help me with an InfoPath problem I've got. I have a form that I am unable to open, originally displaying the message below.
The form definition (.xsf) file contains elements, attributes, or structures that are not valid.
Error details:
The keyref 'ruleSet_41' does not resolve to a key for the Identity Constraint '{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}ruleset_name_key'.
 
Line 1539, Position 3
--^
I have managed to clear this by removing ruleSet_41 from the manifest.xsf file but the message I am now receiving is shown below.
The following file is referenced in the .xsf file but is not part of the form: myschema.xsd
 
This is stopping me opening the form.
Does anyone have any ideas, anything would be much appreciated.
Many thanks, Jamie.
Remove the button that contains the RuleSetAction.
There would also look, open the file "myschema.xsd" will have been a reference to "ruleSet_41". Also delete it from the .xsd

Compiler Error Message: CS0103: The name 'Database' does not exist in the current context [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Razor-based view doesn't see referenced assemblies
I am a Newbie in ASP.net
I am trying to connect to a database and I keep getting this error
**Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Database' does not exist in
the current context
Source Error:
Line 1: #{
Line 2: var db = Database.Open("demo"); '
Line 3:
Line 4:
Source File: c:\Users\Ayoya\Documents\My Web Sites\demo\Page.cshtml
Line: 2
**
Can anyone tell me whats wrong?
Thank you
The compiler's already telling you what's wrong - it doesn't know what you mean by Database. Is that mean to be a property of the page, or is it the name of a type with a static Open method? It's not clear from the code itself, and obviously the compiler can't find the name either.
Work out what name you mean, then work out why the compiler can't see it, then fix that. If you need more help on any of these steps, you'll need to provide more information.
(As an aside, I completely agree with dbaseman: putting database calls in your view is a bad idea.)
If you're opening a database in your Razor view, that is completely the wrong approach. Your logic should go in the Controller, not the View. Consider creating a "view model" class that contains all the data needed for your view, and populate that class from the Controller.
Probably the reason this piece of code isn't working is that you will need to specify the full namespace of Database. I'm not sure what that class is, though; if it's in a separate DLL, you'll have more problems. Again, though, you should circumvent this problem by putting your database logic in the controller.

Flex: errors in generated *WatcherSetupUtil?

If the planets are not correctly aligned when I run a Flex 3.5 build, the .swf produced immidiatly throws a null-object error from the _MyAppWatercherSetupUtil:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at _MyAppWatcherSetupUtil/setup()
at MyApp/initialize()[/Users/wolever/my_app/MyApp.mxml:0]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2131]
at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3400]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3223]
at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3069]
Is there anything I can do about this?
I've tried debugging it, but it seems like the Flex framework goes out of its way to make sure it's impossible to debug into the generated code…
I just upgraded an old Flex 3 app to Flex 4.6 and had the same problem. What worked for me was a project clean. So far so good.
--Keith
I was struggeling today with a WatcherSetupUil/setup() TypeError: Error #1009: Cannot access a property or method of a null object reference.
For me it looks there is a strong connection to databinding. For me it looks this happens if you do not take care of the rules that Flex asks for. I found a resource online I upload here: "Flex data binding pitfalls: 10 common misuses and mistakes." After changing - in my case especially error 6 - Using the wrong bindable event name - took the WatcherSetupUtil away.
Perhaps this is helpful for you too :-).
http://www.adobe.com/devnet/flex/articles/databinding_pitfalls.html
It would be interesting to have a glimpse at generated code for "setup" method for your MyAppWatcherSetupUtil class
Just an idea - did you try to set the compiler flag -keep? Like this you may have a look how your class looks like.

Resources