on 07-06-2007 6:42 AM
Hi All,
I have got an RFC Function Module which gives data from R/3 to WebDynpro. One of the field which needs to be displayed is a "<b>CheckBox</b>". The "<b>Checked</b>" property of <b>CheckBox</b> needs context attribute of type "<b>Boolean</b>". But the context attribute given by the RFC structure is of type <b>String</b>.
I need to display these data in a Table UI element. How can I implement this feature? Which method is the best one and recommended for this kind of scenario.
Regards,
Aryan
Add a calculated attribute (boolean, read-only=false) in the data source node of the table. (Maybe you have to put it into a 1:1 subnode)
Implement conversion boolean <-> string in the get/set methods of the calculated attribute.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Aryan,
Any way, the checkbox requires one label to display the information. This info is coming from RFC. Bind this to text property of check box
The information abt whether the check box is checked or not is getting from boolean variable (bound to checked).
So in table node, create 2 attributes, one for text and for boolean value. In table column, create checkbox and bind text and checked properties.
So it will display the check box with label in table column
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aryan,
U r correct that he "Checked" property of CheckBox needs context attribute of type "Boolean".If the string is returning "true" or "false" values then u can convert the string to boolean explicitly.
e.g.
String s = "true";
Boolean b = Boolean.valueOf(s);
boolean a =b.booleanValue();
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
Thanks for your reply. But any way I have to bind one context attribute of type boolean for the checkbox otherwise it will give u runtime error. I cannot bind the context attribute of type String to <b>Checked</b> property of checkbox at design time...
Just wondering what is the best approach in this scenario (this field is an editable column in the table element of type boolean)
Regards,
Aryan
Message was edited by:
Aryan M V
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.