public SaveAction(EditTextPageModel theModel){
		OpenPages pages = theModel.getOpenPages();
		
		
		File fileToSave = getSaveLocation();
		
		
		if(fileToSave!=null){
			Writer writer = null;
	
			try {
			    writer = new BufferedWriter(new OutputStreamWriter(
			          new FileOutputStream(fileToSave), "utf-8"));
			    for(int i = 0 ; i<pages.size(); i++){
			    	writer.write("@PAGE"+(i+1)+"@"+System.getProperty( "line.separator" ));
			    	writer.write(pages.get(i).getText()+System.getProperty( "line.separator" ));
			    	
			    }
			    
			} catch (IOException ex) {
			  // report
			} finally {
			   try {writer.close();} catch (Exception ex) {}
			}
		}
	}