本文整理汇总了Java中com.extjs.gxt.ui.client.widget.grid.Grid.getStore方法的典型用法代码示例。如果您正苦于以下问题:Java Grid.getStore方法的具体用法?Java Grid.getStore怎么用?Java Grid.getStore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.extjs.gxt.ui.client.widget.grid.Grid
的用法示例。
在下文中一共展示了Grid.getStore方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTestConnection
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
*
* @param event
*/
private void onTestConnection(AppEvent event)
{
if (tabWidget != null)
{
InstancesTabItem instancesTabItem = (InstancesTabItem) tabWidget.getItemByItemId(INSTANCES_TAB_ITEM_ID);
final InstanceGridWidget instancesInfoWidget =
instancesTabItem.getInstanceManagementWidget().getInstancesInfo();
final Grid<GSInstanceModel> grid = instancesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof GSInstanceModel))
{
GSInstanceModel instance = event.getData();
instancesManagerServiceRemote.testConnection(instance, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName() */"Instance Service",
/* TODO: I18nProvider.getMessages().ruleFetchFailureMessage() */ "Error occurred testing connection to Instance ("+caught.getMessage()+")!" });
}
public void onSuccess(Void result)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName() */"Instance Service",
/* TODO: I18nProvider.getMessages().ruleFetchFailureMessage() */ "Connection to Instance succesful!" });
}
});
}
}
}
示例2: onSaveInstance
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
*
* @param event
*/
private void onSaveInstance(AppEvent event)
{
if (tabWidget != null)
{
InstancesTabItem instancesTabItem = (InstancesTabItem) tabWidget.getItemByItemId(INSTANCES_TAB_ITEM_ID);
final InstanceGridWidget instancesInfoWidget =
instancesTabItem.getInstanceManagementWidget().getInstancesInfo();
final Grid<GSInstanceModel> grid = instancesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof GSInstanceModel))
{
GSInstanceModel instance = event.getData();
instancesManagerServiceRemote.saveInstance(instance, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[] { /* I18nProvider.getMessages().ruleServiceName() */"Instance Service",
/* I18nProvider.getMessages().ruleFetchFailureMessage() */ "Error occurred while saving instance!" });
}
public void onSuccess(Void result)
{
// grid.getStore().sort(BeanKeyValue.NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Instance Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Instance saved successfully!" });
}
});
}
}
}
示例3: onDeleteInstance
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
*
* @param event
*/
private void onDeleteInstance(AppEvent event)
{
if (tabWidget != null)
{
InstancesTabItem instancesTabItem = (InstancesTabItem) tabWidget.getItemByItemId(INSTANCES_TAB_ITEM_ID);
final InstanceGridWidget instancesInfoWidget =
instancesTabItem.getInstanceManagementWidget().getInstancesInfo();
final Grid<GSInstanceModel> grid = instancesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof GSInstanceModel))
{
GSInstanceModel instance = event.getData();
instancesManagerServiceRemote.deleteInstance(instance,
new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName() */"Instance Service",
/* TODO: I18nProvider.getMessages().ruleFetchFailureMessage() */ "Error occurred while removing Instance!" });
}
public void onSuccess(Void result)
{
// grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Instance Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Instance removed successfully!" });
}
});
}
}
}
示例4: onSaveUser
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
* On update profile.
*
* @param event
* the event
*/
private void onSaveUser(AppEvent event)
{
if (tabWidget != null)
{
GsUsersTabItem usersTabItem = (GsUsersTabItem) tabWidget.getItemByItemId(USERS_TAB_ITEM_ID);
final UserGridWidget usersInfoWidget = usersTabItem.getUserManagementWidget().getUsersInfo();
final Grid<GSUserModel> grid = usersInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof GSUserModel))
{
GSUserModel user = event.getData();
gsManagerServiceRemote.saveGsUser(user, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[]
{
"User Service",
"Error occurred while saving the new user!"
});
}
public void onSuccess(Void result)
{
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"User Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "User saved successfully!" });
}
});
}
}
}
示例5: onDeleteUser
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
* On delete profile.
*
* @param event
* the event
*/
private void onDeleteUser(AppEvent event)
{
if (tabWidget != null)
{
GsUsersTabItem usersTabItem = (GsUsersTabItem) tabWidget.getItemByItemId(USERS_TAB_ITEM_ID);
final UserGridWidget usersInfoWidget = usersTabItem.getUserManagementWidget().getUsersInfo();
final Grid<GSUserModel> grid = usersInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof GSUserModel))
{
GSUserModel user = event.getData();
gsManagerServiceRemote.deleteGsUser(user, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[]
{
"User Service",
"Error occurred while deleting the selected user."
});
}
public void onSuccess(Void result)
{
// grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(),SortDir.ASC);//<<-- ric mod 20100215
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"User Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "User removed successfully!" });
}
});
}
}
}
示例6: onSaveProfile
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
*
* @param event
*/
private void onSaveProfile(AppEvent event)
{
if (tabWidget != null)
{
ProfilesTabItem profilesTabItem = (ProfilesTabItem) tabWidget.getItemByItemId(PROFILES_TAB_ITEM_ID);
final ProfileGridWidget profilesInfoWidget = profilesTabItem.getProfileManagementWidget().getProfilesInfo();
final Grid<UserGroupModel> grid = profilesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof UserGroupModel))
{
UserGroupModel profile = event.getData();
profilesManagerServiceRemote.saveProfile(profile, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[] { /* I18nProvider.getMessages().ruleServiceName() */"Profile Service",
/* I18nProvider.getMessages().ruleFetchFailureMessage() */ "Error occurred while saving profile!" });
}
public void onSuccess(Void result)
{
// grid.getStore().sort(BeanKeyValue.NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Profile Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Profile saved successfully!" });
}
});
}
}
}
示例7: onDeleteProfile
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
*
* @param event
*/
private void onDeleteProfile(AppEvent event)
{
if (tabWidget != null)
{
ProfilesTabItem profilesTabItem = (ProfilesTabItem) tabWidget.getItemByItemId(PROFILES_TAB_ITEM_ID);
final ProfileGridWidget profilesInfoWidget = profilesTabItem.getProfileManagementWidget().getProfilesInfo();
final Grid<UserGroupModel> grid = profilesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null) && (event.getData() != null) && (event.getData() instanceof UserGroupModel))
{
UserGroupModel profile = event.getData();
profilesManagerServiceRemote.deleteProfile(profile, new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName() */"Profile Service",
/* TODO: I18nProvider.getMessages().ruleFetchFailureMessage() */ "Error occurred while removing Profile!" });
}
public void onSuccess(Void result)
{
// grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
grid.getStore().getLoader().load();
grid.repaint();
Dispatcher.forwardEvent(
GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[] { /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Profile Service",
/* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Profile removed successfully!" });
}
});
}
}
}
示例8: onApplyChangesRules
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
* On apply changes rules.
*
* @param event
* the event
*/
private void onApplyChangesRules(AppEvent event)
{
if (tabWidget != null)
{
RulesTabItem rulesTabItem = (RulesTabItem) tabWidget.getItemByItemId(RULES_TAB_ITEM_ID);
final RuleGridWidget rulesInfoWidget = rulesTabItem.getRuleManagementWidget().getRulesInfo();
final Grid<RuleModel> grid = rulesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null))
{
ListStore<RuleModel> store = grid.getStore();
if ((store != null) && (store.getModels() != null) &&
(store.getModels().size() > 0))
{
// TODO: details?
rulesManagerServiceRemote.saveAllRules(store.getModels(),
new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[]
{
I18nProvider.getMessages().ruleServiceName(),
I18nProvider.getMessages().ruleFetchFailureMessage()
});
grid.getStore().getLoader().setSortDir(SortDir.ASC);
grid.getStore().getLoader().setSortField(
BeanKeyValue.PRIORITY.getValue());
grid.getStore().getLoader().load();
grid.repaint();
}
public void onSuccess(Void result)
{
grid.getStore().getLoader().setSortDir(SortDir.ASC);
grid.getStore().getLoader().setSortField(
BeanKeyValue.PRIORITY.getValue());
grid.getStore().getLoader().load();
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[]
{
I18nProvider.getMessages().ruleServiceName(),
I18nProvider.getMessages().ruleFetchSuccessMessage()
});
}
});
}
}
}
}
示例9: onRemoveRule
import com.extjs.gxt.ui.client.widget.grid.Grid; //导入方法依赖的package包/类
/**
* On remove rule.
*
* @param event
* the event
*/
private void onRemoveRule(AppEvent event)
{
if (tabWidget != null)
{
Object tabData = event.getData();
if (tabData instanceof RuleModel)
{
RuleModel model = (RuleModel) tabData;
RulesTabItem rulesTabItem = (RulesTabItem) tabWidget.getItemByItemId(RULES_TAB_ITEM_ID);
final RuleGridWidget rulesInfoWidget = rulesTabItem.getRuleManagementWidget().getRulesInfo();
final Grid<RuleModel> grid = rulesInfoWidget.getGrid();
if ((grid != null) && (grid.getStore() != null))
{
ListStore<RuleModel> store = grid.getStore();
if ((store != null) && (store.getModels() != null) &&
(store.getModels().size() > 0))
{
rulesManagerServiceRemote.deleteRule(model,
new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
Dispatcher.forwardEvent(GeofenceEvents.SEND_ERROR_MESSAGE,
new String[]
{
I18nProvider.getMessages().ruleServiceName(),
I18nProvider.getMessages().ruleFetchFailureMessage()
});
}
public void onSuccess(Void result)
{
grid.getStore().getLoader().setSortDir(SortDir.ASC);
grid.getStore().getLoader().setSortField(
BeanKeyValue.PRIORITY.getValue());
grid.getStore().getLoader().load();
Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
new String[]
{
I18nProvider.getMessages().ruleServiceName(),
I18nProvider.getMessages().ruleFetchSuccessMessage()
});
}
});
}
}
}
}
}