Anyone have any experience with this bean?
When I drag is into my solution is seems to work but when coding against it the developper does not show all methods.
I called a simpel method and the debugger shows “does not have that function”
Servoy uses normal Java Bean introspection to handle beans, are you sure you pass the rigth arguments to the method?
Servoy uses normal Java Bean introspection to handle beans, are you sure you pass the rigth arguments to the method?
Yes, from the developpers I hear that I am trying to call a method of the bean instead of a function??
A bean method is a JavaScript function, but you have to make sure you pass the right arguments.
Do you see the method ‘setDiagram…’ in the bean?
And direct under the root because that is where you try to set it…
In general, this is really hard to comment on. It looks as though you are (one of) the first to try so you are sort of on your own here.
It could be we list private methods (for an unknown reason) which are not public/callable, where can we get the jgant you are using?
I mailed the whole thing to you already last week
Do you see the method ‘setDiagram…’ in the bean?
And direct under the root because that is where you try to set it…
that is the thing, I don’t see the method there either!
I personally have not seen a mail, support@servoy.com neither, we also do not have a support case.
(support case has our preference, via: http://crm.servoy.com/servoy-webclient/ … oy_support )
that is the thing, I don’t see the method there either!
So that is your issue, it is probably not available.
Like Jan said, it could be private or, other option, it is available in a parent class. You could check for that.
Hint: you probably already did this but you should check the API.
Normally such a bean, eg quite complex, is a subclass from a subclass from a subclass etc…
When you are working in Java, methods and fields from a parent object are available through their subclassed object as well. The way Servoy presents you with this structure though is somewhat different.
rvdb:
that is the thing, I don’t see the method there either!
how did you get the code in the Servoy method then? by typing? or did you move code?
I just made a case where I uploaded a sample solution and the whole jgantt zip 13 mb
public void setDiagramControlBarVisible(boolean bValue)
is a method of JGantt (of the class JGantt itself),
A JavaBean’s published fields/properties and methods are listed by a BeanInfo class.
In the case of JGantt bean, “diagramControlBarVisible” is defined as a property in the bean’s information class. This published property is accessed through it’s getter and setter metods (real Java methods).
Because the method you wanted to call (setDiagramControlBarVisible(true)) is not published as available by the JavaBean, but it is used to acces the published property, it is not visible as a method of the bean.
Anyway, the code in your method can be easily rewritten like this (and it works) - to use the property (that underneath uses the real Java method you wanted to call):
var jGantt = elements.bean_298
// Switching on the ControlPanel in JGantt
jGantt**.diagramControlBarVisible = true**;
var x =1
I talked to the people at netronic. They are very interested in why things don’t work. Is it OK if they call you and if so what is you phone number.
Didn’t my previous post solve the issue?
Cannot you use the property instead of trying to call that method?
I already had an exchange of emails with someone from netronic.
The solution worked but only for this one property. To realy work with the bean i need to use a lot more (all functions/methods and properties)
One example is to set the property jGantt.LinkSetName = “links”.
In runtime i see there is a property LinkSetName but Servoy does not seem to understand it is a string.
An onther example is the fucntion entitySet.addEntityAttribute(“no_of_room”, String.Class , “room number”);
Where servoy (or javascript) does not understand that a class is expected as the second parameter.
Where servoy (or javascript) does not understand that a class is expected as the second parameter
That makes sense but you can java typecase within Servoy so that should be no issue. Or do I misinterpret something here?