calendar

Components, Ajax Framework, Utilities and More.
Post Reply
mar
Posts: 15
Joined: 19 Aug 2011, 13:50

03 Nov 2011, 23:50

hi, i am using the calendar , but i obtein null value,can someone help me?
Thanks for any suggestions

primefaces 1.1
jsp 1

code jsp

Code: Select all

<h:form id="formmuertos" >
	<p:growl id="messages"/>   
    <h:outputText value="fecha" id="fecha"/>     
    <p:calendar  mode="inline" id="calendario" locale="es" showButtonPanel="true" navigator="true" style="display:inline-block;font-size: 12px !important;width:190px;height:16px;" />  

 <h:commandButton id="submitM" value="Ingresar" style="margin-right:30px;" action="#{FormM.ingresar}" />
 </h:form> 
code java

Code: Select all

public class FormM{
	  private String calendario1;
	  public FormM() {
	    }

	  public String obtenerCampos(String campo){
	    	FacesContext fc = FacesContext.getCurrentInstance();
			HttpServletRequest request = (HttpServletRequest) fc
					.getExternalContext().getRequest();		
			String valor = request.getParameter(campo);
			
		return valor;
	    }
	  public String ingresar() {
		  String accionEst = null;  
		  calendario1=obtenerCampos("calendario");
		  System.out.print(calendario1);
		
		  return accionEst;
	  }
}


Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests