Hallo,
ich habe die Beanshell auf der Entity ausgeführt und damit ist diese nicht null:
bsh % show();
Content2 nicht null:
bsh % context.getStoreElement();
<<CONTENT2 editor="1" id="862325" name="products__input_" perm="859412:2047,859417:159,859415:23,859413:3,859416:279" pp="Template" revision="227305" tabletemplate="51">
<LANG displayname="Produkte" language="DE"/>
<LANG displayname="Products" language="EN"/>
<CONTENTPARAMETER source="Products" templateid="51"/>
</CONTENT2>
>
Entity nicht null:
bsh % context.getSelectedRow();
<de.espirit.or.impl.EntityImpl@9fa824d0{Products,PERSISTENT,FS_ID=40005,FS_VALID_FROM=1376917210801,FS_VALID_TO=9223372036854775807,FS_RELEASE_TO=0}>
Dataset nicht null:
bsh % context.getStoreElement().getDataset(context.getSelectedRow());
<de.espirit.firstspirit.store.access.contentstore.DatasetImpl@38c07b0d>
NullPointer trotzdem:
bsh % context.getStoreElement().getDataset(context.getSelectedRow()).toXml();
// Error: // Uncaught Exception: Method Invocation toXml : at Line: 1 : in file: <unknown file> : .toXml ( )
Target exception: java.lang.NullPointerException
bsh % java.lang.NullPointerException
at de.espirit.firstspirit.store.access.contentstore.DatasetImpl._toXml(DatasetImpl.java:1049)
at de.espirit.firstspirit.store.access.contentstore.DatasetImpl.toXml(DatasetImpl.java:1029)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown Source)
at bsh.BSHPrimarySuffix.doName(Unknown Source)
at bsh.BSHPrimarySuffix.doSuffix(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Viele Grüße
Dennis