Archives

  • Bir managedBean den farklı bir managedBean e erişim

    Bir managed bean icerisinden farkli bir managed bean e ulasmak istiyorsak faces-config icersinde parametre olarak gosterip inject edebiliriz. Faces-config.xml icerisinde asagidaki gibi bir tanim yapiyoruz.  <managed-bean>   <managed-bean-name>managedBeanBir</managed-bean-name>   <managed-bean-class>ManagedBeanBir</managed-bean-class>   <managed-bean-scope>request</managed-bean-scope>   <managed-property>    <property-name>m2</property-name>    <property-class>ManagedBeanIki</property-class>    <value>#{managedBeanIki}</value>   </managed-property>  </managed-bean>  <managed-bean>   <managed-bean-name>managedBeanIki</managed-bean-name>   <managed-bean-class>ManagedBeanIki</managed-bean-class>   <managed-bean-scope>request</managed-bean-scope>  </managed-bean> Bu durumda m2 managedBeanBir [...]

    Jul 5th, 2009 | Filed under JSF
  • JSF ManagedBean Redirect

    FacesContext facesContext = FacesContext.getCurrentInstance(); HttpServletResponse res = (HttpServletResponse)facesContext.getExternalContext().getResponse(); res.setContentType("text/html"); res.setHeader("Location", location); res.setStatus(301); facesContext.responseComplete();

    Apr 10th, 2009 | Filed under JSF
Posts Tagged ‘managedBean’