When I send a Collection Table to Excel from a link on my jsp and open it in Excel, when I go back to my jsp, no matter what link I press, it seems to refresh my screen only. If I then press the same link again, it works fine. I have attached a sample jsp and the java file for it. I have also attached the excel jsp page. I will try to add the excel java file also, but 3 seems to be the limit.
Hi Yana,
Thanks for your reply. I have attached the files you requested. When I got to the point of creating my excel file, I had it open, it looked good, I then closed excel and went back to my jsp page. I then clicked the link for the Menu and the screen blinked. (probably refreshed?) I then pressed the same link again and went to the Menu screen. This is the action I was referring to.
Asaf, thanks for the reply. As far as I can tell, where I utilize the “bold” parameter seems correct. I have it coded as "style=“font-weight:bold;” in the jsp excel pages, and “font-weight:bold;” within a tab in the regular jsp pages. What I believe, is that there seems to be some lack of syncronization with Applinx and the Host screen. One point to consider is I have recently found that a jsp page that contains a vertical collection table will function correctly in pressing link buttons. The problem seems to lie with my horizontal and vertical collection tables. I may have 2 or 3 horizontal screens combined into a collection table which can result in a significantly large jsp screen that could have hundreds of rows of data displayed. When I activate the “excel” link, the excel.jsp page is called and the function executed, but I think it is getting confused somewhere (I know I am), and it is still residing on the excel.jsp page with the Host screen being elsewhere. Now, would Applinx then execute some sort of syncronization to align itself with the Host screen? Maybe this is the “blink” that occurs. I appreciate your assistance and welcome any suggestions.
Hi Joe,
We recommend you to save the collected table in session variable, and the excel page should read the table from the session variable.
There is such an example in the attached ZIP file. In WareHouseList.java you can see how it WarehousesList.zip (2.16 KB)
In my previous examples, I believe it already does this. In the PA2.java file I have:
public void gx_fillForm() throws GXGeneralException{
//This will run the path to gather the single occurrance fields for the jsp page.
GXPathResponse res = getGXSession().executePath("Potential_analysis_collection");
gx_fillForm(res.getScreens());
//This runs the path to create the Applinx table for the jsp page.
GXITable gx_table = getGXSession().getTable("Potential_analysis_collection");
getTagsAccesor().setTagTable("Potential_analysis_collection",gx_table,getGXAppConfig().getTableBuildConfig(),this);
getSession().setAttribute(EXCEL_TABLE_SESSION_KEY, gx_table);
}
The PA2_excel.java file has this:
/// Retrieving A table stored in the http session
Object obj = getSession().getAttribute(EXCEL_TABLE_SESSION_KEY);
if (obj != null){
gx_table = (GXITable)obj;
}
else{
gx_table = getGXSession().getTable();
}
getResponse().reset();
getResponse().setContentType("application/vnd.ms-excel");
getResponse().addHeader("Content-Disposition","attachment; filename=\"" + gx_table.getName() + ".xls\"");
GXTableSerializer serializer = new GXTableSerializer();
String xlStr = serializer.serialize(gx_table, getApplication().getRealPath("/hostTable.xsl"));
getTagsAccesor().setTagContent("excelData", xlStr);
Isn’t this doing what your example shows? Please correct me if I am wrong.
Hi Joe,
We saw what the problematic issues are.
We wrote a code sample that solves the problem. Before we hand it to you, we want to debug it and see that it fits your case,
So we will need a new GCT, that doesn
Hi Joe,
Thanks for the GCT, it was indeed what we were looking for.
We contract a code example that should solve the problems you are facing.
In your code instead of calling