on 02-18-2009 10:38 AM
Hi Colleagues,
I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table
could anyone please help me here?
Thanks & Regards
Swetha
Do you really need a Table for this? What is contained in your 12 cells?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
In a window i have to develop a part of window which looks like this
Image URL Description
Image URL Description
Image URL Description
Image URL Description
I have tried doing this using Flow layout for each line
But when i follwed that the last column "description" is not alligned in a straight line(for all rows)
structure is not even as shown above
(varying depending upon the length of the URL)
Here i have attached the piece of code i used
IWDTransparentContainer MainContainer1 = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
IWDFlowLayout flowlayout1 = (IWDFlowLayout)MainContainer1.createLayout(IWDFlowLayout.class);
////For adding Image
IWDImage image = (IWDImage)view.createElement(IWDImage.class);
image.createLayoutData(IWDFlowData.class);
image.setSource("~sapicons/s_b_alet.gif");
/////for Adding URL
IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);
IWDTextAccessor link1text = wdComponentAPI.getTextAccessor();
link1.setText("Collaboration Window");
IWDAction Action1 = (IWDAction)view.getAction("Openlink");
link1.setOnAction(Action1);
IWDFlowData linkdata1 = link1.createLayoutData(IWDFlowData.class);
WDLayoutCellDesign rightpad = WDLayoutCellDesign.R_PAD;
WDLayoutCellSeparator seperator = WDLayoutCellSeparator.LARGE;
linkdata1.setCellDesign(rightpad);
linkdata1.setVGutter(seperator);
///for adding description
IWDTextView text1 = (IWDTextView)view.createElement(IWDTextView.class);
text1.setText("Testing");
IWDFlowData textdata1 = text1.createLayoutData(IWDFlowData.class);
textdata1.setCellDesign(rightpad);
textdata1.setVGutter(seperator);
MainContainer1.addChild(image);
MainContainer1.addChild(link1);
MainContainer1.addChild(text1);
IWDGridData maincont1 = MainContainer1.createLayoutData(IWDGridData.class);
maincont1.setPaddingLeft("10px");
maincont1.setPaddingTop("20px");
I found that this static way of adding rows is not the right way( Keeping in mind the future enhancements)
So thought of trying it through table
i have used IWDtable ...but the look does'nt meets the requirement at all(it has header....border..scrollbar..rows and colums are seperated by lines---> which are not needed)
Could you please let me know is there a approach to do this?
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Feb 18, 2009 12:32 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:33 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:34 PM
Which version are you using? Do you have a RowRepeater UI element in your version?
If not, you could either
- use the Table with gridMode=none, headerVisible=false, footerVisible=false, visibleRowCount=<size of data source node>
- use individual UI elements with a MatrixLayout, where the Image elements have MatrixHeadData (which starts a new line)
Armin
Hi Swetha,
How is everyone at labs? Hope things are going great there.
If you are directly creating UI elements in your container then you can use ColumnLayout to get the alignment correct. Set the number of columns to three.
For your requirement you can use a RowRepeater instead of a table. That will satisfy your requirement.
If you are using a RowRepeater then create a valueNode Directly under context and add your three attributes. Bind the node to the RowRepeater.
You can use this code below which creates the UI dynamically and binds it to the node "test" which is directly under the context. The node test has three attributes.
if(firstTime){
IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootElement");
IWDRowRepeater rowRepeater = (IWDRowRepeater)view.createElement(IWDRowRepeater.class,
"DynamicRowRepeater");
rowRepeater.bindDataSource("test");
////For adding Image
IWDImage image = (IWDImage)view.createElement(IWDImage.class);
image.bindSource("test.image");
rowRepeater.addRowElement(image);
/////for Adding URL
IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);
link1.bindText("test.URL");
IWDAction Action1 = (IWDAction)view.getAction("Openlink");
link1.setOnAction(Action1);
rowRepeater.addRowElement(link1);
///for adding description
IWDTextView text = (IWDTextView)view.createElement(IWDTextView.class);
text.bindText("test.describtion");
rowRepeater.addRowElement(text);
container.addChild(rowRepeater);
}
In your wdDoInit() you can create four elements in the node test and fill it with your data. Your UI's will be rendered properly.
For URL you can use LinkToURL UI element instead of LinkToAction if URL is available at runtime.
If you need more help you can always ask Pramod, Vidhya, Prashantha or Tushar.
Regards,
Sanyev
Hi good morning, I need to create a dinamic table, I have to make a WebDynpro happened where the number of columns and make the table.
Thanks & Regards
Cristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do not hijack threads, use your own thread instead. You can tag people if you want to get their attention.
Hi,
You can use the RowRepeater UI element. If its available in your version.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to create the table in wdDoModifyView of your view.
if (firstTime)
{
IWDTable table = (IWDTable) view.CreateElement("IWDTable", null);
}
Check the API or documentation for further options. (E.g. context binding and formatting).
Good luck, Roelof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.