java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 20
++++++----
java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java | 16
+++++++-
java/code/src/com/redhat/rhn/frontend/taglibs/rhn-list.tld | 5 ++
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicateIPList.jsp | 2 -
4 files changed, 34 insertions(+), 9 deletions(-)
New commits:
commit b51ab25439411627469925bcf85ac59cb1e328af
Author: Partha Aji <paji(a)redhat.com>
Date: Tue May 4 12:52:56 2010 -0400
Added a new tag attribute to filter by ip address
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index ce2bcdd..3861db7 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -48,20 +48,26 @@
<!-- Generic row labels. The intent is that these can be reused across multiple
pages.-->
<group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/profiles/Details</context>
+ </context-group>
<trans-unit id="row.name">
<source>Name</source>
- <context-group name="ctx">
- <context
context-type="sourcefile">/rhn/profiles/Details</context>
- </context-group>
</trans-unit>
-
<trans-unit id="row.description">
<source>Description</source>
- <context-group name="ctx">
- <context
context-type="sourcefile">/rhn/profiles/Details</context>
- </context-group>
</trans-unit>
+ <trans-unit id="row.ip">
+ <source>IP Address</source>
+ </trans-unit>
+ <trans-unit id="row.hostname">
+ <source>Hostname</source>
+ </trans-unit>
+
+ <trans-unit id="row.macaddress">
+ <source>Network Address</source>
+ </trans-unit>
</group>
<!-- Generic buttons. The intent is that these can be reused across multiple
pages.-->
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
index 6c783cb..0e9bf7a 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ColumnTag.java
@@ -48,6 +48,15 @@ public class ColumnTag extends BodyTagSupport {
protected boolean sortable;
private String defaultSortDir;
private String filterAttr;
+ private String filterMessage;
+
+ /**
+ * @param filterMessageIn The filterMessage to set.
+ */
+ public void setFiltermessage(String filterMessageIn) {
+ filterMessage = filterMessageIn;
+ }
+
/**
* Sets sortable attribute
* True values: true, t, yes, y, 1
@@ -186,6 +195,7 @@ public class ColumnTag extends BodyTagSupport {
headerClass = null;
filterAttr = null;
sortable = false;
+ filterMessage = null;
}
protected void renderHeader() throws JspException {
@@ -439,7 +449,11 @@ public class ColumnTag extends BodyTagSupport {
private void setupColumnFilter() throws JspException {
ListTag parent = (ListTag)
BodyTagSupport.findAncestorWithClass(this, ListTag.class);
- ColumnFilter f = new ColumnFilter(headerKey, filterAttr);
+ String key = headerKey;
+ if (!StringUtils.isBlank(filterMessage)) {
+ key = filterMessage;
+ }
+ ColumnFilter f = new ColumnFilter(key, filterAttr);
parent.setColumnFilter(f);
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/rhn-list.tld
b/java/code/src/com/redhat/rhn/frontend/taglibs/rhn-list.tld
index d4b31a2..e1c6dd4 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/rhn-list.tld
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/rhn-list.tld
@@ -221,6 +221,11 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
+ <attribute>
+ <name>filtermessage</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
</tag>
<tag>
<name>selectablecolumn</name>
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicateIPList.jsp
b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicateIPList.jsp
index c32011d..859f748 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicateIPList.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicateIPList.jsp
@@ -45,7 +45,7 @@
<!-- Name Column -->
- <rl:column headerkey="systemlist.jsp.system"
filterattr="key">
+ <rl:column headerkey="systemlist.jsp.system" filterattr="key"
filtermessage="row.ip">
<rl:expandable rendericon="true">${current.key}
<em>(<bean:message key="manysystems.message"
arg0="${rl:countChildren(current)}"/>)</em> </rl:expandable>
<rl:non-expandable
rendericon="true">${current.id}</rl:non-expandable>
Show replies by date