package er.divalite.example.components; // Generated by the WOLips Templateengine Plug-in at java.util.GregorianCalendar[time=1211468796901,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Zurich",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=121,lastRule=java.util.SimpleTimeZone[id=Europe/Zurich,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2008,MONTH=4,WEEK_OF_YEAR=21,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=143,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=5,HOUR_OF_DAY=17,MINUTE=6,SECOND=36,MILLISECOND=901,ZONE_OFFSET=3600000,DST_OFFSET=3600000] import com.webobjects.appserver.WOComponent; import com.webobjects.appserver.WOContext; import com.webobjects.appserver.WORedirect; import com.webobjects.directtoweb.D2W; import com.webobjects.directtoweb.EditPageInterface; import com.webobjects.directtoweb.ErrorPageInterface; import com.webobjects.directtoweb.QueryPageInterface; import com.webobjects.foundation.NSArray; public class MenuHeader extends WOComponent { public String entityNameInList; private String _manipulatedEntityName; public MenuHeader(WOContext aContext) { super(aContext); } public String manipulatedEntityName() { if (_manipulatedEntityName == null) { WOComponent currentPage = context().page(); _manipulatedEntityName = D2W.entityNameFromPage(currentPage); } return _manipulatedEntityName; } public void setManipulatedEntityName(String newValue) { _manipulatedEntityName = newValue; } @SuppressWarnings("unchecked") public NSArray visibleEntityNames() { return D2W.factory().visibleEntityNames(session()); } public String ajaxQueryActionName() { return "AjaxQuery" + _manipulatedEntityName; } public String queryActionName() { return "Query" + _manipulatedEntityName; } @Deprecated public WOComponent findEntityAction() { QueryPageInterface newQueryPage = D2W.factory().queryPageForEntityNamed(_manipulatedEntityName, session()); return (WOComponent) newQueryPage; } public String newActionName() { return "Create" + _manipulatedEntityName; } public String ajaxNewActionName() { return "AjaxCreate" + _manipulatedEntityName; } @Deprecated public WOComponent newObjectAction() { WOComponent nextPage = null; try { EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(_manipulatedEntityName, session()); epi.setNextPage(context().page()); nextPage = (WOComponent) epi; } catch (IllegalArgumentException e) { ErrorPageInterface epf = D2W.factory().errorPage(session()); epf.setMessage(e.toString()); epf.setNextPage(context().page()); nextPage = (WOComponent) epf; } return nextPage; } public WOComponent logout() { WOComponent redirectPage = pageWithName("WORedirect"); ((WORedirect) redirectPage).setUrl(D2W.factory().homeHrefInContext(context())); session().terminate(); return redirectPage; } @Deprecated public WOComponent homeAction() { return D2W.factory().defaultPage(session()); } }