Computed value attribute of the an InputText control

Is it possible to dynamically compute the value attribute of the an InputText?

I’d like to save the data to a sessionScope variable. The name should be defined by a local variable

Something like

localVar=compositeData.FieldVal;

#{javascript:sessionScope.localVar}