on 01-29-2015 3:51 PM
Hi ,
We have implemented the cl_chtmlb_config=>set_iterator( lr_iterator ) for enabling tooltip to a field in web ui.But when we enable the support for screen reader mode in personalization of user settings its going for runtime error.The runtime error is about casting error between cl_bsp_bee_table and cl_thtmlb_label and this happens in the cl_cthtmlb_config_utility class.
Regards,
Sijo
Hi Sijo,
You can put a restriction by checking whether the field is of type 'Label' like
IF iv_element_name = 'label'. Then the error won't come.
Also, you were saying that you are trying to give tooltip. Are you giving tooltip for the contents or for the heading?. If for contents, why can't you go with get_p 'WHEN if_bsp_wd_model_setter_getter=>fp_tooltip' rather than changing the iterator class?.
Thanks,
Faisal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faisal,
The coding is already done with this check so its not the issue.
The tool tip needs to be introduced for label of the input field and not just the input field alone.
Hence this is approach suggested by standard to introduce such functionalities.
May be the SNOTE 1460122 gives your more details on it.
Regards,
Sijo
Hi Sijo,
I am aware of iterator class and had faced the same problem with casting error once. That's why I was asking why can't you go with get_p code. I believe this is a custom field you are talking about and you can make the tooltip with get_p here instead of going to iterator class.
Thanks,
Faisal
Hi Sijo,
If I understand your requirement correctly, you have a field in a form view(not table view field. Right?). And you need this field having a tooltip for both label and input fields. I will check whether get_p works for label or not on Monday as I don't have the system access now. However, can you check the type of cl_thtmlb_label is coming so only in display mode?. I mean, whether it comes properly in edit mode or not.
You can have a look in this discussion also.
Thanks,
Faisal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dharma,
We did the implementation as explained in the sample class provided by SAP which is CL_THTMLB_FORM_IERATOR_SAMPLE.This is mentioned in the SNOTE 1460122.
The same sort of coding is explained in the thread suggested by you.The issue here is when we select the personalization setting as 'Enable support for screen reader mode'.The same casting issue could be happening if we call the iterator set method in any view html code.
The issue happens in the class CL_CHTMLB_CONFIG_UTILITY and method RENDER_FROM_XML
here the there's a check which gets enabled when the above personalization is enabled.
This triggers a code especially for 'label' where they have a casting operation between LV_LAST_LABEL ?= <LS_RENDERER>-ELEMENT where the LV_LAST_LABEL is of reference CL_THTMLB_LABEL.But the <LS_RENDERER>-ELEMENT will be having reference as cl_bsp_bee_table if we are implementing the iterator explicitly.
Regards,
Sijo
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.