Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Could not find "HeatmapFieldAdapter" in namespace ""
Could not find "HeatmapFieldAdapter" in namespace "" [message #1841788] Fri, 28 May 2021 17:45 Go to next message
Amdy DIOP is currently offline Amdy DIOPFriend
Messages: 5
Registered: May 2021
Junior Member
Hello, I am trying to implement the heatMap Field and I have followed the widgets code to the letter. But when I open the form of heatmapFieldForm I have this following error

2021-05-28 16:57:06,454 ERROR [qtp1118078504-18] org.eclipse.scout.rt.ui.html.json.JsonMessageRequestHandler.handleLogRequest(JsonMessageRequestHandler.java:254) - JavaScript exception occurred while processing event formShow for adapter Desktop[id=3, modelClass=com.groupesepro.bp.core.client.Desktop, parentId=2]
Failed to create object for objectType "HeatmapFieldAdapter": Could not find "HeatmapFieldAdapter" in namespace ""
at TypeDescriptor.error (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/TypeDescriptor.js:64:11)
at error (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/TypeDescriptor.js:57:17)
at createInstance (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/TypeDescriptor.js:69:16)
at newInstance (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/ObjectFactory.js:87:26)
at _createObjectByType (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/ObjectFactory.js:137:27)
at create (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/scout.js:90:29)
at create (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/session/Session.js:285:24)
at createModelAdapter (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/session/Session.js:262:23)
at getOrCreateWidget (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/session/ModelAdapter.js:471:28)
at _createChild (webpack:///node_modules/.pnpm/@eclipse-scout+core@11.0.14/node_modules/@eclipse-scout/core/src/widget/Widget.js:234:24) - MDC[principal=amdy, httpUri=log, uiSession=1:1s21q345s1aq1758i68qkdv8efkrrgfedbhtfe1mukg11uelknha, cid=jH8pk8Ns2wz/7]

I'm working on Scout 11 Thank.

[Updated on: Tue, 01 June 2021 08:42] by Moderator

Report message to a moderator

Re: Could not find "HeatmapFieldAdapter" in namespace "" [message #1841842 is a reply to message #1841788] Tue, 01 June 2021 06:44 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hi Amdy

- Have you added the required NPM modules for the Heatmap widget to your package.json (please post your package.json here)?
- Did you execute (p)npm install after you've made changes to the package.json?
- Is the watcher process, which executes the NPM build running? Are there any errors in the console of the watcher process?

Cheers
André


Eclipse Scout Homepage | Documentation | GitHub
Re: Could not find "HeatmapFieldAdapter" in namespace "" [message #1841850 is a reply to message #1841842] Tue, 01 June 2021 08:37 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 259
Registered: March 2010
Senior Member
Hi,

The exception is telling you, that it cannot find the object HeatmapFieldAdapter in the default namespace, which is the scout namespace.
The namespace for your app is defined in your index.js on the bottom.

window.yourNamespace = Object.assign(window.yourNamespace  || {}, self);


When creating a new object, the namespace has to be provided. This includes the JsonAdapters. So you probably need to adjust the objectType in JsonHeatmapField and prepend your namespace to the widget name.

@Override
public String getObjectType() {
  return "yourNamespace.HeatmapField";
}


The heatmap example of the widgets app uses the default scout namespace, which is actually not good practice. It is fixed now: Commit.
Re: Could not find "HeatmapFieldAdapter" in namespace "" [message #1841852 is a reply to message #1841850] Tue, 01 June 2021 09:37 Go to previous messageGo to next message
Amdy DIOP is currently offline Amdy DIOPFriend
Messages: 5
Registered: May 2021
Junior Member
thanks everyone, this solves my problem
@Override
public String getObjectType() {
return "yourNamespace.HeatmapField";
}

But I have the map outside the frame
  • Attachment: map.png
    (Size: 946.16KB, Downloaded 75 times)
Re: Could not find "HeatmapFieldAdapter" in namespace "" [message #1841853 is a reply to message #1841842] Tue, 01 June 2021 09:38 Go to previous message
Amdy DIOP is currently offline Amdy DIOPFriend
Messages: 5
Registered: May 2021
Junior Member
thank Andre WegmuellerFriend
Previous Topic: NullPointerException
Next Topic:SequenceBox and LABEL_POSITION_TOP in containing fields
Goto Forum:
  


Current Time: Sun Dec 08 18:14:18 GMT 2024

Powered by FUDForum. Page generated in 0.05974 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top