Permalink
Browse files

Updates the import syntax to make the files cleaner.

  • Loading branch information...
1 parent 26d9099 commit 5104bd1ae0421cb5d4d0e15c3d2260ceb68b1412 @ccorsi committed Sep 30, 2010
Showing with 48 additions and 46 deletions.
  1. +20 −19 persistence/books/web/ZK/WebContent/edit_book.zul
  2. +28 −27 persistence/books/web/ZK/WebContent/new_book.zul
@@ -9,16 +9,17 @@
<row>
<zscript>
<![CDATA[
+ import org.books.util.SystemManager;
void loadTitle(Textbox text) {
System.out.println("Calling loadTitle");
- String title = org.books.util.SystemManager.getBookProxy().getTitle();
+ String title = SystemManager.getBookProxy().getTitle();
text.setValue(title);
}
void updateTitle(Textbox text) {
String title = text.getValue();
System.out.println("Update title to :" + title);
if (title != null && title.length() > 0) {
- org.books.util.SystemManager.getBookProxy().setTitle(title);
+ SystemManager.getBookProxy().setTitle(title);
}
}
]]>
@@ -40,21 +41,21 @@
}
System.out.println("Calling loadSubtitles");
org.books.util.ListboxUtils.addTextToList(subtitles,
- org.books.util.SystemManager.getBookProxy().getSubtitles());
+ SystemManager.getBookProxy().getSubtitles());
}
void updateSubtitles(Listbox list, Textbox text) {
String name = org.books.util.ListboxUtils.addTextToList(list, text);
if (name != null && name.length() > 0) {
- org.books.util.SystemManager.getBookProxy().addSubtitle(name);
+ SystemManager.getBookProxy().addSubtitle(name);
}
System.out.println("Sub titles: "
- + org.books.util.SystemManager.getBookProxy().getSubtitles());
+ + SystemManager.getBookProxy().getSubtitles());
}
void removeSubtitle(Listbox subtitles) {
String subtitle = (String) org.books.util.ListboxUtils
.removeSelection(subtitles);
if (subtitle != null) {
- org.books.util.SystemManager.getBookProxy().getSubtitles().remove(
+ SystemManager.getBookProxy().getSubtitles().remove(
subtitle);
}
}
@@ -83,7 +84,7 @@
}
void loadSeries(Textbox text) {
System.out.println("Calling loadSeries");
- String series = org.books.util.SystemManager.getBookProxy().getSeries();
+ String series = SystemManager.getBookProxy().getSeries();
if (series != null && series.length() > 0) {
text.setValue(series);
}
@@ -97,7 +98,7 @@
<row>
<zscript><![CDATA[
void loadCopyright(Spinner spinner) {
- int copyright = org.books.util.SystemManager.getBookProxy()
+ int copyright = SystemManager.getBookProxy()
.getCopyright();
if (copyright > 0) {
spinner.setValue(Integer.valueOf(copyright));
@@ -106,7 +107,7 @@
void updateCopyright(Spinner spinner) {
Integer copyright = spinner.getValue();
if (copyright != null && copyright.intValue() > 0) {
- org.books.util.SystemManager.getBookProxy().setCopyright(
+ SystemManager.getBookProxy().setCopyright(
copyright.intValue());
}
}
@@ -125,7 +126,7 @@
void loadAuthors(Listbox list) {
System.out.println("Calling loadAuthors");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Author));
}
]]>
@@ -140,7 +141,7 @@
if (item != null) {
org.books.proxy.PersonProxy person = (org.books.proxy.PersonProxy) item
.getValue();
- org.books.util.SystemManager.getBookProxy().removePerson(person);
+ SystemManager.getBookProxy().removePerson(person);
}
}
void addPerson(Listbox personslist, Listbox persons) {
@@ -149,7 +150,7 @@
if (item != null) {
org.books.proxy.PersonProxy person = (org.books.proxy.PersonProxy) item
.getValue();
- org.books.util.SystemManager.getBookProxy().addPerson(person);
+ SystemManager.getBookProxy().addPerson(person);
}
}
]]></zscript>
@@ -162,7 +163,7 @@
<attribute name="id">authorslist</attribute>
<attribute name="onCreate">
org.books.util.ListboxUtils.populateListboxWithAuthors(authorslist,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Author));
</attribute>
</listbox>
@@ -177,7 +178,7 @@
void loadEditors(Listbox list) {
System.out.println("Calling loadEditors");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Editor));
}
]]>
@@ -195,7 +196,7 @@
<attribute name="onCreate">
System.out.println("Calling loadTitle");
org.books.util.ListboxUtils.populateListboxWithEditors(editorslist,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Editor));
</attribute>
</listbox>
@@ -210,7 +211,7 @@
void loadIllustrators(Listbox list) {
System.out.println("Calling loadIllustrators");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Illustrator));
}
]]>
@@ -227,7 +228,7 @@
<attribute name="onCreate">
org.books.util.ListboxUtils
.populateListboxWithIllustrators(illustratorslist,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Illustrator));
</attribute>
</listbox>
@@ -243,7 +244,7 @@
void loadTranslators(Listbox list) {
System.out.println("Calling loadTranslators");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Translator));
}
]]>
@@ -259,7 +260,7 @@
<listbox rows="3" id="translatorslist">
<attribute name="onCreate">
org.books.util.ListboxUtils.populateListboxWithTranslators(translatorslist,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Translator));
</attribute>
</listbox>
@@ -10,16 +10,17 @@
<row>
<zscript>
<![CDATA[
+ import org.books.util.SystemManager;
void loadTitle(Textbox text) {
System.out.println("Calling loadTitle");
- String title = org.books.util.SystemManager.getBookProxy().getTitle();
+ String title = SystemManager.getBookProxy().getTitle();
text.setValue(title);
}
void updateTitle(Textbox text) {
String title = text.getValue();
System.out.println("Update title to :" + title);
if (title != null && title.length() > 0) {
- org.books.util.SystemManager.getBookProxy().setTitle(title);
+ SystemManager.getBookProxy().setTitle(title);
}
}
]]>
@@ -41,20 +42,20 @@
}
System.out.println("Calling loadSubtitles");
org.books.util.ListboxUtils.addTextToList(subtitles,
- org.books.util.SystemManager.getBookProxy().getSubtitles());
+ SystemManager.getBookProxy().getSubtitles());
}
void updateSubtitles(Listbox list, Textbox text) {
String name = org.books.util.ListboxUtils.addTextToList(list, text);
if (name != null && name.length() > 0) {
- org.books.util.SystemManager.getBookProxy().addSubtitle(name);
+ SystemManager.getBookProxy().addSubtitle(name);
}
System.out.println("Sub titles: "
- + org.books.util.SystemManager.getBookProxy().getSubtitles());
+ + SystemManager.getBookProxy().getSubtitles());
}
void removeSubtitle(Listbox subtitles) {
String subtitle = (String)org.books.util.ListboxUtils.removeSelection(subtitles);
if (subtitle != null) {
- org.books.util.SystemManager.getBookProxy().getSubtitles().remove(subtitle);
+ SystemManager.getBookProxy().getSubtitles().remove(subtitle);
}
}
]]>
@@ -77,12 +78,12 @@
String name = series.getValue();
System.out.println("Series :" + name);
if (name != null && name.length() > 0) {
- org.books.util.SystemManager.getBookProxy().setSeries(name);
+ SystemManager.getBookProxy().setSeries(name);
}
}
void loadSeries(Textbox text) {
System.out.println("Calling loadSeries");
- String series = org.books.util.SystemManager.getBookProxy().getSeries();
+ String series = SystemManager.getBookProxy().getSeries();
if (series != null && series.length() > 0) {
text.setValue(series);
}
@@ -96,7 +97,7 @@
<row>
<zscript><![CDATA[
void loadCopyright(Spinner spinner) {
- int copyright = org.books.util.SystemManager.getBookProxy()
+ int copyright = SystemManager.getBookProxy()
.getCopyright();
if (copyright > 0) {
spinner.setValue(Integer.valueOf(copyright));
@@ -105,7 +106,7 @@
void updateCopyright(Spinner spinner) {
Integer copyright = spinner.getValue();
if (copyright != null && copyright.intValue() > 0) {
- org.books.util.SystemManager.getBookProxy().setCopyright(
+ SystemManager.getBookProxy().setCopyright(
copyright.intValue());
}
}
@@ -124,7 +125,7 @@
void loadAuthors(Listbox list) {
System.out.println("Calling loadAuthors");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Author));
}
]]>
@@ -138,15 +139,15 @@
personslist);
if (item != null) {
org.books.proxy.PersonProxy person = (org.books.proxy.PersonProxy)item.getValue();
- org.books.util.SystemManager.getBookProxy().getPersons(person.getType()).remove(person);
+ SystemManager.getBookProxy().getPersons(person.getType()).remove(person);
}
}
void addPerson(Listbox personslist, Listbox persons) {
Listitem item = org.books.util.ListboxUtils.moveSelection(personslist,
persons);
if (item != null) {
org.books.proxy.PersonProxy person = (org.books.proxy.PersonProxy)item.getValue();
- org.books.util.SystemManager.getBookProxy().addPerson(person);
+ SystemManager.getBookProxy().addPerson(person);
}
}
]]></zscript>
@@ -172,7 +173,7 @@
void loadEditors(Listbox list) {
System.out.println("Calling loadEditors");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Editor));
}
]]>
@@ -203,7 +204,7 @@
void loadIllustrators(Listbox list) {
System.out.println("Calling loadIllustrators");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Illustrator));
}
]]>
@@ -234,7 +235,7 @@
void loadTranslators(Listbox list) {
System.out.println("Calling loadTranslators");
org.books.util.ListboxUtils.populateListbox(list,
- org.books.util.SystemManager.getBookProxy().getPersons(
+ SystemManager.getBookProxy().getPersons(
books.persistence.types.PersonType.Translator));
}
]]>
@@ -265,20 +266,20 @@
void loadGenders(Listbox list) {
System.out.println("Calling loadGenders");
org.books.util.ListboxUtils.populateListboxWithGenders(list,
- org.books.util.SystemManager.getBookProxy().getGenders());
+ SystemManager.getBookProxy().getGenders());
}
void removeGender(Listbox genders, Listbox genderslist) {
Listitem item = org.books.util.ListboxUtils.moveSelection(genders,genderslist);
if (item != null) {
org.books.proxy.GenderProxy gender = (org.books.proxy.GenderProxy)item.getValue();
- org.books.util.SystemManager.getBookProxy().getGenders().remove(gender);
+ SystemManager.getBookProxy().getGenders().remove(gender);
}
}
void addGender(Listbox genderslist, Listbox genders) {
Listitem item = org.books.util.ListboxUtils.moveSelection(genderslist,genders);
if (item != null) {
org.books.proxy.GenderProxy gender = (org.books.proxy.GenderProxy)item.getValue();
- org.books.util.SystemManager.getBookProxy().addGender(gender);
+ SystemManager.getBookProxy().addGender(gender);
}
}
]]>
@@ -303,13 +304,13 @@
<row>
<zscript><![CDATA[
void updatePages(Intbox intbox) {
- org.books.util.SystemManager.getBookProxy().setPages(intbox.intValue());
+ SystemManager.getBookProxy().setPages(intbox.intValue());
System.out.println("Pages: "
- + org.books.util.SystemManager.getBookProxy().getPages());
+ + SystemManager.getBookProxy().getPages());
}
void loadPages(Intbox intbox) {
System.out.println("Calling loadPages");
- int pages = org.books.util.SystemManager.getBookProxy().getPages();
+ int pages = SystemManager.getBookProxy().getPages();
if (pages > 0) {
intbox.setValue(Integer.valueOf(pages));
}
@@ -324,12 +325,12 @@
<zscript><![CDATA[
void updateFinishedDate(Datebox datebox) {
System.out.println("Calling updateFinishedDate");
- org.books.util.SystemManager.getBookProxy().setFinishDate(
+ SystemManager.getBookProxy().setFinishDate(
datebox.getValue());
}
void loadFinishedDate(Datebox datebox) {
System.out.println("Calling loadFinishedDate");
- java.util.Date date = org.books.util.SystemManager.getBookProxy()
+ java.util.Date date = SystemManager.getBookProxy()
.getFinishDate();
if (date != null) {
datebox.setValue(date);
@@ -346,14 +347,14 @@
</grid>
<zscript><![CDATA[
void createBook() {
- org.books.util.SystemManager.createBook();
+ SystemManager.createBook();
// Clear created book proxy..
- org.books.util.SystemManager.clearBookProxy();
+ SystemManager.clearBookProxy();
Executions.sendRedirect("new_book.zul");
}
void done() {
// Clear created book proxy..
- org.books.util.SystemManager.clearBookProxy();
+ SystemManager.clearBookProxy();
Executions.sendRedirect("welcome.zul");
}
]]></zscript>

0 comments on commit 5104bd1

Please sign in to comment.