cancel
Showing results for 
Search instead for 
Did you mean: 

CheckbBoxGroup

Former Member
0 Kudos

Hi,

I have created CheckBoxGroup as a UI Element in one of my forms.The values are populated using structure data type.

The CheckBoxGroup is not visible in the screen when the application is run, but i can see it in layout of web dynpro wizard in Netweaver studio.The application is run in Internet Explorer.Is this the constraint of a web dynpro application?

can anybody please help me out? Is there any document or PDF available anywhere which i can refer ?

any help will be appreciated...

Selva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are the other UI elements shown correctly? There is nothing special with CheckBoxGroup.

Check the data binding, there should be a context node with cardinality 0:N, selection 0:N containing an attribute that provides the texts for the check boxes.

Perhaps the node is empty (contains no elements)?

Armin

Message was edited by: Armin Reichert

Former Member
0 Kudos

Hi Armin,

Other UI elements are shown properly. Event the checkboxgroup is shown on the layout view with the values but not in the browser when i run the application.

Former Member
0 Kudos

Hi,

UI elements like checkbox group ,radio button group are usually binded to a node attribute.

For each element created in the node a corresponding checkbox or radio button will be added.(and made visible)

So when there are no elements in the node the elements wont be visible at run-time. The display that is available in the design time is just a visual indication that the element exists.

regards

Bharathwaj

Former Member
0 Kudos

hello

in the case of checkboxgroup the no. of check boxes is equal to the no. of elements of the node, to which u have bind the ur checkbox UIE. if u have created and added zero element then no check box will be visible.

create the elements and the checkbox will be reflected.

regards,

Piyush.

Former Member
0 Kudos

hi,

I am new to Web dynpro application development.

so I will just write down about how i have created a chekboxgroup.

1) Firstly i created CheckBoxGroup using the Icon from simple Standard menu of view layout.

2) I created a Simple type and added values like (Reading,Playing etc..) in the enumeration tab checking

the available check box to 'Generate a class respresentaion of the enumeration'.

3) Then i created a structure Data Type and bind the Simple data type with Structure Element Name.

4) Then created a Value Node under the context of the view by binding the node with the structure.

5) Then i mapped this value node with 'texts' property of the CheckBoxGroup UI element.

This makes the Simple type description to be shown in design layout.

But when i run the application the CheckBoxGroup is not visible in the browser.

I have been searching a lot for this but i am unable to find a solution for this

Any help will be appreciated...

Former Member
0 Kudos

hi,

I am not sure if your way will work out . And i am surprised that it is giving the enumeration values in the design time.

The easiest way is to map it to a value node attribute and create elements for the node.

Enumeration usage is not possible in checkboxgroup as far as i know. It is possible only with radiobuttongroups.

Because if u map a value node attribute with enumeration values and create elements for it ,it does not seem to make sense.

Anyway thats my view ! Is their a reason for following this method ?

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Hi Bharathwaj,

Thank you!!

Now it's working and solved my problem but still i don't understand why it didn't work in my previous way. Anyway thanks for your help.

Selva

Former Member
0 Kudos

Hi ,

I am trying to explain why it might not work though i am not sure if its the reason.

Lets see.. when u create enum simple type if there are three values .. u bind it to a structure and use it in a node attr.. then it means that the element attr will have this all the enumeration values mapped to one radio button...

enum - a,b

then element1-> rb1 ->a,b

element2-> rb2 ->a,b

It does not make sense rite? coz one rb will be mapped to two enum values.. so its not the correct method to do ..

Hope this solves the problem

Rgds

Bharathwaj

Former Member
0 Kudos

Hi bharatwaj,

The problem of viewing the checkboxgroup is solved but i am not able to get the selected values of the checkboxes in the group on the next page.Can u tell how to do?

Thanks in advance...

Message was edited by: Selvakumar Samuel

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If the node u are using for chkbox is chkboxdata...

then use

wdContext.nodeChkboxdata().isMultiSelected(i) is true if the chkbox is selected.

Then use wdContext.nodeChkboxdata().getChkboxdataElementat(i).get<attr name() will give the selected attribute.. now you can pass this as a string array or populate another node with data which is mapped with the other view..

These are the few possible solutions.

If your problem is already solved please close the question.

regards

Bharathwaj

Former Member
0 Kudos

Hi,

YOu would have bound the check box with a element of a node.

Does any element exist in that node.check its size..WdContext.node<name>.size().

If its 0 create elem = WdContext.node<name>.create<node element>and

WdContext.node<name>.addelement(elem) to the node

Now it will be visible

Regards

Bharathwaj

Former Member
0 Kudos

Please make sure that you have populated the node(datasource for the checkbox ) with values and set the text property of the Checkboxgroup to the right valueattribute.

Regards, Anilkumar

Former Member
0 Kudos

Hi

U need to create the Instance of the Node u have bound to the check Box.

Suppose u have created a ValueNode vnNode that u vave bound to the UI Element. then

u have to say

IPrivate<<Urview Name>>.I<<NodeElement>> neElement = wdContext.create<<urNodeElement>>;

wdContext.nodeVnNode.addChild(neElement);

Message was edited by: krishna kanth