Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
HiddenGenerator |
|
| 1.0;1 |
1 | package org.kuali.rice.krms.impl.ui; | |
2 | ||
3 | import org.kuali.rice.krad.uif.field.GeneratedField; | |
4 | ||
5 | /** | |
6 | * <p>Generator to output a hidden input with the name being the id of the configured {@link GeneratedField}</p> | |
7 | * | |
8 | * <p>example GeneratedField spring config:</p> | |
9 | * <pre> | |
10 | * <bean parent="GeneratedField" p:id="myHiddenFieldName"> | |
11 | * <property name="renderingMethodInvoker"> | |
12 | * <bean class="org.springframework.util.MethodInvoker" p:targetClass="org.kuali.rice.krms.impl.ui.HiddenGenerator" p:targetMethod="generate" /> | |
13 | * </property> | |
14 | * </bean></pre> | |
15 | */ | |
16 | 0 | public class HiddenGenerator { |
17 | ||
18 | public static String generate(GeneratedField field) { | |
19 | 0 | return "<input type=\"hidden\" name=\""+field.getId()+"\" value=\"\"/>"; |
20 | } | |
21 | ||
22 | } |