on 09-23-2009 7:44 AM
Hi
We are using the export excel component, but the problem is that in the getinfocolumns method we need to put the label for the column and we have the application working in two language: spanish and english. We want to send the translated label of the webdynpro table in this method.
Someone can help us?
Thank you
hi, thank you but in the method for set the columns names for excel i dont have access to view element. I only can access to viewElement in the method modifyview, so i cant do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Still you can do that.
one way: Get the lables in the domodify put them inside a context attribute of type array and use this context variable where ever you want.
second way: create a context variable of type IWDView and set this context values in domodify(may be use can use the iffirsttime variable to set it only ones) and use this context variable where ever you want.....
Looks some thing like this:
first in domodify()
try
{
if(firstTime)
{
wdContext.currentContextElement().setVa_view(view);
}
.
.
.
.}
then i used this context variable in doinit() like this...
public void wdDoInit()
{
//@@begin wdDoInit()
try
{
IWDTable tbl=(IWDTable )wdContext.currentContextElement().getVa_view().getElement("Table");
IWDTableColumn col=(IWDTableColumn )tbl.getColumn(0);
IWDCaption cap=(IWDCaption)col.getHeader();
String strColHdr=cap.getText();
//Or use try the below one
String strColHdr2=cap.toString();
}
catch(Exception e)
{
}
//@@end
}
Regards,
SrinivaS
Edited by: srinivas sistu on Sep 24, 2009 2:42 PM
thank you very much. I thought the first way, but i prefer the second way you said.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In domodify, write the below code and get the colomn headres of the table and pass this value to the required method where you are displaying the XL.
try
{
IWDTable tbl=(IWDTable )view.getElement("Table");
IWDTableColumn col=(IWDTableColumn )tbl.getColumn(0);
IWDCaption cap=(IWDCaption)col.getHeader();
String strColHdr=cap.getText();
//Or use try the below one
String strColHdr2=cap.toString();
}
catch(Exception e)
{
}
Regards,
SrinivaS
PS: The above is just give you an initial idea. Sorry I couldnot give exact code as now I am not able to connect an EP Server to test my code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.