Project

General

Profile

Defect #761

setSelectedNodes doesn't work with strings in de web

Added by Sanneke Aleman over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
Start date:
11/12/2013
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

we work with : elements.tree.setSelectedNodes([pckdtl|58C5AF30-61B8-4E93-83AF-ECE3D2D659ED])

This works fine in the smart client but in the webclient we get:
java.lang.String cannot be cast to java.lang.Number
Wrapped java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number (C:\\servoy_workspace\\TSD\\projectx\\forms\\pckdtl_tree.js#629)
at C:\\servoy_workspace\\TSD\\projectx\\forms\\pckdtl_tree.js:629 (btnDelete)
at C:\\servoy_workspace\\TSD\\svy_nav_navigation\\forms\\svy_nav_fr_toolbar_base.js:370 (callProgramFunction)


Files

treebug.servoy (7.3 KB) treebug.servoy Sanneke Aleman, 12/17/2013 12:48 PM
servoy-treeview.jar (6.22 MB) servoy-treeview.jar Imre Tokai, 12/17/2013 03:34 PM

History

#1

Updated by Imre Tokai over 10 years ago

  • Status changed from New to In Progress

Hi Sanneke,

Usage of that method is actually like in sample:
//Select treeview nodes
var selectedNodes = new Array();
selectedNodes[0] = 1;
elements.treeview.setSelectedNodes(selectedNodes);

Submitted array should contain 1 element that's the row's number which you want to select, indexing starts at 1.

Regards

#2

Updated by Sanneke Aleman over 10 years ago

We tested your idea but is doesn't work. The problem is that our RowId is not a number but a string. We made a sample, you can see that it works perfect in Smart Client but in Webclient it doesn't.

#3

Updated by Imre Tokai over 10 years ago

Try with attached and report, please

Regards

#4

Updated by Sanneke Aleman over 10 years ago

We tested your jar and it worked good. Only problem is that we work with the experimental jar.

#5

Updated by Imre Tokai over 10 years ago

  • Status changed from In Progress to Resolved

Hi Sanneke,
yes it should contain experimental features too that are mostly related to SmartClient, together with recent Andrei's work on #740.
Updated Files section

Regards

#6

Updated by Sanneke Aleman over 10 years ago

ok thanks

Also available in: Atom PDF