krause
I'm new here

Custom GUI component does not work on 4.2 R4

Jump to solution

Hey community,

I've implemented my own checkbox component designed on the pattern of the FS-class "CheckboxGuiEditor". This checkbox ist only visible if the user has same special permissions.

Everything works fine on FS Version 4.2 R2. After patching to 4.2 R4 the component doesn't work anymore. Smiley Sad

[Edit]:

FirstSpirit Client 4.2.446.45868

Server: srv-spirit-entw.xxx.local:8000 (HTTP)

Benutzer: Admin

Version Server: 4.2.446.45868

Lizensiert für: xxx

Speicher: 35,14 von 123,75 MByte belegt

Java Version: 1.6.0_25 32bit Sun Microsystems Inc.

Betriebssystem: Windows 7 6.1 x86

I get the following error:

Admin (Admin), session: 1049778028763652868, project: 2810, ip: 10.0.13.93

(de.espirit.firstspirit.ui.gadgets.swing.AggregatingSwingGadgetPanel): Editor component could not be created!

FSVersion=4.2.446.45868#2522;JDK=1.6.0_25 32bit Sun Microsystems Inc.;OS=Windows 7 6.1 x86;Date=15.07.2011 12:24:35

java.lang.IllegalStateException: No public class named 'com.xxx.fs.editor.IncludeServiceOptions_1_8' found!

    at de.espirit.firstspirit.access.store.templatestore.gom.HotspotValueProvider.getValueProvider(HotspotValueProvider.java:70)

    at de.espirit.firstspirit.access.store.templatestore.gom.HotspotValueProvider.getValueProvider(HotspotValueProvider.java:62)

    at de.espirit.firstspirit.access.store.templatestore.gom.HotspotValueProvider.getValues(HotspotValueProvider.java:55)

    at de.espirit.firstspirit.access.store.templatestore.gom.GomIncludeOptions$ListOptionAdapter.getValues(GomIncludeOptions.java:294)

    at de.espirit.firstspirit.access.store.templatestore.gom.GomIncludeOptions$ListOptionAdapter.size(GomIncludeOptions.java:309)

    at java.util.AbstractList$Itr.hasNext(Unknown Source)

    at de.espirit.firstspirit.client.access.editor.ListOptionModel.<init>(ListOptionModel.java:43)

    at de.espirit.firstspirit.client.access.editor.ListOptionModel.<init>(ListOptionModel.java:35)

    at de.espirit.firstspirit.access.store.templatestore.gom.GomIncludeOptions$OptionFactoryImpl.getOptionModel(GomIncludeOptions.java:259)

    at de.espirit.firstspirit.client.access.editor.AbstractOptionsEditorValue.getOptionModel(AbstractOptionsEditorValue.java:221)

    at com.xxx.fs.editor.AccessRightsCheckboxGuiEditor.getEditorComponent(AccessRightsCheckboxGuiEditor.java:129)

    at de.espirit.firstspirit.ui.gadgets.swing.legacy.GuiEditorWrappingSwingGadget.getEditorComponent(GuiEditorWrappingSwingGadget.java:424)

    at de.espirit.firstspirit.ui.gadgets.swing.legacy.GuiEditorWrappingSwingGadget.getComponent(GuiEditorWrappingSwingGadget.java:401)

    at de.espirit.firstspirit.ui.gadgets.swing.ValueHoldingSwingGadgetWrapper.getEditorComponent(ValueHoldingSwingGadgetWrapper.java:195)

    at de.espirit.firstspirit.ui.gadgets.swing.ValueHoldingSwingGadgetWrapper.getComponent(ValueHoldingSwingGadgetWrapper.java:235)

    at de.espirit.firstspirit.ui.gadgets.swing.ValueHoldingSwingGadgetMediator.getComponent(ValueHoldingSwingGadgetMediator.java:647)

    at de.espirit.firstspirit.ui.gadgets.swing.AggregatingSwingGadgetPanel.add(AggregatingSwingGadgetPanel.java:132)

The template coding looks like this, i have many checkboxes with different IncludeServiceOptions, this is the example for "1_8"

<CMS_INPUT_CHECKBOX_ACCESS_RIGHTS name="pt_right_1_8" gridWidth="1" hidden="no" useLanguages="no">

     <CMS_INCLUDE_OPTIONS type="public">

          <NAME>com.xxx.fs.editor.IncludeServiceOptions_1_8</NAME>

     </CMS_INCLUDE_OPTIONS>

     <LANGINFOS>

          <LANGINFO lang="*" label="checkbox" description=""/>

     </LANGINFOS>

</CMS_INPUT_CHECKBOX_ACCESS_RIGHTS>

The class com.xxx.fs.editor.IncludeServiceOptions_1_8 is available in the project in the same folder as AccessRightsCheckboxComponent.class, AccessRightsCheckboxEditorValueImpl.class etc.

Module.xml:

...

<public>

     <name>IncludeServiceOption_1_8</name>

     <description>Gets the options from the service.</description>

     <class>com.xxx.fs.editor.IncludeServiceOptions_1_8</class>

</public>

...

<editor>

     <name>CMS_INPUT_CHECKBOX_ACCESS_RIGHTS</name>

     <description>Checkbox unter Beruecksichtigung der Benutzerattribute</description>

     <class>com.xxx.fs.editor.AccessRightsCheckboxComponent</class>

</editor>

After reading the developer doc for 424 i tried to export the classes named like com.xxx.fs.editor.IncludeServiceOptions_1_8 in a jar-File in the lib folder and referenced it in the module.xml

...

<public>

     <name>IncludeServiceOption_1_8</name>

     <description>Gets the options from the xxx service.</description>

     <class>com.xxx.fs.editor.IncludeServiceOptions_1_8</class>

     <resources>

          <resource scope='module'>lib/IncludeServiceOptions.jar</resource>

     </resources>

</public>

and

...

<public>

     <name>IncludeServiceOption_1_8</name>

     <description>Gets the options from the xxx service.</description>

     <class>com.xxx.fs.editor.IncludeServiceOptions_1_8</class>

</public>

<library>

     <name>IncludeServiceOptions</name>

     <description>IncludeServiceOptions</description>

     <resources>

          <resource>lib/IncludeServiceOptions.jar</resource>

     </resources>

</library>

But the error is still the same.

Does anybody have any further hints?

Thanks a lot,

Steffi

0 Kudos
1 Solution

Accepted Solutions
krause
I'm new here

Solved.

This appears to be a bug. The workaround ist to refer the symbolic name instead of the full class name:

     <CMS_INCLUDE_OPTIONS type="public">
          <NAME>IncludeServiceOption_1_8</NAME>
     </CMS_INCLUDE_OPTIONS>

Many thanks to Peter Jodeleit for the help!

Steffi

View solution in original post

0 Kudos
7 Replies
andre
I'm new here

could you please try to define the resources on modul level.

<module>

<public>
     <name>IncludeServiceOption_1_8</name>
     <description>Gets the options from the service.</description>
     <class>com.xxx.fs.editor.IncludeServiceOptions_1_8</class>
</public>
...
<editor>
     <name>CMS_INPUT_CHECKBOX_ACCESS_RIGHTS</name>
     <description>Checkbox unter Beruecksichtigung der Benutzerattribute</description>
     <class>com.xxx.fs.editor.AccessRightsCheckboxComponent</class>
</editor>

<resources>

     <resource>lib/IncludeServiceOptions.jar</resource>
</resources>
</module>

0 Kudos
Peter_Jodeleit
Crownpeak employee

The scope for the resource containing the class 'com.xxx.fs.editor.IncludeServiceOptions_1_8' should be 'global'.

[Edit]

Sorry for the double post, answer from André was not visible at time sending.

[Edit-2]

Please always name your exact FirstSpirit version.

Peter
krause
I'm new here

Thanks for your help!

FirstSpirit Client 4.2.446.45868

Server: srv-spirit-entw.xxx.local:8000 (HTTP)

Projekt:

Benutzer: Admin

Gruppen (Extern):

Version Server: 4.2.446.45868

Lizensiert für: xxx

Speicher: 35,70 von 123,75 MByte belegt

Java Version: 1.6.0_25 32bit Sun Microsystems Inc.

Betriebssystem: Windows 7 6.1 x86

@Andre: I've already tried to define the resouces on module level, but unfortunately it doesn't help.

@Peter: After installing the module in the server properties I can see that the scope is already "global".

scope.jpg

Or do I have to make any further settings?

I also tried this way:

    <resources>

        <resource scope="server">lib/IncludeServiceOptions.jar</resource>

    </resources>

Regards, Steffi

0 Kudos

Hi Steffi,

Just to make sure: does com.xxx.fs.editor.IncludeServiceOptions_1_8 implement GomIncludeValueProvider?

Cheers,

Stefan

0 Kudos

Hi Stefan,

yes, like this:

public class IncludeServiceOptions_1_8 extends IncludeServiceOptions {

...

}

public abstract class IncludeServiceOptions implements GomIncludeValueProvider<Permission> {

...

}

We made this dirty workaround because of the parameter-free constructur of public components.

Konstruktor.

Regards, Steffi

0 Kudos
krause
I'm new here

Solved.

This appears to be a bug. The workaround ist to refer the symbolic name instead of the full class name:

     <CMS_INCLUDE_OPTIONS type="public">
          <NAME>IncludeServiceOption_1_8</NAME>
     </CMS_INCLUDE_OPTIONS>

Many thanks to Peter Jodeleit for the help!

Steffi

0 Kudos
This appears to be a bug. The workaround ist to refer the symbolic name instead of the full class name:

     <CMS_INCLUDE_OPTIONS type="public">
          <NAME>IncludeServiceOption_1_8</NAME>
     </CMS_INCLUDE_OPTIONS>


The internal ID for this issue is #103496

Peter