cancel
Showing results for 
Search instead for 
Did you mean: 

Radio button with bold description in WebDynpro

UmaArjunan
Active Participant
0 Kudos

WD experts,

I am new to WD programming. My requirement is create a Radio Button with Bold Description.

I  tried the following option :

- Use OTR text option --> For this  normal text appears after the radio buttion--> how to make this as bold ? 

- Label option --> label cannot be used as it appears before the radio buttion

- Caption -- > Can this be used as a description for Radio buttion

Is any other option available ? Please suggest .

Thanks,

Uma

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

For radio button text its not possible to bold text till netweaver 7.01 version.

If you are using Netweaver 7.01 and higher version implement SAP Note 1563823 to achieve this.

For other UI elements like textview it is possible by changing design Property.

Hope this helps u.,

Regards,

Kiran

UmaArjunan
Active Participant
0 Kudos

Hi Kiran/Rohit,

Thanks for your reply. I m using sap NW 7.0 . Hence i coudnt get text design property in the radio button. Is there any notes available to solve this issue in SAP NW 7.0 .

Also i m trying to get input field with length 1. Unable to create. is that possible ? I should allow the user to enter single character. if i give length as 1 , i can able to enter more than 1 character.

Regards, ABAP Dev

amy_king
Active Contributor
0 Kudos

Hi ABAP Dev,

Though the visual display length of the field may be longer than one character, the number of characters the user is permitted to type into the field is controlled by the underlying context attribute's data element. As long as you use a data element defined with length one, e.g., FLAG, only one character will be allowed.

SAP does seem to have decided to give InputField a default minimum size greater than one which makes the field visually longer than one character even with an underlying data element with length one. They may have done this because with proportional fonts, not all characters are the same width, e.g., in proportional fonts M is usually the widest character and I the most narrow. You can override this default width by assigning the InputFIeld's width property, in pixels, e.g., 15px.

As for the radiobutton label, how about using a Label UI Element instead of the radiobutton's text property to label the radiobutton? To make the Label bold use its design = emphasized property. The benefit of using a Label is that the user may click either the radiobutton or its Label to toggle the radiobutton on or off.

To get around the Matrix layout issue, you can always wrap the radiobutton and its Label in a TransparentContainer in order to treat the two objects as one within your Matrix layout.

Cheers,

Amy

UmaArjunan
Active Participant
0 Kudos

thanks amy for your detailed answer for all the problems mentioned in my thread.

1. Length issue resolved : changed data element of attribute to char1 and had set the width of input filed to 15 px. it appears as what i expected in the screen

2. Used Transparent container and inluded radio button and label. I can get bold description using label / text view in the same row with radio button.                but the alignment of radio button and text is not proper. text is appearing just below the radio buttion in the same row . How to adjust

UmaArjunan
Active Participant
0 Kudos

Hi Kiran,

One more doubt in Radio Button :

I have two radio button in my screen but in different groups and radio button groups according to the design changes.

First Group

   Radio Button 1.

Second Group

   Radio Button 2.  ----------> Default selected.

Radio button 2 is selected by default in the inital screen, If i select first radio buttion second one should be de-selected. since it is NOT in same group, i cant get the required one. if i select first one , second one is also selected. Can you suggest some ideas ?  Where can i write coding  ?

former_member184578
Active Contributor
0 Kudos

Hi,

In onSelect even of both the radio buttons you write your code.

In onSelect event of first radio button, Read the second radio button. If it is selected clear it.

Do vice versa in second radio button event. If first one is selected, clear it.

Or directly you can clear the other radio button in onSelect event instead of checking whether it is selected or not as it is radio button not check box.

hope its clear.

Reply if you need some more clarifications.

Regards,

Kiran

UmaArjunan
Active Participant
0 Kudos

I tried , but the problem is the radio buttons are displayed in the pop-up window.

In the before action method of the view which is in the pop-up window, code is written to close the popup window if the error messages are empty....it is delegated in that method.

So as soon as i select the first button the popup is closed, i cant see the other radio buttons un-cleared. Please suggest .

Also give the seqeunce of standard methods called inside each view particulary when an event is triggered

Former Member
0 Kudos

Hi,

Could you make me clear with your requirement what you exactly need.

Which is the main window? and onclick of what the popup window is displayed?

What action has to take place in the popup window? Onaction of onclick of the radiobutton,what has to be displayed?

Kindly let me know.

Regards,

Jyothi

UmaArjunan
Active Participant
0 Kudos

Hi Jyothi,

It is an existing application.

But now the requirement is design has lot of radio buttons.  pop-up window(has pop-up view embedded) is triggered from main view (has main window ) ok button.

Total of three groups in popup window(pop-view).

First group has one radio button and second group has one main radio btn and 2 sub buttons and third group has 2 radio buttons .  these are in a pop up window. once ok is hit another screen will be opened.

Navigation is a problem as i have more radio buttons in the pop-up window.

I want to know the sequence of standard methods called during runtime when on action button is pressed. so that i can decide the coding area to toggle the radio buttons.

pop-up window is closed in the pop-up view DO BEFORE ACTION METHOD.

Sorry I couldnt mention the complete requirement here. But i m trying to solve the problems one by one.  i will open a new thread once my radio button problem is solved.

UmaArjunan
Active Participant
0 Kudos

thanks for the links. I have resolved the issue mentioned above.

I have a problem in accessing the layout(UI elments) of a view in the same view for the second time. .. I have posted another new thread. Could you pl. provide some suggestions ?

http://scn.sap.com/message/13562435

UmaArjunan
Active Participant
0 Kudos

Kiran,

Posted another thread "http://scn.sap.com/message/13562435"   Could you pl. provide some suggestions ?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use textDesign property and set its value as "emphasized". It'll look something like the below image.

Regards,

Rohit

UmaArjunan
Active Participant
0 Kudos

I can identify Design property is available for Text View. How can we use Text view description for Radio button ? Please elaborate the steps how do u get bold description for the radio button.

Former Member
0 Kudos

Hi,

To achieve this:

  • Insert UI element Radiobutton with Flowlayout
  • Insert UI element Textview with Flowlayout
  • Create OTR text

               Goto->Online Text Repository Browser

               Create the Text as TRUE,save

  • Bind the Text property of the Textview UI element with the OTR text created
  • In the Textview UI element,in the property design,choose header2 option from the list.

try this................

Regards,

Jyothi

Former Member
0 Kudos

Hi,

There is a property textDesign for RadioButtonGroupByKey UI element. I used the same.

But if you don't find this property, then there might be some version issue as explained by Kiran.

Regards,

Rohit

UmaArjunan
Active Participant
0 Kudos

I tried this option. seems to be working. But for my requirement, i need to use matrix layout. There are many UI elements to be placed.. Cant use flow layout.

the problem is if i use matrix layout i have a space between radio buttion and the text view in the same line . Its not appearing as provided by you in the screen print.

working on the alignment. provide me some tips .

Former Member
0 Kudos

Hi,

If you are Using Matrix Layout then,

Create a Transparent Container

          layout as matrix layout

          layout data as matrixheaddata.    

and in the transparent container place the radiobutton UI element and Textview UI element(layout data as Matrix data).

Try this...................

Regards,

Jyothi

UmaArjunan
Active Participant
0 Kudos

Thanks Jyothi . Got the required output now. O

One more problem what i m facing is I have added a caption in my Transparent container due to this radio buttonbold desc problem. Now this is resolved.

I want to remove the caption from my container, but i cant do. so i set the visible as none.

But then blank line is coming above the radio button which i dont want to see.

How to remove caption UI element  ? when i right click i get display UI element doucment only.

please suggest.

Former Member
0 Kudos

Hi,

If you select none to visible property then it should be invisible.

There is another way of making UI elements visible and invisible,by creating an attribute with type WDUI_VISIBILITY,bind this attribute to the caption UI element property Visible.

So when the view is processed the Caption will be invisible.

But it should work with visible property with NONE.

kindly send me the screenshot so that I could get what exactly you need .

Regards,

Jyothi

UmaArjunan
Active Participant
0 Kudos

I have marked the upper region in red colored box which was used for caption. though i made visible property as none, blank area is coming above the radio button.

Former Member
0 Kudos

Hi,

I think you took Group UI element to bring Radio Button and Label together. If it is so, use Transparent Container instead.

Regards,

Rohit

Former Member
0 Kudos

Hi,

Rohit is right.The image seems to be a Group UI element that is why you get the line displayed.In Group UI element there is a property of caption.

Instead encapsulate the Radiobutton and Textview UI elements in Transparent container.

Regards,

Jyothi

UmaArjunan
Active Participant
0 Kudos

you are right . but still Group is required for me . I have two groups in the same container one in left side and the other in right side. If i remove the group , i can't differntiate and alignments are changed. Can't i remove Caption from the group element. It is added by me only. Dont y the system is not allowing .

@Jyothi: Tried WDUI_VISIBILITY also. Still blank line is coming for the caption.

UmaArjunan
Active Participant
0 Kudos

I got it. Caption is automatically created, when i create a group. If i use Transparent Contrainer, i cant get back ground color blue as that of group element. Is there a way to get background color blue when i use Transparent container

Former Member
0 Kudos

Hi,

In Transparent Container UI element there is a property called 'CellBackgroundDesign' .If you click on to the list icon of that property,you can find the options like border,fill1,fill2,fill3,Header,Plain,Transparent.Choose fill1.you will get like this,.

Regards,

Jyothi

UmaArjunan
Active Participant
0 Kudos

thanks. I have one more scenario , i have a popscreen defined in one window. based on the input in the popup window, i have to display another popupwindow which contains view which has a table.

How do i pass value from one popup window to other window. based on the input value i hv to fetch data from db table and i hv to bind it to view in another window.

I would like to know how to pass the value in input field in one window to other window.Please suggest

Solved : Binded the wrong node in the context. I have used windows do init / modify view method and retreived the value from context node and binded the table with the correct node

UmaArjunan
Active Participant
0 Kudos

Hi Rohit & WD experts

I have two radio button in my screen but in different groups and radio button groups according to the design changes.

First Group

   Radio Button 1.

Second Group

   Radio Button 2.  ----------> Default selected.

Radio button 2 is selected by default in the inital screen, If i select first radio buttion second one should be de-selected. since it is NOT in same group, i cant get the required one. if i select first one , second one is also selected. Can you suggest some ideas ?  Where can i write coding  ?