本文整理汇总了Java中org.primefaces.event.TransferEvent类的典型用法代码示例。如果您正苦于以下问题:Java TransferEvent类的具体用法?Java TransferEvent怎么用?Java TransferEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransferEvent类属于org.primefaces.event包,在下文中一共展示了TransferEvent类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
public void onTransfer(TransferEvent event) {
log.log(Level.INFO, "onTransfer:: enter");
FacesContext context = FacesContext.getCurrentInstance();
ResourceBundle bundle = context.getApplication().getResourceBundle(context, "msg");
StringBuilder builder = new StringBuilder();
for (Object item : event.getItems()) {
builder.append((String) item).append("<br />");
}
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, bundle.getString("connection.operation.transf.msg"), bundle.getString("connection.success.msg"));
FacesContext.getCurrentInstance().addMessage(null, msg);
}
示例2: onFacetTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
public void onFacetTransfer(TransferEvent event) {
for (Object item : event.getItems()) {
DatasetFieldType facet = (DatasetFieldType) item;
if (facetMetadataBlockId != null && !facetMetadataBlockId.equals(facet.getMetadataBlock().getId())) {
facets.getSource().remove(facet);
}
}
}
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:9,代码来源:DataversePage.java
示例3: handleRelationsSelection
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
public void handleRelationsSelection(TransferEvent event) {
reloadRelationsSource();
relationsDuallist.setSource(relationsSourceList);
ListIterator<PlacesHasTransports> it = relationsDuallist.getTarget()
.listIterator();
List<PlacesHasTransports> newList = new LinkedList<PlacesHasTransports>();
while (it.hasNext()) {
PlacesHasTransports item = it.next();
PlacesHasTransportsId newId = new PlacesHasTransportsId();
newId.setTransportation(item.getId().getTransportation());
newId.setPlacesOrigin(item.getId().getPlacesOrigin());
newId.setPlacesDestination(item.getId().getPlacesDestination());
PlacesHasTransports newObject = new PlacesHasTransports();
newObject.setId(newId);
newObject.setTransports(item.getTransports());
newObject.setDestination(item.getDestination());
newObject.setMoneyCost(item.getMoneyCost());
newObject.setPlaces(item.getPlaces());
newObject
.setRandomDifferenciator((int) (Math.random() * 1000000000));
newList.add(newObject);
}
relationsDuallist.setTarget(newList);
}
示例4: onTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void onTransfer(TransferEvent event) {
if (event.isAdd()) {
this.addEnderecoList((List<Endereco>) event.getItems());
}
if (event.isRemove()) {
this.deleteEnderecoList((List<Endereco>) event.getItems());
}
}
示例5: onTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void onTransfer(TransferEvent event) {
if (event.isAdd()){
this.addEnderecoList((List<Endereco>) event.getItems());
}
if (event.isRemove()) {
this.deleteEnderecoList((List<Endereco>) event.getItems());
}
}
示例6: onTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
public void onTransfer(TransferEvent event) {
StringBuilder builder = new StringBuilder();
for(Object item : event.getItems()) {
builder.append(((Player) item).getName()).append("<br />");
}
FacesMessage msg = new FacesMessage();
msg.setSeverity(FacesMessage.SEVERITY_INFO);
msg.setSummary("Items Transferred");
msg.setDetail(builder.toString());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
示例7: handleUserGroupTransfer
import org.primefaces.event.TransferEvent; //导入依赖的package包/类
/**
* Handles transfer of user or group picklist (active tab fix)
*
* @param event
* JSF transfer event
*/
public void handleUserGroupTransfer( TransferEvent event ) {
// prevents JSF from jumping to wrong tab in some cases
this.setActiveTabIndex( OrganizationHandler.TAB_IDX_ASSIGN_USR_GRP );
}