Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay but I have created macro (velocity macro) for my input, select and other field and script are integreted on macro to avoid to call javascript outside macro like this</p> <pre><code>#macro( textField $hasTr $hasTd $hasLabel $hasError $label $attr $size $maxLength $helpText $isReadonly $isMandatory $autofocus $beanValue $bean ) #if( $hasTr ) &lt;tr&gt; #end #if( $hasTr || $hasTd ) &lt;td class="label"&gt; #end #if( $hasLabel ) #if( !$isReadonly ) &lt;label for="$attr"&gt; #end #text("$label") #if( !$isReadonly ) &lt;/label&gt; #end #if( $isMandatory ) &lt;span class="mandatory"&gt;*&lt;/span&gt; #end #end #if( $hasTr || $hasTd ) &lt;/td&gt; #end #if( $hasTr || $hasTd ) &lt;td class="value"&gt; #end #if( $isReadonly ) &lt;input type="hidden" id="$attr" name="$attr" value="$!escUtils.escapeHtml( $!beanValue )" /&gt; &lt;span class="readonly"&gt;$!beanValue&lt;/span&gt; #else &lt;input type="text" maxlength="$maxLength" id="$attr" name="$attr" value="$!escUtils.escapeHtml( $!beanValue )" size="$size" #if( $autofocus ) autofocus="autofocus" #end /&gt; #end #if( $helpText != "" ) &lt;img src="#media("picto/16x16/help.png")" id="${attr}_image" alt="" /&gt; &lt;script&gt; #set( $imageId = "${attr}_image" ) jQuery( "#$imageId" ).qtip( { prerender: true, content : { text : "$!helpText" }, show: { delay: 1 }, effect: false, position: { my: 'top left', target: 'mouse', viewport: jQuery(window), adjust: { x: 10, y: -15 } }, style: { classes: 'qtip-lgcf qtip-rounded' } }); &lt;/script&gt; #end #if( $hasTr || $hasTd ) &lt;/td&gt; #end #if( $hasTr || $hasTd ) &lt;td class="error"&gt; #end #if( $hasError ) #if( $bean.errors.containsKey( "$attr" ) ) #set( $errorValue = $!bean.errors.get("$attr") ) &lt;span&gt;#text("$errorValue")&lt;/span&gt; #end #end #if( $hasTr || $hasTd ) &lt;/td&gt; #end #if( $hasTr ) &lt;/tr&gt; #end </code></pre> <h1>end</h1> <p>I should be able to update id in script for each field and reload javascript ...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload