Mercurial > hg > LGServer
changeset 2:1f56cf4f80d4
Fix of bug in the creation of a new file.
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Wed, 11 Mar 2015 16:00:42 +0100 |
parents | 43f4cbe04ea1 |
children | 9355e21652ba |
files | src/main/java/de/mpiwg/web/FileCreator.java src/main/resources/config.properties src/main/webapp/home/createNewFile.xhtml src/main/webapp/templates/publicTemplate.xhtml |
diffstat | 4 files changed, 14 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/web/FileCreator.java Wed Mar 11 15:37:16 2015 +0100 +++ b/src/main/java/de/mpiwg/web/FileCreator.java Wed Mar 11 16:00:42 2015 +0100 @@ -21,7 +21,6 @@ private static Logger logger = Logger.getLogger(FileCreator.class); private DBSection section; - private String label; private Long sectionId; private List<SelectItem> sectionSuggestion; @@ -32,18 +31,19 @@ public void reset(){ this.section = null; - this.label = null; this.sectionId = null; this.sectionSuggestion = null; } public void listenerLoadSection(ActionEvent event){ - if(sectionId != null){ + if(sectionId != null & sectionId > 0){ try { this.section = DBService.getSectionWithContent(sectionId); } catch (SQLException e) { internalError(e); } + }else{ + this.reset(); } } @@ -65,6 +65,7 @@ } } + /* public void listenerSaveNewFile(ActionEvent event){ if( section != null && @@ -82,7 +83,7 @@ internalError(e); } } - } + } */ public DBSection getSection() { return section; @@ -92,14 +93,6 @@ this.section = section; } - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - public Long getSectionId() { return sectionId; }
--- a/src/main/resources/config.properties Wed Mar 11 15:37:16 2015 +0100 +++ b/src/main/resources/config.properties Wed Mar 11 16:00:42 2015 +0100 @@ -6,5 +6,5 @@ extraction_interface=http://localgazetteers-dev/extraction-interface dvn_server=http://localgazetteers-dev/dvn #root_server=http://localgazetteers.mpiwg-berlin.mpg.de:8080/gazetteer-server -root_server=http://localhost:8080/LGServer -#root_server=http://localgazetteers-dev/LGServer +#root_server=http://localhost:8080/LGServer +root_server=http://localgazetteers-dev/LGServer
--- a/src/main/webapp/home/createNewFile.xhtml Wed Mar 11 15:37:16 2015 +0100 +++ b/src/main/webapp/home/createNewFile.xhtml Wed Mar 11 16:00:42 2015 +0100 @@ -17,10 +17,6 @@ <h:panelGrid columns="2"> - <h:outputLabel value="Label"/> - <h:inputText value="#{sessionBean.fileCreator.label}"/> - - <h:outputLabel value="Section Id"/> <h:panelGrid columns="2"> <ace:autoCompleteEntry @@ -47,7 +43,10 @@ <h:outputText/> <h:panelGrid columns="2"> - <h:commandButton value="Save" actionListener="#{sessionBean.fileCreator.listenerSaveNewFile}" onclick="#{appBean.JSConfirmationSave}"/> + <h:commandButton + value="Create" + title="Create Branch in Extraction Interface" + onclick="sectionInExtractionInterface(#{sessionBean.fileCreator.section.id}, '#{sessionBean.fileCreator.section.name}', #{sessionBean.fileCreator.section.book.id}, '#{sessionBean.fileCreator.section.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');"/> <h:commandButton value="Reset" actionListener="#{sessionBean.fileCreator.listenerReset}"/> </h:panelGrid> </h:panelGrid>
--- a/src/main/webapp/templates/publicTemplate.xhtml Wed Mar 11 15:37:16 2015 +0100 +++ b/src/main/webapp/templates/publicTemplate.xhtml Wed Mar 11 16:00:42 2015 +0100 @@ -82,7 +82,9 @@ <ace:menuItem value="Create File" url="#{appBean.rootServer}/home/createNewFile.xhtml" /> <ace:menuItem value="Search Section" - url="#{appBean.rootServer}/home/searchPage.xhtml" /> + url="#{appBean.rootServer}/home/searchPage.xhtml" /> + <ace:menuItem value="Dataverse" + url="#{appBean.dvnRootServer}" /> </ace:menuBar> </h:form>