ucRenderEmbeddedObject

Purpose

This exit allows user custom code to generate arbitrary HTML that is rendered in line in a layout by coding a display type of Embedded Object.

Applies To

Field Rendering Methods

Signature

public String ucRenderEmbeddedObject (
                      Connection dbconn,
                      SesameSession session,
                      String layoutType,
                      DDEntry dde,
                      String ddName,
                      HashMap selectedVals,
                      String selectedVal,
                      String[] multipleVals,
                      HashMap attributes,
                      String prefix,
                      LayoutElement le,
                      int row,
                      String styleVal,
                      boolean doHiddenInput) 

Notes

This allows a great deal a flexibility when creating layouts, but caution should be used, as there is no validity checking of the string returned, and incorrectly formed HTML can break standard functionality within the layout. Note that the prefix and doHiddenInput parameters are currently not supported, but are included for future compatibility. Likewise, the selectedVal and muitipleVals are not currently populated but provided for future expansion.

Example

 public String ucRenderEmbeddedObject (Connection dbconn,
                                          SesameSession session,
                                          String layoutType,
                                          DDEntry dde,
                                          String ddName,
                                          HashMap selectedVals,
                                          String selectedVal,
                                          String[] multipleVals,
                                          HashMap attributes,
                                          String prefix,
                                          LayoutElement le,
                                          int row,
                                          String styleVal,
                                          boolean doHiddenInput) {
        if (ddName.equals("SELECT_ALL_COUNTRY_CUSTOM") )
            return selectAllCustomButton(
                      dbconn, 
                      session, 
                      ddName);

        if ("STATUS_TRANSITION".equals(ddName) )
            return transitionBtns(
                      dbconn, session, 
                      layoutType, 
                      dde, 
                      ddName, 
                      selectedVals);

        if ("MINI_HISTORY".equals(ddName) )
            return getMiniHistory(
                      dbconn, 
                      session, 
                      selectedVals);

        return super.ucRenderEmbeddedObject(
                      dbconn, 
                      session, 
                      layoutType, 
                      dde, 
                      ddName, 
                      selectedVals, 
                      selectedVal, 
                      multipleVals, 
                      attributes, 
                      prefix, 
                      le, 
                      row, 
                      styleVal, 
                      doHiddenInput);
    }