Showing posts with label richfaces. Show all posts
Showing posts with label richfaces. Show all posts

2/01/2011

Make modalPanel appear on top of pdf

<rich:modalPanel id="menu_help_view" autosized="true"
        overlapEmbedObjects="true">

12/21/2010

Fire onchange event on IE





Typical way to make 'enter' key working on certain field is


<rich:hotKey
key="return"
handler="#{rich:element('clearance_agent_id')}.onchange()"
selector="#land_lto_id" />


However, this doesn't work on IE.

To make it work you can add a trick.


<rich:hotKey
key="return"
handler="#{rich:element('clearance_agent_id')}.focus();#{rich:element('clearance_agent_id')}.onchange()"
selector="#land_lto_id" />


10/21/2010

s:link, s:button excution order on action and view attribute


s:button and s:link can have both 'action' and 'view' attributes.

When both are given, it will try to excute 'action' first, then 'view' next.
However, if action returns something, it will be forwarded to the 'something'
If, action returns nothing, it will proceed to 'view'.



rule

  • 1. execute action

  • 1.1 if action returns -> redirect to the page

  • 1.2 if action doesn't return -> try to call 'view'

4/16/2009

Richfaces: submit when enter key pressed


<a4j:form>
<h:inputText id="quick_search_client_id" value="#{searchCont.clientId}"/>

<a4j:commandButton type="submit" value="Search"
action="#{searchCont.search}" id="searchButton"/>
...
</a4j:form>

<rich:hotKey key="return"
handler="#{rich:element('searchButton')}.click()"
selector="#quick_search_client_id"/>