NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
williamjwayne
Joined: 20 Mar 2011 Posts: 8
|
Posted: Fri Dec 09, 2011 7:00 pm Post subject: CRUD tutorial problem: Update Section, Step 5 |
|
|
I am having a compiler error in the CustomerViewer module. Everything up to this point works reasonably well. I added the code starting with the @Override as stated in the tutorial through the private class CustomerBeanNode ...
Problem: I'm getting 2 messages as indicated by the symbols in the left numbered lines. The first error exclamation point in a red circle says: "Method does not override or implement a method from a supertype..."
The second error (light bulb with red dot to the right) says: "incompatible types...required: javax.xml.soap.Node...found: org.shop.viewer.CustomerViewerTopComponent.CustomerBeanNode."
Is anyone familiar with what might be wrong? the javax.xml.soap.Node is one of the includes. Any help would be much appreciated.
Thanx.
Bill Wayne
Relevant Code is Below:
@Override
protected Node createNodeForKey(Customer c) {
try {
return new CustomerBeanNode(c);
} catch (IntrospectionException ex) {
Exceptions.printStackTrace(ex);
return null;
}
}
private class CustomerBeanNode extends BeanNode {
public CustomerBeanNode(Customer bean)
throws IntrospectionException {
super(bean, Children.LEAF, Lookups.singleton(bean));
}
} |
|
| Back to top |
|
 |
Geertjan Wielenga Posted via mailing list.
|
Posted: Fri Dec 09, 2011 9:20 pm Post subject: Re: CRUD tutorial problem: Update Section, Step 5 |
|
|
You have the wrong import statement: javax.xml.soap.Node
That should be org.openide.nodes.Node
http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html
Gj
On 12/09/2011 08:01 PM, williamjwayne wrote:
| Quote: | I am having a compiler error in the CustomerViewer module. Everything up to this point works reasonably well. I added the code starting with the @Override as stated in the tutorial through the private class CustomerBeanNode ...
Problem: I'm getting 2 messages as indicated by the symbols in the left numbered lines. The first error exclamation point in a red circle says: "Method does not override or implement a method from a supertype..."
The second error (light bulb with red dot to the right) says: "incompatible types...required: javax.xml.soap.Node...found: org.shop.viewer.CustomerViewerTopComponent.CustomerBeanNode."
Is anyone familiar with what might be wrong? the javax.xml.soap.Node is one of the includes. Any help would be much appreciated.
Thanx.
Bill Wayne
Relevant Code is Below:
@Override
protected Node createNodeForKey(Customer c) {
try {
return new CustomerBeanNode(c);
} catch (IntrospectionException ex) {
Exceptions.printStackTrace(ex);
return null;
}
}
private class CustomerBeanNode extends BeanNode {
public CustomerBeanNode(Customer bean)
throws IntrospectionException {
super(bean, Children.LEAF, Lookups.singleton(bean));
}
}
|
|
|
| Back to top |
|
 |
williamjwayne
Joined: 20 Mar 2011 Posts: 8
|
Posted: Sat Dec 10, 2011 3:52 am Post subject: CRUD tutorial problem: Update Section, Step 5 |
|
|
Gj:
Thanks for the advice. Per your suggestion I changed to the correct include and it works fine.
Regards,
Bill Wayne |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|