error in - abstractwidget.FieldHelper.getCurrentValue()

User 247c00dc1d

23-04-2013 10:07:44

Hello!


I try to use the script from here, but it doesn't work, got an error... 


 


org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static com.im.ijc.widgets.abstractwidget.FieldHelper.getCurrentValue() is applicable for argument types: (com.im.df.impl.db.ResultSetImpl$VS, com.im.df.impl.db.field.DBFieldChemicalTerms, java.lang.Boolean) values: [VS{vertex=RootV{entity=com.im.df.impl.db.entity.DBEntityJChemBaseImpl@7d84326[name=Empty ,description=null,type=IJC_Default_Implementation_v1_DBEntityJChemBase,id=1899A4C7A93E17B6B229AC1287DC636B,xAttrs[]]}}, ...]

at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:97)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)

it seems that error is in this string:


iupac = com.im.ijc.widgets.abstractwidget.FieldHelper.getCurrentValue(parentVS, field, true)


 


Please, help me fix this error, and run transferring the data from choosed field into the browser, like in this example IUPACname field transferred into the google.


Thanks!

ChemAxon 2bdd02d1e5

24-04-2013 13:42:33

Hi!


The script was not correct. Previously used method was removed as it was not part of API. Please use:


iupac = DirectDataFetcher.getDataForFirstSelectedRow(parentVS, [field]).values()[0]

instead of



iupac = com.im.ijc.widgets.abstractwidget.FieldHelper.getCurrentValue(parentVS, field, true)

Also add import for DirectDataFetcher class:


import com.im.ijc.widgets.deprecated.DirectDataFetcher

Note that DirectDataFetcher class is deprecated and will be probably removed in the future. Yet it is the best what is available now. I'll update the example for now.



Thanks for your post!


Filip

ChemAxon 99d87cf303

25-04-2013 08:00:56

What Filip wrote is truth - we simply do not have higher-level publically accessible API for doing this. See what Dong found in other thread (https://www.chemaxon.com/forum/viewpost48642.html) which is official supported way for now. As written there, for 6.0 we will come with a new method:


  VertexStates.getDataForFirstSelectedRow(vertexState, fields)


Cheers,
- m.

User 247c00dc1d

20-06-2013 12:39:28

Hi!


Dear fzimandl and mkrauskopf great thanks for the answer!


 


igorlab,