/scripts/ahub.form.attachments.js
0

Design studio SDK : how to handle Property type "Object" ?

May 14, 2017 at 11:49 PM

48

avatar image

Hi ,

I have defined a property of type "Object" in Sdk custom component and need to access it key value pair using get methods .

	<property id=" p1" 
	title="Input Parameter"
         type="Object" 
	group="Display" > 
<property id="item1" type="String" title="parameter1"/>
<property id="item2" type="String" title="parameter2"/>
<property id="item3" type="String" title="parameter3"/>
</property>

i have defined getter and setter 's in ZTL

/* Sets the param1. */
	void setp1(/*   Object  */ Object text) {*
		this.p1 = text;
	*}	
	/* Returns the  parm1 . */
	Object getp1() {*
		return this.p1;
	*}
	

I couldnt access key value pair in Designstudio BIAL scripts

var x = Comp1.getp1(); is returning of type " " instead of Object type.

and i cannot access to x.item1 , x.item2 or x.item3 values in BIAL .

for example my data looks like this { item1 : 1934 , item2 : 4567 , item3 : 49867 } ;

Am i missing something ? I s there way to access JSON object in BIAL scripts ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content