Revision 1141 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.services/src/main/java/org/gvsig/tools/dynform/services/dynformset/subform/SubformJDynFormSet.java

View differences:

SubformJDynFormSet.java
200 200
    }
201 201

  
202 202
    public boolean doActionFirst() {
203
        if ( autosave ) {
203
        if(this.values.isEmpty())
204
        	return false;
205
        
206
    	if ( autosave ) {
204 207
            if ( !doActionSave()) {
205 208
                return false;
206 209
            }
......
213 216
    }
214 217

  
215 218
    public boolean doActionPrevious() {
219
    	if(this.values.isEmpty())
220
        	return false;
221
        
216 222
        if ( autosave ) {
217 223
            if ( !doActionSave()) {
218 224
                return false;
......
228 234
    }
229 235

  
230 236
    public boolean doActionNext() {
237
    	if(this.values.isEmpty())
238
        	return false;
239
        
231 240
        if ( autosave ) {
232 241
            if ( !doActionSave()) {
233 242
                return false;
234 243
            }
235 244
        }
236
        if ( this.current < this.values.size() ) {
245
        if ( this.current < this.values.size()-1 ) {
237 246
            this.current++;
238 247
        }
239 248
        this.form.setValues((DynObject) this.values.get(this.current));
......
243 252
    }
244 253

  
245 254
    public boolean doActionLast() {
255
    	if(this.values.isEmpty())
256
        	return false;
257
        
246 258
        if ( autosave ) {
247 259
            if ( !doActionSave()) {
248 260
                return false;
......
256 268
    }
257 269

  
258 270
    public boolean doActionSave() {
271
    	if(this.values.isEmpty())
272
        	return false;
273
        
259 274
        if ( !this.form.isModified()) {
260 275
            return true;
261 276
        }
......
332 347
    }
333 348

  
334 349
    public boolean doActionDelete() {
350
    	if(this.values.isEmpty())
351
        	return false;
352
        
335 353
    	if(this.countValues()<1){
336 354
    		return true;
337 355
    	}
......
367 385
    }
368 386

  
369 387
    public boolean doActionSearch() {
388
    	if(this.values.isEmpty())
389
        	return false;
390
        
370 391
        try {
371 392
            this.listeners.accept(new Visitor() {
372 393
                public void visit(Object listener) throws VisitCanceledException, BaseException {

Also available in: Unified diff