Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
Rename the WindowState#set method to WindowState#encode
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed May 15, 2013
1 parent c1d5a4e commit 26845fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion portal/src/main/java/org/gatein/portal/page/PageState.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Iterator<Map.Entry<String, WindowState>> iterator() {
public Phase.View.Dispatch getDispatch() {
Phase.View.Dispatch view = Controller_.index(path, null, null, null, null);
for (WindowState w : windows) {
w.set(view);
w.encode(view);
}
return view;
}
Expand Down
9 changes: 7 additions & 2 deletions portal/src/main/java/org/gatein/portal/page/WindowState.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public String renderURL(ContainerURL containerURL, URLFormat format) {
}
for (WindowState other : page.windows) {
if (other != this) {
other.set(view);
other.encode(view);
}
}
return view.toString();
Expand All @@ -252,7 +252,12 @@ public void renderURL(Writer writer, ContainerURL containerURL, URLFormat format
throw new UnsupportedOperationException("todo");
}

public void set(Phase.View.Dispatch dispatch) {
/**
* Encode the navigational state of the window in the dispatch object.
*
* @param dispatch the dispatch
*/
void encode(Phase.View.Dispatch dispatch) {
if (parameters.size() > 0) {
Encoder encoder = new Encoder(this);
String encoded = encoder.encode();
Expand Down

0 comments on commit 26845fe

Please sign in to comment.