Created
November 20, 2012 18:20
-
-
Save mudgen/4119809 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.inductiveautomation.gemsecs.webpages; | |
| import org.apache.wicket.markup.html.WebMarkupContainer; | |
| import org.apache.wicket.model.IModel; | |
| import org.apache.wicket.model.Model; | |
| import com.inductiveautomation.gemsecs.EquipmentRecord; | |
| import com.inductiveautomation.ignition.gateway.localdb.persistence.RecordMeta; | |
| import com.inductiveautomation.ignition.gateway.web.components.ConfigPanel; | |
| import com.inductiveautomation.ignition.gateway.web.components.RecordActionTable; | |
| import com.inductiveautomation.ignition.gateway.web.components.actions.EditRecordAction; | |
| import com.inductiveautomation.ignition.gateway.web.components.actions.NewRecordAction; | |
| import com.inductiveautomation.ignition.gateway.web.pages.IConfigPage; | |
| public class EquipmentSettingsPage extends RecordActionTable<EquipmentRecord> { | |
| ConfigPanel fileUploadPanel = null; | |
| public EquipmentSettingsPage(IConfigPage configPage) { | |
| super(configPage); | |
| // TODO Auto-generated constructor stub | |
| } | |
| @Override | |
| public String[] getMenuPath() { | |
| // TODO Auto-generated method stub | |
| return null; | |
| } | |
| @Override | |
| protected RecordMeta<EquipmentRecord> getRecordMeta() { | |
| return EquipmentRecord.META; | |
| } | |
| @Override | |
| protected String getTitleKey() { | |
| return "EquipmentRecord.title"; | |
| } | |
| @Override | |
| protected WebMarkupContainer newEditRecordAction(String id, EquipmentRecord record) { | |
| System.out.println("newEditRecordAction called here"); | |
| return new EditRecordAction<EquipmentRecord>(id, configPage, getActionParentPanel(), record) { | |
| @Override | |
| protected ConfigPanel createPanel(EquipmentRecord record) { | |
| System.out.println("createPanel called here"); | |
| if(fileUploadPanel == null) { | |
| fileUploadPanel = new FileUploadRecordEditForm(configPage, parentPanel, Model.of("Test"), record); | |
| } | |
| return fileUploadPanel; | |
| } | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment