NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

CRUD tutorial problem: Update Section, Step 5

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
williamjwayne



Joined: 20 Mar 2011
Posts: 8

PostPosted: Fri Dec 09, 2011 7:00 pm    Post subject: CRUD tutorial problem: Update Section, Step 5 Reply with 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
Geertjan Wielenga
Posted via mailing list.





PostPosted: Fri Dec 09, 2011 9:20 pm    Post subject: Re: CRUD tutorial problem: Update Section, Step 5 Reply with quote

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

PostPosted: Sat Dec 10, 2011 3:52 am    Post subject: CRUD tutorial problem: Update Section, Step 5 Reply with quote

Gj:

Thanks for the advice. Per your suggestion I changed to the correct include and it works fine.

Regards,
Bill Wayne
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo