on 02-20-2009 12:00 PM
Hi
I have abutton as soon as i click it a button need to be displyed..i need how to gereate a button by coding .
Thanks
Rahul
Hi,
Create two buttons at design time lets say buttonA and ButtonB.
Create a context attribute of type "Visibility"(com.sap.ide.webdynpro.uielementdefinitions.Visibility) lets say "Visible"
Bind this attribute to "visible" property of ButtonB
In the DoInit method set the visibility to none , so that its not initially visible
public void wdDoInit()
{
//@@begin wdDoInit()
wdContext.currentContextElement().setVisible(WDVisibility.NONE);
//@@end
}
Create action handler for buttonA
Make the button visible using the following code
wdContext.currentContextElement().setVisible(WDVisibility.VISIBLE);
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,
Following is the code to do this
if(buttonClicked) // this is to check when to create the button, make this variable true when first button is pressed.
{
IWDButton button = view.createElement(IWDButton.class);
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("<Your Attribute>");
button.bindText(attributeInfo);
}
Did you searched the forum?
Regards
Ayyapparaj
Hi Rahul,
/people/ulrich.waiditschka/blog/2007/11/28/dynamic-user-interface-generation-in-web-dynpro-for-java--use-and-implementation
check this link it will be useful , it explains Dynamic User Interface Generation in Web Dynpro for Java - Use and Implementation
Regards,
Sam Charles J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.