on 02-22-2008 10:01 AM
Hi Gurus,
I got a requirement where in which ,when the user chooses the particular leave type......
Say Half day sickness......Duration of the leave should be half of the work schedule which is allocated for the particular employee..(This information has to get from backend using Adaptive RFC model) using bapi.
Once the user choose half day sickness (leave option from the drop down)Duration From ....To....... (field) has to be hide from UI .....
and It has to freeze the value of Duration is (half of the work schedule which is allocated for the particular employee in the backend R/3)..........
Can anyone pls tell me how to hide the Duration From.... To.....Field dynamically once the user chooses the Half Day Sickness leave option..........
Please give me step by step approach to acheive this solution........
Higher points will be rewarded for the useful inputs.....
Thanks in Advance,
Dharani
Hi,
Can anyone pls tell me how to hide the Duration From.... To.....Field dynamically once the user chooses the Half Day Sickness leave option..........
To acheive the above
Create a context attribute lets say durationVisibility of type com.sap.ide.webdynpro.uielementdefinitions.Visibility
bind this attribute to the "visible" property of your Duration From.. To fields.
Initially set this to visible
public void wdDoInit()
{
//@@begin wdDoInit()
wdContext.currentContextElement().setLeaveVisibility(WDVisibility.VISIBLE);
//@@end
}
In the action handler of the halfday sickness do the following
wdContext.currentContextElement().setLeaveVisibility(WDVisibility.NONE);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create In context => Value attribute => Say Visibility
Go to its properties
Select com.sap.ide.webdynpro.uielementdefinitions.Visibility
In View Layout
Select UI Element Set Visible property to this context variable Visibility.
In wdDoModifyView() You can set this property to false
wdContext.currentContextElement().setVisibility(false);
Regards,
Kiran
Edited by: Kiran Yadav on Feb 22, 2008 11:29 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for the input......
Can you guys tell me where to create the value attribute........
In the view context or in the component context...........
and field that am talking about is assign to the container you want me to assign this value attribute property to all the fields which is two input box(from and To) and the lable of the box........
Kindly clarify me........
Thanks in Advance,
Dharani
Hi,
You can create this attribute in the view context.
"and field that am talking about is assign to the container you want me to assign this value attribute property to all the fields which is two input box(from and To) and the lable of the box........"
If you wan all this things to be made visible and vice versa, you have to bind to all of this.
Regards
Ayyapparaj
Hi Aiyapparaj,
As per your guidelines I have created the value attribute in View context (which has the field..... which needs to be hide)inside the value node say FieldVisibility.......and attribute name OldTimeDuration......and I set this value with uidefeneitions Visibility .......
and I bind this vaule with the field property visible(Time.......To..........)which I need to hide...........
Now in the view implementation tab ..........I have coded in the doinit method(since my requirement to hide the field from the layout in all cases).........
wdContext.currentFieldVisibilityElement().setOldTimeDuration(WDVisibility.NONE);
But if I deploy the application and see still am getting the same field dispalying in the screen.........
I even tried putting this code in wdmodifyview method.........same results........
Kindly tell me how to hide the field permenantly from the screen............(without any conditions.)
Thanks in Advance,
Dharani
Hi Ayyapparaj,
I have done that....still the field Time......To....... is getting displayed in the layout........
No clue yaar....Please help me to find the root cause of this problem...........
Is there anyother way to hide this field.......
Looking forward to hear from you soon........
Thanks in Advance,
Dharani
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.