Just pass the whole component via .
...
...
(note: binding code is as-is, do NOT let it refer a bean property!)
with in validator
UIInput endComponent = (UIInput) component.getAttributes().get("endComponent");
Object endComponentValue = endComponent.getSubmittedValue();
// ...
Important note is that the components are processed, converted and validated in the order as they appear in the tree. Any submitted value of components which aren't converted/validated yet is available by UIInput#getSubmittedValue() and any of those which are already converted/validated is available by UIInput#getValue(). So, in your particular example, you should get the value by UIInput#getSubmittedValue() instead of UIInput#getValue().
If you'd like to work with the already converted and validated value as available by UIInput#getValue(), then you need to move the validator to the second component and then pass the first component along instead.
...
...
UIInput startComponent = (UIInput) component.getAttributes().get("startComponent");
Object startComponentValue = startComponent.getValue();
// ...
See also:
- JSF doesn't support cross-field validation, is there a workaround?
- Error validating two inputText fields together
- Validator for multiple fields