forked from zanata/zanata-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request zanata#928 from zanata/replace-seam-taglib
Replace seam taglib
- Loading branch information
Showing
133 changed files
with
2,408 additions
and
1,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
import java.util.List; | ||
|
||
import org.jboss.seam.annotations.Begin; | ||
import org.jboss.seam.annotations.End; | ||
import org.jboss.seam.annotations.In; | ||
import org.jboss.seam.annotations.Install; | ||
import org.jboss.seam.annotations.Name; | ||
|
@@ -16,14 +17,15 @@ | |
import org.zanata.security.annotations.ZanataSecured; | ||
|
||
import static org.jboss.seam.ScopeType.CONVERSATION; | ||
import static org.jboss.seam.ScopeType.PAGE; | ||
import static org.jboss.seam.annotations.Install.APPLICATION; | ||
|
||
/** | ||
* @author Patrick Huang | ||
* <a href="mailto:[email protected]">[email protected]</a> | ||
*/ | ||
@Name("zanataRoleAction") | ||
@Scope(CONVERSATION) | ||
@Scope(PAGE) | ||
@Install(precedence = APPLICATION) | ||
@ZanataSecured | ||
@CheckLoggedIn | ||
|
@@ -39,16 +41,14 @@ public class RoleAction implements Serializable { | |
@In | ||
ZanataIdentity identity; | ||
|
||
@Begin | ||
public void createRole() { | ||
groups = new ArrayList<>(); | ||
} | ||
|
||
@Begin | ||
public void editRole(String role) { | ||
this.originalRole = role; | ||
this.role = role; | ||
groups = identityManager.getRoleGroups(role); | ||
public void loadRole() { | ||
if (role == null) { | ||
// creating new role | ||
groups = new ArrayList<>(); | ||
} else { | ||
this.originalRole = role; | ||
groups = identityManager.getRoleGroups(role); | ||
} | ||
} | ||
|
||
public String save() { | ||
|
@@ -72,7 +72,6 @@ private String saveNewRole() { | |
identityManager.addRoleToGroup(role, r); | ||
} | ||
|
||
Conversation.instance().end(); | ||
} | ||
|
||
return "success"; | ||
|
@@ -95,7 +94,10 @@ private String saveExistingRole() { | |
} | ||
} | ||
|
||
Conversation.instance().end(); | ||
return "success"; | ||
} | ||
|
||
public String cancel() { | ||
return "success"; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.