cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing UI elements in WD

Former Member
0 Kudos

Hi,

I need to access Input Field and assign and reassign it some values without linking it to the context . Can some one help me with this.

Regards,

Parminder

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

One cannot assign and reassign values to Input field without using a context.

But if you want to change the data binding dynamically depending upon some condition then you can use the

following code in the do modify view to do that.

public static void wdDoModifyView(IPrivateCommentsView wdThis, 
IPrivateCommentsView.IContextNode wdContext,
com.sap.tc.webdynpro.progmodel.api.IWDView view,
boolean firstTime)
  {
    //@@begin wdDoModifyView
     IWDInputField descriptionIF = (IWDInputField)
                          view.getElement("Description");
     descriptionIF.bindValue
               ("ActivityBreakup_Planning.Description");
     /** The context attribute info **/
    //@@end
  }

Please reward appropriate points.

Bala

Former Member
0 Kudos

Hi,

what is the "Description" and "ActivityBreakup_Planning.Description" here?

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Parmindar,

Why do you want to display values in input field without changing the attribute value

Regards

Rohit

Former Member
0 Kudos

Hi Rohit,

I have a dropdown on a view with a FileUpload control. When I select a value in the DropDown the screen refreshes and the FileUpload control does not show the filename anymore although the context mapped to this control still has the file name.

How can I make it show the file name ?

Regards,

Parminder

Former Member
0 Kudos

Hi,

Generally people create a textview next to the FileUpload UI element(or perhaps below it..) and bind it to the Filename.. (this being the filename bounded to teh FileUpload Ui also..)..

How is Bala s code helping. ?

It is binding the attribute everytime modifyview is called..

Regards

Bharathwaj

Message was edited by: Bharathwaj R

Former Member
0 Kudos

Hi,

Yes, it is binding everytime.

Regards

Former Member
0 Kudos

...which is not a good idea.

Armin

Former Member
0 Kudos

Parminder,

Have you onSelect event handler associated with DropDown? If "yes", can you change your logic to work without it? This way there will be no data submition...

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com