on 09-13-2007 7:53 AM
My web dynpro has a input field. This input field is mapped with a context attribute which type is I.
I want that this field doesn't show the default value 0.
If I change the attribute context to String I lose the standard message "The Entered Value Can Only Contain Numerical Characters" and the input field is not in red with this error.
1.- If I use a context attribute type I, How can I show an empty default value ?
2.- If I use a context attribute type string, How can I use the standard error "The Entered Value Can Only Contain Numerical Characters" and show the Input field in red?
How do I solve this?
Thanks
Hi to all,
My problem continues. I have created a new Web Dynpro to test the code.
My Web Dynpro contains only one node (NODO_INPUTF) with one attribute (INPUT_FIELD). I only have coded the method (WDDOMODIFIVIEW) with this code:
DATA: node_input_field TYPE REF TO if_wd_context_node,
node_info TYPE REF TO if_wd_context_node_info,
ls_properties TYPE wdy_attribute_format_prop.
IF first_time EQ abap_true.
node_input_field = wd_context->get_child_node( name = wd_this->wdctx_nodo_inputf ).
node_info = node_input_field->get_node_info( ).
ls_properties-null_as_blank = '-'.
node_info->set_attribute_format_props( EXPORTING name = 'INPUT_FIELD'
format_properties = ls_properties ).
ENDIF.
ENDMETHOD.
In the input field appears the value 0.
Can anybody help me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My problem has not been solved yet.
I have used attribute type I.
My code is:
DATA: node TYPE REF TO if_wd_context_node.
DATA: node_info TYPE REF TO if_wd_context_node_info,
ls_properties TYPE wdy_attribute_format_prop.
IF first_time EQ abap_true.
node = wd_context->get_child_node( name = 'MY_NODE' ).
ls_properties-null_as_blank = '-'.
node_info = node_jubilacion->get_node_info( ).
node_info->set_attribute_format_props( EXPORTING name = 'TLFNO'
format_properties = ls_properties ).
endif.
In the input field of 'TLFNO' appears the value 0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can do this by implementing in your wdmodifyview
data: node_info type ref to if_dw_context_node_into,
ls_properties type wdy_attribute_format_prop.
if first_time eq abap_true.
***navigate to your node
ls_properties-null_as_blank = '-'.
node_info = node->get_node_info( ).
node_info->set_attribute_format_props( exporting name = name of the attribute
format_properties = ls_properties ).
endif.
this way you can keep the i and the messaging
grtz,
Koen
Message was edited by:
Koen Labie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.