| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Component |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 1.0 (the | |
| 5 | * "License"); you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl1.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
| 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
| 13 | * License for the specific language governing permissions and limitations under | |
| 14 | * the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kns.uif.core; | |
| 17 | ||
| 18 | import java.io.Serializable; | |
| 19 | import java.util.List; | |
| 20 | import java.util.Map; | |
| 21 | import java.util.Set; | |
| 22 | ||
| 23 | import org.kuali.rice.kns.uif.container.View; | |
| 24 | import org.kuali.rice.kns.uif.modifier.ComponentModifier; | |
| 25 | import org.kuali.rice.kns.uif.service.ViewHelperService; | |
| 26 | import org.springframework.util.MethodInvoker; | |
| 27 | ||
| 28 | /** | |
| 29 | * All classes of the UIF that are used as a rendering element implement the | |
| 30 | * component interface. This interface defines basic properties and methods that | |
| 31 | * all such classes much implement. All components within the framework have the | |
| 32 | * following structure: | |
| 33 | * <ul> | |
| 34 | * <li>Dictionary Configuration/Composition</li> | |
| 35 | * <li>Java Class (the Component implementation</li> | |
| 36 | * <li>>JSP Template Renderer</li> | |
| 37 | * </ul> | |
| 38 | * | |
| 39 | * There are three basic types of components: | |
| 40 | * <ul> | |
| 41 | * <li>Container Components: <code>View</code>, <code>Group</code></li> | |
| 42 | * <li>Field Components: <code>Field</code></li> | |
| 43 | * <li>Widget Components: <code>Widget</code></li> | |
| 44 | * </ul> | |
| 45 | * | |
| 46 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 47 | * | |
| 48 | * @see org.kuali.rice.kns.uif.container.Container | |
| 49 | * @see org.kuali.rice.kns.uif.field.Field | |
| 50 | * @see org.kuali.rice.kns.uif.widget.Widget | |
| 51 | */ | |
| 52 | public interface Component extends Serializable, Ordered, ScriptEventSupport { | |
| 53 | ||
| 54 | /** | |
| 55 | * The unique id (within a given tree) for the component | |
| 56 | * | |
| 57 | * <p> | |
| 58 | * The id will be used by renderers to set the HTML element id. This gives a | |
| 59 | * way to find various elements for scripting. If the id is not given, a | |
| 60 | * default will be generated by the framework | |
| 61 | * </p> | |
| 62 | * | |
| 63 | * @return String id | |
| 64 | */ | |
| 65 | public String getId(); | |
| 66 | ||
| 67 | /** | |
| 68 | * Sets the unique id (within a given tree) for the component | |
| 69 | * | |
| 70 | * @param id | |
| 71 | * - string to set as the component id | |
| 72 | */ | |
| 73 | public void setId(String id); | |
| 74 | ||
| 75 | /** | |
| 76 | * The name for the component type | |
| 77 | * | |
| 78 | * <p> | |
| 79 | * This is used within the rendering layer to pass the component instance | |
| 80 | * into the template. The component instance is exported under the name | |
| 81 | * given by this method. | |
| 82 | * </p> | |
| 83 | * | |
| 84 | * @return String type name | |
| 85 | */ | |
| 86 | public String getComponentTypeName(); | |
| 87 | ||
| 88 | /** | |
| 89 | * The path to the JSP file that should be called to render the component | |
| 90 | * | |
| 91 | * <p> | |
| 92 | * The path should be relative to the web root. An attribute will be | |
| 93 | * available to the component to use under the name given by the method | |
| 94 | * <code>getComponentTypeName</code>. Based on the component type, | |
| 95 | * additional attributes could be available for use. See the component | |
| 96 | * documentation for more information on such attributes. | |
| 97 | * </p> | |
| 98 | * | |
| 99 | * <p> | |
| 100 | * e.g. '/krad/WEB-INF/jsp/tiles/component.jsp' | |
| 101 | * </p> | |
| 102 | * | |
| 103 | * @return String representing the template path | |
| 104 | */ | |
| 105 | public String getTemplate(); | |
| 106 | ||
| 107 | /** | |
| 108 | * Setter for the components template | |
| 109 | * | |
| 110 | * @param template | |
| 111 | */ | |
| 112 | public void setTemplate(String template); | |
| 113 | ||
| 114 | /** | |
| 115 | * A title for the component. Depending on the component can be used in | |
| 116 | * various ways. For example with a Container component the title is used to | |
| 117 | * set the header text. For components like controls other other components | |
| 118 | * that render an HTML element it is used to set the HTML title attribute | |
| 119 | * | |
| 120 | * @return String title for component | |
| 121 | */ | |
| 122 | public String getTitle(); | |
| 123 | ||
| 124 | /** | |
| 125 | * Setter for the components title | |
| 126 | * | |
| 127 | * @param title | |
| 128 | */ | |
| 129 | public void setTitle(String title); | |
| 130 | ||
| 131 | /** | |
| 132 | * Should be called to initialize the component | |
| 133 | * | |
| 134 | * <p> | |
| 135 | * Where components can set defaults and setup other necessary state. The | |
| 136 | * initialize method should only be called once per component lifecycle and | |
| 137 | * is invoked within the initialize phase of the view lifecylce. | |
| 138 | * </p> | |
| 139 | * | |
| 140 | * @param view | |
| 141 | * - view instance in which the component belongs | |
| 142 | * @see ViewHelperService#initializeComponent | |
| 143 | */ | |
| 144 | public void performInitialization(View view); | |
| 145 | ||
| 146 | /** | |
| 147 | * Called after the initialize phase to perform conditional logic based on | |
| 148 | * the model data | |
| 149 | * | |
| 150 | * <p> | |
| 151 | * Where components can perform conditional logic such as dynamically | |
| 152 | * generating new fields or setting field state based on the given data | |
| 153 | * </p> | |
| 154 | * | |
| 155 | * @param view | |
| 156 | * - view instance to which the component belongs | |
| 157 | * @param model | |
| 158 | * - Top level object containing the data (could be the form or a | |
| 159 | * top level business object, dto) | |
| 160 | */ | |
| 161 | public void performApplyModel(View view, Object model); | |
| 162 | ||
| 163 | /** | |
| 164 | * The last phase before the view is rendered. Here final preparations can | |
| 165 | * be made based on the updated view state | |
| 166 | * | |
| 167 | * | |
| 168 | * @param view | |
| 169 | * - view instance that should be finalized for rendering | |
| 170 | * @param model | |
| 171 | * - top level object containing the data | |
| 172 | * @param parent | |
| 173 | * - parent component | |
| 174 | */ | |
| 175 | public void performFinalize(View view, Object model, Component parent); | |
| 176 | ||
| 177 | /** | |
| 178 | * List of components that are contained within the component | |
| 179 | * | |
| 180 | * <p> | |
| 181 | * Used by <code>ViewHelperService</code> for the various lifecycle | |
| 182 | * callbacks | |
| 183 | * </p> | |
| 184 | * | |
| 185 | * @return List<Component> child components | |
| 186 | */ | |
| 187 | public List<Component> getNestedComponents(); | |
| 188 | ||
| 189 | /** | |
| 190 | * <code>ComponentModifier</code> instances that should be invoked to | |
| 191 | * initialize the component | |
| 192 | * | |
| 193 | * <p> | |
| 194 | * These provide dynamic initialization behavior for the component and are | |
| 195 | * configured through the components definition. Each initializer will get | |
| 196 | * invoked by the initialize method. | |
| 197 | * </p> | |
| 198 | * | |
| 199 | * @return List of component modifiers | |
| 200 | * @see ViewHelperService#initializeComponent | |
| 201 | */ | |
| 202 | public List<ComponentModifier> getComponentModifiers(); | |
| 203 | ||
| 204 | /** | |
| 205 | * Setter for the components List of <code>ComponentModifier</code> | |
| 206 | * instances | |
| 207 | * | |
| 208 | * @param componentModifiers | |
| 209 | */ | |
| 210 | public void setComponentModifiers(List<ComponentModifier> componentModifiers); | |
| 211 | ||
| 212 | /** | |
| 213 | * Used by the copy process to determine for which properties only the value | |
| 214 | * reference should be copied (not a new copy instance). Subclasses can | |
| 215 | * define the properties for which only the reference should be copied | |
| 216 | * | |
| 217 | * @return Set<String> property names for which only the value reference | |
| 218 | * should be copied | |
| 219 | * @see org.kuali.rice.kns.uif.util.ComponentUtils.copy(T) | |
| 220 | */ | |
| 221 | public Set<String> getPropertiesForReferenceCopy(); | |
| 222 | ||
| 223 | /** | |
| 224 | * Indicates whether the component should be rendered in the UI | |
| 225 | * | |
| 226 | * <p> | |
| 227 | * If set to false, the corresponding component template will not be invoked | |
| 228 | * (therefore nothing will be rendered to the UI). | |
| 229 | * </p> | |
| 230 | * | |
| 231 | * @return boolean true if the component should be rendered, false if it | |
| 232 | * should not be | |
| 233 | */ | |
| 234 | public boolean isRender(); | |
| 235 | ||
| 236 | /** | |
| 237 | * Setter for the components render indicator | |
| 238 | * | |
| 239 | * @param render | |
| 240 | */ | |
| 241 | public void setRender(boolean render); | |
| 242 | ||
| 243 | /** | |
| 244 | * Expression language string for conditionally setting the render property | |
| 245 | * | |
| 246 | * @return String el that should evaluate to boolean | |
| 247 | */ | |
| 248 | public String getConditionalRender(); | |
| 249 | ||
| 250 | /** | |
| 251 | * Setter for the conditional render string | |
| 252 | * | |
| 253 | * @param conditionalRender | |
| 254 | */ | |
| 255 | public void setConditionalRender(String conditionalRender); | |
| 256 | ||
| 257 | /** | |
| 258 | * Indicates whether the component should be hidden in the UI | |
| 259 | * | |
| 260 | * <p> | |
| 261 | * How the hidden data is maintained depends on the views persistence mode. | |
| 262 | * If the mode is request, the corresponding data will be rendered to the UI | |
| 263 | * but not visible. If the mode is session, the data will not be rendered to | |
| 264 | * the UI but maintained server side. | |
| 265 | * </p> | |
| 266 | * | |
| 267 | * <p> | |
| 268 | * For a <code>Container</code> component, the hidden setting will apply to | |
| 269 | * all contained components (making a section hidden makes all fields within | |
| 270 | * the section hidden) | |
| 271 | * </p> | |
| 272 | * | |
| 273 | * @return boolean true if the component should be hidden, false if it | |
| 274 | * should be visible | |
| 275 | */ | |
| 276 | public boolean isHidden(); | |
| 277 | ||
| 278 | /** | |
| 279 | * Setter for the hidden indicator | |
| 280 | * | |
| 281 | * @param hidden | |
| 282 | */ | |
| 283 | public void setHidden(boolean hidden); | |
| 284 | ||
| 285 | /** | |
| 286 | * Indicates whether the component can be edited | |
| 287 | * | |
| 288 | * <p> | |
| 289 | * When readOnly the controls and widgets of <code>Field</code> components | |
| 290 | * will not be rendered. If the Field has an underlying value it will be | |
| 291 | * displayed readOnly to the user. | |
| 292 | * </p> | |
| 293 | * | |
| 294 | * <p> | |
| 295 | * For a <code>Container</code> component, the readOnly setting will apply | |
| 296 | * to all contained components (making a section readOnly makes all fields | |
| 297 | * within the section readOnly) | |
| 298 | * </p> | |
| 299 | * </p> | |
| 300 | * | |
| 301 | * @return boolean true if the component should be readOnly, false if is | |
| 302 | * allows editing | |
| 303 | */ | |
| 304 | public boolean isReadOnly(); | |
| 305 | ||
| 306 | /** | |
| 307 | * Setter for the read only indicator | |
| 308 | * | |
| 309 | * @param readOnly | |
| 310 | */ | |
| 311 | public void setReadOnly(boolean readOnly); | |
| 312 | ||
| 313 | /** | |
| 314 | * Expression language string for conditionally setting the readOnly | |
| 315 | * property | |
| 316 | * | |
| 317 | * @return String el that should evaluate to boolean | |
| 318 | */ | |
| 319 | public String getConditionalReadOnly(); | |
| 320 | ||
| 321 | /** | |
| 322 | * Setter for the conditional readOnly string | |
| 323 | * | |
| 324 | * @param conditionalReadOnly | |
| 325 | */ | |
| 326 | public void setConditionalReadOnly(String conditionalReadOnly); | |
| 327 | ||
| 328 | /** | |
| 329 | * Indicates whether the component is required | |
| 330 | * | |
| 331 | * <p> | |
| 332 | * At the general component level required means there is some action the | |
| 333 | * user needs to take within the component. For example, within a section it | |
| 334 | * might mean the fields within the section should be completed. At a field | |
| 335 | * level, it means the field should be completed. This provides the ability | |
| 336 | * for the renderers to indicate the required action. | |
| 337 | * </p> | |
| 338 | * | |
| 339 | * @return boolean true if the component is required, false if it is not | |
| 340 | * required | |
| 341 | */ | |
| 342 | public Boolean getRequired(); | |
| 343 | ||
| 344 | /** | |
| 345 | * Setter for the required indicator | |
| 346 | * | |
| 347 | * @param required | |
| 348 | */ | |
| 349 | public void setRequired(Boolean required); | |
| 350 | ||
| 351 | /** | |
| 352 | * CSS style string to be applied to the component | |
| 353 | * | |
| 354 | * <p> | |
| 355 | * Any style override or additions can be specified with this attribute. | |
| 356 | * This is used by the renderer to set the style attribute on the | |
| 357 | * corresponding element. | |
| 358 | * </p> | |
| 359 | * | |
| 360 | * <p> | |
| 361 | * e.g. 'color: #000000;text-decoration: underline;' | |
| 362 | * </p> | |
| 363 | * | |
| 364 | * @return String css style string | |
| 365 | */ | |
| 366 | public String getStyle(); | |
| 367 | ||
| 368 | /** | |
| 369 | * Setter for the components style | |
| 370 | * | |
| 371 | * @param style | |
| 372 | */ | |
| 373 | public void setStyle(String style); | |
| 374 | ||
| 375 | /** | |
| 376 | * CSS style class(s) to be applied to the component | |
| 377 | * | |
| 378 | * <p> | |
| 379 | * Declares style classes for the component. Multiple classes are specified | |
| 380 | * with a space delimiter. This is used by the renderer to set the class | |
| 381 | * attribute on the corresponding element. The class(s) declared must be | |
| 382 | * available in the common style sheets or the style sheets specified for | |
| 383 | * the view | |
| 384 | * </p> | |
| 385 | * | |
| 386 | * <p> | |
| 387 | * e.g. 'header left' | |
| 388 | * </p> | |
| 389 | * | |
| 390 | * @return List<String> css style classes to apply | |
| 391 | */ | |
| 392 | public List<String> getStyleClasses(); | |
| 393 | ||
| 394 | /** | |
| 395 | * Setter for the components style classes | |
| 396 | * | |
| 397 | * @param styleClass | |
| 398 | */ | |
| 399 | public void setStyleClasses(List<String> styleClasses); | |
| 400 | ||
| 401 | /** | |
| 402 | * Adds a single style to the list of styles on this component | |
| 403 | * | |
| 404 | * @param style | |
| 405 | */ | |
| 406 | public void addStyleClass(String styleClass); | |
| 407 | ||
| 408 | /** | |
| 409 | * TODO: javadoc | |
| 410 | * | |
| 411 | * @param itemStyle | |
| 412 | */ | |
| 413 | public void appendToStyle(String itemStyle); | |
| 414 | ||
| 415 | /** | |
| 416 | * Number of places the component should take up horizontally in the | |
| 417 | * container | |
| 418 | * | |
| 419 | * <p> | |
| 420 | * All components belong to a <code>Container</code> and are placed using a | |
| 421 | * <code>LayoutManager</code>. This property specifies how many places | |
| 422 | * horizontally the component should take up within the container. This is | |
| 423 | * only applicable for table based layout managers. Default is 1 | |
| 424 | * </p> | |
| 425 | * | |
| 426 | * TODO: this should not be on component interface since it only applies if | |
| 427 | * the layout manager supports it, need some sort of layoutOptions map for | |
| 428 | * field level options that depend on the manager | |
| 429 | * | |
| 430 | * @return int number of columns to span | |
| 431 | */ | |
| 432 | public int getColSpan(); | |
| 433 | ||
| 434 | /** | |
| 435 | * Setter for the components column span | |
| 436 | * | |
| 437 | * @param colSpan | |
| 438 | */ | |
| 439 | public void setColSpan(int colSpan); | |
| 440 | ||
| 441 | /** | |
| 442 | * Number of places the component should take up vertically in the container | |
| 443 | * | |
| 444 | * <p> | |
| 445 | * All components belong to a <code>Container</code> and are placed using a | |
| 446 | * <code>LayoutManager</code>. This property specifies how many places | |
| 447 | * vertically the component should take up within the container. This is | |
| 448 | * only applicable for table based layout managers. Default is 1 | |
| 449 | * </p> | |
| 450 | * | |
| 451 | * TODO: this should not be on component interface since it only applies if | |
| 452 | * the layout manager supports it, need some sort of layoutOptions map for | |
| 453 | * field level options that depend on the manager | |
| 454 | * | |
| 455 | * @return int number of rows to span | |
| 456 | */ | |
| 457 | public int getRowSpan(); | |
| 458 | ||
| 459 | /** | |
| 460 | * Setter for the component row span | |
| 461 | * | |
| 462 | * @param rowSpan | |
| 463 | */ | |
| 464 | public void setRowSpan(int rowSpan); | |
| 465 | ||
| 466 | /** | |
| 467 | * Context map for the component | |
| 468 | * | |
| 469 | * <p> | |
| 470 | * Any el statements configured for the components properties (e.g. | |
| 471 | * title="@{foo.property}") are evaluated using the el context map. This map | |
| 472 | * will get populated with default objects like the model, view, and request | |
| 473 | * from the <code>ViewHelperService</code>. Other components can push | |
| 474 | * further objects into the context so that they are available for use with | |
| 475 | * that component. For example, <code>Field</code> instances that are part | |
| 476 | * of a collection line as receive the current line instance | |
| 477 | * </p> | |
| 478 | * | |
| 479 | * <p> | |
| 480 | * Context map also provides objects to methods that are invoked for | |
| 481 | * <code>GeneratedField</code> instances | |
| 482 | * </p> | |
| 483 | * | |
| 484 | * <p> | |
| 485 | * The Map key gives the name of the variable that can be used within | |
| 486 | * expressions, and the Map value gives the object instance for which | |
| 487 | * expressions containing the variable should evaluate against | |
| 488 | * </p> | |
| 489 | * | |
| 490 | * @return Map<String, Object> context | |
| 491 | */ | |
| 492 | public Map<String, Object> getContext(); | |
| 493 | ||
| 494 | /** | |
| 495 | * Setter for the context Map | |
| 496 | * | |
| 497 | * @param context | |
| 498 | */ | |
| 499 | public void setContext(Map<String, Object> context); | |
| 500 | ||
| 501 | /** | |
| 502 | * Places the given object into the context Map for the component with the | |
| 503 | * given name | |
| 504 | * | |
| 505 | * @param objectName | |
| 506 | * - name the object should be exposed under in the context map | |
| 507 | * @param object | |
| 508 | * - object instance to place into context | |
| 509 | */ | |
| 510 | public void pushObjectToContext(String objectName, Object object); | |
| 511 | ||
| 512 | /** | |
| 513 | * List of <code>PropertyReplacer</code> instances that will be evaluated | |
| 514 | * during the view lifecycle to conditional set properties on the | |
| 515 | * <code>Component</code> based on expression evaluations | |
| 516 | * | |
| 517 | * @return List<PropertyReplacer> replacers to evaluate | |
| 518 | */ | |
| 519 | public List<PropertyReplacer> getPropertyReplacers(); | |
| 520 | ||
| 521 | /** | |
| 522 | * Setter for the components property substitutions | |
| 523 | * | |
| 524 | * @param propertyReplacers | |
| 525 | */ | |
| 526 | public void setPropertyReplacers(List<PropertyReplacer> propertyReplacers); | |
| 527 | ||
| 528 | /** | |
| 529 | * Options that are passed through to the Component renderer. The Map key is | |
| 530 | * the option name, with the Map value as the option value. See | |
| 531 | * documentation on the particular widget render for available options. | |
| 532 | * | |
| 533 | * @return Map<String, String> options | |
| 534 | */ | |
| 535 | public Map<String, String> getComponentOptions(); | |
| 536 | ||
| 537 | /** | |
| 538 | * Setter for the widget's options | |
| 539 | * | |
| 540 | * @param widgetOptions | |
| 541 | */ | |
| 542 | public void setComponentOptions(Map<String, String> componentOptions); | |
| 543 | ||
| 544 | /** | |
| 545 | * Can be used to order a component within a List of other components, lower | |
| 546 | * numbers are placed higher up in the list, while higher numbers are placed | |
| 547 | * lower in the list | |
| 548 | * | |
| 549 | * @return int ordering number | |
| 550 | * @see org.springframework.core.Ordered#getOrder() | |
| 551 | */ | |
| 552 | public int getOrder(); | |
| 553 | ||
| 554 | /** | |
| 555 | * Setter for the component's order | |
| 556 | * | |
| 557 | * @param order | |
| 558 | */ | |
| 559 | public void setOrder(int order); | |
| 560 | ||
| 561 | /** | |
| 562 | * Name of the method that should be invoked for finalizing the component | |
| 563 | * configuration (full method name, without parameters or return type) | |
| 564 | * | |
| 565 | * <p> | |
| 566 | * Note the method can also be set with the finalizeMethodInvoker | |
| 567 | * targetMethod property. If the method is on the configured | |
| 568 | * <code>ViewHelperService</code>, only this property needs to be configured | |
| 569 | * </p> | |
| 570 | * | |
| 571 | * <p> | |
| 572 | * If the component is selfRendered, the finalize method can return a string which | |
| 573 | * will be set as the component's renderOutput. The selfRendered indicator will also | |
| 574 | * be set to true on the component. | |
| 575 | * </p> | |
| 576 | * | |
| 577 | * @return String method name | |
| 578 | */ | |
| 579 | public String getFinalizeMethodToCall(); | |
| 580 | ||
| 581 | /** | |
| 582 | * <code>MethodInvokerConfig</code> instance for the method that should be invoked | |
| 583 | * for finalizing the component configuration | |
| 584 | * | |
| 585 | * <p> | |
| 586 | * MethodInvoker can be configured to specify the class or object the method | |
| 587 | * should be called on. For static method invocations, the targetClass | |
| 588 | * property can be configured. For object invocations, that targetObject | |
| 589 | * property can be configured | |
| 590 | * </p> | |
| 591 | * | |
| 592 | * <p> | |
| 593 | * If the component is selfRendered, the finalize method can return a string which | |
| 594 | * will be set as the component's renderOutput. The selfRendered indicator will also | |
| 595 | * be set to true on the component. | |
| 596 | * </p> | |
| 597 | * | |
| 598 | * @return MethodInvokerConfig instance | |
| 599 | */ | |
| 600 | public MethodInvokerConfig getFinalizeMethodInvoker(); | |
| 601 | ||
| 602 | /** | |
| 603 | * Indicates whether the component contains its own render output (through | |
| 604 | * the renderOutput property) | |
| 605 | * | |
| 606 | * <p> | |
| 607 | * If self rendered is true, the corresponding template for the component | |
| 608 | * will not be invoked and the renderOutput String will be written to the | |
| 609 | * response as is. | |
| 610 | * </p> | |
| 611 | * | |
| 612 | * @return boolean true if component is self rendered, false if not (renders | |
| 613 | * through template) | |
| 614 | */ | |
| 615 | public boolean isSelfRendered(); | |
| 616 | ||
| 617 | /** | |
| 618 | * Setter for the self render indicator | |
| 619 | * | |
| 620 | * @param selfRendered | |
| 621 | */ | |
| 622 | public void setSelfRendered(boolean selfRendered); | |
| 623 | ||
| 624 | /** | |
| 625 | * Rendering output for the component that will be sent as part of the | |
| 626 | * response (can contain static text and HTML) | |
| 627 | * | |
| 628 | * @return String render output | |
| 629 | */ | |
| 630 | public String getRenderOutput(); | |
| 631 | ||
| 632 | /** | |
| 633 | * Setter for the component's render output | |
| 634 | * | |
| 635 | * @param renderOutput | |
| 636 | */ | |
| 637 | public void setRenderOutput(String renderOutput); | |
| 638 | ||
| 639 | ||
| 640 | /** | |
| 641 | * @return the progressiveRender | |
| 642 | */ | |
| 643 | public String getProgressiveRender(); | |
| 644 | ||
| 645 | /** | |
| 646 | * @param progressiveRender the progressiveRender to set | |
| 647 | */ | |
| 648 | public void setProgressiveRender(String progressiveRender); | |
| 649 | ||
| 650 | /** | |
| 651 | * @return the conditionalRefresh | |
| 652 | */ | |
| 653 | public String getConditionalRefresh(); | |
| 654 | ||
| 655 | /** | |
| 656 | * @param conditionalRefresh the conditionalRefresh to set | |
| 657 | */ | |
| 658 | public void setConditionalRefresh(String conditionalRefresh); | |
| 659 | ||
| 660 | /** | |
| 661 | * @return the progressiveDisclosureControlNames | |
| 662 | */ | |
| 663 | public List<String> getProgressiveDisclosureControlNames(); | |
| 664 | ||
| 665 | /** | |
| 666 | * @return the progressiveDisclosureConditionJs | |
| 667 | */ | |
| 668 | public String getProgressiveDisclosureConditionJs(); | |
| 669 | ||
| 670 | /** | |
| 671 | * @return the conditionalRefreshConditionJs | |
| 672 | */ | |
| 673 | public String getConditionalRefreshConditionJs(); | |
| 674 | ||
| 675 | /** | |
| 676 | * @return the conditionalRefreshControlNames | |
| 677 | */ | |
| 678 | public List<String> getConditionalRefreshControlNames(); | |
| 679 | ||
| 680 | /** | |
| 681 | * @return the progressiveRenderViaAJAX | |
| 682 | */ | |
| 683 | public boolean isProgressiveRenderViaAJAX(); | |
| 684 | ||
| 685 | /** | |
| 686 | * @param progressiveRenderViaAJAX the progressiveRenderViaAJAX to set | |
| 687 | */ | |
| 688 | public void setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX); | |
| 689 | ||
| 690 | /** | |
| 691 | * If true, when the progressiveRender condition is satisfied, the component | |
| 692 | * will always be retrieved from the server and shown(as opposed to being | |
| 693 | * stored on the client, but hidden, after the first retrieval as is the | |
| 694 | * case with the progressiveRenderViaAJAX option). <b>By default, this is | |
| 695 | * false, so components with progressive render capabilities will always be | |
| 696 | * already within the client html and toggled to be hidden or visible.</b> | |
| 697 | * | |
| 698 | * @return the progressiveRenderAndRefresh | |
| 699 | */ | |
| 700 | public boolean isProgressiveRenderAndRefresh(); | |
| 701 | ||
| 702 | /** | |
| 703 | * @param progressiveRenderAndRefresh | |
| 704 | * the progressiveRenderAndRefresh to set | |
| 705 | */ | |
| 706 | public void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh); | |
| 707 | ||
| 708 | /** | |
| 709 | * Specifies a property by name that when it value changes will | |
| 710 | * automatically perform a refresh on this component. This can be a comma | |
| 711 | * separated list of multiple properties that require this component to be | |
| 712 | * refreshed when any of them change. <Br>DO NOT use with progressiveRender | |
| 713 | * unless it is know that progressiveRender condition will always be | |
| 714 | * satisfied before one of these fields can be changed. | |
| 715 | * | |
| 716 | * @return the refreshWhenChanged | |
| 717 | */ | |
| 718 | public String getRefreshWhenChanged(); | |
| 719 | ||
| 720 | /** | |
| 721 | * @param refreshWhenChanged | |
| 722 | * the refreshWhenChanged to set | |
| 723 | */ | |
| 724 | public void setRefreshWhenChanged(String refreshWhenChanged); | |
| 725 | ||
| 726 | /** | |
| 727 | * Result of the conditionalRefresh expression, true if satisfied, otherwise false. | |
| 728 | * Note: not currently used for any processing, required by the expression evaluator. | |
| 729 | * @return the refresh | |
| 730 | */ | |
| 731 | public boolean isRefresh(); | |
| 732 | ||
| 733 | /** | |
| 734 | * @param refresh the refresh to set | |
| 735 | */ | |
| 736 | public void setRefresh(boolean refresh); | |
| 737 | ||
| 738 | /** | |
| 739 | * Control names which will refresh this component when they are changed, added | |
| 740 | * internally | |
| 741 | * @return the refreshWhenChangedControlNames | |
| 742 | */ | |
| 743 | public List<String> getRefreshWhenChangedControlNames(); | |
| 744 | } |