Author: emuckenhuber
Date: 2007-11-30 07:25:13 -0500 (Fri, 30 Nov 2007)
New Revision: 9216
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp
Log:
align styles with core-admin
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java 2007-11-30
10:27:26 UTC (rev 9215)
+++
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/QueryResultParserTestCase.java 2007-11-30
12:25:13 UTC (rev 9216)
@@ -126,8 +126,7 @@
assertNotNull(url);
GGQueryResultBuilder builder = new GGQueryResultBuilder(url);
GGQueryResult result = builder.build(5000);
- assertNotNull(result);
- assertEquals(0, result.collection().size());
+ assertNull(result);
fail();
}
catch(WidgetException e)
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-11-30
10:27:26 UTC (rev 9215)
+++
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGQueryResultBuilder.java 2007-11-30
12:25:13 UTC (rev 9216)
@@ -109,9 +109,10 @@
//
if (bytes == null)
{
- throw new WidgetException("Cannot retrieve url: " + url);
+ throw new WidgetException("Cannot retrieve url: " + url + " -
you can try to increase the connectionTimeout");
}
+ // Remove .replace if google rss feed returns correct xml
String string = new String(bytes).replace("Fun & Games", "Fun
& Games");
List data = null;
@@ -149,7 +150,7 @@
}
catch(JBossXBException e)
{
- throw new WidgetException("Failed to parse directory response.", e);
+ throw new WidgetException("Failed to parse directory response.",
e.getCause());
}
catch(IOException e)
{
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-30
10:27:26 UTC (rev 9215)
+++
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-30
12:25:13 UTC (rev 9216)
@@ -177,8 +177,12 @@
}
%>
- <% // If widget directory lookup was successful
- if ( queryResults == null || queryResults instanceof DirectoryResultFailure )
+ <%
+ if (queryResults == null)
+ {
+
+ } // If widget directory lookup was successful
+ else if ( queryResults instanceof DirectoryResultFailure )
{
DirectoryResultFailure resultFailure = (DirectoryResultFailure) queryResults;
%>
@@ -189,7 +193,12 @@
{
%>
<p>
- <table style="width:100%; border: 1px solid;" cellspacing="0"
cellpadding="0">
+ <table style="width:100%;" class="portlet-def-table datatable"
cellspacing="0" cellpadding="0">
+ <thead class="portlet-section-header">
+ <tr>
+ <td>Search results</td>
+ </tr>
+ </thead>
<%
for (IteratorStatus i = new IteratorStatus(queryResults.entries());
i.hasNext();)
{
@@ -236,6 +245,12 @@
</tr>
<%
}
+ if ( queryResults.resultSize() == 0 )
+ {
+ %><tr>
+ <td>Your search did not match any widgets.</td>
+ </tr><%
+ }
%>
</table>
<table style="width:100%; border: none;" cellspacing="0"
cellpadding="0">
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp 2007-11-30
10:27:26 UTC (rev 9215)
+++
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp 2007-11-30
12:25:13 UTC (rev 9216)
@@ -184,7 +184,11 @@
</form>
<% // If widget directory lookup was successful
- if ( queryResults == null || queryResults instanceof DirectoryResultFailure )
+ if (queryResults == null)
+ {
+
+ }
+ else if ( queryResults instanceof DirectoryResultFailure )
{
DirectoryResultFailure resultFailure = (DirectoryResultFailure) queryResults;
%>
@@ -195,7 +199,12 @@
{
%>
<p>
- <table style="width:100%; border: 1px solid;" cellspacing="0"
cellpadding="0">
+ <table style="width:100%;" class="portlet-def-table datatable"
cellspacing="0" cellpadding="0">
+ <thead class="portlet-section-header">
+ <tr>
+ <td>Search results</td>
+ </tr>
+ </thead>
<%
for (IteratorStatus i = new IteratorStatus(queryResults.entries());
i.hasNext();)
{
@@ -237,6 +246,12 @@
</tr>
<%
}
+ if ( queryResults.resultSize() == 0 )
+ {
+ %><tr>
+ <td>Your search did not match any gadgets.</td>
+ </tr><%
+ }
%>
</table>
<table style="width:100%; border: none;" cellspacing="0"
cellpadding="0">