on 01-12-2012 6:08 AM
Hello Experts,
I am new to webdynpro.
I have a requirement to create the input filed dynamically for material.
Requirement:- I have to button in my screen "+" and "-" button.
after execution while i will click on + button one input filed should be created automatically and while i will clicik on
- button the newly creaed inputfield should be deleted from the screen.
Coulld anybody help me on this.
it would be great if somebody can share any solutin or sample code.
Thanks in Adv...
Hi,
just being curious: In what situation are you, that you have to dynamically create UI-Elements and I guess respective Context as well? Couldn't you just create the input-field in design time, set it invisible and set it visible dynamically when pushing that button?
Cheers, Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Couldn't you just create the input-field in design time, set it invisible and set it visible dynamically when pushing that button?
Hi Lukas,
Jus to clarify on this: There might be situations, we don't know how many fields the user wants to create at runtime.
Let say, the user is inserting product items and their validities, we are not sure how many product items he is going to insert.
To simplify this situation we can use a table UI with add button also.
Thanks & Regards,
Kiran.
Hi Kiran,
Jus to clarify on this: There might be situations, we don't know how many fields the user wants to create at runtime.
Yes, OK, that does make sense and justifies the effort in this case, I agree with you.
But in OP's case I think he only wants one field:
after execution while i will click on + button one input filed should be created automatically and while i will clicik on
Still, it does make sense to dynamically create them if there could be one up to X to keep the application slender.
Cheers, Lukas
Hi Lukas,
Yep. If it is one input field he can set it invisible and onClick of add button he can set it visible. But User can click that button again.! and one input field has to create..!! Ok we will leave this to him. It doesn't make sense discussing on this without knowing what excatly the requirement was.
Cheers,
Kiran.
Hi Lukas,
>
> Yep. If it is one input field he can set it invisible and onClick of add button he can set it visible. But User can click that button again.! and one input field has to create..!! Ok we will leave this to him. It doesn't make sense discussing on this without knowing what excatly the requirement was.
>
> Cheers,
> Kiran.
Haha, you are right . I think he has to good approaches now and can choose as per his requirements accordingly
Cheers, Lukas
Hi Kiran,
how can we add search help to input field dynamically . if u have any code snippets drop a mail to me
Thanks in Advance.
Hello,
you can create as many as UI you want to create but for that you need to write code in the Modifyview method.
here is a good link which will provide you no. of links to do this things..
BR
Chandra..
just make use of OVS(https://www.google.co.in/#fp=40855a382358404c&q=how%20to%20implement%20ovs%20in%20webdynpro%20abap)
on the particular attribute and bind that attribute with newly created input field as you must provided some attribute in dynamic creation of input field.
.. Chandra..
Hi,
You need to code in DOMODIFYVIEW method. Check this wiki for reference: [Dynamic UI in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application]
Also check this demo by thomas sir: [Dynamic Programming in WDA|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89]
hope this helps u.,
Thanks & Regards,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.