当前位置: 首页>>代码示例>>Java>>正文


Java RowEditEvent类代码示例

本文整理汇总了Java中org.primefaces.event.RowEditEvent的典型用法代码示例。如果您正苦于以下问题:Java RowEditEvent类的具体用法?Java RowEditEvent怎么用?Java RowEditEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RowEditEvent类属于org.primefaces.event包,在下文中一共展示了RowEditEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onEdit( RowEditEvent event ) 
{  
        Scontrino scon = (Scontrino) event.getObject();  
        if ( !scon.isAnomalo() )
        {
        	if ( StringUtils.equalsIgnoreZeros( scon.getNumero(), scon.getRifornimento().getNumeroScontrino() ) )
        	{
        		scon.cambiaStato( Scontrino.Stato.GIUSTIFICATO, new Date(), loggedUser.getUser(), "" );
        	}
        	else
        	{
        		log.debugv( "Scontrino {0} diverso dal numero scontrino {1} sul rifornimento", scon.getNumero(), scon.getRifornimento().getNumeroScontrino() );
        		
        		bundleManager.error( "valodator.scon.wrong" );
        		
        		FacesContext context = FacesContext.getCurrentInstance();
    			FacesMessage fm = new FacesMessage();
    			fm.setSeverity( FacesMessage.SEVERITY_ERROR );
    			fm.setSummary( bundleManager.getMessage( "valodator.scon.wrong" ) );
    			context.addMessage( "msgGrowl", fm );
        		
        		scon.setNumero( null );
        	}
        }
}
 
开发者ID:Inspiredsoft,项目名称:parco,代码行数:26,代码来源:ScontrinoInlineEdit.java

示例2: onRowEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowEdit(RowEditEvent event) {
  ProjectQuotas pQuotas = (ProjectQuotas) event.getObject();
  try {
    projectController.adminProjectUpdate(pQuotas.getProject(), pQuotas.getNormalizedQuotas());
  } catch (AppException e) {
    logger.log(Level.SEVERE, "Error updating the quota for the project: " + pQuotas.getName(),
        e);
    MessagesController.addErrorMessage("Error updating the project, " +
          "check the logs for more information");
  }

  // Update the timestamp in the table
  Date timestamp = new Date();
  pQuotas.setLastQuotaUpdate(timestamp);
  int rowIndex = ((DataTable)event.getSource()).getRowIndex();
  RequestContext.getCurrentInstance().update("projectmodifyForm:projectsTable:" + rowIndex
      + ":lastQuotaUpdateColumn");

  logger.log(Level.INFO, "Quotas successfully updated for project: " + pQuotas.getName());
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:21,代码来源:ProjectsManagementBean.java

示例3: onRowEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowEdit(RowEditEvent event) {
  Hosts host = (Hosts) event.getObject();
  
  Hosts storedHost = hostsFacade.findByHostname(host.getHostname());
  if (storedHost != null) {
    storedHost.setHostIp(host.getHostIp());
    storedHost.setPublicIp(host.getPublicIp());
    storedHost.setPrivateIp(host.getPrivateIp());
    storedHost.setAgentPassword(host.getAgentPassword());
    storedHost.setRegistered(host.isRegistered());
    hostsFacade.storeHost(storedHost, true);
    MessagesController.addInfoMessage("Updated host");
    LOG.log(Level.FINE, "Updated Host with ID: " + host.getHostname() + " Hostname: " + host.getHostIp()
        + " Public IP: " + host.getPublicIp() + " Private IP: " + host.getPrivateIp());
  }
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:17,代码来源:NodesBean.java

示例4: rowEdited

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void rowEdited( RowEditEvent evt )
{
    if ( evt.getObject() instanceof SlotConnectionBean )
    {
        SlotConnectionBean editedSlotConnection = ( SlotConnectionBean ) evt.getObject();
        if ( editedSlotConnection.getSlot() == null )
        {
            editedSlotConnection.setRack( null );
        }
        saveSlotConnection( editedSlotConnection );

        settopEditedNotifier.fire( new SettopEditEvent(editedSlotConnection.getSettop() ) );
        
        //clear the form after successfully saving.
        editedSlotConnection.setSettop( null );
        editedSlotConnection.setRack( null );
        editedSlotConnection.setSlot( null );
    }
}
 
开发者ID:Comcast,项目名称:cats,代码行数:20,代码来源:SettopController.java

示例5: rowEditedTest

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
@Test
public void rowEditedTest(){
    SlotConnectionBean slotConnection = saveASlotConnection();
    
    Slot slot2 = rackService.findSlotByRack( RACK_1, 2 );
    slotConnection.setSlot( slot2 );
    Behavior behaviour = new Behavior()
    {
        @Override
        public void broadcast( BehaviorEvent arg0 )
        {
            
        }
    };
    RowEditEvent event = new RowEditEvent( new UICommand(), behaviour, slotConnection );
    settopController.rowEdited( event );
    settopSlotService.refresh();
    SlotConnectionBean slotConnection1 = settopSlotService.getSlotConnection( "1" );
    assertEquals( slot2, slotConnection1.getSlot() );
}
 
开发者ID:Comcast,项目名称:cats,代码行数:21,代码来源:SettopControllerTest.java

示例6: onRowEditSensor

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowEditSensor(RowEditEvent event) {
SensorVO s = (SensorVO) event.getObject();
List<DataChangeHandler> handlers = changeListener.getHandlersFor(s.getId());
if (handlers != null) {
	changeListener.unsubscribeAllFrom(s.getId());
	sensorContainer.updateSensor(s);
	changeListener.subscribeFor(
			sensorContainer.getSensors().stream().filter(se -> se.getId() == s.getId()).findFirst().get().getId(),
			handlers);
} else {
	sensorContainer.updateSensor(s);
}
  }
 
开发者ID:daergoth,项目名称:hiots,代码行数:14,代码来源:SetupManager.java

示例7: onPropertyEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
/**
 * 更新数据
 */
public void onPropertyEdit(RowEditEvent event) {
    if (!checkPropertyGroupCheckedStatus()) {
        return;
    }

    PropertyItemVO selectedItem = (PropertyItemVO) event.getObject();

    LOGGER.info("Update property with : {}.", selectedItem);

    String name = selectedItem.getName();
    String oriName = selectedItem.getOriName();

    boolean suc = false;
    String fullPropPath = getPropertyNodePath(name);
    String fullCommentPath = getPropertyCommentPath(name);
    if (name.equals(oriName)) {
        suc = nodeService.updateProperty(fullPropPath, selectedItem.getValue());
        nodeService.updateProperty(fullCommentPath, selectedItem.getComment());
    }
    else {
        nodeService.deleteProperty(getPropertyNodePath(oriName));
        suc = nodeService.createProperty(fullPropPath, selectedItem.getValue());

        nodeService.deleteProperty(fullCommentPath);
        nodeService.createProperty(fullCommentPath, selectedItem.getComment());
    }

    if (suc) {
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Property Saved suc.", name));
    }
    else {
        FacesContext.getCurrentInstance().addMessage(null,
            new FacesMessage(FacesMessage.SEVERITY_ERROR, "Property Saved failed.", name));
    }

}
 
开发者ID:ErinDavid,项目名称:elastic-config,代码行数:40,代码来源:NodeDataManagedBean.java

示例8: onEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onEdit( RowEditEvent event ) 
{
	CodificaCarburante cc = (CodificaCarburante) event.getObject();
	rs.updateCodificaCarburante( cc );
	jobManager.enqueueAnomalieCarburanteJob( cc );
	message.info( "message.job.new.anocarb", cc.getValore() );
}
 
开发者ID:Inspiredsoft,项目名称:parco,代码行数:8,代码来源:CodificaCarburanteList.java

示例9: onCancel

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onCancel( RowEditEvent evt ){
    if ( evt.getObject() instanceof SlotConnectionBean )
    {
        SlotConnectionBean editedSlotConnection = ( SlotConnectionBean ) evt.getObject();
        settopSlotConfigService.refresh();
        editedSlotConnection = settopSlotConfigService.getSlotConnection( editedSlotConnection.getSettop().getId() );
    }
}
 
开发者ID:Comcast,项目名称:cats,代码行数:9,代码来源:SettopController.java

示例10: onPropertyEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
/**
 * 更新数据
 * 
 */
public void onPropertyEdit(RowEditEvent event) {
	if (!checkPropertyGroupCheckedStatus()) {
		return;
	}

	PropertyItemVO selectedItem = (PropertyItemVO) event.getObject();

	LOGGER.info("Update property with : {}.", selectedItem);

	String name = selectedItem.getName();
	String oriName = selectedItem.getOriName();

	boolean suc = false;
	String fullPropPath = getPropertyNodePath(name);
	String fullCommentPath = getPropertyCommentPath(name);
	if (name.equals(oriName)) {
		suc = nodeService.updateProperty(fullPropPath, selectedItem.getValue());
		nodeService.updateProperty(fullCommentPath, selectedItem.getComment());
	} else {
		nodeService.deleteProperty(getPropertyNodePath(oriName));
		suc = nodeService.createProperty(fullPropPath, selectedItem.getValue());

		nodeService.deleteProperty(fullCommentPath);
		nodeService.createProperty(fullCommentPath, selectedItem.getComment());
	}

	if (suc) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Property Saved suc.", name));
	} else {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Property Saved failed.", name));
	}

}
 
开发者ID:dangdangdotcom,项目名称:config-toolkit,代码行数:38,代码来源:NodeDataManagedBean.java

示例11: onPositionEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onPositionEdit(RowEditEvent event){
	Position position=(Position) event.getObject();
	System.out.println("Position:"+position.getPositionId()+" "+position.getPositionTitle()+" "+position.getPositionDescription());
	
	PositionDAO pdao=new PositionDAO();
	String msgText="";
	FacesMessage message=null;
	
	//Avant de modifier, on verifie si tous les champs sont complet�s
		if(position.getPositionTitle().trim().equals("") ||  position.getPositionDescription().trim().equals("")){
			msgText=RessourceBundleUtil.getMessage("allFieldsNotCompleted");
			System.out.println("New Position:"+position.getPositionId()+" "+position.getPositionTitle()+" "+position.getPositionDescription());
			this.init();
			message=new FacesMessage(FacesMessage.SEVERITY_ERROR, RessourceBundleUtil.getMessage("error"), msgText);
			
		}else{
	if(pdao.update(position)){
		msgText=RessourceBundleUtil.getMessage("positionUpdated");
		System.out.println("New Position:"+position.getPositionId()+" "+position.getPositionTitle()+" "+position.getPositionDescription());
		message=new FacesMessage(FacesMessage.SEVERITY_INFO, RessourceBundleUtil.getMessage("success"), msgText);
	}else {
		msgText="Failded to update the position";
		System.out.println("New Position:"+position.getPositionId()+" "+position.getPositionTitle()+" "+position.getPositionDescription());
		message = new FacesMessage(FacesMessage.SEVERITY_ERROR, RessourceBundleUtil.getMessage("error"), msgText);
			
	} }
	FacesUtil.addMessage(null, message);

}
 
开发者ID:diokey,项目名称:ums,代码行数:30,代码来源:PositionBean.java

示例12: onEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onEdit(RowEditEvent event) {
	pessoa = (Pessoa) event.getObject();
	atualizar();
	addMessage("Cliente " + pessoa.getNome() + " atualizado!");
}
 
开发者ID:Daniel-Dos,项目名称:DanielDias-MongoDB,代码行数:6,代码来源:PessoaController.java

示例13: onRowEditActor

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowEditActor(RowEditEvent event) {
actorContainer.updateActor((ActorVO) event.getObject());
  }
 
开发者ID:daergoth,项目名称:hiots,代码行数:4,代码来源:SetupManager.java

示例14: onRowEdit

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowEdit(RowEditEvent event) {
  String varName = ((Variables) event.getObject()).getId();
  String varValue = ((Variables) event.getObject()).getValue();
  settings.updateVariable(varName, varValue);
  MessagesController.addInfoMessage("Updated variable : " + varName + " to: " + varValue);
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:7,代码来源:HopsworksVariablesBean.java

示例15: onRowCancel

import org.primefaces.event.RowEditEvent; //导入依赖的package包/类
public void onRowCancel(RowEditEvent event) {
}
 
开发者ID:hopshadoop,项目名称:hopsworks,代码行数:3,代码来源:NdbBackupBean.java


注:本文中的org.primefaces.event.RowEditEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。