I have this following code snippet
<p:selectOneMenu id="agencia" converter="agenciasConverter" value="#{agenciasMB.agencias.agencia}" style="width:150px">
<f:selectItem itemLabel="Selecione a Agência" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{agenciasMB.lista}" var="org" itemValue="#{org}" itemLabel="#{org.agencia}" />
</p:selectOneMenu>
<p:fileUpload id="fileIdPhoto" fileUploadListener="#{fileUploadBean.uploadPhoto}" mode="advanced" dragDropSupport="false"
multiple="true" update="messages" label="Escolha o arquivo" sizeLimit="10000000000" fileLimit="3" allowTypes="/(\.|\/)(pdf)$/">
<f:attribute name="agencia" value="#{org}" />
</p:fileUpload>
I want to do the following, pass the agency object that was selected and retrieve it there in the fileUploadBean.uploadPhoto method
I used to do this to retrieve a variable:
<f:attribute name="agencia" value="minhavariavel" />
And there in MB I gave
e.getComponent().getAttributes().get("agencia")
but what happens inside the f: attribute so that it passes the entire object that was selected in the select?