本文整理汇总了Java中org.primefaces.event.CellEditEvent类的典型用法代码示例。如果您正苦于以下问题:Java CellEditEvent类的具体用法?Java CellEditEvent怎么用?Java CellEditEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CellEditEvent类属于org.primefaces.event包,在下文中一共展示了CellEditEvent类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if (!oldValue.equals(newValue)) {
// Save to the database
DataTable table = (DataTable) event.getSource();
Customer customer = (Customer) table.getRowData();
ejbFacade.edit(customer);
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(FacesMessage.SEVERITY_INFO, "Successfully Updated", "Updated value to " + newValue));
}
}
开发者ID:javaee-samples,项目名称:javaee8-applications,代码行数:13,代码来源:CustomerController.java
示例2: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent e) {
Cell newCell = (Cell) e.getNewValue();
int columnId = newCell.getColumnId();
int rowId = newCell.getRowId();
try {
com.aspose.cells.Cell c = getAsposeWorksheet().getCells().get(rowId, columnId);
if (newCell.getFormula() != null) {
c.setFormula(newCell.getFormula(), null);
} else {
c.putValue(newCell.getValue(), true);
}
cells.putCell(workbook.getCurrent(), columnId, rowId, newCell);
} catch (com.aspose.cells.CellsException x) {
LOGGER.throwing(null, null, x);
}
}
开发者ID:AsposeShowcase,项目名称:Html5_Spreadsheet_Editor_by_Aspose.Cells_for_Java,代码行数:18,代码来源:WorksheetView.java
示例3: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent event) {
try {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if (newValue != null && !newValue.equals(oldValue)) {
this.messageUtil.infoText(oldValue + " -> " + newValue);
}
}
catch (Exception err) {
this.messageUtil.error(err);
}
}
开发者ID:ddRPB,项目名称:rpb,代码行数:13,代码来源:StudyBean.java
示例4: onCellEditCondition
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEditCondition(CellEditEvent event) throws InvalidSensorDataTypeException {
ConditionVO modifiedCond = rules.get(activeRuleIndex).getConditions().get(event.getRowIndex());
switch (modifiedCond.getSensor().getType()) {
case Light:
modifiedCond.getValue().setType(SensorType.Light);
break;
case Temperature:
modifiedCond.getValue().setType(SensorType.Temperature);
break;
default:
throw new InvalidSensorDataTypeException("Unknown SensorType!");
//break;
}
ruleContainer.updateRule(rules.get(activeRuleIndex));
}
开发者ID:daergoth,项目名称:hiots,代码行数:16,代码来源:RulesManager.java
示例5: onCellEditAction
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEditAction(CellEditEvent event) throws InvalidActorStateTypeException {
ActionVO modifiedAct = rules.get(activeRuleIndex).getActions().get(event.getRowIndex());
switch (modifiedAct.getActor().getType()) {
case Lamp:
modifiedAct.getValue().setType(ActorType.Lamp);
break;
case Thermostat:
modifiedAct.getValue().setType(ActorType.Thermostat);
break;
default:
throw new InvalidActorStateTypeException("Unknown ActorType");
//break;
}
ruleContainer.updateRule(rules.get(activeRuleIndex));
}
开发者ID:daergoth,项目名称:hiots,代码行数:16,代码来源:RulesManager.java
示例6: onContactEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onContactEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if(newValue != null && !newValue.equals(oldValue))
applicationBean.sendMessageInfo("clientes.contacto.cambio.titulo", "clientes.contacto.cambio", oldValue.toString(), newValue.toString());
}
开发者ID:ganzux,项目名称:SIRME,代码行数:8,代码来源:TeamsBean.java
示例7: onContactEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onContactEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if(newValue != null && !newValue.equals(oldValue))
applicationBean.sendMessageInfo("clientes.contacto.cambio.titulo", "clientes.contacto.cambio", oldValue.toString(), newValue.toString());
}
开发者ID:ganzux,项目名称:SIRME,代码行数:8,代码来源:UsersBean.java
示例8: onAddressEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onAddressEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if(newValue != null && !newValue.equals(oldValue) )
applicationBean.sendMessageInfo("Direccion del Servicio cambiada", "Antes ?, ahora ?", oldValue.toString(), newValue.toString());
}
开发者ID:ganzux,项目名称:SIRME,代码行数:8,代码来源:CustomersBean.java
示例9: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if(newValue != null && !newValue.equals(oldValue)) {
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Cell Changed", "Old: " + oldValue + ", New:" + newValue);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:10,代码来源:TableBean.java
示例10: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent event) {
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
if (newValue != null && !newValue.equals(oldValue)) {
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Cell Changed", "Old: " + oldValue + ", New:" + newValue);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
开发者ID:jimaguere,项目名称:Maskana-Gestor-de-Conocimiento,代码行数:10,代码来源:TrabajosGradoBean.java
示例11: onCellEdit
import org.primefaces.event.CellEditEvent; //导入依赖的package包/类
public void onCellEdit(CellEditEvent event) {
log.info("row changed... " + event);
save();
}
开发者ID:SchweizerischeBundesbahnen,项目名称:releasetrain,代码行数:5,代码来源:CalendarBackingBean.java
注:本文中的org.primefaces.event.CellEditEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论