com.mizar.trinidad.util
Class TrinidadUtils

java.lang.Object
  extended by com.mizar.trinidad.util.TrinidadUtils

public class TrinidadUtils
extends java.lang.Object

A collection of static methods useful for managing MyFaces Trinidad components


Method Summary
static void addPartialTarget(java.lang.String id)
           
static void addPartialTarget(javax.faces.component.UIComponent uic)
           
static void addScript(java.lang.String script)
          This method sends some Javascript to the current FacesContext for immediate execution.
static java.util.List<TrinidadCollection> getReferencedCollections(javax.persistence.EntityManager em, java.lang.Class beanClass)
          The method reflects on the beanClass looking for properties that have a type known to the EntityManager em.
static java.lang.String getWktRangeShape(oracle.spatial.geometry.JGeometry anchorGeometry, java.util.List list)
           
static java.lang.String getWktRangeShape(oracle.spatial.geometry.JGeometry anchorGeometry, java.util.List list, double precision)
           
static void launchArbitraryDialog(java.lang.String action, javax.faces.component.UIComponent source, java.util.HashMap userProps)
           
static void launchArbitraryDialog(java.lang.String action, javax.faces.component.UIComponent source, java.util.HashMap userProps, java.util.HashMap winProps)
           
static void setActionListener(org.apache.myfaces.trinidad.component.UIXCommand uic, java.lang.String el)
           
static void setLaunchListener(org.apache.myfaces.trinidad.component.UIXCommand uic, java.lang.String el)
           
static void setReturnListener(org.apache.myfaces.trinidad.component.UIXCommand uic, java.lang.String el)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addPartialTarget

public static void addPartialTarget(javax.faces.component.UIComponent uic)
Parameters:
uic - a component to mark for re-render

addPartialTarget

public static void addPartialTarget(java.lang.String id)
Parameters:
id - the id of a component to mark for re-render

addScript

public static void addScript(java.lang.String script)
This method sends some Javascript to the current FacesContext for immediate execution.

Parameters:
script - some Javascript code

setReturnListener

public static void setReturnListener(org.apache.myfaces.trinidad.component.UIXCommand uic,
                                     java.lang.String el)
Parameters:
uic - the component to set a ReturnListener for
el - a JSF expression language that will resolve to the ReturnListener method

setLaunchListener

public static void setLaunchListener(org.apache.myfaces.trinidad.component.UIXCommand uic,
                                     java.lang.String el)
Parameters:
uic - the component to set a LaunchListener for
el - a JSF expression language that will resolve to the LaunchListener method

setActionListener

public static void setActionListener(org.apache.myfaces.trinidad.component.UIXCommand uic,
                                     java.lang.String el)
Parameters:
uic - the component to set a ActionListener for
el - a JSF expression language that will resolve to the ActionListener method

getReferencedCollections

public static java.util.List<TrinidadCollection> getReferencedCollections(javax.persistence.EntityManager em,
                                                                          java.lang.Class beanClass)
The method reflects on the beanClass looking for properties that have a type known to the EntityManager em. It then checks the SessionConstants.beanTableMap to see if the referenced bean is managed by an AbstractCollection associated with a managed bean. If so the instance to that managed table is found and added to the list.

Parameters:
em - an open EntityManager
beanClass - a JPA entity bean class
Returns:
a list of AbstractCollection instances that might be affected by a change to an instance of beanClass
See Also:
JPAUtils.getReferencedBeans(EntityManager, Class)

getWktRangeShape

public static java.lang.String getWktRangeShape(oracle.spatial.geometry.JGeometry anchorGeometry,
                                                java.util.List list)

getWktRangeShape

public static java.lang.String getWktRangeShape(oracle.spatial.geometry.JGeometry anchorGeometry,
                                                java.util.List list,
                                                double precision)

launchArbitraryDialog

public static void launchArbitraryDialog(java.lang.String action,
                                         javax.faces.component.UIComponent source,
                                         java.util.HashMap userProps,
                                         java.util.HashMap winProps)

launchArbitraryDialog

public static void launchArbitraryDialog(java.lang.String action,
                                         javax.faces.component.UIComponent source,
                                         java.util.HashMap userProps)