PDA

View Full Version : Ext Js :groupTextTpl can't access record value



sanjuindia
11 Jun 2012, 3:40 AM
Hello Friends,

I am using Grid view with Grouping feature,

i have some validation on grouppin view so i had make some in groupTextTpl,
validation works fine but cant set record value in dom object.

my code is like ...

i have one dom object in my jsp page with name and id same as "hdnId",


view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{text} ({[values.rs[0].get("filename")=="" ? "0" : values.rs.length]} {[values.rs.length > 1 ? "Documents" : "Document"]}) {[values.rs[0].get("isWritable")==false ? "" : values.rs[0].get("isDocumentBundle")==true ? <a href="#" onClick="javascript:document.getElementById(\'hdnId\').value=\'{text}\';alert(\'{text}\');alert(document.getElementById(\'hdnId\').value);document.getElementById(\'form-file-file\').click();" style="align:right"><img src="images/image_add.png" alt="Upload Document" style="border:none;margin-left:390px;"/></a> : (values.rs.length < 1 || (values.rs.length == 1 && values.rs[0].get("filename")== "")) ? <a href="#" onClick="javascript:document.getElementById(\'hdnId\').value=\'{text}\';alert(\'{text}\');alert(document.getElementById(\'hdnId\').value);document.getElementById(\'form-file-file\').click();" style="align:right"><img src="images/image_add.png" alt="Upload Document" style="border:none;margin-left:390px;"/></a> : "" ]} '
}),



I had tried but cant assign text value in my dom object.

Please help me ,