All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xq.gwt.mvc.controller.TextArrayPropertyController Maven / Gradle / Ivy

Go to download

A framework for implementing the MVP variant of the Model View Controller design pattern in the context of GWT

The newest version!
package xq.gwt.mvc.controller;

import xq.gwt.mvc.model.StringArrayPropertyModel;
import xq.gwt.mvc.view.TextArrayPropertyView;

public class TextArrayPropertyController extends AbstractPropertyController {

	private static final long serialVersionUID = 2100519177469436553L;
	
	protected StringArrayPropertyModel stringArrayModel;
	protected TextArrayPropertyView textArraytView;
	
	public TextArrayPropertyController(TextArrayPropertyView textArrayView){
		super(textArrayView);
		this.textArraytView = textArrayView;
	}
	

    public void setPropertyModel(StringArrayPropertyModel stringArrayModel){
        this.stringArrayModel = stringArrayModel;
        super.setPropertyModel(stringArrayModel);        
    }
	
	
	@Override
	public void updateModel() {
		if (stringArrayModel != null)
			stringArrayModel.setValue(textArraytView.getTextArray());

	}

	@Override
	public void updateView() {
		if (textArraytView != null)
			textArraytView.setTextArray(stringArrayModel.getValue());

	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy