cancel
Showing results for 
Search instead for 
Did you mean: 

Disable editing of part of table

Former Member
0 Kudos

Hello,

i need to disable editing on some rows in table. Also i need to change style of some rows, is it possible in webdynpro (some sample code?) or i have to use PDK?

thanks

JJ

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Jiri,

Yes, this is possible with WD.

Just bind property "enabled" of table cell renderers to context attribute of type "boolean" (attribute must resize in same node as "data" for renderer or in 1..1 non-singleton subnode of thereof).

Again, style customization is the same, however it is supported in NW04s. In previous version you may onnly alter color of TextView cell renderer.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi,

thanks for answer. But i have model based on rfc and there i have CHAR1 instead of boolean. Is there any simple solution how to tell webdynpro table to take this as boolean or how to change model?

thanks

JJ

Former Member
0 Kudos

Jiri,

Let us assume your attribute CHAR1 name is Flag. So:

1. Right under the node with attribute Flag create sub-node with cardinality 1..1, singleton=flase, name it UISettings

2. In this sub-node create boolean attribute EditorEnabled

3. Mark EditorEnabled attribute readOnly=true, calculated=true

4. Switch to source editor, and write the following for method getUISettingsEditorEnabled:


return "X".equalsIgnoreCase(element.getParentElement().getAttribute("Flag");

5. Bind "enabled" properties of cell renderers to EditorEnabled attribute.

Make sure to rename "Flag" in code to actuall property name from BAPI!

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Thanks...

Answers (0)