Posts

Showing posts from May, 2013

how to access the DOM gwt smartclient

To access the DOM of your page you can call  Document.get() , which has a convenience method for finding an element by it's id  Document.get().getElementById("test"); Of course, you should keep a reference to this element so as not to have to search through the DOM everytime you want to access it, because this is brutal. private Element testDiv = Document.get().getElementById("test"); ... testDiv.setInnerHTML("Some html"); ... testDiv.setInnerHTML("Some other html"); But once you have a reference to this element, calling setInnerHTML is the most efficient way to do what you want. I'm not sure why you think this is brutal. This is probably even more efficient than when you call a method on a widget to change it's content, like  setText(" ...")  on a  TextBox  for example, because these methods usually check the value passed as parameter for security. Security could also be a concern for you, depending on what the

gwt function formatString

How to use formatString function if(record==null || value == null){ if(record!=null && record.isGroupSummary!=null && record.isGroupSummary){ return null; }else{ return "NA"; } }

How to Detect if is Group Summary on record summaryFunction

Hi guys, very ease on summaryFunction just add  record.isGroupSummary or record.isGridSummary case 'clicks': $columnas_raw->title = 'Clicks'; $columnas_raw->type = 'float'; $js = " return  isc.Format.toUSString(value)"; $columnas_raw->formatCellValue =   $js ; //$columnas_raw->recordSummaryFunction = "multiplier"; //$columnas_raw->summaryFunction = "sum"; $columnas_raw->showGridSummary = true; $columnas_raw->showGroupSummary = true; $js = " return  '<div style=\"text-align: left;\">Total<br> <div  style=\"font-weight: normal;\">all -- 32 Product(s)</div> Client/Network<br><div  style=\"font-weight: normal;\">-- unallocated data</div></div>' "; $columnas_raw->summaryFunction = $js ; if (record.isGroupSummary || record.isG