on 07-18-2005 9:37 AM
I need to display the following news item in a grey background
BoardMeeting to be held in Nov <More>
More is a link, clicking on which opens the news in detail.
The following is the code i have written to do this. However i am not able to set the background to grey.
Also the group has a gridlayout with colcount 2. So the More link is not displayed immediately after the news. It is displayed in the second column.
Can someone tell me how to do this?
IWDTransparentContainer rootContainer = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDGroup group = (IWDGroup)view.getElement("link_group");
IWDTextView textView = (IWDTextView) view.createElement(IWDTextView.class, null);
textView.setText(abstractValue.getValueAsString());
textView.setWrapping(true);
IWDLinkToURL linkToURL1 = (IWDLinkToURL)view.createElement(IWDLinkToURL.class,null);
linkToURL1.setText("More");
linkToURL1.setReference(tempRes.getAccessURI().toString());
group.addChild(textView);
group.addChild(linkToURL1);
You can change the background color of a group using the "design"-property.
To get the link directly after the text, put both UI elements in a container with flow layout. Generally, prefer the MatrixLayout over GridLayout.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sameer,
you can change the background color by making using of themes in portal.
regards
rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer to Lishas weblog on applying application specific themes in webdynpro
/people/lisha.peter/blog/2005/07/07/make-your-webdynpro-application-theme-specific
Also refer to bharaths article
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/colour... webdynpro applications.pdf
Regards
Rohit
Message was edited by: Rohit Radhakrishnan
Hi Sameer,
Webdynpro provides only limited options for changing the color.In the following code change the primarycolor to secondary or some other suitable color
create the attribute .Select the type from dictionary simple type .Expand com.sap.ide....uielementdefinitions and chose group color
Write the following code to change color
IWDAttributeInfo info = wdContext.getNodeInfo().getAttribute("test");
group.bindDesign(info);
wdContext.currentContextElement().setTest(WDGroupDesign.PRIMARYCOLOR);
Hope this helps you.Kindly reward points if this is found usefull
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer,
I feel wedon't have much choice in selecting the background. You need to choose the one from available like PRIMARY,SAP,SECONDARY,SECONDARYBOX etc.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can bind the design to a context attribute
IWDGroup group =
(IWDGroup) view.getElement("Group1");
group.bindDesign()
Hope this helps u
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try using
Group.setDesign() method.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.