view src/main/java/de/mpiwg/web/jsp/CreateFilePage.java @ 0:3e62083dbcbf

First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Thu, 23 Apr 2015 15:46:01 +0200
parents
children
line wrap: on
line source

package de.mpiwg.web.jsp;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import de.mpiwg.gazetteer.db.DBSection;
import de.mpiwg.gazetteer.utils.DBService;

public class CreateFilePage extends AbstractJSPPage{
	
	private static Logger logger = Logger.getLogger(CreateFilePage.class);
	
	public static String bean = "createFileBean";
	public static String page = "pages/createFile.jsp";
	
	private Long sectionId;
	private DBSection section;

	public void loadParameters(HttpServletRequest request, HttpServletResponse response){
		this.request = request;
		this.response = response;
		
		this.sectionId = getLongParameter("sectionId");
	}
	
	public void loadSection(){
		System.out.println("$$$$$ loadSection= " + sectionId);
		try {
			
			this.section = DBService.getSectionWithContent(sectionId);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public void reset(){
		this.section = null;
		this.sectionId = null;
	}
	
	public Long getSectionId() {
		return sectionId;
	}

	public void setSectionId(Long sectionId) {
		this.sectionId = sectionId;
	}

	public DBSection getSection() {
		return section;
	}

	public void setSection(DBSection section) {
		this.section = section;
	}
	
	

}