Posts

Showing posts from 2013

recordSummaryFunction smartgwt from backend

how to recordSummaryFunction smartgwt from backend //$columnas_raw->type = 'integer'; if( $columna == "impressions" ){ $columnas_raw->recordSummaryFunction = "multiplier"; $columnas_raw->summaryFunction = "sum"; $columnas_raw->showGridSummary = true; $columnas_raw->showGroupSummary= true; }

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

addDataChangedHandler addDataArrivedHandler

        this.grid = listGrid;         this.ds      = (PagerDataSource) listGrid.getDataSource();                 ResultSet dataProperties = new ResultSet();          dataProperties.addDataChangedHandler(new DataChangedHandler() {                    @Override             public void onDataChanged(DataChangedEvent event) {                 System.out.println(" onDataChanged" );                                 RecordList data = grid.getDataAsRecordList();                             if (data != null && data instanceof ResultSet && ((ResultSet)data).lengthIsKnown() && data.getLength() > 0) {                      totalsLabel.setContents(  new Integer(ds.getTotalRows()).toString()   + " Records");                     System.out.println(" Total paginas  :" + new Integer(ds.getTotalPages()).toString() );                     System.out.println(" numero de  pagina :"+ new Integer(ds.getCurrentPage()).toString() );