im trying to pass some parameters from my a4j:mediaOutput to my bean. I can pass the OutputStream parameter and the second parameter (a reference to the value attribute of the component).
But i need to pass two other parameters too: the height and width of the mediaOutput. I tried it with f:param and a4j:actionparam, but both didnt worked.
<a4j:mediaOutput
style="width: 200px; height:100px; max-width: 200px;max-height: 200px"
element="img" mimeType="image/jpeg"
createContent="# {bean.paint}"
value="#{row}" cacheable="false" id="mediaOut">
<a4j:param name="w" value="screen.height"
assignTo="#{bean.screenHeight}"
noEscape="true" />
</a4j:mediaOutput>
Any idea how i can solve this?
Well, it works with f:param. I just didnt read it right in my bean with the FacesContext.
f.e for the width:
FacesContext fContext = FacesContext.getCurrentInstance();
width = Integer.valueOf((String) fContext.getExternalContext()
.getRequestParameterMap().get("w"));