[resolvido] bean nulo jsf por favor!

Boa tarde, estou desperado aqui com um erro que não consigo identificar. Tenho um modal panel que esta ligado ao bean mas não sei o porque ao tentar usar o bean o valor do mesmo esta nulo.

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sigga.managedbean;

import java.util.ArrayList;
import java.util.List;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

import org.apache.commons.beanutils.BeanUtils;

import com.sigga.common.map.Version;
import com.sigga.facade.VersionFacade;


public class VersionBean extends BaseBean implements CrudBean{

	
	private List<Version> listVersion;
	private Version version;
	private DataModel dt;
	private Boolean blockedSinc;
	private String versaoCol1;
	private String versaoCol2;
	private String versaoCol3;
	private String versaoServ1;
	private String versaoServ2;
	private String versaoServ3;


	public VersionBean() {
		if (listVersion == null) {
			listVersion = new ArrayList<Version>();
			getAll();
		}
		
	}

	public void getAll() {
		try {
			listVersion = new ArrayList<Version>();
			VersionFacade versionFacade = new VersionFacade();
			listVersion = versionFacade.findAll();
			
			this.setControlBarIsRendered(listVersion);
			
		} catch (Exception e) {
			FacesMessage message = new FacesMessage(e.toString());
			FacesContext.getCurrentInstance().addMessage("Error", message);
		}
	}

	public void save() {
		try {
			new VersionFacade().saveOrUpdate(this.version);
		} catch (Exception e) {
			FacesMessage message = new FacesMessage(e.toString());
			FacesContext.getCurrentInstance().addMessage("Error", message);
		}
		getAll();
	}

	public void delete() {
		VersionFacade versionFacade = new VersionFacade();
		try {
			Version version = new Version();
			BeanUtils.copyProperties(version, this);
			versionFacade.delete(version.getHversionId());
			getAll();
			} catch (Exception e) {
			FacesMessage message = new FacesMessage(e.toString());
			FacesContext.getCurrentInstance().addMessage("Error", message);
		}
			getAll();
	}
	
	public List<Version> getListVersion() {
		return listVersion;
	}

	public void setListVersion(List<Version> listVersion) {
		this.listVersion = listVersion;
	}

	public Version getVersion() {
		if(version == null)
			version =  new Version();
		return version;
	}

	public void setVersion(Version version) {
		this.version = version;
	}

	public DataModel getDt() {
		dt = new ListDataModel(listVersion);
		return dt;
	}

	public void setDt(DataModel dt) {
		this.dt = dt;
	}

	public Boolean getBlockedSinc() {
		return blockedSinc;
	}

	public void setBlockedSinc(Boolean blockedSinc) {
		this.blockedSinc = blockedSinc;
	}
	
	public String getVersaoCol1() {
		return versaoCol1;
	}

	public void setVersaoCol1(String versaoCol1) {
		this.versaoCol1 = versaoCol1;
	}

	public String getVersaoCol2() {
		return versaoCol2;
	}

	public void setVersaoCol2(String versaoCol2) {
		this.versaoCol2 = versaoCol2;
	}

	public String getVersaoCol3() {
		return versaoCol3;
	}

	public void setVersaoCol3(String versaoCol3) {
		this.versaoCol3 = versaoCol3;
	}

	public String getVersaoServ1() {
		return versaoServ1;
	}

	public void setVersaoServ1(String versaoServ1) {
		this.versaoServ1 = versaoServ1;
	}

	public String getVersaoServ2() {
		return versaoServ2;
	}

	public void setVersaoServ2(String versaoServ2) {
		this.versaoServ2 = versaoServ2;
	}

	public String getVersaoServ3() {
		return versaoServ3;
	}

	public void setVersaoServ3(String versaoServ3) {
		this.versaoServ3 = versaoServ3;
	}

	@Override
	void limparCampos() {
		// TODO Auto-generated method stub
		
	}


}
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
	
		<a4j:form id="formIncluirVersao">

			<rich:modalPanel id="pnlIncluirVersao" width="550" autosized="true">
				<f:facet name="header">
					<h:panelGroup>
						<h:outputText value="Incluir Versão"></h:outputText>
					</h:panelGroup>
				</f:facet>
				<f:facet name="controls">
					<h:panelGroup>
						<h:graphicImage value="/images/close.png" id="hidelink"
							onclick="Richfaces.hideModalPanel('pnlIncluirVersao')" />
					</h:panelGroup>
				</f:facet>
				<h:panelGrid columns="4"
					style="font-size: 10px; font-family: Arial; padding-right: 10%"
					cellpadding="5" cellspacing="5">

					<h:outputLabel value="Release Coletor" for="txtRServidor" />
					<h:inputText id="txtRColetor" value="#{versionBean.version.caminhoColetorRelease}" size="100"/>
					
					<rich:spacer />
					<rich:spacer />
					
					<h:outputLabel value="Release Servidor:" for="txtRServidor" />
					<h:inputText id="txtRServidor" value="#{versionBean.version.caminhoServidor}" size="100"/>
					<rich:spacer />
					<rich:spacer />
				</h:panelGrid>

				<h:panelGrid columns="4"
					style="font-size: 10px; font-family: Arial; padding-right: 10%"
					cellpadding="7" cellspacing="8">
					<h:outputLabel value="Versão Coletor:" for="txtVColetor1" />
					<h:inputText id="txtVColetor1" maxlength="3" size="5" value="#{versionBean.versaoCol1}"/>
					<h:inputText id="txtVColetor2" maxlength="3" size="5" value="#{versionBean.versaoCol2}"/>
					<h:inputText id="txtVColetor3" maxlength="3" size="5" value="#{versionBean.versaoCol3}"/>
				</h:panelGrid>

				<h:panelGrid columns="4"
					style="font-size: 10px; font-family: Arial; padding-right: 10%"
					cellpadding="7" cellspacing="6">
					<h:outputLabel value="Versão Servidor:" for="txtVServidor1" />
					<h:inputText id="txtVServidor1" maxlength="3" size="5" value="#{versionBean.versaoServ1}"/>
					<h:inputText id="txtVServidor2" maxlength="3" size="5" value="#{versionBean.versaoServ2}"/>
					<h:inputText id="txtVServidor3" maxlength="3" size="5" value="#{versionBean.versaoServ3}"/>
				</h:panelGrid>
				
				<br />
				<h:panelGrid columns="2">
							<a4j:commandButton value="Salvar" action="#{versionBean.save}" 
							id="btnSalvar" style="font-size: 10px; font-family: Arial;" />
							<a4j:commandButton value="Fechar" id="btnFechar"
								onclick="Richfaces.hideModalPanel('pnlIncluirVersao')"
								style="font-size: 10px; font-family: Arial;" />
						</h:panelGrid>
			</rich:modalPanel>
		</a4j:form>
</ui:composition>
</body>

</html>


AO CLICAR NO SALVAR DO MODAL ELE ENTRA NO METODO SAVE DIRETO NEM SEQUER SETA OS VALORES DO MEU POJO O QUE EH QUE EU FIZ DE ERRADO?

Alguem???

Pelo que eu entendi o problema é o seguinte: o objeto version no seu bean não está recebendo os valores do formulario. Quando vc faz value="#{versionBean.versaoCol1} vc coloca o valor na String versaoCol1 do bean … o objeto version só está recebendo os valores de caminhoColetorRelease e caminhoServidor. Esses dois atributos de version não estão sendo setados?

outra coisa se vc estiver usando actionListener seu metodo deve ter a seguinte assinatura:

public void save(ActionEvent evt) {  

}

caso use action ele deve ter a seguinte assinatura:

public String save() {  
...
return "";
}

tente trocar seu (a4j:form) e seu (a4j:commandButton) por (h:form) e (h:comandButton)

Resolvido

Obrigado pela ajuda, realmente vcs dois estvam certos, mas alem disso quando abria o modal, passava no construtor da classe novamente deixando o version como nulo, ai na hora de setar os valores do atributo dava null pointer
o que fiz foi colocar no get uma verificação e dar um new na variavel caso seja nula, muito obrigado.