cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro UI related issues.

Former Member
0 Kudos

Hi All

I have a few Qs. regarding the webDynpro application development.

1) Am creating a WebDynpro application that uses a web service. Now when i try to bind the controller created with the view, the ui components are not generated automatically. I have to manually create all the UI elements and bind them to the controller entities.

Why are the UI elements not generated automatically?

2) I have created a table UI element in the view and binded the columns, TextView to the appropriate controller elements.Now when i try to run the application, the columns in the table are not editable.

What s/d i do to make the columns editable.

Please help me on that.

Regards

Bhupesh...

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Bupesh,

I had the same problem. I resolved it changing cardinality of the binded context Value Node to "1..1".

This should resolve your problem.

Former Member
0 Kudos

Hi All

Thanks a lot for ur replies first of all.

But the sad thing is, my problem still persists.

Am able to create the UI from the templates now, but when i run the application, still the input fields are not editable.

I have a few other qs, for the suggestions that were posted earlier here...

1) how do i change the cardinality of the node?

2) where to add the code for the node, createAndAddElement(), which was mentioned by Pravesh.

Am not able to understand the simple thing, why an input field is not editable?

Please throw some light on this..

Regards

Bhupesh...

Former Member
0 Kudos

There are a number of reasons why an InputField may be read-only.

Either the InputField itself is disabled or read-only, or the bound context attribute (binding of "value"-property) is read-only, or the context attribute is inside a context node that contains no elements, ...

For the other questions, I suggest reading the book "Inside Web Dynpro for Java" by Chris Whealy.

Armin

Former Member
0 Kudos

Hi Armin

I have checked all the things that u have mentioned.

The input fields are not disabled and they are not read-only, the binding is also not read-only and the context is not contained inside any other context node.

I Guess i'll get my hand over the book that u have mentioned and then try s'thing.

Former Member
0 Kudos

hi Bhupesh,

To embed Ui elements to a view, you'll have to add them manually at design time or use dynamic coding to generate UI elements at runtime.UI elements will not be generated automatically.

For your second question,which table cell editor have you added in the table columns? Its not possible to edit a textview UI element.

regards

Shyam.

Former Member
0 Kudos

Hi

Thanks for the replies Rathna and Shyam.

Now i have changed the textview in the table to a input field. But still when i deploy the application and run it, am not able to edit the text fields.

Is there any property that i have to set?

Regards

Bhupesh...

Former Member
0 Kudos

Hi Bhupesh,

Check the input fields' context bindings.

regards

Shaym.

pravesh_verma
Active Contributor
0 Kudos

Hi Bhupesh,

No other setting is required you are doing it correctly. Just try and add this line in your code:

wdContext.node<which_has_inputfeild_attribute>().createAndAddElement();

it can be <b>context</b> OR any <b>manually created node</b>.

I hope this solves the problem.

Regards

Pravesh

PS: Kindly rewards points if solved or helpful.

Former Member
0 Kudos

Hi,

Check the cardinality of the node that you have bound to the input field. If it's 0...n, make it 1...n.

Regards,

Satyajit.

Former Member
0 Kudos

Hi

I think you havent created element to the node.

Try the following code in the wdInit method.

for(int i=0;i<4;i++)

{

IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();

wdContext.node<node name>().addElement(element);

}

Also check if you have set the value property ofthe inputfield to the corresponding attribute.

Hope this helps.

Regards,

Rathna.

Former Member
0 Kudos

Hi

<i>1) Am creating a WebDynpro application that uses a web service. Now when i try to bind the controller created with the view, the ui components are not generated automatically. I have to manually create all the UI elements and bind them to the controller entities.

Why are the UI elements not generated automatically?</i>

By controller entity do you mean Context nodes, attributes?

If so, UI elements can be generated automatically.

1)Right click <b>RootUIElementContainer</b> in the outline window.

2)Choose <b>Apply Template</b> and select the appropriate one.

3)Click <b>Next</b> and select nodes, attributes.

4)Click <b>Finish</b>.

<i>2) I have created a table UI element in the view and binded the columns, TextView to the appropriate controller elements.Now when i try to run the application, the columns in the table are not editable.</i>

TextView ui element is readonly and you cant edit it.

Instead you can use <b>InputField</b> for that column so that you can enter the value.

Under the RootUIElementContainer>Table>Column-->select Tablecelleditor as inputfield.

Hope this helps.

Regards,

Rathna.