Commit 1140481b authored by Matt Tucker's avatar Matt Tucker Committed by matt

If the URL isn't specified for an override tab, default to the url of the first item in the tab.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@503 b35dd754-fafc-0310-a699-88a17e54d16e
parent f7673aa3
...@@ -203,6 +203,12 @@ public class AdminConsole { ...@@ -203,6 +203,12 @@ public class AdminConsole {
Element existingTab = getElemnetByID(id); Element existingTab = getElemnetByID(id);
// Simple case, there is no existing tab with the same id. // Simple case, there is no existing tab with the same id.
if (existingTab == null) { if (existingTab == null) {
// Make sure that the URL on the tab is set. If not, default to the
// url of the first item.
if (tab.attributeValue("url") == null) {
tab.addAttribute("url", ((Element)tab.selectSingleNode(
"//item[@url]")).attributeValue("url"));
}
generatedModel.add(tab.createCopy()); generatedModel.add(tab.createCopy());
} }
// More complex case -- a tab with the same id already exists. // More complex case -- a tab with the same id already exists.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment