on 09-24-2008 8:55 AM
hi friends,
I have to change attributes of a button dynamically when another button clicked.
In my BSP there are 2 buttons.
1. CHANGE
2. UPDATE
i have to change only DISABLED attribute of these two.
Now when i clicked on CHANGE automatically UPDATE BUTTON has to be ENABLED and CHANGE BUTTON has to be DISABLED.
How can i change attributes in event handler.
Thanks & Regards,
Shankar.
Hi,
Try this.... On input processing
DATA: event type REF TO cl_htmlb_event,
button type ref TO cl_htmlb_button.
event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
clear: status.
if event is not INITIAL.
case event->id.
when 'btn_up'.
status = 'false'.
status1 = 'true'.
when 'btn_ch'.
status = 'true'.
status1 = 'false'.
endcase.
endif.
On create
status = 'false'.
status1 = 'false'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Thanks for ur reply. But here wat's status and status1.
these wat type of attributes and where to assign it. it means string or char.
And Event OnInput Processing
DATA button_event TYPE REF TO cl_htmlb_event_button .
DATA: event TYPE REF TO if_htmlb_data.
IF event IS NOT INITIAL AND event->event_name = htmlb_events=>button .
button_event ?= event .
CASE event->event_server_name.
WHEN 'BTN_CHNG'.
disp_upd = 'true' .
disp_chng = 'false' .
WHEN 'BTN_UPD'.
disp_upd = 'false'.
disp_chng = 'true'.
endcase.
endif.
And Event OnInitialization
disp_chng = 'false'.
disp_upd = 'true'.
Now no errors in this. but It's not working. Any modification is there to do.
And one more thing i saw in this posts, wat ever you people are posted the queries that and all appearing in a box(Code lines), how it is possible.
Thanks & Regards,
Shankar.
Hi,
Layout:
<htmlb:button id = "change"
text = "change"
on C l i c k = "change"
disabled = <%= dis_chng %> />
<htmlb:button id = "update"
text = "update"
disabled = <%= dis_upd %> />
in eventhandler onInputProcessing:
DATA
button_event TYPE REF TO cl_htmlb_event_button ,
.
DATA: event TYPE REF TO if_htmlb_data.
IF event IS NOT INITIAL AND event->event_name = htmlb_events=>button .
button_event ?= event .
CASE event->event_server_name.
WHEN 'change'.
dis_up = false .
dis_chng = true .
endcase.
endif.
disp_up and disp_chng are page attributes of type string and the page is statefull.
Regards,
Anubhav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI JAIN,
thanks for your solution.
But i am getting error like this.
"You must assing a value to the property"
And one more thing is when it shows first time it means initialation of page the attributes must be like this.
update should be enabled and change should be disabled.
Thanks & Regards
Shankar.
Hi,
But i am getting error like this.
"You must assing a value to the property"
Please check the page button.htm of application SBSPEXT_HTMLB for sample code .
And one more thing is when it shows first time it means initialation of page the attributes must be like this.
update should be enabled and change should be disabled.
OnCreate :
dis_chng = 'false' .
dis_upd = 'true' .
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.