incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Kalkhof <nkalk...@web.de>
Subject [trinidad] how do components work during ppr?
Date Wed, 06 Jun 2007 13:14:18 GMT
hello,

i have some basic questions about how trinidad/adf components work during ppr. i wrote a custom
outputtext component but didn't get ppr to work at all. it seems that i miss the basic understanding
how for example the tr:outputtext component obtains the new data from the model during a ppr
request.

my custom tag handler class extends UIXOutputTag and uses setProperties() to set the values
to my component. in my renderer class like this:

public class RichSymbolTextTagHandler extends UIXOutputTag { // JSF 1.2 compliant!
  
  private ValueExpression valueTextVE = null;
  private ValueExpression partialTriggersVE = null;
      
  public void release() {
    super.release();
    this.valueTextVE = null;
    this.partialTriggersVE = null;
  }
  
  final public void setValueText(ValueExpression valueTextVE) {
    this.valueTextVE = valueTextVE;
  }
  
  final public void setPartialTriggers(ValueExpression partialTriggersVE) {
    this.partialTriggersVE = partialTriggersVE;
  }


  protected void setProperties(FacesBean bean) {    
    super.setProperties(bean);        
    if(this.valueTextVE != null) {                    
      if(!this.valueTextVE.isLiteralText()) { // unified EL 
        bean.setProperty(RichSymbolText.VALUE_TEXT_KEY, 
        this.valueTextVE.getValue(FacesContext.getCurrentInstance().getELContext()));
      } 
      else { // plain text
        bean.setProperty(RichSymbolText.VALUE_TEXT_KEY, 
          this.valueTextVE.getExpressionString());
      }    
    }
    .........   
    }    


since the setProperties method is NOT called during a ppr request, how can my component access
the data?
in my renderer implementation i use decodeInternal() to set the partialtriggers - without
success:


   public void decodeInternal(FacesContext fc, UIComponent uic, String  clientId) {// JSF
1.2 compliant!
      super.decodeInternal(fc, uic, clientId);          
      String[] s = getPartialTriggers();
      RequestContext reqC = RequestContext.getCurrentInstance();
      reqC.addPartialTriggerListeners(uic, s);     
   }

is this the right way to go? could anyone give me a hint what to do?

thanks in advance and best regards,
nicolas 
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


Mime
View raw message