David,

I'm sorry but I was trying to reconfigure SVN in Eclipse and committed these items by mistake, although most of them I wanted to commit anyway.

I was having trouble telling what the portlet mode icons signified, and thought it would be good if we could add tooltips to them. I played around with the CSS for a time, but did not find any way to add the a tooltip to each style, so I changed the 'span' tags to 'img', which allows a 'title' attribute that is used as a tooltip in IE and Firefox. I think it clarifies the use of each icon. As you probably noticed there is also a CSS style for each img.

If you can find out a way to add tooltips via a 'span' style, please do. But remember that many of our users are newbies with the portlet API, so it is important to have a clear user interface.

BTW, I guess my Eclipse reconfiguration at least got my commits back on pluto-scm :).
/Craig



"David H. DeWolf" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

12/08/2005 08:43 AM

Please respond to
[email protected]

To
[email protected]
cc
Subject
Re: svn commit: r355080 - in /portals/pluto/trunk: pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/ pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/ pluto-optional-services/src/main/java/org/ap





Craig,

What was the reason for the change in portlet controls?  Is there a
reason we must use explicit images?  I prefer the pure css approach as
it is more flexible.

David


On 12/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: cdoremus
> Date: Thu Dec  8 04:25:33 2005
> New Revision: 355080
>
> URL: http://svn.apache.org/viewcvs?rev=355080&view=rev
> Log: (empty)
>
> Modified:
>     portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/EmbeddedDataSourceManager.java
>     portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/DBPortletPreferencesService.java
>     portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/userattr/UserInfoAttributesDao.java
>     portals/pluto/trunk/pluto-portal/pom.xml
>     portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/commons-logging.properties
>     portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp
>     portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css
>     portals/pluto/trunk/pluto-testsuite/pom.xml
>     portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
>     portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimplePreferenceTest.java
>     portals/pluto/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/commons-logging.properties
>
> Modified: portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/EmbeddedDataSourceManager.java
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/EmbeddedDataSourceManager.java?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/EmbeddedDataSourceManager.java (original)
> +++ portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/common/EmbeddedDataSourceManager.java Thu Dec  8 04:25:33 2005
> @@ -44,7 +44,8 @@
>          new File(System.getProperty("user.home") + "/.pluto/portal-driver/data");
>
>      private static final String DEFAULT_CONNECTION_STRING =
> -        "databaseName=PLUTO_PORTAL_DRIVER;name=pluto_portal_driver;password=apachep0rtals;create=true";
> +        "user=pluto_portal_driver;password=apachep0rtals;create=true";
> +//        "databaseName=PLUTO_PORTAL_DRIVER;user=pluto_portal_driver;password=apachep0rtals;create=true";
>
>
>      private String connectionString;
>
> Modified: portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/DBPortletPreferencesService.java
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/DBPortletPreferencesService.java?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/DBPortletPreferencesService.java (original)
> +++ portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/preferences/DBPortletPreferencesService.java Thu Dec  8 04:25:33 2005
> @@ -57,6 +57,11 @@
>                     "Unable to startup portlet preferences service due to dataSourceManager error."+
>                     pce.getMessage();
>                  LOG.error(msg, pce);
> +                try {
> +                                       dataSourceManager.shutdown();
> +                               } catch (PortletContainerException e) {
> +                       throw new InstantiationException(msg + e.getMessage());
> +                               }
>                  throw new InstantiationException(msg);
>              }
>          }
>
> Modified: portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/userattr/UserInfoAttributesDao.java
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/userattr/UserInfoAttributesDao.java?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/userattr/UserInfoAttributesDao.java (original)
> +++ portals/pluto/trunk/pluto-optional-services/src/main/java/org/apache/pluto/optional/db/userattr/UserInfoAttributesDao.java Thu Dec  8 04:25:33 2005
> @@ -114,13 +114,27 @@
>             //TODO: finish impl
>             throw new UnsupportedOperationException("Not yet implemented");
>         }
> -       catch(SQLException sqle) {
> +       catch(SQLException e) {
>             if(LOG.isErrorEnabled()) {
> -               LOG.error("Error saving preferences: ", sqle);
> +               LOG.error("Error saving preferences: ", e);
>             }
> -           conn.rollback();
> -           throw sqle;
> +           if (conn != null) {
> +                  conn.rollback();
> +           }
> +           throw e;
>         }
> +       catch(Throwable e) {
> +           if(LOG.isErrorEnabled()) {
> +               LOG.error("Error saving preferences: ", e);
> +           }
> +           if (conn != null) {
> +                  conn.rollback();
> +           }
> +           //Make sure the client knows about problem
> +           SQLException e1 = new SQLException();
> +           e1.initCause(e);
> +           throw e1;
> +       }
>         finally {
>             conn.setAutoCommit(autoCommit);
>             cleanup(null, stmt, null);
>
> Modified: portals/pluto/trunk/pluto-portal/pom.xml
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/pom.xml?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-portal/pom.xml (original)
> +++ portals/pluto/trunk/pluto-portal/pom.xml Thu Dec  8 04:25:33 2005
> @@ -25,16 +25,31 @@
>              <groupId>xml-apis</groupId>
>              <artifactId>xml-apis</artifactId>
>            </exclusion>
> +<!-- >                   <exclusion>
>                     <groupId>commmons-logging</groupId>
>              <artifactId>commons-logging</artifactId>
>            </exclusion>
> +-->
>                   <exclusion>
>                     <groupId>junit</groupId>
>              <artifactId>junit</artifactId>
>            </exclusion>
>         </exclusions>
>      </dependency>
> +       <!-- For Derby -->
> +       <dependency>
> +               <groupId>org.apache.derby</groupId>
> +               <artifactId>derby</artifactId>
> +               <version>10.1.1.0</version>
> +               <scope>runtime</scope>
> +       </dependency>
> +       <dependency>
> +               <groupId>org.apache.derby</groupId>
> +               <artifactId>derbytools</artifactId>
> +               <version>10.1.1.0</version>
> +               <scope>runtime</scope>
> +       </dependency>
>    </dependencies>
>    <build>
>      <finalName>pluto-portal</finalName>
>
> Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/commons-logging.properties
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/commons-logging.properties?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/commons-logging.properties (original)
> +++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/classes/commons-logging.properties Thu Dec  8 04:25:33 2005
> @@ -1 +1,2 @@
> -org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> \ No newline at end of file
> +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> \ No newline at end of file
>
> Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp (original)
> +++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp Thu Dec  8 04:25:33 2005
> @@ -3,13 +3,13 @@
>  <pluto:portlet portletId="${portlet}">
>  <div class="portlet" id='<c:out value="${portlet}"/>'>
>    <div class="header">
> -     <a href="" portletMode="help"/>"><span class="help"></span></a>
> -     <a href="" portletMode="edit"/>"><span class="edit"></span></a>
> -     <a href="" portletMode="view"/>"><span class="view"></span></a>
> +     <a href="" portletMode="help"/>"><img src="" request.getContextPath() %>/images/controls/help.png" title="Help" alt="Help" class="help"/></a>
> +     <a href="" portletMode="edit"/>"><img src="" request.getContextPath() %>/images/controls/edit.png" title="Edit" alt="Edit" class="edit"/></a>
> +     <a href="" portletMode="view"/>"><img src="" request.getContextPath() %>/images/controls/view.png" title="View" alt="View" class="view"/></a>
>
> -     <a href="" windowState="minimized"/>"><span class="min"></span></a>
> -     <a href="" windowState="maximized"/>"><span class="max"></span></a>
> -     <a href="" windowState="normal"/>"><span class="norm"></span></a>
> +     <a href="" windowState="minimized"/>"><img src="" request.getContextPath() %>/images/controls/min.png" title="Minimize" alt="Minimize" class="min"/></a>
> +     <a href="" windowState="maximized"/>"><img src="" request.getContextPath() %>/images/controls/max.png" title="Maximize" alt="Maximize" class="max"/></a>
> +     <a href="" windowState="normal"/>"><img src="" request.getContextPath() %>/images/controls/norm.png" title="Normal" alt="Normal" class="norm"/></a>
>       <span class="title"><pluto:title/></span>
>    </div>
>    <p>
>
> Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css (original)
> +++ portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css Thu Dec  8 04:25:33 2005
> @@ -178,6 +178,49 @@
>    background: url(images/controls/help.png) no-repeat;
>  }
>
> +/* Portlet mode icons */
> +img.min {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
> +img.max {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
> +img.norm {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
> +img.view {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
> +img.edit {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
> +img.help {
> +  border: 0;
> +  position: relative;
> +  float: right;
> +  padding-right:0.25em;
> +}
> +
>  /* Start look and feel -- end positioning */
>
>  fieldset {
>
> Modified: portals/pluto/trunk/pluto-testsuite/pom.xml
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-testsuite/pom.xml?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-testsuite/pom.xml (original)
> +++ portals/pluto/trunk/pluto-testsuite/pom.xml Thu Dec  8 04:25:33 2005
> @@ -15,6 +15,18 @@
>    <url>http://portals.apache.org/pluto</url>
>    <dependencies>
>      <dependency>
> +      <groupId>commons-logging</groupId>
> +      <artifactId>commons-logging</artifactId>
> +      <version>1.0.4</version>
> +      <scope>compile</scope>
> +    </dependency>
> +    <dependency>
> +      <groupId>log4j</groupId>
> +      <artifactId>log4j</artifactId>
> +      <version>1.2.9</version>
> +      <scope>runtime</scope>
> +    </dependency>
> +    <dependency>
>        <groupId>junit</groupId>
>        <artifactId>junit</artifactId>
>        <version>3.8.1</version>
>
> Modified: portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java (original)
> +++ portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/TestPortlet.java Thu Dec  8 04:25:33 2005
> @@ -30,6 +30,10 @@
>  import javax.portlet.RenderRequest;
>  import javax.portlet.RenderResponse;
>  import javax.portlet.WindowState;
> +
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +
>  import java.io.IOException;
>  import java.io.InputStream;
>  import java.util.HashMap;
> @@ -39,6 +43,9 @@
>
>  public class TestPortlet extends GenericPortlet {
>
> +       /** Internal logger. */
> +       private static final Log LOG = LogFactory.getLog(TestPortlet.class);
> +
>      private List configs;
>      private Map tests;
>
> @@ -72,10 +79,12 @@
>                  }
>              }
>              catch (Throwable t) {
> +               LOG.error(t);
>                  throw new PortletException("Unable to read configuration", t);
>              }
>          }
>          else {
> +               LOG.error("Configuration File Not Found");
>              throw new IllegalStateException("Configuration File Not Found");
>          }
>      }
> @@ -88,10 +97,17 @@
>          String testId = getTestId(request);
>          PortletTest test = (PortletTest)tests.get(testId);
>
> +//        if (LOG.isDebugEnabled()) {
> +//             LOG.debug("Processing Portlet Test method in processAction(): " + test);
> +//     }
> +
>          if(test!=null && test instanceof ActionTest) {
>              TestResults results = test.doTest(getPortletConfig(),
>                                                getPortletContext(),
>                                                request, response);
> +//             if (LOG.isDebugEnabled()) {
> +//                     LOG.debug("Action Test results in processAction(): " + results);
> +//             }
>              request.getPortletSession().setAttribute(test.getClass().getName(), results);
>          }
>          Map renderParameters = null;
> @@ -120,6 +136,9 @@
>          }
>
>          PortletTest test = (PortletTest)tests.get(testId);
> +//        if (LOG.isDebugEnabled()) {
> +//             LOG.debug("Processing Portlet Test method in doView(): " + test);
> +//     }
>
>          WindowState state = request.getWindowState();
>          if (!state.equals(WindowState.MINIMIZED)) {
> @@ -129,11 +148,17 @@
>                  TestResults results = test.doTest(getPortletConfig(),
>                                                    getPortletContext(),
>                                                    request, response);
> +//             if (LOG.isDebugEnabled()) {
> +//                     LOG.debug("Test results in doView(): " + results);
> +//             }
>                  request.setAttribute("results", results);
>              }
>              else if(test != null) {
>                  PortletSession session = request.getPortletSession();
>                  TestResults results = (TestResults)session.getAttribute(test.getClass().getName());
> +//             if (LOG.isDebugEnabled()) {
> +//                     LOG.debug("Action Test results in doView(): " + results);
> +//             }
>                  request.setAttribute("results", results);
>              }
>
>
> Modified: portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimplePreferenceTest.java
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimplePreferenceTest.java?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimplePreferenceTest.java (original)
> +++ portals/pluto/trunk/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimplePreferenceTest.java Thu Dec  8 04:25:33 2005
> @@ -15,6 +15,8 @@
>   */
>  package org.apache.pluto.testsuite.test;
>
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
>  import org.apache.pluto.testsuite.ActionTest;
>  import org.apache.pluto.testsuite.TestResult;
>
> @@ -34,6 +36,9 @@
>   extends ActionAbstractReflectivePortletTest
>   implements ActionTest {
>
> +    private static final Log LOG =
> +        LogFactory.getLog(SimplePreferenceTest.class);
> +
>      private static final String BOGUS_KEY = "org.apache.pluto.testsuite.BOGUS_KEY";
>
>      public String getTestSuiteName() {
> @@ -178,17 +183,20 @@
>          try {
>              preferences.setValue("VALIDATION_TEST_KEY", " Spaces removed by trim ");
>              preferences.store();
> -        } catch (ReadOnlyException roe) {
> -
> +        } catch (ReadOnlyException e) {
> +               LOG.error(e);
>          } catch (ValidatorException e) {
> +               //We should get here.
>              exceptionThrown = true;
>              try {
> +               //get rid of spaces because it causes problems with reset() call.
> +                preferences.setValue("VALIDATION_TEST_KEY", "OK");
>                 preferences.reset("VALIDATION_TEST_KEY");
>              } catch (Throwable t) {
> -
> +               LOG.error(t);
>              }
> -        } catch (IOException io) {
> -
> +        } catch (IOException e) {
> +               LOG.error(e);
>          }
>
>          if (exceptionThrown) {
> @@ -206,6 +214,9 @@
>          res.setDesc("Ensure storage works.");
>
>          PortletPreferences preferences = req.getPreferences();
> +        if (LOG.isDebugEnabled()) {
> +               LOG.debug("Preferences to store: " + preferences);
> +        }
>          boolean setOccured = false;
>          boolean storeOccured = false;
>          try {
> @@ -216,20 +227,21 @@
>              }
>
>              preferences.store();
> +
>              if("notTheOriginal".equals(preferences.getValue("dummyName", "Default"))) {
>                  storeOccured = true;
>              }
>
>              preferences.reset("dummyName");
>          }
> -        catch(ReadOnlyException roe) {
> -
> +        catch(ReadOnlyException e) {
> +               LOG.error("ReadOnly problem: ", e);
>          }
> -        catch(ValidatorException ve) {
> -
> +        catch(ValidatorException e) {
> +               LOG.error("Validation problem: ",e);
>          }
> -        catch(IOException io) {
> -
> +        catch(IOException e) {
> +               LOG.error("IO problem: ", e);
>          }
>
>          if(setOccured && storeOccured) {
>
> Modified: portals/pluto/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/commons-logging.properties
> URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/commons-logging.properties?rev=355080&r1=355079&r2=355080&view=diff
> ==============================================================================
> --- portals/pluto/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/commons-logging.properties (original)
> +++ portals/pluto/trunk/pluto-testsuite/src/main/webapp/WEB-INF/classes/commons-logging.properties Thu Dec  8 04:25:33 2005
> @@ -1 +1,2 @@
> -org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> \ No newline at end of file
> +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> \ No newline at end of file
>
>
>

Reply via email to