public void restoreState(FacesContext context, Object stateObject) { Object[] state = (Object[]) stateObject; setCacheable((Boolean) state[0]); setContentType((String) state[1]); userData = UIComponentBase.restoreAttachedState(context, state[2]); contentProducer = (MethodExpression) UIComponentBase.restoreAttachedState(context, state[3]); fileName = (String) state[4]; }
public void restoreState(FacesContext context, Object stateObject) { Object[] state = (Object[]) stateObject; setCacheable((Boolean) state[0]); setContentType((String) state[1]); userData = UIComponentBase.restoreAttachedState(context, state[2]); contentProducer = (MethodExpression) UIComponentBase.restoreAttachedState(context, state[3]); fileName = (String) state[4]; }
/** * @param uiMediaOutput */ // TODO use ResourceComponent or exchange object as argument? @PostConstructResource public void initialize() { AbstractMediaOutput uiMediaOutput = (AbstractMediaOutput) UIComponent.getCurrentComponent(FacesContext .getCurrentInstance()); this.setCacheable(uiMediaOutput.isCacheable()); this.setContentType(uiMediaOutput.getMimeType()); this.userData = uiMediaOutput.getValue(); this.contentProducer = uiMediaOutput.getCreateContent(); this.lastModifiedExpression = uiMediaOutput.getValueExpression("lastModfied"); this.expiresExpression = uiMediaOutput.getValueExpression("expires"); this.timeToLiveExpression = uiMediaOutput.getValueExpression("timeToLive"); this.fileName = uiMediaOutput.getFileName(); }
/** * @param uiMediaOutput */ // TODO use ResourceComponent or exchange object as argument? @PostConstructResource public void initialize() { AbstractMediaOutput uiMediaOutput = (AbstractMediaOutput) UIComponent.getCurrentComponent(FacesContext .getCurrentInstance()); this.setCacheable(uiMediaOutput.isCacheable()); this.setContentType(uiMediaOutput.getMimeType()); this.userData = uiMediaOutput.getValue(); this.contentProducer = uiMediaOutput.getCreateContent(); this.lastModifiedExpression = uiMediaOutput.getValueExpression("lastModfied"); this.expiresExpression = uiMediaOutput.getValueExpression("expires"); this.timeToLiveExpression = uiMediaOutput.getValueExpression("timeToLive"); this.fileName = uiMediaOutput.getFileName(); }