\n\n| \n\n"
+ + "\n");
+ }
+ else if (gridTab.getTabLevel () == 1)
+ {
+ tabString
+ .append ("baseIndentOneTabStyle unselectedTabStyle\" rendered=\"#{!(uiStateBean.tabNo eq "
+ + gridTab.getTabNo ()
+ + ")}\""
+ + " actionListener=\"#{actionListener_lookup["
+ + gridTab.getTabNo ()
+ + "].focus}\" onmouseover=\"this.className='baseIndentOneTabStyle "
+ + "unselectedMouseOverTabStyle';\" onmouseout=\"this.className='baseIndentOneTabStyle unselectedTabStyle';\" />\n"
+ + "\n");
+ }
+ else if (gridTab.getTabLevel () == 2)
+ {
+ tabString
+ .append ("baseIndentTwoTabStyle unselectedTabStyle\" rendered=\"#{!(uiStateBean.tabNo eq "
+ + gridTab.getTabNo ()
+ + ")}\""
+ + " actionListener=\"#{actionListener_lookup["
+ + gridTab.getTabNo ()
+ + "].focus}\" onmouseover=\"this.className='baseIndentTwoTabStyle "
+ + "unselectedMouseOverTabStyle';\" onmouseout=\"this.className='baseIndentTwoTabStyle unselectedTabStyle';\" />\n"
+ + "\n");
+ }
+ tabString
+ .append (" | \n \n");
+ }
+ return tabString;
+ }
+
+ // Generate Detail jsp page
+ private void createDetailPage(String realContextPath)
+ {
+ File detailFile = null;
+ for (int i = 0; i < tabCount; i++)
+ {
+ StringBuilder detailJSP = new StringBuilder ();
+ detailJSP.append (createCompiereHeader ());
+ detailJSP.append (createHeader ());
+ detailJSP.append ("\n");
+ GridTab gridTab = gridWindow.getTab (i);
+ String fileName = formatNameWithFirstLowerCase (gridTab.getName ())
+ + "Detail";
+ String jsfFile = realContextPath + "window/" + fileName + ".jsp";
+ detailFile = new File (jsfFile);
+ gridTab.dataRefreshAll ();
+ boolean isSolo = false; // true if not same line as previous
+ for (int j = 0; j < gridTab.getFieldCount (); j++)
+ {
+ GridField gridField = gridTab.getField (j);
+ // check if displayed
+ if (gridField.isDisplayed ())
+ {
+ int displayType = gridField.getDisplayType ();
+ // check display type to genereate jsf code for each
+ // specific component
+ switch (displayType)
+ {
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15: // this is a Date format. Comes as Date +
+ // Time and needs to be chopped in Backing
+ // Bean
+ case 16: // this is a Date + Time format.
+ case 21: // complete address comma seperated ex:
+ // street, city, state, zip
+ case 22:
+ case 29:
+ case 33:
+ case 34:
+ case 35:
+ case 36:
+ case 37:
+ // text box
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append ("| "
+ + "\n"
+ + " | \n\n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 17:
+ case 18:
+ case 19:
+ // lookup
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ ArrayList al = gridField.getLookup ().getData (
+ true, true, true, true);
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append (" | \n\n"
+ + "\n\n\n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 20:
+ // Check box
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append (" | \n"
+ + "\n"
+ + "\n"
+ + " | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 23:
+ case 24:
+ case 25:
+ case 27:
+ case 28:
+ // custom component
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append (" | "
+ + "\n"
+ + " \n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 30:
+ // search
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append ("| "
+ + "\n"
+ + " | \n\n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 31:
+ // locator
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append ("| "
+ + "\n"
+ + " | \n\n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ case 32:
+ // image
+ // check if same line. make sure that it isn't the
+ // first field. It is possible that the
+ // first field can have same line checked and that
+ // would cause formatting issues.
+ if (gridField.isSameLine () && j != 0)
+ {
+ isSolo = false;
+ }
+ else
+ {
+ if (isSolo)
+ {
+ detailJSP
+ .append ("\n");
+ }
+ detailJSP
+ .append ("\n");
+ isSolo = true;
+ }
+ detailJSP
+ .append ("| "
+ + "\n"
+ + " | \n\n | \n");
+ // check if same line. if yes and not first field,
+ // close table row
+ if (gridField.isSameLine () && j != 0)
+ {
+ detailJSP
+ .append (" \n");
+ }
+ break;
+ default:
+ log.severe ("Display Type not handled for "
+ + gridField.getColumnName ()
+ + " with display type: "
+ + gridField.getDisplayType ());
+ break;
+ }
+ }
+ }
+ detailJSP.append (" ");
+ saveFile (detailFile, detailJSP.toString ());
+ }
+ }
+
+ // Generate Table jsp page
+ private void createTablePage(String realContextPath)
+ {
+ File tableFile = null;
+ for (int i = 0; i < tabCount; i++)
+ {
+ StringBuilder tableJSP = new StringBuilder ();
+ tableJSP.append (createCompiereHeader ());
+ tableJSP.append (createHeader ());
+ GridTab gridTab = gridWindow.getTab (i);
+ String fileName = formatNameWithFirstLowerCase (gridTab.getName ())
+ + "Table";
+ String jsfFile = realContextPath + "window/" + fileName + ".jsp";
+ tableFile = new File (jsfFile);
+ gridTab.dataRefreshAll ();
+ // counter for subscripts
+ int subscriptCount = 0;
+ tableJSP
+ .append ("\n");
+ for (int j = 0; j < gridTab.getFieldCount (); j++)
+ {
+ GridField gridField = gridTab.getField (j);
+ tableJSP
+ .append ("\n\n");
+ // check if displayed
+ if (gridField.isDisplayed ())
+ {
+ int displayType = gridField.getDisplayType ();
+ // check display type to genereate jsf code for each
+ // specific component
+ switch (displayType)
+ {
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15: // this is a Date format. Comes as Date +
+ // Time and needs to be chopped in Backing
+ // Bean
+ case 16: // this is a Date + Time format.
+ case 21: // complete address comma seperated ex:
+ // street, city, state, zip
+ case 22:
+ case 29:
+ case 33:
+ case 34:
+ case 35:
+ case 36:
+ case 37:
+ // text box
+ tableJSP.append ("\n");
+ break;
+ case 17:
+ case 18:
+ case 19:
+ // lookup
+ tableJSP
+ .append ("\n\n\n");
+ break;
+ case 20:
+ // check box
+ tableJSP
+ .append ("\n");
+ break;
+ case 23:
+ case 24:
+ case 25:
+ case 27:
+ case 28:
+ // custom component
+ tableJSP.append ("\n");
+ break;
+ case 30:
+ // search
+ tableJSP
+ .append ("\n");
+ subscriptCount++;
+ break;
+ case 31:
+ // locator
+ tableJSP
+ .append ("\n");
+ subscriptCount++;
+ break;
+ case 32:
+ // image
+ tableJSP
+ .append ("\n");
+ subscriptCount++;
+ break;
+ default:
+ log.severe ("Display Type not handled for "
+ + gridField.getColumnName ()
+ + " with display type: "
+ + gridField.getDisplayType ());
+ subscriptCount++;
+ break;
+ }
+ }
+ tableJSP.append ("\n");
+ }
+ tableJSP.append ("");
+ saveFile (tableFile, tableJSP.toString ());
+ }
+ }
+
+ // Save GridWindow jsf test file
+ private void saveFile(File file, String generatedJSF)
+ {
+ try
+ {
+ FileWriter out = new FileWriter (file);
+ out.write (generatedJSF);
+ out.flush ();
+ out.close ();
+ }
+ catch (IOException ioe)
+ {
+ log.severe ("Error " + ioe.toString ()
+ + " occurred in saveGridWindow");
+ }
+ }
+
+ // format name of file or tab
+ private String formatNameWithFirstLowerCase(String name)
+ {
+ String[] tempNameArray = name.split (" ");
+ for (int i = 0; i < tempNameArray.length; i++)
+ {
+ if (i == 0)
+ {
+ name = tempNameArray[i].toLowerCase ();
+ }
+ else
+ {
+ name += tempNameArray[i];
+ }
+ }
+ return name;
+ }
+
+ // compiere header
+ private StringBuilder createCompiereHeader()
+ {
+ StringBuilder compiereHeader = new StringBuilder ();
+ compiereHeader
+ .append ("<%--/*************************************************************\n"
+ + " **********\n"
+ + " *******\n"
+ + " * Product: Compiere ERP & CRM Smart Business Solution\n"
+ + " * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.\n"
+ + " * This program is free software; you can redistribute it and/or modify it\n"
+ + " * under the terms version 2 of the GNU General Public License as published\n"
+ + " * by the Free Software Foundation. This program is distributed in the hope\n"
+ + " * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\n"
+ + " * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+ + " * See the GNU General Public License for more details.\n"
+ + " * You should have received a copy of the GNU General Public License along\n"
+ + " * with this program; if not, write to the Free Software Foundation, Inc.,\n"
+ + " * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.\n"
+ + " * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html\n"
+ + " * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@compiere.org\n"
+ + " **************************************************************\n"
+ + " **********\n" + " *****/--%>\n");
+ return compiereHeader;
+ }
+
+ // page header
+ private StringBuilder createHeader()
+ {
+ StringBuilder headerString = new StringBuilder ();
+ headerString
+ .append ("<%@page contentType=\"text/html\"%>\n<%@page pageEncoding=\"UTF-8\"%>\n"
+ + "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\"%>\n"
+ + "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\"%>\n"
+ + "<%@ taglib uri=\"http://myfaces.apache.org/tomahawk\" prefix=\"t\"%>\n");
+ return headerString;
+ }
+
+ // Get GridWindow TimeStamp
+ private long getGridWindowTimeStamp()
+ {
+ Timestamp timeStamp = gridWindow.getModelUpdated (true);
+ if (timeStamp.equals (null))
+ {
+ log.severe ("Could not get GridWindow TimeStamp");
+ }
+ return timeStamp.getTime ();
+ }
+}
diff --git a/serverApps/src/main/servlet/org/compiere/jsf/MenuBean.java b/serverApps/src/main/servlet/org/compiere/jsf/MenuBean.java
new file mode 100755
index 0000000000..f3deeee087
--- /dev/null
+++ b/serverApps/src/main/servlet/org/compiere/jsf/MenuBean.java
@@ -0,0 +1,134 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.jsf;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.myfaces.custom.navmenu.NavigationMenuItem;
+
+import org.apache.log4j.Logger;
+
+/**
+ * provides a model of the main menu bar
+ *
+ * @author rfreden
+ */
+public class MenuBean
+{
+ private static final Logger log=Logger.getLogger(MenuBean.class);
+
+ private List menu;
+
+ // label, icon, action
+ // all three null for menu break
+ // first element is the submenu title
+ private static final String[][] fileMenu= { { "File", null, null },
+ { "Print Screen", "/images/PrintScreen16.gif", null },
+ { "Screen Shot", "/images/ScreenShot16.gif", null },
+ { "Report", "/images/Report16.gif", null }, { "Print", "/images/Print16.gif", null },
+ { null, null, null }, { "End", "/images/End16.gif", null },
+ { "Exit", "/images/Exit16.gif", null } };
+
+ private static final String[][] editMenu= { { "Edit", null, null },
+ { "New Record", "/images/New16.gif", null }, { "Save", "/images/Save16.gif", null },
+ { null, null, null }, { "Copy Record", "/images/Copy16.gif", null },
+ { "Delete Record", "/images/Delete16.gif", null },
+ { "Undo Changes", "/images/Undo16.gif", null },
+ { "Requery", "/images/Refresh16.gif", null }, { null, null, null },
+ { "Look Up Record", "/images/Find16.gif", null } };
+
+ private static final String[][] viewMenu= { { "View", null, null },
+ { "Product Info", "/images/Product16.gif", null },
+ { "Business Partner Info", "/images/BPartner16.gif", null },
+ { "Account Info", "/images/InfoAccount16.gif", null },
+ { "Schedule Info", "/images/InfoSchedule16.gif", null }, { null, null, null },
+ { "Order Info", "/images/Info16.gif", null },
+ { "Invoice Info", "/images/Info16.gif", null },
+ { "Shipment Info", "/images/Info16.gif", null },
+ { "Payment Info", "/images/Info16.gif", null },
+ { "Cash Journal Info", "/images/Info16.gif", null },
+ { "Resource Info", "/images/Info16.gif", null },
+ { "Asset Info", "/images/Info16.gif", null }, { null, null, null },
+ { "Attachment", "/images/Attachment16.gif", null },
+ { "History Records", "/images/History16.gif", null }, { null, null, null },
+ { "Grid Toggle", "/images/Multi16.gif", null } };
+
+ private static final String[][] goMenu= { { "Go", null, null },
+ { "First Record", "/images/First16.gif", null },
+ { "Previous Record", "/images/Previous16.gif", null },
+ { "Next Record", "/images/Next16.gif", null },
+ { "Last Record", "/images/Last16.gif", null }, { null, null, null },
+ { "Parent Record", "/images/Parent16.gif", null },
+ { "Detail Record", "/images/Detail16.gif", null }, { null, null, null },
+ { "Zoom Across (Where Used)", "/images/ZoomAcross16.gif", null },
+ { "Check Requests", "/images/Request16.gif", null },
+ { "Archived Documents/Reports", "/images/Archive16.gif", null },
+ { "Menu", "/images/Home16.gif", null } };
+
+ private static final String[][] toolsMenu= { { "Tools", null, null },
+ { "Calculator", "/images/Calculator16.gif", null },
+ { "Calendar", "/images/Calendar16.gif", null },
+ { "Editor", "/images/Editor16.gif", null }, { "Script", "/images/Script16.gif", null },
+ { "Active Workflows", "/images/WorkFlow16.gif", null }, { null, null, null },
+ { "Preference", "/images/Preference16.gif", null } };
+
+ private static final String[][] helpMenu= { { "Help", null, null },
+ { "Help", "/images/Help16.gif", null }, { "Online", "/images/Online16.gif", null },
+ { "Email Support", "/images/EMailSupport16.gif", null },
+ { "About", "/images/About16.gif", null } };
+
+ /** Creates a new instance of MenuBean */
+ public MenuBean()
+ {
+ menu=new ArrayList();
+ menu.add(getNavigationItemListFromArray(fileMenu));
+ menu.add(getNavigationItemListFromArray(editMenu));
+ menu.add(getNavigationItemListFromArray(viewMenu));
+ menu.add(getNavigationItemListFromArray(goMenu));
+ menu.add(getNavigationItemListFromArray(toolsMenu));
+ menu.add(getNavigationItemListFromArray(helpMenu));
+ }
+
+ public List getMenu()
+ {
+ return menu;
+ }
+
+ private NavigationMenuItem getNavigationItemListFromArray(String[][] sa)
+ {
+ NavigationMenuItem root=new NavigationMenuItem(sa[0][0], sa[0][2], sa[0][1], false);
+ List tmp=new ArrayList();
+ for (int i=1; i, for windowNo and tab state string
+ * but... this class should be the only interface to that (currently there is an el expression that looks like #{sessionScope.tabNo[windowNo]} )
+ * this object is _only valid for the windowNo it is instantiated from_
+ * the class furthermore should be the interface to windowNo, which is a request parameter
+ * @author rfreden
+ *
+ */
+public class TabStateManager
+{
+ private static final CLogger log=CLogger.getCLogger(TabStateManager.class);
+
+ // the map should be a non clobberable singleton
+ private static Map tabNo;
+
+ private FacesContext facesContext;
+
+ public TabStateManager(FacesContext fc)
+ {
+ facesContext=fc;
+ if(tabNo==null)
+ {
+ // if it doesn't exist in the session, then instantiate it and put it there
+ if((tabNo=(Map)facesContext.getExternalContext().getSessionMap().get("tabNo"))==null)
+ {
+ tabNo=new HashMap();
+ facesContext.getExternalContext().getSessionMap().put("tabNo",tabNo);
+ }
+ }
+ }
+
+ public UIStateBean getUIState()
+ {
+ return (UIStateBean)facesContext.getApplication().getVariableResolver().resolveVariable(facesContext,"uiStateBean");
+ }
+}
diff --git a/serverApps/src/main/servlet/org/compiere/jsf/UIStateBean.java b/serverApps/src/main/servlet/org/compiere/jsf/UIStateBean.java
new file mode 100755
index 0000000000..9de96fbc16
--- /dev/null
+++ b/serverApps/src/main/servlet/org/compiere/jsf/UIStateBean.java
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.jsf;
+
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.compiere.util.CLogger;
+
+/**
+ * holds state for a window; currently it tracks only the windowNo attribute, provided on initial load
+ * an instance of this class should be available for any window page, as it is persisted throughout the view existence via t:saveState
+ * @author rfreden
+ *
+ */
+public class UIStateBean implements Serializable
+{
+ private static final long serialVersionUID=2930846164351L;
+
+ private static final CLogger log=CLogger.getCLogger(UIStateBean.class);
+
+ // TODO: this should be an Integer
+ private String windowNo;
+
+ private boolean gridView;
+
+ private int tabNo;
+
+ public UIStateBean()
+ {
+ // int and boolean default initializers put this initial state at tab0Detail
+ String[] s=(String[])FacesContext.getCurrentInstance().getExternalContext().getRequestParameterValuesMap().get("windowNo");
+ if(s!=null)
+ {
+ windowNo=s[0];
+ log.info("got windowNo "+windowNo);
+ }
+ }
+
+ public void setWindowNo(String w)
+ {
+ log.info("setting windowNo "+w);
+ windowNo=w;
+ }
+
+ public String getWindowNo()
+ {
+ //log.info("getting windowNo "+windowNo);
+ return windowNo;
+ }
+
+ public Boolean getGridView()
+ {
+ return gridView;
+ }
+
+ public void setGridView(Boolean b)
+ {
+ gridView=b;
+ }
+
+ public Integer getTabNo()
+ {
+ return tabNo;
+ }
+
+ public void setTabNo(Integer i)
+ {
+ tabNo=i;
+ }
+
+ public String getTabState()
+ {
+ String s="tab"+String.valueOf(tabNo)+(gridView?"Table":"Detail");
+ log.info("returning "+s);
+ return s;
+ }
+
+ public void toggleGridView(ActionEvent ae)
+ {
+ log.info("called");
+ gridView=!gridView;
+ }
+}
|