Seam SVN: r7496 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-29 07:50:52 -0500 (Fri, 29 Feb 2008)
New Revision: 7496
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
Log:
Don't invalidate the session after exception, Seam does "exception recovery" magic
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-02-29 12:38:27 UTC (rev 7495)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-02-29 12:50:52 UTC (rev 7496)
@@ -282,10 +282,9 @@
}
}
throw new ServletException(ex);
- } finally {
- invalidateSessionIfPossible(request);
}
+ invalidateSessionIfPossible(request);
}
public SyndFeed createSyndFeed(String baseURI, SyndFeedType syndFeedType, Feed feed, Integer currentAccessLevel) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java 2008-02-29 12:38:27 UTC (rev 7495)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java 2008-02-29 12:50:52 UTC (rev 7496)
@@ -87,7 +87,6 @@
log.error("could not roll back transaction: " + rbEx.getMessage());
}
}
- invalidateSessionIfPossible(request);
throw new ServletException(ex);
}
}
16 years, 9 months
Seam SVN: r7495 - in trunk/examples/wiki: src/main/org/jboss/seam/wiki/connectors/cache and 4 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-29 07:38:27 -0500 (Fri, 29 Feb 2008)
New Revision: 7495
Modified:
trunk/examples/wiki/Wiki.iml
trunk/examples/wiki/Wiki.ipr
trunk/examples/wiki/Wiki.iws
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml
Log:
JBSEAM-2688, etag handling for feed servlet
Modified: trunk/examples/wiki/Wiki.iml
===================================================================
--- trunk/examples/wiki/Wiki.iml 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/Wiki.iml 2008-02-29 12:38:27 UTC (rev 7495)
@@ -9,6 +9,8 @@
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build" />
+ <excludeFolder url="file://$MODULE_DIR$/dist" />
+ <excludeFolder url="file://$MODULE_DIR$/production" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
@@ -399,6 +401,24 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../local/dbdrivers/mysql-connector-java-5.1.5-bin.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../lib/richfaces-impl.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/examples/wiki/Wiki.ipr
===================================================================
--- trunk/examples/wiki/Wiki.ipr 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/Wiki.ipr 2008-02-29 12:38:27 UTC (rev 7495)
@@ -50,9 +50,6 @@
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="DEPLOY_AFTER_MAKE" value="0" />
- <excludeFromCompile>
- <directory url="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/blogdirectory" includeSubdirectories="true" />
- </excludeFromCompile>
<resourceExtensions>
<entry name=".+\.(properties|xml|html|dtd|tld)" />
<entry name=".+\.(gif|png|jpeg|jpg)" />
@@ -69,1151 +66,6 @@
<entry name="?*.jpg" />
</wildcardResourcePatterns>
</component>
- <component name="DataSourceManagerImpl">
- <DataSource DataSourceSourceName="LOCAL">
- <option name="DRIVER_CLASS" value="org.hsqldb.jdbcDriver" />
- <option name="DATABASE_URL" value="jdbc:hsqldb:hsql://localhost" />
- <option name="DRIVER_PATH" />
- <option name="DATBASE_USERNAME" value="sa" />
- <option name="ENCODED_DATABASE_PASSWORD" value="" />
- <option name="DEFAULT_SCHEMA_NAME" />
- <option name="TABLE_PATTERN" value="" />
- <option name="NAME" value="Datasource" />
- <option name="PROJECT" value="Wiki" />
- <TABLE_DATA>
- <option name="NAME" value="COMMENTS" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="COMMENT_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="SUBJECT" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FROM_USER_NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="100" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FROM_USER_EMAIL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FROM_USER_HOMEPAGE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="1000" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="COMMENT_TEXT" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FROM_USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="DOCUMENT_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="DOCUMENT_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="FROM_USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="NODE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_TYPE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_REVISION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="WIKINAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="MENU_ITEM" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="16" />
- <option name="TYPE" value="java.lang.Boolean" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="AREA_NR" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LAST_MODIFIED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="WRITE_ACCESS_LEVEL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="READ_ACCESS_LEVEL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CONTENT" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="32768" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NAME_AS_TITLE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="16" />
- <option name="TYPE" value="java.lang.Boolean" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="PARENT_NODE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="DEFAULT_DOCUMENT_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LAST_MODIFIED_BY_USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_BY_USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_POSITION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="DEFAULT_DOCUMENT_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="PARENT_NODE_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="CREATED_BY_USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="LAST_MODIFIED_BY_USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="NODE_FILE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="FILENAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILESIZE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILEDATA" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-4" />
- <option name="TYPE" value="byte[]" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CONTENT_TYPE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_SIZE_X" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_SIZE_Y" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_THUMBNAIL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="1" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="1" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="FILE_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="NODE_HISTORY" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_HISTORY_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_TYPE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_REVISION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="WIKINAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LAST_MODIFIED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LAST_MODIFIED_BY_USERNAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CONTENT" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="32768" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILENAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILESIZE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FILEDATA" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-3" />
- <option name="TYPE" value="byte[]" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CONTENT_TYPE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_SIZE_X" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_SIZE_Y" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_THUMBNAIL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="1" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="1" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="PREFERENCE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="PREF_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="COMPONENT_NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="PROPERTY_NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LONG_VALUE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="DOUBLE_VALUE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="8" />
- <option name="TYPE" value="java.lang.Double" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="TIMESTAMP_VALUE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="BOOLEAN_VALUE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="16" />
- <option name="TYPE" value="java.lang.Boolean" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="STRING_VALUE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="PREFERENCE_NODE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="PREF_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NODE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="NODE_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="PREFERENCE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="PREF_ID" />
- <option name="SOURCE_COLUMN" value="PREF_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="PREFERENCE_USER" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="PREF_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="PREFERENCE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="PREF_ID" />
- <option name="SOURCE_COLUMN" value="PREF_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="ROLE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="ROLE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="DISPLAY_NAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="40" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="ACCESS_LEVEL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="USERS" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="FIRSTNAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="63" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="LASTNAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="63" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="USERNAME" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="16" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="PASSWORDHASH" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="EMAIL" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="ACTIVATED" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="16" />
- <option name="TYPE" value="java.lang.Boolean" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="ACTIVATION_CODE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="MEMBER_HOME_NODE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="NODE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="NODE_ID" />
- <option name="SOURCE_COLUMN" value="MEMBER_HOME_NODE_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="USER_IMAGE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="USER_IMAGE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="true" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="OBJ_VERSION" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="4" />
- <option name="TYPE" value="java.lang.Integer" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="IMAGE_DATA" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-4" />
- <option name="TYPE" value="byte[]" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CONTENT_TYPE" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="12" />
- <option name="TYPE" value="java.lang.String" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="255" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="CREATED_ON" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="93" />
- <option name="TYPE" value="java.sql.Timestamp" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="6" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="true" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <TABLE_DATA>
- <option name="NAME" value="USER_ROLE" />
- <option name="SCHEMA" value="PUBLIC" />
- <option name="CATALOG" />
- <option name="TYPE" />
- <FIELD_ELEMENT>
- <option name="NAME" value="USER_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <FIELD_ELEMENT>
- <option name="NAME" value="ROLE_ID" />
- <option name="SQL_TYPE" />
- <option name="JDBC_TYPE" value="-5" />
- <option name="TYPE" value="java.lang.Long" />
- <option name="PRIMARY" value="false" />
- <option name="LENGTH" value="0" />
- <option name="PRECISION" value="0" />
- <option name="NULLABLE" value="false" />
- </FIELD_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="ROLE" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="ROLE_ID" />
- <option name="SOURCE_COLUMN" value="ROLE_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- <RELATIONSHIP_ELEMENT>
- <option name="RELATION_NAME" />
- <option name="TARGET_TABLE" value="USERS" />
- <option name="TARGET_SCHEMA" value="PUBLIC" />
- <option name="TARGET_CATALOG" />
- <option name="TARGET_COLUMN" value="USER_ID" />
- <option name="SOURCE_COLUMN" value="USER_ID" />
- <option name="CASCADE_REMOVE" value="false" />
- <option name="CASCADE_UPDATE" value="false" />
- </RELATIONSHIP_ELEMENT>
- </TABLE_DATA>
- <libraries>
- <library>
- <attribute name="URI" value="" />
- <url>jar://$PROJECT_DIR$/../../../jboss-seam/seam-gen/lib/hsqldb.jar!/</url>
- </library>
- </libraries>
- </DataSource>
- </component>
<component name="DependenciesAnalyzeManager">
<option name="myForwardDirection" value="false" />
</component>
@@ -1246,13 +98,7 @@
<autodetection-disabled>
<facet-type id="jpa">
<modules>
- <module name="Wiki">
- <files>
- <file url="file://$PROJECT_DIR$/src/etc/META-INF/persistence-dev-war.xml" />
- <file url="file://$PROJECT_DIR$/src/etc/META-INF/persistence-prod-war.xml" />
- <file url="file://$PROJECT_DIR$/src/etc/META-INF/persistence-test-war.xml" />
- </files>
- </module>
+ <module name="Wiki" />
</modules>
</facet-type>
</autodetection-disabled>
Modified: trunk/examples/wiki/Wiki.iws
===================================================================
--- trunk/examples/wiki/Wiki.iws 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/Wiki.iws 2008-02-29 12:38:27 UTC (rev 7495)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project relativePaths="true" version="4">
<component name="AnalysisUIOptions">
+ <option name="ANALYZE_TEST_SOURCES" value="false" />
<option name="CUSTOM_SCOPE_NAME" value="Project Files" />
<option name="ANALYSIS_IN_BACKGROUND" value="true" />
</component>
@@ -37,49 +38,22 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/NodeHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/NodeHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/CommentHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/CommentHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/WEB-INF/pages.xml" afterPath="$PROJECT_DIR$/src/etc/WEB-INF/pages.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/WEB-INF/web.xml" afterPath="$PROJECT_DIR$/src/etc/WEB-INF/web.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/docHistory_d.xhtml" afterPath="$PROJECT_DIR$/view/docHistory_d.xhtml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iws" afterPath="$PROJECT_DIR$/Wiki.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/runningon_seamlogo_grey.gif" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/META-INF/components-dev.xml" afterPath="$PROJECT_DIR$/src/etc/META-INF/components-dev.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.ipr" afterPath="$PROJECT_DIR$/Wiki.ipr" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UploadHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UploadHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UserHome.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/UserHome.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/runningon_seamlogo_white.gif" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" afterPath="$PROJECT_DIR$/src/etc/WEB-INF/components.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/Preferences.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/preferences/Preferences.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Wiki.iml" afterPath="$PROJECT_DIR$/Wiki.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/editing/Uploading.java" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/editing/Uploading.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/etc/import-prod.sql" afterPath="$PROJECT_DIR$/src/etc/import-prod.sql" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/view/themes/sfwkorg/img/runningon_seamlogo_black.gif" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/view/themes/default/css/template.css" afterPath="$PROJECT_DIR$/view/themes/default/css/template.css" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" afterPath="$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java" afterPath="$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java" />
</list>
- <list name="Failed commit: Default" comment="Oops" />
- <list name="Foo" comment="" />
<ignored path="dist/" />
</component>
<component name="ChangesViewManager" flattened_view="false" show_ignored="false" />
@@ -203,21 +177,12 @@
<file leaf-file-name="FeedServlet.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="241" column="0" selection-start="10913" selection-end="10913" vertical-scroll-proportion="0.5566038">
+ <state line="270" column="15" selection-start="12910" selection-end="12910" vertical-scroll-proportion="0.33285302">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="FileServlet.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="128" column="0" selection-start="4941" selection-end="4941" vertical-scroll-proportion="0.9716981">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -480,13 +445,9 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes/sfwkorg" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -506,31 +467,13 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/themes" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/view/plugins/dirToc" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -549,14 +492,6 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -576,92 +511,10 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/feeds" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/editing" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -726,7 +579,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/forum" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/dirToc" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -756,7 +609,7 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -786,32 +639,14 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/engine" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="Wiki" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@@ -831,14 +666,14 @@
<option name="lastEditedConfigurable" value="Wiki" />
</component>
<component name="ProjectView">
- <navigator currentView="ProjectPane" proportions="0.11111111" version="1" splitterProportion="0.5">
+ <navigator currentView="ProjectPane" proportions="0.5" version="1" splitterProportion="0.5">
<flattenPackages ProjectPane="false" />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages ProjectPane="true" />
<abbreviatePackageNames />
- <showStructure PackagesPane="false" Scope="false" Favorites="false" ProjectPane="false" />
+ <showStructure Favorites="false" Scope="false" PackagesPane="false" ProjectPane="false" />
<autoscrollToSource />
<autoscrollFromSource ProjectPane="false" />
<sortByType />
@@ -852,8 +687,8 @@
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_treeOrder4" value="4" />
<property name="TEMP_MODULE_EXPLODED_DIR_FOR_Wiki/web/Web" value="/private/tmp/webExplodedDir27892tmp" />
<property name="cvs_file_history_flatOrder1" value="1" />
- <property name="cvs_file_history_flatWidth1" value="351" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_flatOrder5" value="5" />
+ <property name="cvs_file_history_flatWidth1" value="351" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_flatWidth6" value="531" />
<property name="cvs_file_history_flatOrder2" value="2" />
<property name="MemberChooser.showClasses" value="true" />
@@ -904,12 +739,12 @@
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_treeOrder0" value="0" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_treeWidth6" value="531" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_flatOrder0" value="0" />
- <property name="cvs_file_history_flatWidth6" value="350" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_flatWidth5" value="319" />
+ <property name="cvs_file_history_flatWidth6" value="350" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_flatOrder3" value="3" />
<property name="cvs_file_history_flatOrder5" value="5" />
- <property name="cvs_file_history_flatWidth5" value="351" />
<property name="FileHistory.com.intellij.cvsSupport2.history.CvsHistoryProvider_treeOrder5" value="5" />
+ <property name="cvs_file_history_flatWidth5" value="351" />
<property name="cvs_file_history_treeOrder2" value="2" />
<property name="cvs_file_history_treeWidth5" value="351" />
<property name="cvs_file_history_flatWidth0" value="351" />
@@ -918,32 +753,33 @@
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
+ <recent name="org.jboss.seam.wiki.core.ui.icon" />
<recent name="org.jboss.seam.wiki.plugin.faqBrowser" />
<recent name="org.jboss.seam.wiki.core.action" />
<recent name="org.jboss.seam.wiki.test.preferences" />
<recent name="org.jboss.seam.wiki.core.preferences2.template" />
- <recent name="org.jboss.seam.wiki.core.preferences2.editor" />
</key>
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="org.jboss.seam.wiki.core.action" />
+ <recent name="org.jboss.seam.wiki.core.renderer" />
<recent name="org.jboss.seam.wiki.connectors.cache" />
<recent name="org.jboss.seam.wiki.connectors.jira" />
<recent name="org.jboss.seam.wiki.preferences" />
- <recent name="org.jboss.seam.wiki.core.preferences" />
- <recent name="org.jboss.seam.wiki.preferences2.metamodel" />
</key>
</component>
<component name="RunManager" selected="TestNG.AllTests">
- <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
+ <configuration default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Remote">
<option name="WORKING_DIRECTORY" />
<option name="HOST" value="localhost" />
<option name="PORT" value="8080" />
- <option name="LOCAL" value="true" />
+ <option name="LOCAL" value="false" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPEN_IN_BROWSER_URL" value="/" />
<option name="COMMON_VM_ARGUMENTS" value="" />
- <option name="DEPLOY_TOMCAT_MANAGER" value="false" />
- <option name="BASE_DIRECTORY_NAME" value="" />
- <predefined_log_file id="TOMCAT_LOCALHOST_LOG_ID" enabled="true" />
+ <option name="JSP_PACKAGE" value="" />
+ <option name="VM_OPTS" value="VM_OPTS" />
+ <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
+ <option name="LOCAL_PORT" value="80" />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
@@ -952,6 +788,46 @@
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
+ <configuration default="true" type="WebLogic Instance" factoryName="Remote">
+ <option name="WORKING_DIRECTORY" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="7001" />
+ <option name="LOCAL" value="false" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ <option name="OPEN_IN_BROWSER_URL" value="/" />
+ <option name="COMMON_VM_ARGUMENTS" value="" />
+ <option name="DOMAIN_PATH" value="" />
+ <option name="USER" value="weblogic" />
+ <option name="PASSWORD" value="weblogic" />
+ <option name="SERVER_NAME" value="myserver" />
+ <option name="DOMAIN_NAME" value="mydomain" />
+ <predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
+ <predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
+ </configuration>
+ <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote">
+ <option name="WORKING_DIRECTORY" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="8080" />
+ <option name="LOCAL" value="false" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ <option name="OPEN_IN_BROWSER_URL" value="/" />
+ <option name="COMMON_VM_ARGUMENTS" value="" />
+ <option name="DEPLOY_TOMCAT_MANAGER" value="false" />
+ <option name="BASE_DIRECTORY_NAME" value="" />
+ <predefined_log_file id="TOMCAT_LOCALHOST_LOG_ID" enabled="true" />
+ </configuration>
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$PROJECT_DIR$/../../../../../../../Desktop/IntelliJ IDEA.app/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
<configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
@@ -968,11 +844,11 @@
<option name="Make" value="true" />
</method>
</configuration>
- <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote">
+ <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
<option name="WORKING_DIRECTORY" />
<option name="HOST" value="localhost" />
<option name="PORT" value="8080" />
- <option name="LOCAL" value="false" />
+ <option name="LOCAL" value="true" />
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OPEN_IN_BROWSER_URL" value="/" />
<option name="COMMON_VM_ARGUMENTS" value="" />
@@ -980,17 +856,18 @@
<option name="BASE_DIRECTORY_NAME" value="" />
<predefined_log_file id="TOMCAT_LOCALHOST_LOG_ID" enabled="true" />
</configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$PROJECT_DIR$/../../../../../../../Desktop/IntelliJ IDEA.app/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
+ <configuration default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Local">
+ <option name="WORKING_DIRECTORY" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="8080" />
+ <option name="LOCAL" value="true" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ <option name="OPEN_IN_BROWSER_URL" value="/" />
+ <option name="COMMON_VM_ARGUMENTS" value="" />
+ <option name="JSP_PACKAGE" value="" />
+ <option name="VM_OPTS" value="VM_OPTS" />
+ <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
+ <option name="LOCAL_PORT" value="80" />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
<module name="" />
@@ -1026,6 +903,22 @@
<option name="Run ant target" value="false" />
</method>
</configuration>
+ <configuration default="true" type="WebLogic Instance" factoryName="Local">
+ <option name="WORKING_DIRECTORY" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="7001" />
+ <option name="LOCAL" value="true" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ <option name="OPEN_IN_BROWSER_URL" value="/" />
+ <option name="COMMON_VM_ARGUMENTS" value="" />
+ <option name="DOMAIN_PATH" value="" />
+ <option name="USER" value="weblogic" />
+ <option name="PASSWORD" value="weblogic" />
+ <option name="SERVER_NAME" value="myserver" />
+ <option name="DOMAIN_NAME" value="mydomain" />
+ <predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
+ <predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
+ </configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -1142,6 +1035,11 @@
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
+ <RunnerSettings RunnerId="JProfiler">
+ <option name="WINDOW" value="false" />
+ <option name="JVMPI" value="false" />
+ <option name="INTERPRETED" value="false" />
+ </RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
@@ -1158,7 +1056,7 @@
<option name="SUITE_NAME" value="" />
<option name="PACKAGE_NAME" value="org.jboss.seam.wiki.test.editing" />
<option name="MAIN_CLASS_NAME" value="org.jboss.seam.wiki.test.editing.BasicNodeOperations" />
- <option name="METHOD_NAME" value="editDirectory" />
+ <option name="METHOD_NAME" value="createDocumentTooMuchContent" />
<option name="GROUP_NAME" value="" />
<option name="TEST_OBJECT" value="METHOD" />
<option name="VM_PARAMETERS" value="" />
@@ -1185,6 +1083,11 @@
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
+ <RunnerSettings RunnerId="JProfiler">
+ <option name="WINDOW" value="false" />
+ <option name="JVMPI" value="false" />
+ <option name="INTERPRETED" value="false" />
+ </RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
@@ -1201,64 +1104,6 @@
<item index="3" class="java.lang.String" itemvalue="TestNG.AllTests" />
<item index="4" class="java.lang.String" itemvalue="TestNG.Adhoc" />
</list>
- <configuration default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Remote">
- <option name="WORKING_DIRECTORY" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="8080" />
- <option name="LOCAL" value="false" />
- <option name="OPEN_IN_BROWSER" value="true" />
- <option name="OPEN_IN_BROWSER_URL" value="/" />
- <option name="COMMON_VM_ARGUMENTS" value="" />
- <option name="JSP_PACKAGE" value="" />
- <option name="VM_OPTS" value="VM_OPTS" />
- <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
- <option name="LOCAL_PORT" value="80" />
- </configuration>
- <configuration default="true" type="WebLogic Instance" factoryName="Local">
- <option name="WORKING_DIRECTORY" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="7001" />
- <option name="LOCAL" value="true" />
- <option name="OPEN_IN_BROWSER" value="true" />
- <option name="OPEN_IN_BROWSER_URL" value="/" />
- <option name="COMMON_VM_ARGUMENTS" value="" />
- <option name="DOMAIN_PATH" value="" />
- <option name="USER" value="weblogic" />
- <option name="PASSWORD" value="weblogic" />
- <option name="SERVER_NAME" value="myserver" />
- <option name="DOMAIN_NAME" value="mydomain" />
- <predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
- <predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
- </configuration>
- <configuration default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Local">
- <option name="WORKING_DIRECTORY" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="8080" />
- <option name="LOCAL" value="true" />
- <option name="OPEN_IN_BROWSER" value="true" />
- <option name="OPEN_IN_BROWSER_URL" value="/" />
- <option name="COMMON_VM_ARGUMENTS" value="" />
- <option name="JSP_PACKAGE" value="" />
- <option name="VM_OPTS" value="VM_OPTS" />
- <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
- <option name="LOCAL_PORT" value="80" />
- </configuration>
- <configuration default="true" type="WebLogic Instance" factoryName="Remote">
- <option name="WORKING_DIRECTORY" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="7001" />
- <option name="LOCAL" value="false" />
- <option name="OPEN_IN_BROWSER" value="true" />
- <option name="OPEN_IN_BROWSER_URL" value="/" />
- <option name="COMMON_VM_ARGUMENTS" value="" />
- <option name="DOMAIN_PATH" value="" />
- <option name="USER" value="weblogic" />
- <option name="PASSWORD" value="weblogic" />
- <option name="SERVER_NAME" value="myserver" />
- <option name="DOMAIN_NAME" value="mydomain" />
- <predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
- <predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
- </configuration>
</component>
<component name="SQLPlugin.ProjectConfiguration">
<queries />
@@ -1346,39 +1191,40 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="22" width="2560" height="1523" extended-state="6" />
+ <frame x="0" y="22" width="2560" height="1533" extended-state="6" />
<editor active="false" />
<layout>
- <window_info id="SQL" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.42507002" order="16" x="897" y="216" width="436" height="865" />
+ <window_info id="SQL" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.40333796" order="16" x="897" y="216" width="436" height="865" />
+ <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+ <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297414" order="3" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.64235127" order="7" />
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20421974" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.6162465" order="1" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.1437102" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.6133519" order="1" />
<window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16103522" order="7" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.28431374" order="12" x="2269" y="1083" width="300" height="438" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.28025034" order="12" x="2269" y="1083" width="300" height="438" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="5" />
- <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39486468" order="13" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32961783" order="6" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39429763" order="13" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="4" />
- <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.10987261" order="2" />
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32913166" order="14" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.464986" order="2" x="-1442" y="805" width="1440" height="900" />
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24874191" order="1" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.14942528" order="2" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32753825" order="14" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.46175244" order="2" x="-1442" y="805" width="1440" height="900" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24761146" order="1" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39968154" order="0" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.67881244" order="3" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2109646" order="11" />
+ <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="15" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.21070932" order="11" />
<window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3296322" order="9" />
<window_info id="SVN Repositories" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32928476" order="8" />
- <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
- <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3297414" order="3" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="4" />
<window_info id="Maven projects" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32902297" order="3" />
- <window_info id="SQL Schema" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.29215822" order="0" />
+ <window_info id="SQL Schema" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2920168" order="0" />
+ <window_info id="JProfiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="10" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
<window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="6" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="8" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39968154" order="0" />
- <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="15" />
</layout>
</component>
<component name="VCS.FileViewConfiguration">
@@ -1396,7 +1242,7 @@
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="Improved exception handling a bit (still buggy)" />
+ <option name="LAST_COMMIT_MESSAGE" value="Minor UI fix for Safari" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
@@ -1407,31 +1253,31 @@
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
- <MESSAGE value="JBSEAM-2136 - Anchor/linking support for document headlines" />
- <MESSAGE value="Right-click action menu on dir display" />
- <MESSAGE value="JBSEAM-2457 - Render "REST" feed/file download URLs, breaks all current feed/file bookmarks" />
- <MESSAGE value="Minor" />
+ <MESSAGE value="Cleanup and preparation for production" />
+ <MESSAGE value="Formatting toolbar for wiki text editor" />
+ <MESSAGE value="New tag editor, global AJAX status indicator, other cleanup" />
+ <MESSAGE value="UI and forum query performance optimizations" />
+ <MESSAGE value="Nicer URLs for sear" />
+ <MESSAGE value="Submit search form on Enter, nicer URLs for search and after editing, unified URL rendering" />
+ <MESSAGE value="Disabled live preview, manual preview update now with keyboard shortcut" />
+ <MESSAGE value="Button for manual preview, force validation for comments/forum postings" />
+ <MESSAGE value="Optimized execution plan of forum list SQL queries" />
+ <MESSAGE value="Implemented tag cloud" />
+ <MESSAGE value="Fixed search URL rewritting and submit-on-enter on search page, JBSEAM-2626" />
+ <MESSAGE value="Do not show supersecret e-mail addresses to non-admins" />
+ <MESSAGE value="JBSEAM-2631, send notification emails of forum to mailing list" />
+ <MESSAGE value="JBSEAM-2653, creation time should be persist() time" />
+ <MESSAGE value="JBSEAM-2586, new icons for FAQ browser" />
+ <MESSAGE value="d" />
+ <MESSAGE value="JBSEAM-2671" />
+ <MESSAGE value="JBSEAM-2671, too much document content didn't trigger validation" />
+ <MESSAGE value="JBSEAM-2673, use given name as feedentry name for anonymous user comments" />
+ <MESSAGE value="UI Consistency Work" />
+ <MESSAGE value="JBSEAM-2582, UI consistency work and new directory browser" />
<MESSAGE value="Fix test" />
- <MESSAGE value="Layout fix for revision display" />
- <MESSAGE value="Make ORDER BY in queries more typesafe" />
- <MESSAGE value="Ooops" />
- <MESSAGE value="JBSEAM-2486 - Implemented FAQ browser plugin" />
- <MESSAGE value="Fixes for faq browser" />
- <MESSAGE value="Updated IntelliJ project to subversion" />
- <MESSAGE value="Stupid bug" />
- <MESSAGE value="Update IntelliJ, better headline rendering, minor fixes to FAQ plugin" />
- <MESSAGE value="Various bugfixes" />
- <MESSAGE value="JBSEAM-2502 - JIRA issue list plugin and JIRA connector (plus re-usable remote connector data cache)" />
- <MESSAGE value="JBSEAM-2451 - Feed aggregator connector and plugin" />
- <MESSAGE value="Fix possible non-threadsafe map access, async updater might write after purge" />
- <MESSAGE value="Configuration switch for site feed in main menu" />
- <MESSAGE value="Implemented subscription for aggregated feeds" />
- <MESSAGE value="Minor UI improvements, IE fixes" />
- <MESSAGE value="Fix tests" />
- <MESSAGE value="Rating system for comments and top posters plugin" />
- <MESSAGE value="Fix NPE" />
- <MESSAGE value="Minor changes" />
- <MESSAGE value="Improved exception handling a bit (still buggy)" />
+ <MESSAGE value="JBSEAM-2634, table-of-contents plugin" />
+ <MESSAGE value="JBSEAM-2687, activate inactive account on password reset" />
+ <MESSAGE value="Minor UI fix for Safari" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
@@ -1483,6 +1329,7 @@
<filter targetName="copyjbossembedded" isVisible="false" />
<filter targetName="copyseam" isVisible="false" />
<filter targetName="copyseamdependencies" isVisible="false" />
+ <filter targetName="dependencyReport" isVisible="true" />
<filter targetName="deploy" isVisible="true" />
<filter targetName="dist" isVisible="true" />
<filter targetName="explodehotdeploy" isVisible="false" />
@@ -1495,7 +1342,6 @@
<filter targetName="initdav" isVisible="false" />
<filter targetName="initpoms" isVisible="false" />
<filter targetName="redeploy" isVisible="true" />
- <filter targetName="schemaexport" isVisible="true" />
<filter targetName="startdb" isVisible="true" />
<filter targetName="test" isVisible="true" />
<filter targetName="undeploy" isVisible="true" />
@@ -1517,114 +1363,114 @@
<option name="myLastEditedConfigurable" value="Default" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/migration.sql">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/util/WikiUtil.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="199" column="59" selection-start="12559" selection-end="12559" vertical-scroll-proportion="0.5471698">
+ <state line="154" column="51" selection-start="5718" selection-end="5718" vertical-scroll-proportion="0.36527377">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="23" column="140" selection-start="3839" selection-end="3873" vertical-scroll-proportion="0.22213967">
+ <state line="167" column="0" selection-start="5638" selection-end="5638" vertical-scroll-proportion="0.5151297">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="203" column="0" selection-start="6312" selection-end="6563" vertical-scroll-proportion="0.9150943">
+ <state line="33" column="52" selection-start="1174" selection-end="1174" vertical-scroll-proportion="0.3090778">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/includes/searchControl.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorPreferences.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="13" selection-start="1410" selection-end="1410" vertical-scroll-proportion="0.20058781">
+ <state line="34" column="12" selection-start="1150" selection-end="1150" vertical-scroll-proportion="0.3184438">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/includes/userControl.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="109" column="0" selection-start="5913" selection-end="5913" vertical-scroll-proportion="0.36296842">
+ <state line="25" column="13" selection-start="635" selection-end="635" vertical-scroll-proportion="0.23414986">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/themes/default/css/template.css">
+ <entry file="file://$PROJECT_DIR$/src/etc/i18n/messages_en.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="985" column="0" selection-start="16132" selection-end="16132" vertical-scroll-proportion="0.3490566">
+ <state line="42" column="126" selection-start="2242" selection-end="2242" vertical-scroll-proportion="0.0093659945">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/themes/sfwkorg/css/sfwk.css">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="734" column="0" selection-start="11189" selection-end="11237" vertical-scroll-proportion="0.009433962">
+ <state line="90" column="51" selection-start="3425" selection-end="3425" vertical-scroll-proportion="0.40994236">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/docDisplay_d.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/FeedEntry.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="205" column="33" selection-start="11321" selection-end="11321" vertical-scroll-proportion="0.51212347">
+ <state line="129" column="27" selection-start="3039" selection-end="3039" vertical-scroll-proportion="0.19380404">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/view/includes/commentsDisplay.xhtml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="104" column="0" selection-start="6141" selection-end="6141" vertical-scroll-proportion="0.55033064">
+ <state line="39" column="0" selection-start="1653" selection-end="1653" vertical-scroll-proportion="0.36527377">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="345" column="94" selection-start="15370" selection-end="15370" vertical-scroll-proportion="0.3896952">
+ <state line="38" column="0" selection-start="1447" selection-end="1447" vertical-scroll-proportion="0.35590777">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocuments.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="40" column="37" selection-start="1211" selection-end="1211" vertical-scroll-proportion="0.3773585">
+ <state line="207" column="0" selection-start="8289" selection-end="8289" vertical-scroll-proportion="0.5309798">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test/org/jboss/seam/wiki/test/dao/WikiNodeDAOTests.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="82" column="48" selection-start="2791" selection-end="2791" vertical-scroll-proportion="0.11828737">
+ <state line="32" column="34" selection-start="951" selection-end="951" vertical-scroll-proportion="0.29971182">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="13" selection-start="324" selection-end="324" vertical-scroll-proportion="0.11320755">
+ <state line="106" column="22" selection-start="3912" selection-end="3912" vertical-scroll-proportion="0.67146975">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/etc/WEB-INF/web.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="113" column="26" selection-start="3388" selection-end="3388" vertical-scroll-proportion="0.904482">
+ <state line="122" column="0" selection-start="4659" selection-end="4659" vertical-scroll-proportion="0.82132566">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java">
+ <entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="128" column="0" selection-start="4941" selection-end="4941" vertical-scroll-proportion="0.9716981">
+ <state line="70" column="67" selection-start="3109" selection-end="3109" vertical-scroll-proportion="0.5871758">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="241" column="0" selection-start="10913" selection-end="10913" vertical-scroll-proportion="0.5566038">
+ <state line="270" column="15" selection-start="12910" selection-end="12910" vertical-scroll-proportion="0.33285302">
<folding />
</state>
</provider>
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/cache/ConnectorCache.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -118,7 +118,7 @@
protected ConnectorCacheAsyncUpdater<T, K> getAsyncUpdater() {
return (ConnectorCacheAsyncUpdater<T, K>) Component.getInstance(getAsyncUpdaterClass());
- };
+ }
protected ConnectorCacheKey<K> findKey(ConnectorCacheKey<K> key) {
for (ConnectorCacheKey keyOfMap : cache.keySet()) {
@@ -129,10 +129,10 @@
protected long getUpdateTimeoutSeconds() { return 0; }
protected abstract long getIdleTimeoutSeconds();
- protected Class<? extends ConnectorCacheAsyncUpdater<T, K>> getAsyncUpdaterClass() { return null; };
+ protected Class<? extends ConnectorCacheAsyncUpdater<T, K>> getAsyncUpdaterClass() { return null; }
protected boolean isFirstCacheMissResolvedAsynchronously() { return true; }
protected List<T> udpateCacheSynchronously(ConnectorCache<T, K> cache, ConnectorCacheKey<K> key) {
return Collections.EMPTY_LIST;
- };
+ }
}
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregateCache.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -6,22 +6,16 @@
*/
package org.jboss.seam.wiki.connectors.feed;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.wiki.connectors.cache.ConnectorCache;
import org.jboss.seam.wiki.connectors.cache.ConnectorCacheKey;
-import org.jboss.seam.wiki.core.model.Feed;
-import org.jboss.seam.wiki.core.model.FeedEntry;
-import java.net.URL;
-import java.util.List;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Collections;
import java.io.Serializable;
+import java.util.List;
/**
* Caches transient feeds.
@@ -36,6 +30,9 @@
@AutoCreate
public class FeedAggregateCache extends ConnectorCache<FeedEntryDTO, FeedAggregateCache.FeedAggregateCacheKey> {
+ // The stuff in here is valid for 10 minutes
+ public static long CACHE_IDLE_TIMEOUT_SECONDS = 36000l;
+
public void put(String aggregateId, List<FeedEntryDTO> feedEntries) {
long currentTime = System.currentTimeMillis();
FeedAggregateCacheKey newKey = new FeedAggregateCacheKey(aggregateId);
@@ -54,7 +51,7 @@
}
protected long getIdleTimeoutSeconds() {
- return 36000;
+ return CACHE_IDLE_TIMEOUT_SECONDS;
}
public static class FeedAggregateCacheKey implements Serializable {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedAggregatorDAO.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -7,7 +7,6 @@
package org.jboss.seam.wiki.connectors.feed;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.wiki.core.model.Feed;
import org.jboss.seam.annotations.*;
import org.jboss.seam.log.Log;
@@ -16,6 +15,30 @@
import java.net.URL;
/**
+ * Calls feed connector several times for several feed URLs, optionally stores the result in a cache.
+ *
+ * <p>
+ * Reads the feed information from the feed connector (or the transparent cache on top of the connector) and
+ * then aggregates the data into <tt>FeedEntryDTO</tt> instances. These instances are then again cached
+ * in the <tt>FeedAggregateCache</tt>. We basically have a DTO/DAO/Cache layer on top of the connector layer (with
+ * its own caching). However, this aggregate cache is not transparent, so if a client wants to get cached
+ * <tt>FeedEntryDTO</tt> objects, it needs to ask the <tt>FeedAggregateCache</tt> directly, not this DAO. The DAO
+ * just puts stuff <i>into</i> the cache when its loaded from the connector.
+ * </p>
+ * <p>
+ * The primary motivation behind this architecture is resolving the disconnect that exists between reading external
+ * feeds and storing them in-memory for further reading (display on pages, exposing aggregated feeds). We also need
+ * to channel parameters, that is, a page might want to render external feeds A and B. However, the connector layer
+ * can only handle a single feed at a time, so the additional aggregation layer was added to combine data from
+ * several feeds (with potentially several connector calls).
+ * </p>
+ * <p>
+ * Finally, caching the aggregated feeds is optional. If a client asks this DAO to aggregate feed entries of
+ * several external feeds, and does not supply a cache key (the aggregateId), the result is not cached in the
+ * <tt>FeedAggregateCache</tt>. So <i>other</i> clients (which might also only know the aggregateId, not the
+ * external feed URLs) can not access the data on the <tt>FeedAggregateCache</tt>.
+ * </p>
+ *
* @author Christian Bauer
*/
@Name("feedAggregatorDAO")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -62,6 +62,7 @@
SyndFeedInput input = new SyndFeedInput();
SyndFeed syndFeed = input.build(new XmlReader(connection));
*/
+ // So we let Rome do it, whatever it uses internally seems to be safer...
SyndFeedInput input = new SyndFeedInput();
SyndFeed syndFeed = input.build(new XmlReader(feedSource));
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -138,7 +138,7 @@
public List<FeedEntry> findLastFeedEntries(Long feedId, int maxResults) {
return (List<FeedEntry>) restrictedEntityManager
- .createQuery("select fe from Feed f join f.feedEntries fe where f.id = :feedId order by fe.publishedDate desc")
+ .createQuery("select fe from Feed f join f.feedEntries fe where f.id = :feedId order by fe.updatedDate desc")
.setParameter("feedId", feedId)
.setMaxResults(maxResults)
.getResultList();
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -37,7 +37,6 @@
fe.setLink(wikiURLRenderer.renderURL(comment, true));
fe.setTitle(Messages.instance().get("lacewiki.label.comment.FeedEntryTitlePrefix") + " " + comment.getSubject());
fe.setAuthor(comment.getCreatedBy().getFullname() != null ? comment.getCreatedBy().getFullname() : comment.getFromUserName());
- fe.setUpdatedDate(comment.getLastModifiedOn());
fe.setDescriptionValue(getCommentDescription(comment));
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -36,7 +36,6 @@
fe.setLink(wikiURLRenderer.renderURL(document, true));
fe.setTitle(getFeedEntryTitle(document));
fe.setAuthor(document.getCreatedBy().getFullname());
- fe.setUpdatedDate(document.getLastModifiedOn());
fe.setDescriptionValue(renderWikiText(document.getAreaNumber(), document.getFeedDescription()));
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -9,7 +9,7 @@
import com.sun.syndication.feed.synd.*;
import com.sun.syndication.io.SyndFeedOutput;
import org.jboss.seam.Component;
-import org.jboss.seam.Seam;
+import org.jboss.seam.transaction.Transaction;
import org.jboss.seam.web.Session;
import org.jboss.seam.security.Identity;
import org.jboss.seam.international.Messages;
@@ -20,6 +20,7 @@
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.dao.WikiNodeFactory;
import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.util.Hash;
import org.jboss.seam.wiki.preferences.Preferences;
import org.jboss.seam.wiki.connectors.feed.FeedAggregateCache;
import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
@@ -43,6 +44,7 @@
* read-access filtered. Optionally, requests can enable/disable comments on the feed
* or filter by tag. It's up to the actual <tt>WikiFeedEntry</tt> instance how these
* filters are applied.
+ * </p>
*
* @author Christian Bauer
*/
@@ -93,6 +95,7 @@
if (!feedTypes.containsKey(pathInfo)) {
log.debug("can not render this feed type, returning BAD REQUEST");
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Unsupported feed type " + pathInfo);
+ invalidateSessionIfPossible(request);
return;
}
SyndFeedType syndFeedType = feedTypes.get(pathInfo);
@@ -100,10 +103,12 @@
// Comments
String commentsParam = request.getParameter("comments");
Comments comments = Comments.include;
- if (commentsParam != null) {
+ if (commentsParam != null && commentsParam.length() >0) {
try {
comments = Comments.valueOf(commentsParam);
- } catch (IllegalArgumentException ex) {}
+ } catch (IllegalArgumentException ex) {
+ log.info("invalid comments request parameter: " + commentsParam);
+ }
}
log.debug("feed rendering handles comments: " + comments);
@@ -120,7 +125,7 @@
UserTransaction userTx = null;
boolean startedTx = false;
try {
- userTx = (UserTransaction)org.jboss.seam.Component.getInstance("org.jboss.seam.transaction.transaction");
+ userTx = Transaction.instance();
if (userTx.getStatus() != javax.transaction.Status.STATUS_ACTIVE) {
startedTx = true;
userTx.begin();
@@ -140,6 +145,7 @@
feed.setAuthor(Messages.instance().get("lacewiki.msg.AutomaticallyGeneratedFeed"));
feed.setTitle(Messages.instance().get("lacewiki.msg.AutomaticallyGeneratedFeed") + ": " + aggregateParam);
feed.setPublishedDate(new Date());
+ // We are lying here, we don't really have an alternate representation link for this resource
feed.setLink( Preferences.getInstance(WikiPreferences.class).getBaseUrl() );
for (FeedEntryDTO feedEntryDTO : result) {
feed.getFeedEntries().add(feedEntryDTO.getFeedEntry());
@@ -188,6 +194,7 @@
log.debug("feed not found, returning NOT FOUND");
response.sendError(HttpServletResponse.SC_NOT_FOUND, "Feed");
if (startedTx) userTx.commit();
+ invalidateSessionIfPossible(request);
return;
}
@@ -202,11 +209,46 @@
response.setHeader("WWW-Authenticate", "Basic realm=\"" + feed.getTitle().replace("\"", "'") + "\"");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
if (startedTx) userTx.commit();
+ invalidateSessionIfPossible(request);
return;
}
}
- // TODO: Refactor this mess a little
+ String etag = null;
+ if (feed.getId() != null) {
+ log.debug("calculating etag for local feed");
+
+ // Ask the database what the latest feed entry is for that feed, then use its updated timestamp hash
+ FeedDAO feedDAO = (FeedDAO)Component.getInstance(FeedDAO.class);
+ List<FeedEntry> result = feedDAO.findLastFeedEntries(feed.getId(), 1);
+ if (result.size() > 0)
+ etag = calculateEtag(result.get(0).getUpdatedDate());
+
+ } else {
+ log.debug("calculating etag for aggregated feed");
+
+ // Get the first (latest) entry of the aggregated feed and use its published timestamp hash (ignoring updates!)
+ // There is a wrinkle hidden here: What if a feed entry is updated? Then the published timestamp should also
+ // be different because the "first latest" feed entry in the list is sorted by both published and updated
+ // timestamps. So even though we only use published timestamp hash as an ETag, this timestamp also changes
+ // when a feed entry is updated because the collection order changes as well.
+ if (feed.getFeedEntries().size() > 0)
+ etag = calculateEtag(feed.getFeedEntries().iterator().next().getPublishedDate());
+ }
+ if (etag != null) {
+ log.debug("setting etag header: " + etag);
+ response.setHeader("ETag", etag);
+ String previousToken = request.getHeader("If-None-Match");
+ if (previousToken != null && previousToken.equals(etag)) {
+ log.debug("found matching etag in request header, returning 304 Not Modified");
+ response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
+ if (startedTx) userTx.commit();
+ invalidateSessionIfPossible(request);
+ return;
+ }
+ }
+
+ // TODO: Refactor this parameter mess a little
log.debug("finally rendering feed");
SyndFeed syndFeed =
createSyndFeed(
@@ -229,23 +271,21 @@
log.debug("<<< commit, rendering complete");
if (startedTx) userTx.commit();
+
} catch (Exception ex) {
- try {
- if (startedTx && userTx.getStatus() != javax.transaction.Status.STATUS_MARKED_ROLLBACK) {
- log.error("error serving feed, setting transaction to rollback only");
- userTx.setRollbackOnly();
+ if (startedTx && userTx != null) {
+ // We started it, so we need to roll it back
+ try {
+ userTx.rollback();
+ } catch (Exception rbEx) {
+ log.error("could not roll back transaction: " + rbEx.getMessage());
}
- } catch (Exception rbEx) {
- rbEx.printStackTrace();
}
- throw new RuntimeException(ex);
+ throw new ServletException(ex);
+ } finally {
+ invalidateSessionIfPossible(request);
}
- // If the user is not logged in, we might as well destroy the session immediately, saving some memory
- if (request.getSession().isNew() && !Identity.instance().isLoggedIn()) {
- log.debug("destroying session that was only created for reading the feed");
- Session.instance().invalidate();
- }
}
public SyndFeed createSyndFeed(String baseURI, SyndFeedType syndFeedType, Feed feed, Integer currentAccessLevel) {
@@ -316,4 +356,17 @@
return syndFeed;
}
+ private String calculateEtag(Date date) {
+ Hash hash = new Hash();
+ return hash.hash(date.toString());
+ }
+
+ private void invalidateSessionIfPossible(HttpServletRequest request) {
+ // If the user is not logged in, we might as well destroy the session immediately, saving some memory
+ if (request.getSession().isNew() && !Identity.instance().isLoggedIn()) {
+ log.debug("destroying session that was only created for reading the feed");
+ Session.instance().invalidate();
+ }
+ }
+
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java 2008-02-29 12:38:27 UTC (rev 7495)
@@ -5,6 +5,8 @@
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.WikiUpload;
import org.jboss.seam.wiki.core.model.WikiUploadImage;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -17,6 +19,8 @@
public class FileServlet extends HttpServlet {
+ private static final Log log = LogFactory.getLog(FileServlet.class);
+
private static final String DOWNLOAD_PATH = "/download.seam";
private byte[] fileNotFoundImage;
@@ -75,13 +79,16 @@
if (startedTx) userTx.commit();
} catch (Exception ex) {
- try {
- if (startedTx && userTx.getStatus() != javax.transaction.Status.STATUS_MARKED_ROLLBACK)
- userTx.setRollbackOnly();
- } catch (Exception rbEx) {
- rbEx.printStackTrace();
+ if (startedTx && userTx != null) {
+ // We started it, so we need to roll it back
+ try {
+ userTx.rollback();
+ } catch (Exception rbEx) {
+ log.error("could not roll back transaction: " + rbEx.getMessage());
+ }
}
- throw new RuntimeException(ex);
+ invalidateSessionIfPossible(request);
+ throw new ServletException(ex);
}
}
@@ -131,11 +138,15 @@
response.getOutputStream().flush();
}
+ invalidateSessionIfPossible(request);
+ }
+ private void invalidateSessionIfPossible(HttpServletRequest request) {
// If the user is not logged in, we might as well destroy the session immediately, saving some memory
if (request.getSession().isNew() && !Identity.instance().isLoggedIn()) {
+ log.debug("destroying session that was only created for reading the file");
Session.instance().invalidate();
}
+ }
- }
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml 2008-02-28 09:25:03 UTC (rev 7494)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml 2008-02-29 12:38:27 UTC (rev 7495)
@@ -137,6 +137,7 @@
and t.createdOn > :lastLoginDate
]]></query>
+ <!-- TODO: Optimize this with native SQL, move where-clause subselect into from-clause join -->
<query name="forumUnreadReplies"><![CDATA[
select
distinct t.id, t.parent.id
@@ -161,6 +162,7 @@
and t.createdOn > :lastLoginDate
]]></query>
+ <!-- TODO: Optimize this with native SQL, move where-clause subselect into from-clause join -->
<query name="forumUnreadRepliesInForum"><![CDATA[
select
distinct t.id, t.parent.id
@@ -238,7 +240,7 @@
by STICKY desc, LAST_POST desc
]]></sql-query>
- <!-- TODO: Optimize this with native SQL -->
+ <!-- TODO: Optimize this with native SQL, move where-clause subselect into from-clause join-->
<query name="forumTopicsReplies"><![CDATA[
select
t.id,
@@ -266,6 +268,7 @@
]]></query>
+ <!-- TODO: Optimize this with native SQL, move where-clause subselect into from-clause join -->
<sql-query name="forumPostersAndRatingPoints">
<return class="org.jboss.seam.wiki.core.model.User"/>
<return-scalar column="RATING_POINTS" type="long"/>
16 years, 9 months
Seam SVN: r7494 - trunk/examples/wiki/view/includes.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-28 04:25:03 -0500 (Thu, 28 Feb 2008)
New Revision: 7494
Modified:
trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
Log:
Minor UI fix for Safari
Modified: trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-28 08:48:25 UTC (rev 7493)
+++ trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-28 09:25:03 UTC (rev 7494)
@@ -7,7 +7,7 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:s="http://jboss.com/products/seam/taglib">
- <h:form id="directoryBrowserPathForm">
+ <h:form id="directoryBrowserPathForm" style="margin:0;padding:0;border:0">
<h:panelGrid columns="2"
styleClass="directoryBrowserPathPanel"
columnClasses="#{directoryBrowserSettings.treeVisible ? 'treeSwitchOpen':'treeSwitchClosed'}, path"
16 years, 9 months
Seam SVN: r7493 - in trunk/examples/wiki/view/themes: inrelationto/mailtemplates and 1 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-28 03:48:25 -0500 (Thu, 28 Feb 2008)
New Revision: 7493
Modified:
trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml
Log:
JBSEAM-2687, activate inactive account on password reset
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml 2008-02-28 08:43:43 UTC (rev 7492)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/resetPassword.xhtml 2008-02-28 08:48:25 UTC (rev 7493)
@@ -20,7 +20,7 @@
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
- with your old password.
+ with your old password. If your account is currently not activated, you can use the link above to activated it.
</p>
<p>
@@ -39,7 +39,8 @@
#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}
If you did not request a password reset, or if you do not reset your password, your account will still
-be active with your old password.
+be active with your old password. If your account is currently not activated, you can use the link above
+to activated it.
Regards,
LaceWiki
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml 2008-02-28 08:43:43 UTC (rev 7492)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/resetPassword.xhtml 2008-02-28 08:48:25 UTC (rev 7493)
@@ -20,7 +20,7 @@
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
- with your old password.
+ with your old password. If your account is currently not activated, you can use the link above to activated it.
</p>
<p>
@@ -39,7 +39,8 @@
#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}
If you did not request a password reset, or if you do not reset your password, your account will still
-be active with your old password.
+be active with your old password. If your account is currently not activated, you can use the link above
+to activated it.
Regards,
LaceWiki
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml 2008-02-28 08:43:43 UTC (rev 7492)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/resetPassword.xhtml 2008-02-28 08:48:25 UTC (rev 7493)
@@ -20,7 +20,7 @@
<p>
If you did not request a password reset, or if you do not reset your password, your account will still be active
- with your old password.
+ with your old password. If your account is currently not activated, you can use the link above to activated it.
</p>
</body>
</html>
@@ -34,7 +34,8 @@
#{preferences.get('Wiki').baseUrl}/resetPassword.seam?activationCode=#{resetPasswordOfUser.activationCode}
If you did not request a password reset, or if you do not reset your password, your account will still
-be active with your old password.
+be active with your old password. If your account is currently not activated, you can use the link above
+to activated it.
</h:outputText>
</f:facet>
</m:body>
16 years, 9 months
Seam SVN: r7492 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-28 03:43:43 -0500 (Thu, 28 Feb 2008)
New Revision: 7492
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
Log:
JBSEAM-2687, activate inactive account on password reset
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java 2008-02-27 14:31:31 UTC (rev 7491)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java 2008-02-28 08:43:43 UTC (rev 7492)
@@ -15,12 +15,9 @@
import org.jboss.seam.wiki.core.dao.TagDAO;
import org.jboss.seam.wiki.core.model.DisplayTagCount;
import org.jboss.seam.wiki.core.model.WikiDirectory;
-import org.jboss.seam.wiki.core.model.WikiFile;
import javax.faces.application.FacesMessage;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.SortedSet;
+import java.util.*;
import java.io.Serializable;
/**
@@ -40,7 +37,7 @@
@In
private FacesMessages facesMessages;
- private SortedSet<String> tags;
+ private SortedSet<String> tags = new TreeSet<String>();
private String newTag;
private List<DisplayTagCount> popularTags;
@@ -53,7 +50,7 @@
}
public List<String> getTagsAsList() {
- return new ArrayList<String>(tags);
+ return tags != null ? new ArrayList<String>(tags) : Collections.EMPTY_LIST;
}
public String getNewTag() {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-02-27 14:31:31 UTC (rev 7491)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-02-28 08:43:43 UTC (rev 7492)
@@ -30,6 +30,24 @@
import java.util.regex.Pattern;
/**
+ * The password reset feature works as follows:
+ *
+ * - User enters username and e-mail address. The account does not have to be activated, so
+ * the "Reset Password" functionality can also serve as "Resend Activation E-Mail".
+ *
+ * - Both username and e-mail address are checked with what we have in the database.
+ *
+ * - An activation code is generated and stored in the database for this user account.
+ *
+ * - An e-mail with the activation code is send to the users e-mail address.
+ *
+ * - If the user clicks on the activation link, the login form on the page will
+ * switch to a password reset form. (If the activation code was correct.)
+ *
+ * - After typing in the password twice, the user account gets a new password and
+ * we also activate it.
+ *
+ *
* @author Christian Bauer
*/
@Name("userPasswordReset")
@@ -155,6 +173,10 @@
User persistentUser = userDAO.findUser(user.getId());
persistentUser.setPasswordHash(hashUtil.hash(getPassword()));
+
+ // As a side effect, also activate the user! http://jira.jboss.com/jira/browse/JBSEAM-2687
+ persistentUser.setActivated(true);
+
Contexts.getSessionContext().remove(RESET_PASSWORD_OF_USER);
facesMessages.addFromResourceBundleOrDefault(
16 years, 9 months
Seam SVN: r7491 - in trunk/examples/wiki: src/etc/i18n and 9 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-27 09:31:31 -0500 (Wed, 27 Feb 2008)
New Revision: 7491
Added:
trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferencesSupport.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocQuery.java
trunk/examples/wiki/view/plugins/dirToc/
trunk/examples/wiki/view/plugins/dirToc/plugin.xhtml
trunk/examples/wiki/view/themes/default/css/dirToc.css
trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css
trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css
Modified:
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/KnowledgeBase.dbunit.xml
trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
Log:
JBSEAM-2634, table-of-contents plugin
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-27 08:41:59 UTC (rev 7490)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-27 14:31:31 UTC (rev 7491)
@@ -98,9 +98,7 @@
<value>i18n.messages_feedAggregator</value>
<value>i18n.messages_feedConnector</value>
<value>i18n.messages_forumTopPosters</value>
- <!--
<value>i18n.messages_dirToc</value>
- -->
</core:bundle-names>
</core:resource-loader>
Copied: trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties (from rev 7445, trunk/examples/wiki/src/etc/i18n/messages_dirMenu_en.properties)
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties (rev 0)
+++ trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,8 @@
+dirToc.preferences.Name=Plugin: Directory TOC
+dirToc.preferences.ShowRootDocuments=Show documents of root directory
+dirToc.preferences.ShowDefaultDocuments=Show default documents of all directories
+dirToc.preferences.ShowLastUpdatedTimestamp=Show 'Last Updated' timestamp
+dirToc.preferences.WithHeaderMacro=Only show documents with macro in header
+dirToc.preferences.RootDocumentLink=Wiki link to root document of TOC
+
+dirToc.label.LastUpdated=Last Updated
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferences.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferences.java 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.dirToc;
+
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Length;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(name = "DirToc", description = "#{messages['dirToc.preferences.Name']}")
+public class DirTocPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.ShowRootDocuments']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showRootDocuments;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.ShowDefaultDocuments']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showDefaultDocuments;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.ShowLastUpdatedTimestamp']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showLastUpdatedTimestamp;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.WithHeaderMacro']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String withHeaderMacro;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.RootDocumentLink']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String rootDocumentLink;
+
+ public Boolean getShowRootDocuments() {
+ return showRootDocuments;
+ }
+
+ public Boolean getShowDefaultDocuments() {
+ return showDefaultDocuments;
+ }
+
+ public Boolean getShowLastUpdatedTimestamp() {
+ return showLastUpdatedTimestamp;
+ }
+
+ public String getWithHeaderMacro() {
+ return withHeaderMacro;
+ }
+
+ public String getRootDocumentLink() {
+ return rootDocumentLink;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferencesSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferencesSupport.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferencesSupport.java 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.dirToc;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("dirTocPreferencesSupport")
+public class DirTocPreferencesSupport extends PreferencesSupport {
+
+ public Set<PreferenceEntity> getPreferenceEntities() {
+ return new HashSet<PreferenceEntity>() {{
+ add( createPreferenceEntity(DirTocPreferences.class) );
+ }};
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocQuery.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocQuery.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocQuery.java 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.dirToc;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.richfaces.component.UITree;
+
+import javax.persistence.EntityManager;
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("dirTocQuery")
+(a)Scope(ScopeType.CONVERSATION)
+public class DirTocQuery implements Serializable {
+
+ @In
+ EntityManager restrictedEntityManager;
+
+ @In
+ Integer currentAccessLevel;
+
+ @In
+ WikiDirectory currentDirectory;
+
+ @In("#{preferences.get('DirToc', currentMacro)}")
+ DirTocPreferences prefs;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ NestedSetNodeWrapper<WikiDirectory> tocRoot;
+
+ public NestedSetNodeWrapper<WikiDirectory> getTocRoot() {
+ if (tocRoot == null) loadTocRoot();
+ return tocRoot;
+ }
+
+ @Observer(value = "Macro.render.dirToc", create = false)
+ public void loadTocRoot() {
+
+ if (prefs.getRootDocumentLink() != null) {
+ Long id = ((WikiLinkResolver)Component.getInstance("wikiLinkResolver"))
+ .resolveWikiDirectoryId(currentDirectory.getAreaNumber(), prefs.getRootDocumentLink());
+ WikiDirectory foundDir = wikiNodeDAO.findWikiDirectory(id);
+ if (foundDir != null)
+ currentDirectory = foundDir;
+ }
+
+ // Query the directory tree
+ tocRoot = wikiNodeDAO.findWikiDirectoryTree(currentDirectory);
+
+ Set<Long> directoryIds = new HashSet<Long>(tocRoot.getFlatTree().keySet());
+ if (prefs.getShowRootDocuments() != null && prefs.getShowRootDocuments()) {
+ directoryIds.add(tocRoot.getWrappedNode().getId());
+ }
+ if (directoryIds.size() == 0) return; // Early exit
+
+ // Now query the documents for the directories in the tree
+ StringBuilder queryString = new StringBuilder();
+ queryString.append("select d from WikiDocument d ");
+ // TODO: Rewrite this query to use a subselect nested set query, this has limits
+ queryString.append("where d.parent.id in (:directories) ");
+ if (prefs.getWithHeaderMacro() != null)
+ queryString.append("and d.headerMacrosString like :headerMacro").append(" ");
+ queryString.append("order by d.createdOn asc");
+
+ Query query = getSession().createQuery(queryString.toString());
+ query.setParameterList("directories", directoryIds);
+ if (prefs.getWithHeaderMacro() != null)
+ query.setParameter("headerMacro", "%"+prefs.getWithHeaderMacro()+"%");
+ query.setComment("retrieving documents for toc directory tree");
+
+ List<WikiDocument> flatDocs = query.list();
+
+ // Now attach the documents as payloads to the directories in the tree
+ for (WikiDocument flatDoc : flatDocs) {
+
+ Long directoryId = flatDoc.getParent().getId();
+ NestedSetNodeWrapper<WikiDirectory> dirWrapper;
+
+ if (prefs.getShowRootDocuments() != null && prefs.getShowRootDocuments()
+ && directoryId.equals(tocRoot.getWrappedNode().getId())) {
+ dirWrapper = tocRoot;
+ } else {
+ dirWrapper = tocRoot.getFlatTree().get(directoryId);
+ }
+
+ if (dirWrapper.getPayload() == null)
+ dirWrapper.setPayload(new ArrayList<WikiDocument>());
+
+ ((Collection)dirWrapper.getPayload()).add(flatDoc);
+ }
+
+ }
+
+ public boolean expandTocTree(UITree tree) {
+ return true; // Expand all nodes by default;
+ }
+
+ private Session getSession() {
+ return ((Session)((org.jboss.seam.persistence.EntityManagerProxy) restrictedEntityManager).getDelegate());
+ }
+
+}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/KnowledgeBase.dbunit.xml
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/KnowledgeBase.dbunit.xml 2008-02-27 08:41:59 UTC (rev 7490)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/KnowledgeBase.dbunit.xml 2008-02-27 14:31:31 UTC (rev 7491)
@@ -32,9 +32,9 @@
<WIKI_DOCUMENT
NODE_ID="202"
NAME_AS_TITLE="true" ENABLE_COMMENTS="false" ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"
- HEADER_MACROS="hideCreatorHistory" CONTENT_MACROS="dirMenu" FOOTER_MACROS="[NULL]"
+ HEADER_MACROS="hideCreatorHistory" CONTENT_MACROS="dirToc dirMenu" FOOTER_MACROS="[NULL]"
HEADER="[<=hideCreatorHistory]" FOOTER="[NULL]"
- CONTENT="Knowledge Base...

[<=dirMenu[onlyMenuItems=true]]"/>
+ CONTENT="Knowledge Base...

<div style="float:right;">[<=dirMenu[onlyMenuItems=true]]</div>

[<=dirToc[showDefaultDocuments=true][showLastUpdatedTimestamp=true][withHeaderMacro=tocEntry]]"/>
<WIKI_NODE
@@ -77,5 +77,62 @@
NS_LEFT="208" NS_RIGHT="209" NS_THREAD="1"/>
<WIKI_MENU_ITEM DIRECTORY_ID="206" DISPLAY_POSITION="3"/>
+
+ <WIKI_NODE
+ NODE_ID="207" OBJ_VERSION="0" RATING="0" PARENT_NODE_ID="204"
+ AREA_NR="200" NAME="Some setup instructions" WIKINAME="SomeSetupInstructions"
+ CREATED_ON="2006-09-23 13:45:00" CREATED_BY_USER_ID="1" LAST_MODIFIED_ON="[NULL]" LAST_MODIFIED_BY_USER_ID="[NULL]"
+ READ_ACCESS_LEVEL="0" WRITE_ACCESS_LEVEL="0" WRITE_PROTECTED="false"/>
+ <WIKI_FILE
+ NODE_ID="207" FILE_REVISION="0"/>
+ <WIKI_DOCUMENT
+ NODE_ID="207"
+ NAME_AS_TITLE="true" ENABLE_COMMENTS="false" ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"
+ HEADER_MACROS="tocEntry" CONTENT_MACROS="[NULL]" FOOTER_MACROS="[NULL]"
+ HEADER="[<=tocEntry]" FOOTER="[NULL]"
+ CONTENT="This is a document with a tocEntry header macro."/>
+
+ <WIKI_NODE
+ NODE_ID="208" OBJ_VERSION="0" RATING="0" PARENT_NODE_ID="204"
+ AREA_NR="200" NAME="More setup instructions" WIKINAME="MoreSetupInstructions"
+ CREATED_ON="2006-09-24 13:45:00" CREATED_BY_USER_ID="1" LAST_MODIFIED_ON="[NULL]" LAST_MODIFIED_BY_USER_ID="[NULL]"
+ READ_ACCESS_LEVEL="0" WRITE_ACCESS_LEVEL="0" WRITE_PROTECTED="false"/>
+ <WIKI_FILE
+ NODE_ID="208" FILE_REVISION="0"/>
+ <WIKI_DOCUMENT
+ NODE_ID="208"
+ NAME_AS_TITLE="true" ENABLE_COMMENTS="false" ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"
+ HEADER_MACROS="tocEntry" CONTENT_MACROS="[NULL]" FOOTER_MACROS="[NULL]"
+ HEADER="[<=tocEntry]" FOOTER="[NULL]"
+ CONTENT="This is a document with a tocEntry header macro."/>
+
+ <WIKI_NODE
+ NODE_ID="209" OBJ_VERSION="0" RATING="0" PARENT_NODE_ID="205"
+ AREA_NR="200" NAME="Another knowledge page" WIKINAME="AnotherKnowledgePage"
+ CREATED_ON="2006-09-25 13:45:00" CREATED_BY_USER_ID="1" LAST_MODIFIED_ON="2006-09-25 13:45:00" LAST_MODIFIED_BY_USER_ID="1"
+ READ_ACCESS_LEVEL="0" WRITE_ACCESS_LEVEL="0" WRITE_PROTECTED="false"/>
+ <WIKI_FILE
+ NODE_ID="209" FILE_REVISION="0"/>
+ <WIKI_DOCUMENT
+ NODE_ID="209"
+ NAME_AS_TITLE="true" ENABLE_COMMENTS="false" ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"
+ HEADER_MACROS="tocEntry" CONTENT_MACROS="[NULL]" FOOTER_MACROS="[NULL]"
+ HEADER="[<=tocEntry]" FOOTER="[NULL]"
+ CONTENT="This is a document with a tocEntry header macro."/>
+
+ <WIKI_NODE
+ NODE_ID="210" OBJ_VERSION="0" RATING="0" PARENT_NODE_ID="205"
+ AREA_NR="200" NAME="A document not in the TOC" WIKINAME="ADocumentNotInTheTOC"
+ CREATED_ON="2006-09-26 13:45:00" CREATED_BY_USER_ID="1" LAST_MODIFIED_ON="[NULL]" LAST_MODIFIED_BY_USER_ID="[NULL]"
+ READ_ACCESS_LEVEL="0" WRITE_ACCESS_LEVEL="0" WRITE_PROTECTED="false"/>
+ <WIKI_FILE
+ NODE_ID="210" FILE_REVISION="0"/>
+ <WIKI_DOCUMENT
+ NODE_ID="210"
+ NAME_AS_TITLE="true" ENABLE_COMMENTS="false" ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"
+ HEADER_MACROS="[NULL]" CONTENT_MACROS="[NULL]" FOOTER_MACROS="[NULL]"
+ HEADER="[NULL]" FOOTER="[NULL]"
+ CONTENT="This is a document with no tocEntry header macro, so it does not appear in the TOC."/>
+
</dataset>
Modified: trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-27 08:41:59 UTC (rev 7490)
+++ trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-27 14:31:31 UTC (rev 7491)
@@ -16,7 +16,7 @@
<s:fragment>
<a:commandLink action="#{directoryBrowser.showTree}" tabindex="1"
- reRender="#{renderOnSelect}, directoryBrowserPath"
+ reRender="#{renderOnSelect}"
rendered="#{not directoryBrowserSettings.treeVisible}"
status="globalStatus">
<h:graphicImage value="#{themePath}/img/menu_right.gif" width="18" height="18"/>
Added: trunk/examples/wiki/view/plugins/dirToc/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/dirToc/plugin.xhtml (rev 0)
+++ trunk/examples/wiki/view/plugins/dirToc/plugin.xhtml 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,71 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <rich:tree switchType="client" styleClass="dirToc"
+ adviseNodeOpened="#{dirTocQuery.expandTocTree}">
+
+ <rich:treeNodesAdaptor
+ var="rootDoc"
+ nodes="#{dirTocQuery.tocRoot.payload}"
+ includedNode="#{rootDoc.id != dirTocQuery.tocRoot.wrappedNode.defaultFile.id or preferences.get('DirToc', currentMacro).showDefaultDocuments}">
+ <rich:treeNode>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{themePath}/img/icon.doc.gif" width="18" height="20"/>
+ </f:facet>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(doc)}">
+ <h:outputText styleClass="tocDocumentLabel" value="#{doc.name}"/>
+ </h:outputLink>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+
+ <rich:recursiveTreeNodesAdaptor
+ var="tocDir"
+ roots="#{dirTocQuery.tocRoot.wrappedChildren}"
+ nodes="#{tocDir.wrappedChildren}">
+
+ <rich:treeNode>
+ <f:facet name="icon">
+ <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(tocDir.wrappedNode)}">
+ <h:outputText styleClass="tocDirectoryLabel" value="#{tocDir.wrappedNode.name}"/>
+ </h:outputLink>
+ </s:span>
+ </rich:treeNode>
+
+ <rich:treeNodesAdaptor var="doc" nodes="#{tocDir.payload}"
+ includedNode="#{doc.id != tocDir.wrappedNode.defaultFile.id or preferences.get('DirToc', currentMacro).showDefaultDocuments}">
+ <rich:treeNode>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{themePath}/img/icon.doc.gif" width="18" height="20"/>
+ </f:facet>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(doc)}">
+ <h:outputText styleClass="tocDocumentLabel" value="#{doc.name}"/>
+ </h:outputLink>
+ <s:span styleClass="tocLastUpdatedLabel"
+ rendered="#{preferences.get('DirToc', currentMacro).showLastUpdatedTimestamp and not empty doc.lastModifiedOn}">
+ <h:outputText value=" (#{messages['dirToc.label.LastUpdated']}: "/>
+ <h:outputText value="#{doc.lastModifiedOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ <h:outputText value=")"/>
+ </s:span>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:tree>
+
+</wiki:plugin>
\ No newline at end of file
Added: trunk/examples/wiki/view/themes/default/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/view/themes/default/css/dirToc.css 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,20 @@
+.dirToc {
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+}
+
+.tocDirectoryLabel {
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
Added: trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,20 @@
+.dirToc {
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+}
+
+.tocDirectoryLabel {
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
Added: trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css 2008-02-27 14:31:31 UTC (rev 7491)
@@ -0,0 +1,21 @@
+.dirToc {
+}
+
+.tocDirectoryPanel {
+ margin-top: 5px;
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
16 years, 9 months
Seam SVN: r7490 - trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-27 03:41:59 -0500 (Wed, 27 Feb 2008)
New Revision: 7490
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
Log:
Fix test
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-27 08:35:11 UTC (rev 7489)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-27 08:41:59 UTC (rev 7490)
@@ -347,7 +347,7 @@
assert browser.getChildNodes().size() == 3;
boolean found = false;
- for (WikiNode node : browser.getChildNodes()) found = node.getId().equals(9l);
+ for (WikiNode node : browser.getChildNodes()) if (node.getId().equals(9l)) found = true;
assert found;
DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
16 years, 9 months
Seam SVN: r7489 - in trunk/examples/wiki: src/etc/WEB-INF and 27 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-27 03:35:11 -0500 (Wed, 27 Feb 2008)
New Revision: 7489
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java
trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
trunk/examples/wiki/view/includes/pager.xhtml
trunk/examples/wiki/view/includes/sortableHeader.xhtml
trunk/examples/wiki/view/themes/default/js/jqMenu.js
Removed:
trunk/examples/wiki/view/themes/default/js/jqContextMenu.js
Modified:
trunk/examples/wiki/src/etc/META-INF/components-dev.xml
trunk/examples/wiki/src/etc/META-INF/components-prod.xml
trunk/examples/wiki/src/etc/META-INF/components-test.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/dirDisplay_m.xhtml
trunk/examples/wiki/view/dirEdit_d.xhtml
trunk/examples/wiki/view/dirEdit_m.xhtml
trunk/examples/wiki/view/docEdit_d.xhtml
trunk/examples/wiki/view/docEdit_m.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js
trunk/examples/wiki/view/themes/inrelationto/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
trunk/examples/wiki/view/uploadCreate_d.xhtml
trunk/examples/wiki/view/uploadCreate_m.xhtml
trunk/examples/wiki/view/uploadEdit_d.xhtml
trunk/examples/wiki/view/uploadEdit_m.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
JBSEAM-2582, UI consistency work and new directory browser
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+ http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true" max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+ http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true" max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -32,6 +32,9 @@
<mail:mail-session host="localhost" port="25"/>
<!-- Maximum size of file uploads -->
+ <!-- If you are using MySQL, don't forget their magic stuff:
+ http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
+ -->
<web:multipart-filter create-temp-files="true" max-request-size="10000000" url-pattern="*.seam"/>
<!-- ############## END OF WIKI USER CONFIGURATION ############## -->
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -98,6 +98,9 @@
<value>i18n.messages_feedAggregator</value>
<value>i18n.messages_feedConnector</value>
<value>i18n.messages_forumTopPosters</value>
+ <!--
+ <value>i18n.messages_dirToc</value>
+ -->
</core:bundle-names>
</core:resource-loader>
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -44,9 +44,7 @@
<navigation>
<rule if-outcome="exit">
<end-conversation before-redirect="true"/>
- <redirect view-id="/docDisplay_#{skin}.xhtml">
- <param name="documentId" value="#{documentHistory.currentFile.id}"/>
- </redirect>
+ <redirect url="#{wikiURLRenderer.renderURL(documentHistory.currentFile)}"/>
</rule>
<rule if-outcome="purgedHistory">
<end-conversation before-redirect="true"/>
@@ -92,11 +90,11 @@
</page>
<page view-id="/dirDisplay*">
- <param name="directoryId" value="#{directoryHome.nodeId}"/>
+ <param name="directoryId" value="#{directoryBrowser.directoryId}"/>
<navigation>
<rule if-outcome="removed">
<redirect view-id="/dirDisplay_#{skin}.xhtml">
- <param name="directoryId" value="#{directoryHome.nodeId}"/>
+ <param name="directoryId" value="#{directoryBrowser.directoryId}"/>
</redirect>
</rule>
</navigation>
@@ -111,7 +109,9 @@
<navigation>
<rule if-outcome="exitManaged">
<end-conversation before-redirect="true"/>
- <redirect view-id="/dirDisplay_#{skin}.xhtml"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{directoryHome.nodeId}"/>
+ </redirect>
</rule>
<rule if-outcome="exitUnmanaged">
<end-conversation before-redirect="true"/>
@@ -342,10 +342,9 @@
<exception class="javax.faces.application.ViewExpiredException">
- <!-- TODO: This is never thrown by JSF, Richfaces is the problem!-->
<end-conversation/>
<redirect view-id="/wiki.xhtml">
- <message>Your session has timed out, please try again</message>
+ <message severity="WARN">#{messages['lacewiki.msg.SessionTimeoutOccured']}</message>
</redirect>
</exception>
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -4,6 +4,19 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
+ <!--
+ (This resolves the not-thrown ViewExpiredException on session timeout and JSF POSTback.)
+ I have got a lot of times to understand JSF 1.2 implementation code. As I guess from code,
+ JSF 1.2 detect ViewHandler/StateManager version from faces-config.xml DTD/XML schema name.
+ We can't switch RichFaces 3.1.x configuration files to a JSF 1.2 format, as far as it will
+ completely break JSF 1.1 compatibility. Fortunately, there is workaround for a SUN RI framework.
+ Just put into application web.xml. It will switch framework to a JSF 1.2 behavior.
+ -->
+ <context-param>
+ <param-name>com.sun.faces.disableVersionTracking</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<!-- Seam -->
<listener>
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-27 08:35:11 UTC (rev 7489)
@@ -151,8 +151,6 @@
lacewiki.button.Close=Clos<u>e</u> Workspace
lacewiki.button.Close.accesskey=E
-lacewiki.button.ExitEditor=<u>E</u>xit Workspace
-lacewiki.button.ExitEditor.accesskey=E
lacewiki.button.SiteFeed=Subscribe to site
lacewiki.button.DirectoryFeed=Subscribe to directory
@@ -250,12 +248,8 @@
# Directory Display
-lacewiki.label.dirDisplay.Name=Name
-lacewiki.label.dirDisplay.RightClickForActions=(right-click for menu)
-lacewiki.label.dirDisplay.Owner=Owner
lacewiki.label.dirDisplay.ReadAccess=Read Access
lacewiki.label.dirDisplay.WriteAccess=Write Access
-lacewiki.label.dirDisplay.LastModifiedOn=Last Modified On
lacewiki.label.dirDisplay.DirectoryIsEmpty=This directory is empty.
lacewiki.label.dirDisplay.PagerShowing=
lacewiki.label.dirDisplay.PagerTo=to
@@ -441,7 +435,8 @@
lacewiki.label.userList.JoinedOn=Joined
lacewiki.label.userList.LastLoginOn=Last Login
lacewiki.label.userList.NotActivated=Not Activated
-lacewiki.button.userList.Edit=Edit
+lacewiki.label.userList.View=View
+lacewiki.label.userList.Edit=Edit
lacewiki.label.userList.NotAvailableForSkin=User search is not available with this skin.
# User Info
@@ -639,9 +634,20 @@
lacewiki.entity.UsernameMustStartWithALetterAndOnlyContainLetters=Username must start with a letter, and only contain letters and numbers.
lacewiki.entity.LinkProtokol.PrefixMustOnlyContainLetters=Prefix must only contain letters.
+# Model properties
+
+lacewiki.entity.WikiNode.property.name=Name
+lacewiki.entity.WikiNode.property.createdOn=Created On
+lacewiki.entity.WikiNode.property.createdBy=Created By
+lacewiki.entity.WikiNode.property.lastModifiedOn=Last Modified On
+lacewiki.entity.WikiNode.property.lastModifiedBy=Last Modified By
+lacewiki.entity.WikiNode.property.rating=Rating
+
+
# Misc messages
lacewiki.msg.SessionTimeout=Your session has timed out, you will be redirected to the start page.
+lacewiki.msg.SessionTimeoutOccured=Your session has timed out, you have been redirected to the start page.
lacewiki.msg.UsernameExists=A user with that username already exists, please pick a different name.
lacewiki.msg.PasswordControlNoMatch=The passwords don't match, please enter again.
lacewiki.msg.PasswordDoesntMatchPattern=Your password is trivial and easy to guess, please enter a different password.
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/RomeFeedConnector.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -89,15 +89,15 @@
return feedEntryDTOs;
} catch (SocketTimeoutException timeoutEx) {
- log.warn("timeout connecting to feed: " + feedURL, timeoutEx);
+ log.warn("timeout connecting to feed: " + feedURL + ", " + timeoutEx.getMessage());
} catch (IllegalArgumentException iaEx) {
- log.warn("could not connect to feed: " + feedURL, iaEx);
+ log.warn("could not connect to feed: " + feedURL + ", " + iaEx.getMessage());
} catch (MalformedURLException urlEx) {
- log.warn("URL is not valid: " + feedURL, urlEx);
+ log.warn("URL is not valid: " + feedURL + ", " + urlEx.getMessage());
} catch (IOException ioEx) {
- log.warn("could not connect to feed: " + feedURL, ioEx);
+ log.warn("could not connect to feed: " + feedURL + ", " + ioEx.getMessage());
} catch (FeedException fex) {
- log.warn("could not marshall feed data: " + feedURL, fex);
+ log.warn("could not marshall feed data: " + feedURL + ", " + fex.getMessage());
}
return Collections.EMPTY_LIST;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraConnector.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -70,7 +70,7 @@
log.warn("URL is not valid: " + url);
return null;
} catch (Exception ex) {
- log.error("couldn't connect to remote JIRA webservice: " + url + RPC_PATH, ex);
+ log.warn("couldn't connect to remote JIRA webservice: " + url + RPC_PATH + ", " + ex.getMessage());
return null;
}
}
@@ -79,7 +79,7 @@
try {
return (Boolean) client.execute("jira1.logout", wrapLoginToken(loginToken));
} catch (XmlRpcException rpcEx) {
- log.error("could not logout from JIRA webservice", rpcEx);
+ log.warn("couldn't disconnect from remote JIRA webservice, " + rpcEx.getMessage());
}
return false;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
@@ -7,13 +13,15 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.WikiComment;
-import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.action.prefs.CommentsPreferences;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
+/**
+ * @author Christian Bauer
+ */
@Name("commentQuery")
@Scope(ScopeType.CONVERSATION)
public class CommentQuery implements Serializable {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -13,6 +13,7 @@
import java.util.Map;
import java.util.Set;
+import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -229,6 +230,28 @@
links.put(linkText, wikiLink);
}
+ public Long resolveWikiDirectoryId(Long currentAreaNumber, String linkText) {
+ WikiFile f = resolveWikiFile(currentAreaNumber, linkText);
+ return f != null ? f.getParent().getId() : null;
+ }
+
+ public Long resolveWikiDocumentId(Long currentAreaNumber, String linkText) {
+ WikiFile f = resolveWikiFile(currentAreaNumber, linkText);
+ return f != null ? f.getId() : null;
+ }
+
+ private WikiFile resolveWikiFile(Long currentAreaNumber, String linkText) {
+ if (linkText == null || linkText.length() == 0) return null;
+ Map<String, WikiLink> resolvedLinks = new HashMap<String, WikiLink>();
+ resolveLinkText(currentAreaNumber, resolvedLinks, linkText);
+ WikiLink resolvedLink = resolvedLinks.get(linkText);
+ if (resolvedLink.isBroken() || resolvedLink.getFile().getId() == null) {
+ return null;
+ } else {
+ return resolvedLink.getFile();
+ }
+ }
+
private Matcher getCrossAreaMatcher(String linkText) {
Matcher matcher = Pattern.compile(REGEX_WIKILINK_CROSSAREA).matcher(linkText);
return matcher.find() ? matcher : null;
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,453 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.framework.EntityNotFoundException;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.Messages;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.dao.UserDAO;
+import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
+import org.jboss.seam.wiki.util.WikiUtil;
+import org.richfaces.component.UITree;
+import org.richfaces.component.html.HtmlTree;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
+
+import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static javax.faces.application.FacesMessage.SEVERITY_WARN;
+import javax.persistence.EntityManager;
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * AJAX-oriented backend for browsing directories and copy/pasting files.
+ *
+ * @author Christian Bauer
+ */
+@Name("directoryBrowser")
+(a)Scope(ScopeType.CONVERSATION)
+public class DirectoryBrowser implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ Clipboard clipboard;
+
+ @In
+ FacesMessages facesMessages;
+
+ @In
+ EntityManager restrictedEntityManager;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ @In
+ WikiDirectory wikiRoot;
+
+ @In(value = "directoryBrowserSettings")
+ DirectoryBrowserSettings settings;
+
+ @Create
+ @Begin // This conversation ends through timeout only
+ public void create() {
+ log.debug("instantiating directory browser conversation");
+ resetPager();
+ }
+
+ private Long directoryId;
+ private WikiDirectory instance;
+ private NestedSetNodeWrapper<WikiDirectory> treeRoot;
+ private List<WikiNode> childNodes;
+ private Map<WikiNode, Boolean> selectedNodes = new HashMap<WikiNode,Boolean>();
+ private Pager pager;
+
+ public Long getDirectoryId() { return directoryId; }
+ public void setDirectoryId(Long directoryId) { this.directoryId = directoryId; }
+
+ public List<WikiNode> getChildNodes() { return childNodes; }
+ public Map<WikiNode, Boolean> getSelectedNodes() { return selectedNodes; }
+
+ public EntityManager getEntityManager() { return restrictedEntityManager; }
+
+ public WikiNodeDAO getWikiNodeDAO() { return wikiNodeDAO; }
+
+ public WikiDirectory getInstance() {
+ if (instance == null) findInstance();
+ return instance;
+ }
+
+ public void setInstance(WikiDirectory instance) {
+ this.instance = instance;
+ }
+
+ public Pager getPager() {
+ return pager;
+ }
+
+ public void setPager(Pager pager) {
+ this.pager = pager;
+ }
+
+ private void resetPager() {
+ pager = new Pager(settings.getPageSize());
+ }
+
+ public NestedSetNodeWrapper<WikiDirectory> getTreeRoot() {
+ if (treeRoot == null) loadTree();
+ return treeRoot;
+ }
+
+ public void showTree() {
+ settings.setTreeVisible(true);
+ }
+
+ public void hideTree() {
+ settings.setTreeVisible(false);
+ }
+
+ // Open a node in the visible UI tree if its identifier is in the current path
+ public boolean adviseTreeNodeOpened(UITree tree) {
+
+ // We need to call the undocumented getRowData() and not getTreeNode() because we
+ // use the rich:recursiveTreeNodeAdapter...
+ if (tree.getRowData() == null) return false; // Safety against RichFaces behavior
+ Long currentTreeNodeId = ((NestedSetNodeWrapper<WikiDirectory>) tree.getRowData()).getWrappedNode().getId();
+
+ if (settings.getExpandedTreeNodes().contains(currentTreeNodeId)) {
+ log.debug("node is stored as expanded in session: " + currentTreeNodeId);
+ return true;
+ }
+
+ if (getInstance().getPathIdentifiers().contains(currentTreeNodeId)) {
+ log.debug("node is in parent path of current directory, hence expanded: " + currentTreeNodeId);
+ return true;
+ }
+ log.debug("node is not expanded: " + currentTreeNodeId);
+ return false;
+ }
+
+ // Select the node in the visible UI tree if its identifier is the same as the current directory
+ public boolean adviseTreeNodeSelected(UITree tree) {
+ if (tree.getRowData() == null) return false; // Safety against RichFaces behavior
+ Long currentTreeNodeId = ((NestedSetNodeWrapper<WikiDirectory>) tree.getRowData()).getWrappedNode().getId();
+ return getInstance().getId().equals(currentTreeNodeId);
+ }
+
+ public void listenTreeNodeExpand(NodeExpandedEvent event) {
+ Long currentTreeNodeId =
+ ((NestedSetNodeWrapper<WikiDirectory>) ((HtmlTree)event.getSource()).getRowData()).getWrappedNode().getId();
+
+ boolean isExpanded = ((HtmlTree)event.getSource()).isExpanded();
+ if (isExpanded) {
+ log.debug("expanding tree node: " + currentTreeNodeId);
+ settings.getExpandedTreeNodes().add(currentTreeNodeId);
+ } else {
+ log.debug("collapsing tree node: " + currentTreeNodeId);
+ settings.getExpandedTreeNodes().remove(currentTreeNodeId);
+ }
+ }
+
+ public void listenTreeNodeSelected(NodeSelectedEvent event) {
+ Long currentTreeNodeId =
+ ((NestedSetNodeWrapper<WikiDirectory>) ((HtmlTree)event.getSource()).getRowData()).getWrappedNode().getId();
+ log.debug("selecting tree node: " + currentTreeNodeId);
+ selectDirectory(currentTreeNodeId);
+ }
+
+ public void findInstance() {
+ if (getDirectoryId() == null)
+ throw new InvalidWikiRequestException("Missing directoryId parameter");
+
+ instance = wikiNodeDAO.findWikiDirectory(getDirectoryId());
+ if (instance == null)
+ throw new EntityNotFoundException(getDirectoryId(), WikiDirectory.class);
+
+ afterNodeFound();
+ }
+
+ public void afterNodeFound() {
+ refreshChildNodes();
+ }
+
+ public void selectDirectory(Long nodeId) {
+ resetPager();
+ setDirectoryId(nodeId);
+ instance = null;
+ findInstance();
+ settings.getExpandedTreeNodes().add(nodeId);
+ }
+
+ public void sortBy(String propertyName) {
+ resetPager();
+ settings.setOrderByProperty(WikiNode.SortableProperty.valueOf(propertyName));
+ settings.setOrderDescending(!settings.isOrderDescending());
+ refreshChildNodes();
+ }
+
+ public void changePageSize() {
+ pager.setPage(0);
+ refreshChildNodes();
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset", "Node.refreshList"}, create = false)
+ public void loadTree() {
+ WikiDirectory wikiRoot = (WikiDirectory) Component.getInstance("wikiRoot");
+ treeRoot = wikiNodeDAO.findWikiDirectoryTree(wikiRoot);
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset", "Node.refreshList", "Pager.pageChanged"}, create = false)
+ public void refreshChildNodes() {
+
+ log.debug("refreshing child nodes of current directory: " + getInstance());
+ getPager().setNumOfRecords(wikiNodeDAO.findChildrenCount(getInstance()));
+ getPager().setPageSize(settings.getPageSize());
+
+ log.debug("number of children: " + getPager().getNumOfRecords());
+ if (getPager().getNumOfRecords() > 0) {
+ log.debug("loading children page from: " + getPager().getNextRecord() + " size: " + getPager().getPageSize());
+ childNodes =
+ wikiNodeDAO.findChildren(
+ getInstance(),
+ settings.getOrderByProperty(),
+ !settings.isOrderDescending(),
+ getPager().getQueryFirstResult(),
+ getPager().getQueryMaxResults()
+ );
+ } else {
+ childNodes = Collections.emptyList();
+ }
+ }
+
+ // TODO: Most of this clipboard stuff is based on the hope that nobody modifies anything while we have it in the clipboard...
+
+ public void clearClipboard() {
+ clipboard.clear();
+ }
+
+ public void copy() {
+ for (Map.Entry<WikiNode, Boolean> entry : selectedNodes.entrySet()) {
+ if (entry.getValue()) { // Has to be true for a selected node
+ log.debug("copying to clipboard: " + entry.getKey());
+ clipboard.add(entry.getKey().getId(), false);
+ }
+ }
+ selectedNodes.clear();
+ }
+
+ @Restrict("#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}")
+ public void cut() {
+ for (Map.Entry<WikiNode, Boolean> entry : selectedNodes.entrySet()) {
+ if (entry.getValue()) { // Has to be true for a selected node
+ log.debug("cutting to clipboard: " + entry.getKey());
+ clipboard.add(entry.getKey().getId(), true);
+ }
+ }
+ selectedNodes.clear();
+ refreshChildNodes();
+ }
+
+ @Restrict("#{s:hasPermission('Node', 'create', directoryBrowser.instance)}")
+ public void paste() {
+
+ if (getInstance().getId().equals(wikiRoot.getId())) return; // Can't paste in wiki root
+
+ // Batch the work
+ int batchSize = 2;
+ int i = 0;
+ List<Long> batchIds = new ArrayList<Long>();
+ for (Long clipboardNodeId : clipboard.getItems()) {
+ i++;
+ batchIds.add(clipboardNodeId);
+ if (i % batchSize == 0) {
+ List<WikiNode> nodesForPasteBatch = wikiNodeDAO.findWikiNodes(batchIds);
+ pasteNodes(nodesForPasteBatch);
+ batchIds.clear();
+ }
+ }
+ // Last batch
+ if (batchIds.size() != 0) {
+ List<WikiNode> nodesForPasteBatch = wikiNodeDAO.findWikiNodes(batchIds);
+ pasteNodes(nodesForPasteBatch);
+ }
+
+ log.debug("completed executing paste, refreshing...");
+
+ selectedNodes.clear();
+ clipboard.clear();
+ refreshChildNodes();
+ }
+
+ private void pasteNodes(List<WikiNode> nodes) {
+ log.debug("executing paste batch");
+ for (WikiNode n: nodes) {
+ log.debug("pasting clipboard item: " + n);
+ String pastedName = n.getName();
+
+ // Check unique name if we are not cutting and pasting into the same area
+ if (!(clipboard.isCut(n.getId()) && n.getParent().getAreaNumber().equals(getInstance().getAreaNumber()))) {
+ log.debug("pasting node into different area, checking wikiname");
+
+ if (!wikiNodeDAO.isUniqueWikiname(getInstance().getAreaNumber(), WikiUtil.convertToWikiName(pastedName))) {
+ log.debug("wikiname is not unique, renaming");
+ if (pastedName.length() > 245) {
+ facesMessages.addToControlFromResourceBundleOrDefault(
+ "name",
+ SEVERITY_WARN,
+ "lacewiki.msg.Clipboard.DuplicatePasteNameFailure",
+ "The name '{0}' was already in use in this area and is too long to be renamed, skipping paste.",
+ pastedName
+ );
+ continue; // Jump to next loop iteration when we can't append a number to the name
+ }
+
+ // Now try to add "Copy 1", "Copy 2" etc. to the name until it is unique
+ int i = 1;
+ String attemptedName = pastedName + " " + Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + i;
+ while (!wikiNodeDAO.isUniqueWikiname(getInstance().getAreaNumber(), WikiUtil.convertToWikiName(attemptedName))) {
+ attemptedName = pastedName + " " + Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + (++i);
+ }
+ pastedName = attemptedName;
+
+ facesMessages.addToControlFromResourceBundleOrDefault(
+ "name",
+ SEVERITY_INFO,
+ "lacewiki.msg.Clipboard.DuplicatePasteName",
+ "The name '{0}' was already in use in this area, renamed item to '{1}'.",
+ n.getName(), pastedName
+ );
+ }
+ }
+
+ if (clipboard.isCut(n.getId())) {
+ log.debug("cut pasting: " + n);
+
+ // Check if the cut item was a default file for its parent
+ if ( ((WikiDirectory)n.getParent()).getDefaultFile() != null &&
+ ((WikiDirectory)n.getParent()).getDefaultFile().getId().equals(n.getId())) {
+ log.debug("cutting default file of directory: " + n.getParent());
+ ((WikiDirectory)n.getParent()).setDefaultFile(null);
+ }
+
+ n.setName(pastedName);
+ n.setWikiname(WikiUtil.convertToWikiName(pastedName));
+ n.setParent(getInstance());
+
+ // If we cut and paste into a new area, all children must be updated as well
+ if (!getInstance().getAreaNumber().equals(n.getAreaNumber())) {
+ n.setAreaNumber(getInstance().getAreaNumber());
+
+ // TODO: Ugly and memory intensive, better use a database query but HQL updates are limited with joins
+ if (n.isInstance(WikiDocument.class)) {
+ List<WikiComment> comments = wikiNodeDAO.findWikiCommentsFlat((WikiDocument)n, true);
+ for (WikiComment comment : comments) {
+ comment.setAreaNumber(n.getAreaNumber());
+ }
+ }
+ }
+
+ } else {
+ log.debug("copy pasting: " + n);
+ WikiNode newNode = n.duplicate(true);
+ newNode.setName(pastedName);
+ newNode.setWikiname(WikiUtil.convertToWikiName(pastedName));
+ newNode.setParent(getInstance());
+ newNode.setAreaNumber(getInstance().getAreaNumber());
+ UserDAO userDAO = (UserDAO)Component.getInstance(UserDAO.class);
+ newNode.setCreatedBy(userDAO.findUser(n.getCreatedBy().getId()));
+ if (n.getLastModifiedBy() != null) {
+ newNode.setLastModifiedBy(userDAO.findUser(n.getLastModifiedBy().getId()));
+ }
+ restrictedEntityManager.persist(newNode);
+ }
+ }
+ log.debug("completed executing of paste batch");
+ }
+
+ @Restrict("#{s:hasPermission('Trash', 'empty', trashArea)}")
+ public void emptyTrash() {
+ WikiDirectory trashArea = (WikiDirectory) Component.getInstance("trashArea");
+ if (getInstance() == null || !trashArea.getId().equals(getInstance().getId())) return;
+
+ log.debug("emptying trash");
+ List<WikiNode> children = wikiNodeDAO.findChildren(getInstance(), WikiNode.SortableProperty.name, false, 0, Integer.MAX_VALUE);
+
+ // TODO: This should be batched with a database cursor!
+ for (WikiNode child : children) {
+ log.debug("trashing item: " + child);
+ if (child.isInstance(WikiDocument.class)) {
+ NodeRemover documentRemover = (NodeRemover)Component.getInstance(DocumentNodeRemover.class);
+ documentRemover.removeDependencies(child);
+ } else if (child.isInstance(WikiUpload.class)) {
+ NodeRemover uploadRemover = (NodeRemover)Component.getInstance(UploadNodeRemover.class);
+ uploadRemover.removeDependencies(child);
+ }
+ restrictedEntityManager.remove(child);
+ }
+ restrictedEntityManager.flush();
+
+ facesMessages.addFromResourceBundleOrDefault(
+ SEVERITY_INFO,
+ "lacewiki.msg.Trash.Emptied",
+ "All items in the trash have been permanently deleted."
+ );
+
+ selectedNodes.clear();
+ refreshChildNodes();
+ }
+
+
+ // TODO: I'm not too happy with this, maybe we should call the NodeRemovers directly from the XHTML
+
+ // Cache removablity information, speeds up large lists
+ Map<Long, Boolean> childNodesRemovability = new HashMap<Long, Boolean>();
+
+ public boolean isRemovable(WikiNode node) {
+
+ if (childNodesRemovability.containsKey(node.getId())) {
+ // Return cached result
+ return childNodesRemovability.get(node.getId());
+ }
+
+ log.debug("checking removablity of node: " + node);
+
+ // Check if the current directory is the trash area, delete doesn't make sense here
+ WikiDirectory trashArea = (WikiDirectory)Component.getInstance("trashArea");
+ if (trashArea.getId().equals(getInstance().getId()))
+ return false;
+
+ // Check permissions TODO: This duplicates the check
+ if (!Identity.instance().hasPermission("Node", "edit", node))
+ return false;
+
+ NodeRemover remover;
+ if (node.isInstance(WikiDocument.class)) {
+ remover = (NodeRemover) Component.getInstance(DocumentNodeRemover.class);
+ } else if (node.isInstance(WikiUpload.class)) {
+ remover = (NodeRemover) Component.getInstance(UploadNodeRemover.class);
+ } else {
+ return false;
+ }
+ boolean removable = remover.isRemovable(node);
+
+ childNodesRemovability.put(node.getId(), removable);
+
+ return removable;
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowserSettings.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.model.WikiNode;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("directoryBrowserSettings")
+(a)Scope(ScopeType.SESSION)
+@AutoCreate
+public class DirectoryBrowserSettings implements Serializable {
+
+ private long pageSize = 15l;
+ private boolean treeVisible = false;
+ private Set<Long> expandedTreeNodes = new HashSet<Long>();
+ private WikiNode.SortableProperty orderByProperty = WikiNode.SortableProperty.name;
+ private boolean orderDescending;
+
+ public long getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(long pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public boolean isTreeVisible() {
+ return treeVisible;
+ }
+
+ public void setTreeVisible(boolean treeVisible) {
+ this.treeVisible = treeVisible;
+ }
+
+ public Set<Long> getExpandedTreeNodes() {
+ return expandedTreeNodes;
+ }
+
+ public void setExpandedTreeNodes(Set<Long> expandedTreeNodes) {
+ this.expandedTreeNodes = expandedTreeNodes;
+ }
+
+ public WikiNode.SortableProperty getOrderByProperty() {
+ return orderByProperty;
+ }
+
+ public void setOrderByProperty(WikiNode.SortableProperty orderByProperty) {
+ this.orderByProperty = orderByProperty;
+ }
+
+ public boolean isOrderDescending() {
+ return orderDescending;
+ }
+
+ public void setOrderDescending(boolean orderDescending) {
+ this.orderDescending = orderDescending;
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,24 +8,25 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.international.Messages;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
-import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiMenuItem;
+import org.jboss.seam.wiki.core.model.WikiNode;
import org.jboss.seam.wiki.util.WikiUtil;
import javax.faces.application.FacesMessage;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
-import static javax.faces.application.FacesMessage.SEVERITY_WARN;
import java.util.*;
/**
- * TODO: This class is turning into a maintenance nightmare, split
- * directory browser and editor functionality.
+ * Directory editor functionality.
*
* @author Christian Bauer
*/
@@ -33,27 +34,15 @@
@Scope(ScopeType.CONVERSATION)
public class DirectoryHome extends NodeHome<WikiDirectory, WikiDirectory> {
-
/* -------------------------- Context Wiring ------------------------------ */
@In
protected FeedDAO feedDAO;
- @In
- protected Clipboard clipboard;
-
- @In
- @Out(scope = ScopeType.CONVERSATION) // Helps us use this home with page and conversation contexts
- protected Pager pager;
-
/* -------------------------- Internal State ------------------------------ */
private boolean hasFeed;
- private List<WikiNode> childNodes;
-
- private Map<WikiNode, Boolean> selectedNodes = new HashMap<WikiNode,Boolean>();
-
private List<WikiDocument> childDocuments = new ArrayList<WikiDocument>();
private List<WikiMenuItem> menuItems = new ArrayList<WikiMenuItem>();
private SortedSet<WikiDirectory> alreadyUsedMenuItems = new TreeSet<WikiDirectory>();
@@ -78,16 +67,6 @@
}
@Override
- public WikiDirectory afterNodeFound(WikiDirectory dir) {
- super.afterNodeFound(dir);
-
- getLog().debug("refreshing child nodes after node found");
- refreshChildNodes(dir);
-
- return dir;
- }
-
- @Override
public WikiDirectory beforeNodeEditFound(WikiDirectory dir) {
dir = super.beforeNodeEditFound(dir);
@@ -204,23 +183,6 @@
/* -------------------------- Internal Methods ------------------------------ */
- private void refreshChildNodes(WikiDirectory dir) {
- getLog().debug("refreshing child nodes of directory: " + dir);
- pager.setNumOfRecords(getWikiNodeDAO().findChildrenCount(dir));
- getLog().debug("number of children: " + pager.getNumOfRecords());
- if (pager.getNumOfRecords() > 0) {
- getLog().debug("loading children page from: " + pager.getNextRecord() + " size: " + pager.getPageSize());
- childNodes =
- getWikiNodeDAO().findChildren(
- dir, WikiNode.SortableProperty.name, false,
- new Long(pager.getNextRecord()).intValue(),
- new Long(pager.getPageSize()).intValue()
- );
- } else {
- childNodes = Collections.emptyList();
- }
- }
-
private void refreshAvailableMenuItems(WikiDirectory dir) {
availableMenuItems = new TreeSet();
availableMenuItems.addAll(getWikiNodeDAO().findChildWikiDirectories(dir));
@@ -271,33 +233,10 @@
/* -------------------------- Public Features ------------------------------ */
- @Observer(value = {"PersistenceContext.filterReset", "Node.refreshList"}, create = false)
- public void refreshChildNodes() {
- if (isManaged()) {
- getLog().debug("refreshing child nodes of the current instance");
- refreshChildNodes(getInstance());
- } else {
- getLog().debug("not refreshing child nodes, instance is not managed: " + getInstance());
- }
- }
-
- @RequestParameter
- public void setPage(Integer page) {
- pager.setPage(page);
- }
-
- public Pager getPager() {
- return pager;
- }
-
- public List<WikiNode> getChildNodes() { return childNodes; }
-
public List<WikiDocument> getChildDocuments() { return childDocuments; }
public List<WikiMenuItem> getMenuItems() { return menuItems; }
- public Map<WikiNode, Boolean> getSelectedNodes() { return selectedNodes; }
-
public WikiDirectory getSelectedChildDirectory() { return selectedChildDirectory; }
public void setSelectedChildDirectory(WikiDirectory selectedChildDirectory) { this.selectedChildDirectory = selectedChildDirectory; }
@@ -352,202 +291,4 @@
}
}
- // TODO: Most of this clipboard stuff is based on the hope that nobody modifies anything while we have it in the clipboard...
-
- public void clearClipboard() {
- clipboard.clear();
- }
-
- public void copy() {
- for (Map.Entry<WikiNode, Boolean> entry : getSelectedNodes().entrySet()) {
- if (entry.getValue()) {
- getLog().debug("copying to clipboard: " + entry.getKey());
- clipboard.add(entry.getKey().getId(), false);
- }
- }
- selectedNodes.clear();
- }
-
- @Restrict("#{s:hasPermission('Node', 'edit', directoryHome.instance)}")
- public void cut() {
- for (Map.Entry<WikiNode, Boolean> entry : getSelectedNodes().entrySet()) {
- if (entry.getValue()) {
- getLog().debug("cutting to clipboard: " + entry.getKey());
- clipboard.add(entry.getKey().getId(), true);
- }
- }
- selectedNodes.clear();
- refreshChildNodes();
- }
-
- @Restrict("#{s:hasPermission('Node', 'create', directoryHome.instance)}")
- public void paste() {
-
- if (getInstance().getId().equals(getWikiRoot().getId())) return; // Can't paste in wiki root
-
- // Batch the work
- int batchSize = 2;
- int i = 0;
- List<Long> batchIds = new ArrayList<Long>();
- for (Long clipboardNodeId : clipboard.getItems()) {
- i++;
- batchIds.add(clipboardNodeId);
- if (i % batchSize == 0) {
- List<WikiNode> nodesForPasteBatch = getWikiNodeDAO().findWikiNodes(batchIds);
- pasteNodes(nodesForPasteBatch);
- batchIds.clear();
- }
- }
- // Last batch
- if (batchIds.size() != 0) {
- List<WikiNode> nodesForPasteBatch = getWikiNodeDAO().findWikiNodes(batchIds);
- pasteNodes(nodesForPasteBatch);
- }
-
- getLog().debug("completed executing paste, refreshing...");
-
- selectedNodes.clear();
- clipboard.clear();
- refreshChildNodes();
- }
-
- private void pasteNodes(List<WikiNode> nodes) {
- getLog().debug("executing paste batch");
- for (WikiNode n: nodes) {
- getLog().debug("pasting clipboard item: " + n);
- String pastedName = n.getName();
-
- // Check unique name if we are not cutting and pasting into the same area
- if (!(clipboard.isCut(n.getId()) && n.getParent().getAreaNumber().equals(getInstance().getAreaNumber()))) {
- getLog().debug("pasting node into different area, checking wikiname");
-
- if (!getWikiNodeDAO().isUniqueWikiname(getInstance().getAreaNumber(), WikiUtil.convertToWikiName(pastedName))) {
- getLog().debug("wikiname is not unique, renaming");
- if (pastedName.length() > 245) {
- getFacesMessages().addToControlFromResourceBundleOrDefault(
- "name",
- SEVERITY_WARN,
- "lacewiki.msg.Clipboard.DuplicatePasteNameFailure",
- "The name '{0}' was already in use in this area and is too long to be renamed, skipping paste.",
- pastedName
- );
- continue; // Jump to next loop iteration when we can't append a number to the name
- }
-
- // Now try to add "Copy 1", "Copy 2" etc. to the name until it is unique
- int i = 1;
- String attemptedName = pastedName + " " + Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + i;
- while (!getWikiNodeDAO().isUniqueWikiname(getInstance().getAreaNumber(), WikiUtil.convertToWikiName(attemptedName))) {
- attemptedName = pastedName + " " + Messages.instance().get("lacewiki.label.Clipboard.CopySuffix") + (++i);
- }
- pastedName = attemptedName;
-
- getFacesMessages().addToControlFromResourceBundleOrDefault(
- "name",
- SEVERITY_INFO,
- "lacewiki.msg.Clipboard.DuplicatePasteName",
- "The name '{0}' was already in use in this area, renamed item to '{1}'.",
- n.getName(), pastedName
- );
- }
- }
-
- if (clipboard.isCut(n.getId())) {
- getLog().debug("cut pasting: " + n);
-
- // Check if the cut item was a default file for its parent
- if ( ((WikiDirectory)n.getParent()).getDefaultFile() != null &&
- ((WikiDirectory)n.getParent()).getDefaultFile().getId().equals(n.getId())) {
- getLog().debug("cutting default file of directory: " + n.getParent());
- ((WikiDirectory)n.getParent()).setDefaultFile(null);
- }
-
- n.setName(pastedName);
- n.setWikiname(WikiUtil.convertToWikiName(pastedName));
- n.setParent(getInstance());
-
- // If we cut and paste into a new area, all children must be updated as well
- if (!getInstance().getAreaNumber().equals(n.getAreaNumber())) {
- n.setAreaNumber(getInstance().getAreaNumber());
-
- // TODO: Ugly and memory intensive, better use a database query but HQL updates are limited with joins
- if (n.isInstance(WikiDocument.class)) {
- List<WikiComment> comments = getWikiNodeDAO().findWikiCommentsFlat((WikiDocument)n, true);
- for (WikiComment comment : comments) {
- comment.setAreaNumber(n.getAreaNumber());
- }
- }
- }
-
- } else {
- getLog().debug("copy pasting: " + n);
- WikiNode newNode = n.duplicate(true);
- newNode.setName(pastedName);
- newNode.setWikiname(WikiUtil.convertToWikiName(pastedName));
- newNode.setParent(getInstance());
- newNode.setAreaNumber(getInstance().getAreaNumber());
- newNode.setCreatedBy(getUserDAO().findUser(n.getCreatedBy().getId()));
- if (n.getLastModifiedBy() != null) {
- newNode.setLastModifiedBy(getUserDAO().findUser(n.getLastModifiedBy().getId()));
- }
- getEntityManager().persist(newNode);
- }
- }
- getLog().debug("completed executing of paste batch");
- }
-
- @Restrict("#{s:hasPermission('Trash', 'empty', trashArea)}")
- public void emptyTrash() {
- WikiDirectory trashArea = (WikiDirectory) Component.getInstance("trashArea");
- if (!isManaged() || !trashArea.getId().equals(getInstance().getId())) return;
-
- getLog().debug("emptying trash");
- List<WikiNode> children = getWikiNodeDAO().findChildren(getInstance(), WikiNode.SortableProperty.name, false, 0, Integer.MAX_VALUE);
-
- // TODO: This should be batched with a database cursor!
- for (WikiNode child : children) {
- getLog().debug("trashing item: " + child);
- if (child.isInstance(WikiDocument.class)) {
- NodeRemover documentRemover = (NodeRemover)Component.getInstance(DocumentNodeRemover.class);
- documentRemover.removeDependencies(child);
- } else if (child.isInstance(WikiUpload.class)) {
- NodeRemover uploadRemover = (NodeRemover)Component.getInstance(UploadNodeRemover.class);
- uploadRemover.removeDependencies(child);
- }
- getEntityManager().remove(child);
- }
- getEntityManager().flush();
-
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
- "lacewiki.msg.Trash.Emptied",
- "All items in the trash have been permanently deleted."
- );
-
- selectedNodes.clear();
- refreshChildNodes();
- }
-
- public boolean isRemovable(WikiNode node) {
-
- // Check if the current directory is the trash area, delete doesn't make sense here
- WikiDirectory trashArea = (WikiDirectory)Component.getInstance("trashArea");
- if (trashArea.getId().equals(getInstance().getId()))
- return false;
-
- // Check permissions TODO: This duplicates the check
- if (!Identity.instance().hasPermission("Node", "edit", node))
- return false;
-
- NodeRemover remover;
- if (node.isInstance(WikiDocument.class)) {
- remover = (NodeRemover) Component.getInstance(DocumentNodeRemover.class);
- } else if (node.isInstance(WikiUpload.class)) {
- remover = (NodeRemover) Component.getInstance(UploadNodeRemover.class);
- } else {
- return false;
- }
- return remover.isRemovable(node);
- }
-
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -261,6 +261,7 @@
}
public boolean isRemovable() {
+ getLog().debug("checking removability of current instance");
return isManaged() &&
getNodeRemover() != null &&
getNodeRemover().isRemovable(getInstance());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -5,6 +5,7 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.core.Events;
import java.io.Serializable;
@@ -45,8 +46,7 @@
@RequestParameter
public void setPageSize(Long pageSize) {
- if (pageSize != null)
- this.pageSize = pageSize;
+ if (pageSize != null) this.pageSize = pageSize;
}
public int getNextPage() {
@@ -97,6 +97,30 @@
return new Long(getPageSize()).intValue();
}
+ public boolean isSeveralPages() {
+ return getNumOfRecords() != 0 && getNumOfRecords() > getPageSize();
+ }
+
+ public void setFirstPage() {
+ setPage(getFirstPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setPreviousPage() {
+ setPage(getPreviousPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setNextPage() {
+ setPage(getNextPage());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
+ public void setLastPage() {
+ setPage(new Long(getLastPage()).intValue());
+ Events.instance().raiseEvent("Pager.pageChanged");
+ }
+
public String toString() {
return "Pager - Records: " + getNumOfRecords() + " Page size: " + getPageSize();
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,18 +8,17 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.web.Parameters;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
+import org.jboss.seam.web.Parameters;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
-import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.search.WikiSearch;
import javax.faces.application.FacesMessage;
-import java.util.Map;
/**
* Returns <tt>docDisplay</tt>, <tt>dirDisplay</tt>, or <tt>search</tt> for the resolved <tt>nodeId</tt>.
@@ -197,10 +196,10 @@
log.debug("displaying document: " + currentDocument);
return "docDisplay";
} else {
- DirectoryHome directoryHome = (DirectoryHome)Component.getInstance(DirectoryHome.class);
- directoryHome.setNodeId(currentDirectory.getId());
- directoryHome.setInstance(currentDirectory);
- directoryHome.afterNodeFound(currentDirectory);
+ DirectoryBrowser directoryBrowser = (DirectoryBrowser)Component.getInstance(DirectoryBrowser.class);
+ directoryBrowser.setDirectoryId(currentDirectory.getId());
+ directoryBrowser.setInstance(currentDirectory);
+ directoryBrowser.afterNodeFound();
log.debug("displaying directory: " + currentDirectory);
return "dirDisplay";
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -582,6 +582,10 @@
}
+ public NestedSetNodeWrapper<WikiDirectory> findWikiDirectoryTree(WikiDirectory startDir) {
+ return findWikiDirectoryTree(startDir, null, 0l, false);
+ }
+
public NestedSetNodeWrapper<WikiDirectory> findWikiDirectoryTree(WikiDirectory startDir, Long maxDepth, Long flattenToLevel, boolean showAdminOnly) {
NestedSetNodeWrapper<WikiDirectory> startNodeWrapper = new NestedSetNodeWrapper<WikiDirectory>(startDir, getComparatorWikiDirectoryName());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -166,4 +166,8 @@
*/
public void resolveLinkText(Long currentAreaNumber, Map<String, WikiLink> links, String linkText);
+ public Long resolveWikiDirectoryId(Long currentAreaNumber, String linkText);
+
+ public Long resolveWikiDocumentId(Long currentAreaNumber, String linktext);
+
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.wiki.core.feeds;
import org.jboss.seam.wiki.core.model.FeedEntry;
@@ -14,6 +20,9 @@
import antlr.ANTLRException;
import antlr.RecognitionException;
+/**
+ * @author Christian Bauer
+ */
@Scope(ScopeType.APPLICATION)
public abstract class FeedEntryManager<M, FE extends FeedEntry> {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDirectory.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -106,6 +106,18 @@
}
}
+ public List<Long> getPathIdentifiers() {
+ List<Long> pathIds = new ArrayList<Long>();
+ WikiDirectory current = this;
+ pathIds.add(current.getId());
+ while (current.getParent() != null && getParent().isInstance(WikiDirectory.class)){
+ current = (WikiDirectory)current.getParent();
+ pathIds.add(current.getId());
+ }
+ Collections.reverse(pathIds);
+ return pathIds;
+ }
+
public List<WikiDirectory> getPath() {
List<WikiDirectory> path = new ArrayList<WikiDirectory>();
WikiDirectory current = this;
@@ -119,6 +131,6 @@
}
public String toString() {
- return "Directory (" + getId() + "): " + getName();
+ return "WikiDirectory (" + getId() + "): " + getName();
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -154,7 +154,7 @@
/*
Macro handling routines, based on the following concept:
- - Persistent HEADER/CONTENT/FOOTER fields: This is the editable text, show to the user.
+ - Persistent HEADER/CONTENT/FOOTER fields: This is the editable text, shown to the user.
- Persistent HEADER_MACROS/CONTENT_MACROS/FOOTER_MACROS fields: These are strings that represent
a space-separated list of all macros (names only) the user has entered. We need this separate
@@ -316,7 +316,18 @@
}
}
+ // TODO: Again, the ugly Hibernate group by bug
+ public static String[] getPropertiesForGroupingInQueries() {
+ return new String[]{
+ "id", "version", "parent", "rating",
+ "areaNumber", "name", "wikiname", "createdBy", "createdOn",
+ "lastModifiedBy", "lastModifiedOn", "readAccessLevel", "writeAccessLevel", "writeProtected",
+ "nameAsTitle", "enableComments", "enableCommentForm", "enableCommentsOnFeeds",
+ "header", "headerMacrosString", "contentMacrosString", "footer", "footerMacrosString"
+ };
+ }
+
public String toString() {
- return "Document (" + getId() + "): " + getName();
+ return "WikiDocument (" + getId() + "): " + getName();
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -27,7 +27,7 @@
public abstract class WikiNode<N extends WikiNode> implements Comparable {
public static enum SortableProperty {
- name, createdOn, lastModifiedOn, rating
+ name, createdOn, createdBy, lastModifiedOn, lastModifiedBy, rating
}
@Id
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetNodeWrapper.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -51,7 +51,8 @@
Comparator<NestedSetNodeWrapper<N>> comparator;
Long level;
Map<String, Object> additionalProjections = new HashMap<String, Object>();
- public boolean childrenLoaded = false;
+ Map<Long, NestedSetNodeWrapper<N>> flatTree = new LinkedHashMap<Long, NestedSetNodeWrapper<N>>();
+ Object payload;
public NestedSetNodeWrapper(N wrappedNode) {
this(
@@ -97,7 +98,6 @@
void setWrappedParent(NestedSetNodeWrapper<N> wrappedParent) {
this.wrappedParent = wrappedParent;
- childrenLoaded = true;
}
public List<NestedSetNodeWrapper<N>> getWrappedChildren() {
@@ -110,7 +110,6 @@
void addWrappedChild(NestedSetNodeWrapper<N> wrappedChild) {
getWrappedChildren().add(wrappedChild);
- childrenLoaded = true;
}
public Comparator<NestedSetNodeWrapper<N>> getComparator() {
@@ -131,6 +130,18 @@
return wrappedChildrenSorted;
}
+ public Map<Long, NestedSetNodeWrapper<N>> getFlatTree() {
+ return flatTree;
+ }
+
+ public Object getPayload() {
+ return payload;
+ }
+
+ public void setPayload(Object payload) {
+ this.payload = payload;
+ }
+
// This is needed because JSF converters for selectitems need to return an equal() instance to
// the selected item of the selectitems collection. This sucks.
public boolean equals(Object o) {
@@ -139,9 +150,8 @@
NestedSetNodeWrapper that = (NestedSetNodeWrapper) o;
- if (!wrappedNode.getId().equals(that.wrappedNode.getId())) return false;
+ return wrappedNode.getId().equals(that.wrappedNode.getId());
- return true;
}
public int hashCode() {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/nestedset/query/NestedSetResultTransformer.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -157,7 +157,9 @@
}
nodeWrapper.setWrappedParent(currentParent);
currentParent.addWrappedChild(nodeWrapper);
- log.trace("adding nested set node to tree: " + nodeWrapper);
+ log.trace("added nested set node to tree: " + nodeWrapper);
+ rootWrapper.getFlatTree().put(nodeWrapper.getWrappedNode().getId(), nodeWrapper);
+
currentParent = nodeWrapper;
return rootWrapper; // Return just something so that transformList() will be called when we are done
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/IconHandler.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.model.WikiNode;
+
+/**
+ * @author Christian Bauer
+ */
+(a)Scope(ScopeType.CONVERSATION)
+public abstract class IconHandler<N extends WikiNode> {
+
+ public abstract String getIconName(N wikiNode);
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDirectoryIconHandler.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiDirectoryIconHandler")
+public class WikiDirectoryIconHandler extends IconHandler<WikiDirectory> implements Serializable {
+
+ @In
+ WikiDirectory trashArea;
+
+ @In
+ WikiDirectory memberArea;
+
+ @In
+ WikiDirectory helpArea;
+
+ public String getIconName(WikiDirectory dir) {
+ if (dir.getId().equals(trashArea.getId())) return "icon.trash.gif";
+ if (dir.getId().equals(helpArea.getId())) return "icon.help.gif";
+ if (dir.getId().equals(memberArea.getId())) return "icon.user.gif";
+ return "icon.dir.gif";
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiDocumentIconHandler.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiDocumentIconHandler")
+public class WikiDocumentIconHandler extends IconHandler<WikiDocument> implements Serializable {
+
+ @In
+ DirectoryBrowser directoryBrowser;
+
+ public String getIconName(WikiDocument doc) {
+ if (directoryBrowser.getInstance().getDefaultFile() != null &&
+ directoryBrowser.getInstance().getDefaultFile().getId().equals(doc.getId())) return "icon.doc.default.gif";
+ return "icon.doc.gif";
+ }
+
+}
\ No newline at end of file
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/icon/WikiUploadIconHandler.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui.icon;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.wiki.core.model.WikiUpload;
+import org.jboss.seam.wiki.core.upload.UploadType;
+import org.jboss.seam.wiki.core.upload.UploadTypes;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiUploadIconHandler")
+public class WikiUploadIconHandler extends IconHandler<WikiUpload> implements Serializable {
+
+ @In
+ Map<String, UploadType> uploadTypes;
+
+ public String getIconName(WikiUpload upload) {
+ if (uploadTypes.containsKey(upload.getContentType()))
+ return uploadTypes.get(upload.getContentType()).getDisplayIcon();
+ return uploadTypes.get(UploadTypes.GENERIC_UPLOAD_TYPE).getDisplayIcon();
+ }
+}
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -11,22 +11,24 @@
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.transform.ResultTransformer;
-import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.action.Pager;
+import org.jboss.seam.ScopeType;
import javax.persistence.EntityManager;
import java.util.List;
+import java.io.Serializable;
/**
* @author Christian Bauer
*/
@Name("blogDAO")
-@AutoCreate
-public class BlogDAO {
+(a)Scope(ScopeType.CONVERSATION)
+public class BlogDAO implements Serializable {
@In
EntityManager restrictedEntityManager;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -30,7 +30,7 @@
@In
WikiNodeDAO wikiNodeDAO;
- @In
+ @In(create = true)
BlogDAO blogDAO;
@In
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -23,13 +23,12 @@
*/
@Name("faqBrowser")
@Scope(ScopeType.PAGE)
-@AutoCreate
public class FaqBrowser implements Serializable {
@Logger
Log log;
- @In
+ @In(create = true)
FaqBrowserDAO faqBrowserDAO;
@In
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowserDAO.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -24,7 +24,6 @@
*/
@Name("faqBrowserDAO")
@Scope(ScopeType.CONVERSATION)
-@AutoCreate
public class FaqBrowserDAO implements Serializable {
@In
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -15,7 +15,7 @@
@Scope(ScopeType.CONVERSATION)
public class FaqQuestionHome extends DocumentHome {
- @In
+ @In(create = true)
FaqBrowser faqBrowser;
private boolean showForm = false;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -3,18 +3,19 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Scope;
import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
import org.hibernate.Session;
-import org.hibernate.ScrollableResults;
import org.hibernate.transform.ResultTransformer;
import javax.persistence.EntityManager;
import java.util.*;
+import java.io.Serializable;
@Name("forumDAO")
-@AutoCreate
-public class ForumDAO {
+(a)Scope(ScopeType.CONVERSATION)
+public class ForumDAO implements Serializable {
@In
EntityManager entityManager;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -17,7 +17,7 @@
@Scope(ScopeType.CONVERSATION)
public class ForumHome extends DirectoryHome {
- @In
+ @In(create = true)
ForumDAO forumDAO;
@In
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -53,7 +53,7 @@
@In
int currentAccessLevel;
- @In
+ @In(create = true)
ForumDAO forumDAO;
/* ####################### FORUMS ########################## */
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -26,7 +26,6 @@
*/
@Name("forumTopicReadManager")
@Scope(ScopeType.SESSION)
-@AutoCreate
public class ForumTopicReadManager implements Serializable {
Map<Long, Set<Long>> readTopics = new HashMap<Long, Set<Long>>();
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,6 +8,7 @@
import org.dbunit.operation.DatabaseOperation;
import org.jboss.seam.wiki.core.action.DirectoryHome;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
@@ -34,15 +35,15 @@
WikiDocument doc = (WikiDocument)getValue("#{currentDocument}");
assert doc == null;
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- WikiDirectory dir = dirHome.getInstance();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ WikiDirectory dir = browser.getInstance();
assert dir != null;
assert dir.getId().equals(2l);
assert dir.getArea().getId().equals(2l);
- assert dirHome.getChildNodes().size() == 1;
+ assert browser.getChildNodes().size() == 1;
- assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+ assert browser.isRemovable(browser.getChildNodes().get(0));
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -63,14 +64,14 @@
WikiDocument doc = (WikiDocument)getValue("#{currentDocument}");
assert doc == null;
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- WikiDirectory dir = dirHome.getInstance();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ WikiDirectory dir = browser.getInstance();
assert dir != null;
assert dir.getId().equals(4l);
- assert dirHome.getChildNodes().size() == 1;
+ assert browser.getChildNodes().size() == 1;
- assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+ assert browser.isRemovable(browser.getChildNodes().get(0));
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/ClipboardTests.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -7,8 +7,8 @@
package org.jboss.seam.wiki.test.editing;
import org.dbunit.operation.DatabaseOperation;
-import org.jboss.seam.wiki.core.action.DirectoryHome;
import org.jboss.seam.wiki.core.action.Clipboard;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
@@ -36,13 +36,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.copy();
}
}.run();
@@ -54,9 +55,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -72,12 +70,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -91,18 +89,18 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
WikiDocument doc =
- home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(), "Four");
+ browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(), "Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
WikiDocument docOriginal =
- home.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
+ browser.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
assert docOriginal.getParent().getId().equals(2l);
}
@@ -120,13 +118,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(upload, true);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.copy();
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.copy();
}
}.run();
@@ -138,9 +137,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -156,12 +152,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -175,19 +171,19 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- List<WikiUpload> uploads = home.getWikiNodeDAO().findWikiUploads(home.getInstance(), WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads = browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(), WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads = home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
+ WikiDirectory originalDir = browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads = browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
assert originalUploads.size() == 2;
}
}.run();
@@ -204,15 +200,16 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(doc, true);
- home.getSelectedNodes().put(upload, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.copy();
}
}.run();
@@ -224,9 +221,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 2;
@@ -242,12 +236,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -261,24 +255,24 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
WikiDocument doc =
- home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(), "Four");
+ browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(), "Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- List<WikiUpload> uploads = home.getWikiNodeDAO().findWikiUploads(home.getInstance(), WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads = browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(), WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads = home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
+ WikiDirectory originalDir = browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads = browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
assert originalUploads.size() == 2;
}
}.run();
@@ -295,13 +289,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -313,9 +308,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -331,12 +323,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -350,15 +342,15 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(), "Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(), "Four");
+ assert doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDocument docOriginal = home.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
+ WikiDocument docOriginal = browser.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
assert docOriginal == null;
}
}.run();
@@ -375,13 +367,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(upload, true);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.cut();
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.cut();
}
}.run();
@@ -393,9 +386,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -411,12 +401,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -430,19 +420,19 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 2;
+ assert browser.getChildNodes().size() == 2;
- List<WikiUpload> uploads = home.getWikiNodeDAO().findWikiUploads(home.getInstance(), WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads = browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(), WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads = home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
+ WikiDirectory originalDir = browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads = browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
assert originalUploads.size() == 1;
}
}.run();
@@ -459,15 +449,16 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- WikiUpload upload = home.getWikiNodeDAO().findWikiUpload(30l);
- home.getSelectedNodes().put(doc, true);
- home.getSelectedNodes().put(upload, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
+ WikiUpload upload = browser.getWikiNodeDAO().findWikiUpload(30l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+ browser.getSelectedNodes().put(upload, true);
+
+ browser.cut();
}
}.run();
@@ -479,9 +470,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 2;
@@ -498,12 +486,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -517,27 +505,27 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(4l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(4l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
WikiDocument doc =
- home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(), "Four");
+ browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(), "Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
- List<WikiUpload> uploads = home.getWikiNodeDAO().findWikiUploads(home.getInstance(), WikiNode.SortableProperty.createdOn, true);
+ List<WikiUpload> uploads = browser.getWikiNodeDAO().findWikiUploads(browser.getInstance(), WikiNode.SortableProperty.createdOn, true);
assert uploads.size() == 1;
assert uploads.get(0).getName().equals("Test Image");
- assert uploads.get(0).getAreaNumber().equals(home.getInstance().getAreaNumber());
+ assert uploads.get(0).getAreaNumber().equals(browser.getInstance().getAreaNumber());
- WikiDocument docOriginal = home.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
+ WikiDocument docOriginal = browser.getWikiNodeDAO().findWikiDocumentInArea(2l, "Four");
assert docOriginal == null;
- WikiDirectory originalDir = home.getWikiNodeDAO().findWikiDirectory(2l);
- List<WikiUpload> originalUploads = home.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
+ WikiDirectory originalDir = browser.getWikiNodeDAO().findWikiDirectory(2l);
+ List<WikiUpload> originalUploads = browser.getWikiNodeDAO().findWikiUploads(originalDir, WikiNode.SortableProperty.createdOn, true);
assert originalUploads.size() == 1;
}
}.run();
@@ -554,13 +542,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -572,9 +561,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -590,12 +576,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -609,13 +595,13 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 3;
+ assert browser.getChildNodes().size() == 3;
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocumentInArea(home.getInstance().getAreaNumber(), "Four");
- assert doc.getAreaNumber().equals(home.getInstance().getAreaNumber());
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocumentInArea(browser.getInstance().getAreaNumber(), "Four");
+ assert doc.getAreaNumber().equals(browser.getInstance().getAreaNumber());
assert doc.getId().equals(9l);
}
}.run();
@@ -632,13 +618,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(9l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(9l);
- home.copy();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.copy();
}
}.run();
@@ -650,8 +637,8 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
@@ -668,12 +655,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -687,10 +674,10 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 4;
+ assert browser.getChildNodes().size() == 4;
}
}.run();
@@ -706,13 +693,14 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(3l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(3l); // Init!
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(6l);
- home.getSelectedNodes().put(doc, true);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(6l);
- home.cut();
+ browser.getSelectedNodes().put(doc, true);
+
+ browser.cut();
}
}.run();
@@ -724,9 +712,6 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(3l); // Init!
-
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 1;
@@ -742,12 +727,12 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- home.paste();
+ browser.paste();
- home.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
+ browser.getEntityManager().flush(); // TODO: ?! I think the test phase listener is wrong here not doing that...
}
}.run();
@@ -761,22 +746,22 @@
Clipboard clipboard = (Clipboard)getInstance(Clipboard.class);
assert clipboard.getItems().size() == 0;
- DirectoryHome home = (DirectoryHome)getInstance(DirectoryHome.class);
- assert home.getInstance().getId().equals(2l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
- assert home.getChildNodes().size() == 4;
+ assert browser.getChildNodes().size() == 4;
- WikiDocument docOriginal = home.getWikiNodeDAO().findWikiDocumentInArea(3l, "One");
+ WikiDocument docOriginal = browser.getWikiNodeDAO().findWikiDocumentInArea(3l, "One");
assert docOriginal == null;
- WikiDirectory dirOriginal = home.getWikiNodeDAO().findWikiDirectory(3l);
+ WikiDirectory dirOriginal = browser.getWikiNodeDAO().findWikiDirectory(3l);
assert dirOriginal.getDefaultFile() == null;
- WikiDocument doc = home.getWikiNodeDAO().findWikiDocument(6l);
+ WikiDocument doc = browser.getWikiNodeDAO().findWikiDocument(6l);
assert doc.getAreaNumber().equals(2l);
assert doc.getParent().getId().equals(2l);
- List<WikiComment> comments = home.getWikiNodeDAO().findWikiCommentsFlat(doc, false);
+ List<WikiComment> comments = browser.getWikiNodeDAO().findWikiCommentsFlat(doc, false);
for (WikiComment comment : comments) {
assert comment.getAreaNumber().equals(2l);
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,13 +8,13 @@
import org.dbunit.operation.DatabaseOperation;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
-import org.jboss.seam.wiki.core.action.DocumentHome;
-import org.jboss.seam.wiki.core.action.DirectoryHome;
-import org.jboss.seam.wiki.core.action.UploadHome;
-import org.jboss.seam.wiki.core.action.PreferenceEditor;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
+import org.jboss.seam.wiki.core.action.PreferenceEditor;
+import org.jboss.seam.wiki.core.action.DocumentHome;
+import org.jboss.seam.wiki.core.action.DirectoryBrowser;
+import org.jboss.seam.wiki.core.action.UploadHome;
import org.jboss.seam.wiki.preferences.PreferenceValue;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
@@ -113,11 +113,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(6l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(6l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -130,9 +130,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -143,10 +144,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(6l) == null;
@@ -208,11 +209,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(9l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(9l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -225,9 +226,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -238,10 +240,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(9l) == null;
@@ -285,11 +287,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(30l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(30l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -302,9 +304,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -315,9 +318,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(30l) == null;
@@ -337,12 +341,13 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(2l); // Init!
- assert dirHome.getChildNodes().size() == 3;
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(2l); // Init!
+ assert browser.getChildNodes().size() == 3;
+
boolean found = false;
- for (WikiNode node : dirHome.getChildNodes()) found = node.getId().equals(9l);
+ for (WikiNode node : browser.getChildNodes()) found = node.getId().equals(9l);
assert found;
DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
@@ -370,11 +375,11 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 1;
- assert dirHome.getChildNodes().get(0).getId().equals(9l);
+ assert browser.getChildNodes().size() == 1;
+ assert browser.getChildNodes().get(0).getId().equals(9l);
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
@@ -387,9 +392,10 @@
}
protected void invokeApplication() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
- dirHome.emptyTrash();
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
+
+ browser.emptyTrash();
}
}.run();
@@ -400,10 +406,10 @@
}
protected void renderResponse() throws Exception {
- DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
- assert dirHome.getInstance().getId().equals(17l); // Init!
+ DirectoryBrowser browser = (DirectoryBrowser)getInstance(DirectoryBrowser.class);
+ assert browser.getInstance().getId().equals(17l); // Init!
- assert dirHome.getChildNodes().size() == 0;
+ assert browser.getChildNodes().size() == 0;
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
assert dao.findWikiNode(9l) == null;
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,69 +8,71 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
-<ui:define name="screenname">#{directoryHome.instance.name}</ui:define>
+<ui:define name="screenname">#{directoryBrowser.instance.name}</ui:define>
<ui:define name="controlTwo">
- <s:fragment rendered="#{!empty directoryHome.parentNode}">
+ <s:fragment rendered="#{!empty directoryBrowser.instance.parent}">
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}">
+ <f:param name="directoryId" value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false" value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
view="/uploadCreate_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.UploadFile']}"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
</s:fragment>
- <s:fragment rendered="#{empty directoryHome.parentNode}">
+ <s:fragment rendered="#{empty directoryBrowser.instance.parent}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}">
+ <f:param name="directoryId" value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false" value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
</s:link>
</s:fragment>
- <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null, null)}"
- styleClass="linkNavigation" rendered="#{not empty directoryHome.instance.feed}">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryBrowser.instance.feed, null, null)}"
+ styleClass="linkNavigation" rendered="#{not empty directoryBrowser.instance.feed}">
<h:graphicImage styleClass="feedIcon" value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
<h:outputText value="#{messages['lacewiki.button.DirectoryFeed']}"/>
</h:outputLink>
@@ -79,540 +81,306 @@
<ui:define name="content">
-<h:form id="dirSelectionForm">
+<s:div styleClass="box directoryBrowser" id="directoryBrowser">
-<div class="box">
+ <ui:include src="includes/directoryBrowserPath.xhtml">
+ <ui:param name="renderOnSelect" value="control, directoryBrowser, messageBoxContainer"/>
+ </ui:include>
- <script type="text/javascript">
- function switchClipboardControl() {
- var clipboardControlsEnabled = false
- jQuery(".wikiFileSelect").each(
- function checkSelected() {
- if (jQuery(this).attr("checked")) {
- clipboardControlsEnabled = true;
- }
- }
- );
- if (clipboardControlsEnabled) {
- jQuery(".clipboardControl").show();
- } else {
- jQuery(".clipboardControl").hide();
- }
- }
- </script>
+ <h:panelGrid id="directoryBrowserMainPanel" styleClass="directoryBrowserMainPanel"
+ columnClasses="directoryBrowserTreePanel #{directoryBrowserSettings.treeVisible ? 'open':'closed'}, directoryBrowserContentPanel"
+ columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:panelGrid columns="3"
- styleClass="directoryControl smallFont"
- columnClasses="directorySelectControl, directoryTrash, directoryClipboard"
- cellpadding="0" cellspacing="0" border="0">
-
<s:fragment>
- <h:panelGroup styleClass="undecoratedLink"
- rendered="#{directoryHome.childNodes.size() > 0 and directoryHome.instance.id != wikiRoot.id}">
- <h:outputText value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
- <h:outputLink value="javascript:selectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
- <h:outputText value="#{messages['lacewiki.label.Clipboard.All']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
- <h:outputText value="#{messages['lacewiki.label.Clipboard.None']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();"
- tabindex="1">
- <h:outputText value="#{messages['lacewiki.label.Clipboard.Documents']}"/>
- </h:outputLink>
- <h:outputText value=" | "/>
- <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();"
- tabindex="1">
- <h:outputText value="#{messages['lacewiki.label.Clipboard.UploadedFiles']}"/>
- </h:outputLink>
- </h:panelGroup>
+ <ui:include src="includes/directoryBrowserTree.xhtml">
+ <ui:param name="renderOnSelect" value="control, directoryBrowser, messageBoxContainer"/>
+ </ui:include>
</s:fragment>
- <s:fragment>
- <h:panelGroup rendered="#{directoryHome.instance.id == trashArea.id and s:hasPermission('Trash', 'empty', directoryHome.instance)}">
- <h:graphicImage value="#{themePath}/img/icon.trash.gif"
- width="18" height="20" style="vertical-align:middle;"/>
- <h:commandLink action="#{directoryHome.emptyTrash()}"
- tabindex="1" styleClass="button">
- <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.EmptyTrash']}"/>
- </h:commandLink>
- </h:panelGroup>
- </s:fragment>
+ <s:div id="directoryBrowserContentPanel">
+ <h:form>
- <s:fragment>
- <h:panelGroup>
- <s:span>
- <h:outputText value="#{messages['lacewiki.label.Clipboard']} "/>
- <h:outputText value="(#{clipboard.items.size()} #{messages['lacewiki.label.Clipboard.Items']})" rendered="#{clipboard.items.size() > 1}"/>
- <h:outputText value="(#{clipboard.items.size()} #{messages['lacewiki.label.Clipboard.Item']})" rendered="#{clipboard.items.size() == 1}"/>
- <h:outputText value="(#{messages['lacewiki.label.Clipboard.Empty']})" rendered="#{empty clipboard.items}"/>
- <h:outputText value=": " styleClass="#{empty clipboard.items ? 'clipboardControl': ''}"
- style="display:#{empty clipboard.items ? 'none':'inherit'}"/>
- </s:span>
+ <ui:include src="includes/directoryBrowserControl.xhtml">
+ <ui:param name="renderOnSelect" value="directoryBrowserPathPanel, directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <h:commandLink action="#{directoryHome.copy()}" style="display:none;"
- tabindex="1" styleClass="buttonNonpersistent clipboardControl"
- accesskey="#{messages['lacewiki.button.Clipboard.Copy.accesskey']}">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.Clipboard.Copy']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.cut()}" style="display:none;"
- rendered="#{s:hasPermission('Node', 'edit', directoryHome.instance)}"
- tabindex="1" styleClass="buttonNonpersistent clipboardControl"
- accesskey="#{messages['lacewiki.button.Clipboard.Cut.accesskey']}">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.Clipboard.Cut']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.clearClipboard()}"
- rendered="#{not empty clipboard.items}"
- tabindex="1"
- accesskey="#{messages['lacewiki.button.Clipboard.Clear.accesskey']}"
- styleClass="buttonNonpersistent">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.Clipboard.Clear']}"/>
- </h:commandLink>
- <h:commandLink action="#{directoryHome.paste()}"
- rendered="#{not empty clipboard.items and directoryHome.instance.id != wikiRoot.id
- and s:hasPermission('Node', 'create', directoryHome.instance)}"
- tabindex="1"
- accesskey="#{messages['lacewiki.button.Clipboard.Paste.accesskey']}"
- styleClass="button">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.Clipboard.Paste']}"/>
- </h:commandLink>
- </h:panelGroup>
- </s:fragment>
+ <ui:include src="includes/pager.xhtml">
+ <ui:param name="pager" value="#{directoryBrowser.pager}"/>
+ <ui:param name="pagerStyleClass" value="pagerTop"/>
+ <ui:param name="useAjax" value="true"/>
+ <ui:param name="renderOnSelect" value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- </h:panelGrid>
+ <s:div styleClass="directoryEmpty" rendered="#{directoryBrowser.childNodes.size() == 0}">
+ <a:commandLink action="#{directoryBrowser.selectDirectory(directoryBrowser.instance.parent.id)}"
+ tabindex="1" accesskey="."
+ status="globalStatus"
+ reRender="control, directoryBrowser, messageBoxContainer"
+ rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <h:graphicImage styleClass="icon" value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ <h:outputText styleClass="text" value=".."/>
+ </a:commandLink>
+ </s:div>
- <h:panelGrid columns="2" styleClass="directoryPathTable" columnClasses="directoryPath, directoryPagerControl"
- cellpadding="0" cellspacing="0" border="0">
+ <script type="text/javascript">jQuery(function() {
+ jQuery(".contextMenu").show();
+ })</script>
- <h:panelGroup>
- <h:outputText value="/" styleClass="directorySeparator"/>
- <ui:repeat var="directory" value="#{directoryHome.instance.path}">
+ <h:dataTable id="dirTable" var="node"
+ value="#{directoryBrowser.childNodes}"
+ rendered="#{directoryBrowser.childNodes.size() > 0}"
+ styleClass="datatable smallFont undecoratedLink"
+ headerClass="sortableHeader alignCenter"
+ columnClasses="onePercentColumn alignCenter,
+ onePercentColumn alignCenter,
+ defaultColumn alignLeft wrapWhitespace,
+ fifteenPercentColumn alignLeft wrapWhitespace,
+ tenPercentColumn alignLeft wrapWhitespace,
+ tenPercentColumn alignLeft wrapWhitespace,
+ twentyPercentColumn alignCenter wrapWhitespace"
+ rowClasses="rowOdd,rowEven"
+ cellpadding="0" cellspacing="0" border="0">
- <s:link view="/dirDisplay_#{skin}.xhtml" value="#{directory.name}" propagation="none"
- styleClass="directoryButton" tabindex="1">
- <f:param name="directoryId" value="#{directory.id}"/>
- </s:link>
+ <h:column>
+ <s:fragment rendered="#{not clipboard.isCut(node.id)}">
+ <h:selectBooleanCheckbox value="#{directoryBrowser.selectedNodes[node]}"
+ onchange="switchClipboardControl()"
+ styleClass="wikiFileSelect wikiDocumentSelect"
+ rendered="#{node.isInstance('WikiDocument')}"/>
+ <h:selectBooleanCheckbox value="#{directoryBrowser.selectedNodes[node]}"
+ onchange="switchClipboardControl()"
+ styleClass="wikiFileSelect wikiUploadSelect"
+ rendered="#{node.isInstance('WikiUpload')}"/>
+ </s:fragment>
+ <s:fragment rendered="#{clipboard.isCut(node.id)}">
+ <h:graphicImage value="#{themePath}/img/icon.cut.gif" width="18" height="20"/>
+ </s:fragment>
+ </h:column>
- <h:outputText value="/" styleClass="directorySeparator" rendered="#{directory != directoryHome.instance}"/>
+ <h:column>
+ <f:facet name="header">
+ <a:commandLink action="#{directoryBrowser.selectDirectory(directoryBrowser.instance.parent.id)}"
+ tabindex="1" accesskey="."
+ status="globalStatus"
+ reRender="control, directoryBrowser, messageBoxContainer"
+ rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ </a:commandLink>
+ </f:facet>
- </ui:repeat>
- </h:panelGroup>
+ <s:fragment rendered="#{node.isInstance('WikiDirectory')}">
+ <ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon" value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <a:commandLink action="#{directoryBrowser.selectDirectory(node.id)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="control, directoryBrowser, messageBoxContainer"
+ oncomplete="jQuery('.menu-div').hide()">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </a:commandLink>
+ </li>
+ <li>
+ <s:link value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}" propagation="none"
+ target="_blank"
+ view="/dirDisplay_#{skin}.xhtml" tabindex="1">
+ <f:param name="directoryId" value="#{node.id}"/>
+ </s:link>
+ </li>
+ <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link view="/dirEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="directoryId" value="#{node.id}"/>
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- <h:panelGroup rendered="#{directoryHome.childNodes.size() > 0}" styleClass="smallFont">
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.ShowItems']}: "/>
- <h:selectOneMenu value="#{directoryHome.pager.pageSize}" tabindex="1">
- <f:selectItem itemLabel="5" itemValue="5"/>
- <f:selectItem itemLabel="15" itemValue="15"/>
- <f:selectItem itemLabel="50" itemValue="50"/>
- <f:selectItem itemLabel="#{messages['lacewiki.label.dirDisplay.All']}" itemValue="999999"/>
- </h:selectOneMenu>
- <h:commandLink action="#{directoryHome.refreshChildNodes()}"
- tabindex="1" accesskey="#{messages['lacewiki.button.dirDisplay.Refresh.accesskey']}"
- styleClass="buttonNonpersistent">
- <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['lacewiki.button.dirDisplay.Refresh']}"/>
- </h:commandLink>
- </h:panelGroup>
+ <s:fragment rendered="#{node.isInstance('WikiDocument')}">
+ <ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon" value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </h:outputLink>
+ </li>
+ <li>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+ <s:fragment rendered="#{directoryBrowser.isRemovable(node)}">
+ <a:jsFunction name="deleteDocumentId#{node.id}"
+ status="globalStatus"
+ action="#{documentHome.remove(node.id)}"/>
+ <li>
+ <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteDocumentId#{node.id}')">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+ <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="documentId" value="#{node.id}"/>
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- </h:panelGrid>
+ <s:fragment rendered="#{node.isInstance('WikiUpload')}">
+ <ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
+ <ui:param name="icon" value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"/>
+ <ui:define name="menu">
+ <ul class="contextMenuItems">
+ <li>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
+ </h:outputLink>
+ </li>
+ <li>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+ <s:fragment rendered="#{directoryBrowser.isRemovable(node)}">
+ <a:jsFunction name="deleteUploadId#{node.id}"
+ status="globalStatus"
+ action="#{uploadHome.remove(node.id)}"/>
+ <li>
+ <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteUploadId#{node.id}')">
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+ <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
+ <li>
+ <s:link view="/uploadEdit_#{skin}.xhtml" propagation="none">
+ <f:param name="uploadId" value="#{node.id}"/>
+ <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
- <s:div styleClass="directoryEmpty" rendered="#{directoryHome.childNodes.size() == 0}">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId" value="#{directoryHome.parentNode.id}"/>
- <h:panelGrid columns="2">
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
- <h:outputText value=".."/>
- </h:panelGrid>
- </s:link>
- <h:outputText rendered="#{empty directoryHome.parentNode or !s:hasPermission('Node','read',directoryHome.parentNode)}"
- value="#{messages['lacewiki.label.dirDisplay.DirectoryIsEmpty']}"/>
+ </h:column>
- </s:div>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty" value="name"/>
+ <ui:param name="sortAction" value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus" value="#{directoryBrowserSettings}"/>
+ <ui:param name="label" value="#{messages['lacewiki.entity.WikiNode.property.name']}"/>
+ <ui:param name="renderOnSelect" value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <h:panelGrid columns="5" rendered="#{directoryHome.childNodes.size() > 0 and directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
- styleClass="pager pagerTop"
- columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
- cellpadding="0" cellspacing="0" border="0">
+ <a:commandLink action="#{directoryBrowser.selectDirectory(node.id)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="control, directoryBrowser, messageBoxContainer"
+ oncomplete="jQuery('.menu-div').hide()"
+ rendered="#{node.isInstance('WikiDirectory') and s:hasPermission('Node','read',node)}">
+ <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}"/>
+ </a:commandLink>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="0"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.previousPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:span>
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
- #{directoryHome.pager.firstRecord} #{messages['lacewiki.label.dirDisplay.PagerTo']}
- #{directoryHome.pager.lastRecord} #{messages['lacewiki.label.dirDisplay.PagerOf']}
- #{directoryHome.pager.numOfRecords} #{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
- </s:span>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.nextPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.lastPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- </h:panelGrid>
-
- <h:dataTable id="dirTable" var="node"
- value="#{directoryHome.childNodes}"
- rendered="#{directoryHome.childNodes.size() > 0}"
- styleClass="datatable topLeftBottomBorder smallFont"
- headerClass="regularHeader rightBorder alignCenter"
- columnClasses="onePercentColumn rightBorder alignCenter, onePercentColumn rightBorder alignCenter,
- defaultColumn rightBorder alignLeft wrapWhitespace,
- fifteenPercentColumn rightBorder alignLeft wrapWhitespace,
- tenPercentColumn rightBorder alignLeft wrapWhitespace,
- tenPercentColumn rightBorder alignLeft wrapWhitespace,
- twentyPercentColumn rightBorder alignCenter wrapWhitespace"
- rowClasses="rowOdd,rowEven"
- cellpadding="0" cellspacing="0" border="0">
- <h:column>
- <s:fragment rendered="#{not clipboard.isCut(node.id)}">
- <h:selectBooleanCheckbox value="#{directoryHome.selectedNodes[node]}"
- onchange="switchClipboardControl()"
- styleClass="wikiFileSelect wikiDocumentSelect"
- rendered="#{node.isInstance('WikiDocument')}"/>
- <h:selectBooleanCheckbox value="#{directoryHome.selectedNodes[node]}"
- onchange="switchClipboardControl()"
- styleClass="wikiFileSelect wikiUploadSelect"
- rendered="#{node.isInstance('WikiUpload')}"/>
- <h:outputText value="-" rendered="#{node.isInstance('WikiDirectory')}"/>
- </s:fragment>
- <s:fragment rendered="#{clipboard.isCut(node.id)}">
- <h:graphicImage value="#{themePath}/img/icon.cut.gif" width="18" height="20"/>
- </s:fragment>
- </h:column>
- <h:column>
- <f:facet name="header">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId" value="#{directoryHome.parentNode.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
- </s:link>
- </f:facet>
- <h:graphicImage value="#{themePath}/img/icon.dir.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory')
- and node.id != trashArea.id and node.id != memberArea.id and node.id != helpArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.trash.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and node.id == trashArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.user.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and node.id == memberArea.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.help.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDirectory') and node.id == helpArea.id}"/>
-
- <h:graphicImage value="#{themePath}/img/icon.doc.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node.id != directoryHome.instance.defaultFile.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.default.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node.id == directoryHome.instance.defaultFile.id}"/>
-
- <h:graphicImage value="#{themePath}/img/#{uploadTypes[node.contentType].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and !empty uploadTypes[node.contentType]}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and empty uploadTypes[node.contentType]}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.Name']} #{messages['lacewiki.label.dirDisplay.RightClickForActions']}"/>
- </f:facet>
-
- <s:fragment rendered="#{node.isInstance('WikiDirectory')}">
- <s:fragment rendered="#{s:hasPermission('Node','read',node)}">
-
- <s:link id="directoryLink" value="#{wiki:truncateString(node.name, 40, '...')}" propagation="none"
- view="/dirDisplay_#{skin}.xhtml" tabindex="1">
- <f:param name="directoryId" value="#{node.id}"/>
- </s:link>
-
- <s:div id="directoryMenu" styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
-
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
-
- <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink">
- <s:link view="/dirEdit_#{skin}.xhtml" propagation="none">
- <f:param name="directoryId" value="#{node.id}"/>
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
-
- </ul>
- </s:div>
-
- <script type="text/javascript">jQuery(function() {
- jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:directoryLink")
- .contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:directoryMenu", {})
- });</script>
-
- </s:fragment>
-
- <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}" rendered="#{!s:hasPermission('Node','read',node)}"/>
-
- </s:fragment>
-
- <s:fragment rendered="#{node.isInstance('WikiDocument')}">
-
- <s:fragment rendered="#{s:hasPermission('Node','read',node)}">
-
- <h:outputLink id="documentLink" value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" tabindex="1"
+ rendered="#{not node.isInstance('WikiDirectory') and s:hasPermission('Node','read',node)}">
<h:outputText value="#{wiki:truncateString(node.name, 40, '...')}"/>
</h:outputLink>
- <s:div id="documentMenu" styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
+ <s:fragment rendered="#{not s:hasPermission('Node','read',node)}">
+ <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}"/>
+ </s:fragment>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
+ </h:column>
- <s:fragment rendered="#{directoryHome.isRemovable(node)}">
- <a:jsFunction name="deleteDocumentId#{node.id}"
- status="globalStatus"
- action="#{documentHome.remove(node.id)}"/>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteDocumentId#{node.id}')">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
- </h:outputLink>
- </li>
- </s:fragment>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty" value="createdBy"/>
+ <ui:param name="sortAction" value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus" value="#{directoryBrowserSettings}"/>
+ <ui:param name="label" value="#{messages['lacewiki.entity.WikiNode.property.createdBy']}"/>
+ <ui:param name="renderOnSelect" value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink noWrapWhitespace">
- <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
- <f:param name="documentId" value="#{node.id}"/>
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
+ <s:span styleClass="undecoratedLink" rendered="#{node.ownedByRegularUser}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
+ <h:outputText value="#{node.createdBy.fullname}"/>
+ </h:outputLink>
+ </s:span>
+ <h:outputText rendered="#{not node.ownedByRegularUser}" value="#{node.createdBy.fullname}"/>
+ </h:column>
- </ul>
- </s:div>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['lacewiki.label.dirDisplay.ReadAccess']}"/>
+ </f:facet>
+ <h:outputText value="#{wiki:truncateString(wiki:resolveAccessLevel(node.readAccessLevel).roleNames, 15, '...')}"/>
+ </h:column>
- <script type="text/javascript">jQuery(function() {
- jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:documentLink")
- .contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:documentMenu", {})
- });</script>
- </s:fragment>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['lacewiki.label.dirDisplay.WriteAccess']}"/>
+ </f:facet>
+ <h:outputText value="#{wiki:truncateString(wiki:resolveAccessLevel(node.writeAccessLevel).roleNames, 15, '...')}"/>
+ </h:column>
- <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}" rendered="#{!s:hasPermission('Node','read',node)}"/>
+ <h:column>
+ <ui:include src="includes/sortableHeader.xhtml">
+ <ui:param name="sortProperty" value="lastModifiedOn"/>
+ <ui:param name="sortAction" value="#{directoryBrowser}"/>
+ <ui:param name="sortStatus" value="#{directoryBrowserSettings}"/>
+ <ui:param name="label" value="#{messages['lacewiki.entity.WikiNode.property.lastModifiedOn']}"/>
+ <ui:param name="renderOnSelect" value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- </s:fragment>
+ <s:fragment rendered="#{not empty node.lastModifiedOn}">
+ <h:outputText value="#{node.lastModifiedOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ (<s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
+ <h:outputText value="#{node.lastModifiedBy.username}"/>
+ </h:outputLink>
+ </s:span>)
+ </s:fragment>
+ <s:fragment rendered="#{empty node.lastModifiedOn}">
+ <h:outputText value="-"/>
+ </s:fragment>
- <s:fragment rendered="#{node.isInstance('WikiUpload')}">
- <s:fragment rendered="#{s:hasPermission('Node','read',node)}">
+ </h:column>
- <h:outputLink id="uploadLink" value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
- <h:outputText value="#{wiki:truncateString(node.name, 30, '...')} (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
- </h:outputLink>
+ </h:dataTable>
- <s:div id="uploadMenu" styleClass="contextMenu">
- <ul>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.View']}"/>
- </h:outputLink>
- </li>
+ <ui:include src="includes/pager.xhtml">
+ <ui:param name="pager" value="#{directoryBrowser.pager}"/>
+ <ui:param name="pagerStyleClass" value="pagerBottom"/>
+ <ui:param name="useAjax" value="true"/>
+ <ui:param name="renderOnSelect" value="directoryBrowserContentPanel, messageBoxContainer"/>
+ </ui:include>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
- </h:outputLink>
- </li>
+ </h:form>
+ </s:div>
- <s:fragment rendered="#{directoryHome.isRemovable(node)}">
- <a:jsFunction name="deleteUploadId#{node.id}"
- status="globalStatus"
- action="#{uploadHome.remove(node.id)}"/>
- <li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteUploadId#{node.id}')">
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
- </h:outputLink>
- </li>
- </s:fragment>
-
- <s:fragment rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink noWrapWhitespace">
- <s:link view="/uploadEdit_#{skin}.xhtml" propagation="none">
- <f:param name="uploadId" value="#{node.id}"/>
- <h:outputText value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
- </s:link>
- </li>
- </s:fragment>
-
- </ul>
- </s:div>
-
- <script type="text/javascript">jQuery(function() {
- jQuery("#dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:uploadLink")
- .contextMenu("dirSelectionForm\\:dirTable\\:#{uiComponent['dirSelectionForm:dirTable'].rowIndex}\\:uploadMenu", {})
- });</script>
- </s:fragment>
-
- <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}" rendered="#{!s:hasPermission('Node','read',node)}"/>
-
- </s:fragment>
-
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.Owner']}"/>
- </f:facet>
- <s:span styleClass="undecoratedLink" rendered="#{node.ownedByRegularUser}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
- <h:outputText value="#{node.createdBy.fullname}"/>
- </h:outputLink>
- </s:span>
- <h:outputText rendered="#{not node.ownedByRegularUser}" value="#{node.createdBy.fullname}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.ReadAccess']}"/>
- </f:facet>
- <h:outputText value="#{wiki:truncateString(wiki:resolveAccessLevel(node.readAccessLevel).roleNames, 15, '...')}"/>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.WriteAccess']}"/>
- </f:facet>
- <h:outputText value="#{wiki:truncateString(wiki:resolveAccessLevel(node.writeAccessLevel).roleNames, 15, '...')}"/>
- </h:column>
-
- <h:column rendered="#{!empty node.lastModifiedOn and !empty node.lastModifiedBy}">
- <f:facet name="header">
- #{messages['lacewiki.label.dirDisplay.LastModifiedOn']}
- </f:facet>
- <h:outputText value="#{node.lastModifiedOn}">
- <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- (<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
- <h:outputText value="#{node.lastModifiedBy.username}"/>
- </h:outputLink>
- </s:span>)
- </h:column>
-
- <h:column rendered="#{empty node.lastModifiedOn or empty node.lastModifiedBy}">
- <f:facet name="header">
- #{messages['lacewiki.label.dirDisplay.LastModifiedOn']}
- </f:facet>
- -
- </h:column>
-
- </h:dataTable>
-
- <h:panelGrid columns="5" rendered="#{directoryHome.childNodes.size() > 0 and directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
- styleClass="pager pagerBottom"
- columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
- cellpadding="0" cellspacing="0" border="0">
-
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="0"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.previousPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.previousPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.previousPageAvailable}"/>
-
- <s:span>
- <h:outputText value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
- #{directoryHome.pager.firstRecord} #{messages['lacewiki.label.dirDisplay.PagerTo']}
- #{directoryHome.pager.lastRecord} #{messages['lacewiki.label.dirDisplay.PagerOf']}
- #{directoryHome.pager.numOfRecords} #{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
- </s:span>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.nextPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
- rendered="#{directoryHome.pager.nextPageAvailable}">
- <f:param name="page" value="#{directoryHome.pager.lastPage}"/>
- <f:param name="pageSize" value="#{directoryHome.pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
- </s:link>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
- rendered="#{!directoryHome.pager.nextPageAvailable}"/>
-
</h:panelGrid>
-</div>
+</s:div>
-</h:form>
-
</ui:define>
<ui:define name="footer"> </ui:define>
Modified: trunk/examples/wiki/view/dirDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -8,70 +8,71 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
-<ui:define name="screenname">#{directoryHome.instance.name}</ui:define>
+<ui:define name="screenname">#{directoryBrowser.instance.name}</ui:define>
<ui:define name="control">
- <s:fragment rendered="#{!empty directoryHome.parentNode}">
+ <s:fragment rendered="#{!empty directoryBrowser.instance.parent}">
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
 
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}">
+ <f:param name="directoryId" value="#{directoryBrowser.instance.id}"/>
<h:outputText escape="false" value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
 
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
 
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
view="/uploadCreate_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.UploadFile']}"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
 
</s:fragment>
- <s:fragment rendered="#{empty directoryHome.parentNode}">
+ <s:fragment rendered="#{empty directoryBrowser.instance.parent}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
view="/dirEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'edit', directoryHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}">
<h:outputText escape="false" value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
</s:link>
</s:fragment>
- <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null, null)}"
- styleClass="linkNavigation" rendered="#{not empty directoryHome.instance.feed}">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryBrowser.instance.feed, null, null)}"
+ styleClass="linkNavigation" rendered="#{not empty directoryBrowser.instance.feed}">
<h:outputText value="#{messages['lacewiki.button.DirectoryFeed']}"/>
</h:outputLink>
@@ -80,34 +81,27 @@
<ui:define name="content">
<div class="directoryPathPanel">
-
- <s:link view="/dirDisplay_#{skin}.xhtml" value="#{wikiRoot.name}" propagation="none"
- styleClass="directoryButton" tabindex="1">
- <f:param name="directoryId" value="#{wikiRoot.id}"/>
- </s:link>
- <h:outputText value="/" styleClass="directorySeparator"/>
-
<h:panelGroup>
- <ui:repeat var="directory" value="#{breadcrumb}">
+ <ui:repeat var="directory" value="#{directoryBrowser.instance.path}">
<s:link view="/dirDisplay_#{skin}.xhtml" value="#{directory.name}" propagation="none"
styleClass="directoryButton" tabindex="1">
<f:param name="directoryId" value="#{directory.id}"/>
</s:link>
- <h:outputText value="/" styleClass="directorySeparator" rendered="#{directory != directoryHome.instance}"/>
+ <h:outputText value=" / " styleClass="directorySeparator" rendered="#{directory != directoryBrowser.instance}"/>
</ui:repeat>
</h:panelGroup>
</div>
-<s:div styleClass="directoryEmpty" rendered="#{empty directoryHome.childNodes}">
+<s:div styleClass="directoryEmpty" rendered="#{empty directoryBrowser.childNodes}">
<s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId" value="#{directoryHome.parentNode.id}"/>
+ rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read', directoryBrowser.instance.parent)}">
+ <f:param name="directoryId" value="#{directoryBrowser.instance.parent.id}"/>
<h:panelGrid columns="2">
<h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
<h:outputText value=".."/>
</h:panelGrid>
</s:link>
- <h:outputText rendered="#{empty directoryHome.parentNode or !s:hasPermission('Node','read',directoryHome.parentNode)}"
+ <h:outputText rendered="#{empty directoryBrowser.instance.parent or !s:hasPermission('Node','read', directoryBrowser.instance.parent)}"
value="#{messages['lacewiki.label.dirDisplay.DirectoryIsEmpty']}"/>
</s:div>
@@ -115,8 +109,8 @@
<!-- TODO: Add pager -->
<h:dataTable id="directoryTable" var="node"
- value="#{directoryHome.childNodes}"
- rendered="#{!empty directoryHome.childNodes}"
+ value="#{directoryBrowser.childNodes}"
+ rendered="#{!empty directoryBrowser.childNodes}"
styleClass="datatable topLeftBottomBorder"
headerClass="regularHeader rightBorder"
columnClasses="onePercentColumn rightBorder alignCenter, defaultColumn rightBorder alignLeft"
@@ -126,27 +120,23 @@
<h:column>
<f:facet name="header">
<s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" accesskey="." propagation="none"
- rendered="#{!empty directoryHome.parentNode and s:hasPermission('Node','read',directoryHome.parentNode)}">
- <f:param name="directoryId" value="#{directoryHome.parentNode.id}"/>
+ rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
+ <f:param name="directoryId" value="#{directoryBrowser.instance.parent.id}"/>
<h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
</s:link>
</f:facet>
- <h:graphicImage value="#{themePath}/img/icon.dir.gif"
+
+ <h:graphicImage value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"
width="18" height="20"
rendered="#{node.isInstance('WikiDirectory')}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.gif"
+
+ <h:graphicImage value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"
width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node != directoryHome.instance.defaultFile}"/>
- <h:graphicImage value="#{themePath}/img/icon.doc.default.gif"
- width="18" height="20"
- rendered="#{node.isInstance('WikiDocument') and node == directoryHome.instance.defaultFile}"/>
+ rendered="#{node.isInstance('WikiDocument')}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes[node.contentType].displayIcon}"
+ <h:graphicImage value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"
width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and !empty uploadTypes[node.contentType]}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
- width="18" height="20"
- rendered="#{node.isInstance('WikiUpload') and empty uploadTypes[node.contentType]}"/>
+ rendered="#{node.isInstance('WikiUpload')}"/>
</h:column>
<h:column>
@@ -171,7 +161,7 @@
<s:link id="editFile" value="#{wiki:truncateString(node.name, 30, '...')}"
tabindex="2" view="/uploadEdit_#{skin}.xhtml" propagation="none">
<f:param name="uploadId" value="#{node.id}"/>
- <f:param name="parentDirectoryId" value="#{directoryHome.instance.id}"/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
</s:link>
<h:outputText value=" (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
</s:span>
Modified: trunk/examples/wiki/view/dirEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -18,13 +18,13 @@
<ui:define name="controlTwo">
<s:link id="exitManaged" styleClass="linkNavigation sessionEventTrigger" rendered="#{directoryHome.managed}" action="exitManaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation sessionEventTrigger" rendered="#{!directoryHome.managed}" action="exitUnmanaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/dirEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/dirEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,13 +16,13 @@
<ui:define name="control">
<s:link id="exitManaged" styleClass="linkNavigation" rendered="#{directoryHome.managed}" action="exitManaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation" rendered="#{!directoryHome.managed}" action="exitUnmanaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -19,13 +19,13 @@
<ui:define name="controlTwo">
<s:link id="exitManaged" styleClass="linkNavigation sessionEventTrigger" rendered="#{documentHome.managed}" action="exitManaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation sessionEventTrigger" rendered="#{!documentHome.managed}" action="exitUnmanaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/docEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/docEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,13 +16,13 @@
<ui:define name="control">
<s:link id="exitManaged" styleClass="linkNavigation" rendered="#{documentHome.managed}" action="exitManaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
<s:link id="exitUnmanaged" styleClass="linkNavigation" rendered="#{!documentHome.managed}" action="exitUnmanaged"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Added: trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,148 @@
+<s:div id="directoryBrowserControl"
+ styleClass="directoryBrowserControl smallFont"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<script type="text/javascript">
+ function switchClipboardControl() {
+ var clipboardControlsEnabled = false
+ jQuery(".wikiFileSelect").each(
+ function checkSelected() {
+ if (jQuery(this).attr("checked")) {
+ clipboardControlsEnabled = true;
+ }
+ }
+ );
+ if (clipboardControlsEnabled) {
+ jQuery(".clipboardControl").show();
+ } else {
+ jQuery(".clipboardControl").hide();
+ }
+ }
+</script>
+
+<h:panelGrid columns="4"
+ styleClass="directoryBrowserControlPanel"
+ columnClasses="itemSelector, clipboard, tools, pagerSelector"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:fragment>
+ <h:panelGroup styleClass="undecoratedLink"
+ rendered="#{directoryBrowser.childNodes.size() > 0 and directoryBrowser.instance.id != wikiRoot.id}">
+ <h:outputText value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
+ <h:outputLink value="javascript:selectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
+ <h:outputText value="#{messages['lacewiki.label.Clipboard.All']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); switchClipboardControl();"
+ tabindex="1">
+ <h:outputText value="#{messages['lacewiki.label.Clipboard.None']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink
+ value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();"
+ tabindex="1">
+ <h:outputText value="#{messages['lacewiki.label.Clipboard.Documents']}"/>
+ </h:outputLink>
+ <h:outputText value=" | "/>
+ <h:outputLink
+ value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();"
+ tabindex="1">
+ <h:outputText value="#{messages['lacewiki.label.Clipboard.UploadedFiles']}"/>
+ </h:outputLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup>
+ <s:span>
+ <h:outputText value="#{messages['lacewiki.label.Clipboard']} "/>
+ <h:outputText value="(#{clipboard.items.size()} #{messages['lacewiki.label.Clipboard.Items']})"
+ rendered="#{clipboard.items.size() > 1}"/>
+ <h:outputText value="(#{clipboard.items.size()} #{messages['lacewiki.label.Clipboard.Item']})"
+ rendered="#{clipboard.items.size() == 1}"/>
+ <h:outputText value="(#{messages['lacewiki.label.Clipboard.Empty']})"
+ rendered="#{empty clipboard.items}"/>
+ <h:outputText value=": " styleClass="#{empty clipboard.items ? 'clipboardControl': ''}"
+ style="display:#{empty clipboard.items ? 'none':'inherit'}"/>
+ </s:span>
+
+ <a:commandLink action="#{directoryBrowser.copy()}" style="display:none;"
+ tabindex="1" styleClass="buttonNonpersistent clipboardControl"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ accesskey="#{messages['lacewiki.button.Clipboard.Copy.accesskey']}">
+ <h:outputText styleClass="buttonLabel" escape="false"
+ value="#{messages['lacewiki.button.Clipboard.Copy']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.cut()}" style="display:none;"
+ rendered="#{s:hasPermission('Node', 'edit', directoryBrowser.instance)}"
+ tabindex="1" styleClass="buttonNonpersistent clipboardControl"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ accesskey="#{messages['lacewiki.button.Clipboard.Cut.accesskey']}">
+ <h:outputText styleClass="buttonLabel" escape="false"
+ value="#{messages['lacewiki.button.Clipboard.Cut']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.clearClipboard()}"
+ rendered="#{not empty clipboard.items}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ accesskey="#{messages['lacewiki.button.Clipboard.Clear.accesskey']}"
+ styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false"
+ value="#{messages['lacewiki.button.Clipboard.Clear']}"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.paste()}"
+ rendered="#{not empty clipboard.items and directoryBrowser.instance.id != wikiRoot.id
+ and s:hasPermission('Node', 'create', directoryBrowser.instance)}"
+ tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ accesskey="#{messages['lacewiki.button.Clipboard.Paste.accesskey']}"
+ styleClass="button">
+ <h:outputText styleClass="buttonLabel" escape="false"
+ value="#{messages['lacewiki.button.Clipboard.Paste']}"/>
+ </a:commandLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup
+ rendered="#{directoryBrowser.instance.id == trashArea.id and s:hasPermission('Trash', 'empty', directoryBrowser.instance)}">
+ <h:graphicImage value="#{themePath}/img/icon.trash.gif"
+ width="18" height="20" style="vertical-align:middle;"/>
+ <a:commandLink action="#{directoryBrowser.emptyTrash()}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ tabindex="1" styleClass="button">
+ <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.EmptyTrash']}"/>
+ </a:commandLink>
+ </h:panelGroup>
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup rendered="#{directoryBrowser.childNodes.size() > 0}">
+ <h:outputText value="#{messages['lacewiki.label.dirDisplay.ShowItems']}: "/>
+ <h:selectOneMenu value="#{directoryBrowserSettings.pageSize}" tabindex="1">
+ <f:selectItem itemLabel="5" itemValue="5"/>
+ <f:selectItem itemLabel="15" itemValue="15"/>
+ <f:selectItem itemLabel="50" itemValue="50"/>
+ <f:selectItem itemLabel="#{messages['lacewiki.label.dirDisplay.All']}" itemValue="999999"/>
+ <a:support event="onchange"
+ action="#{directoryBrowser.changePageSize()}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"/>
+ </h:selectOneMenu>
+ </h:panelGroup>
+ </s:fragment>
+
+</h:panelGrid>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,16 @@
+<s:div styleClass="contextMenu"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:outputLink value="#" tabindex="1"
+ onmouseover="jQuery(this).children('.dirItemIcon').attr('src','#{themePath}/img/menu_down.gif').toggleClass('mouseOver');
+ jQuery(this).parent('.contextMenu').menu(); jQuery(this).children('.contextMenuItems').show();"
+ onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{icon}').toggleClass('mouseOver')">
+ <h:graphicImage value="#{icon}" styleClass="dirItemIcon"/>
+ </h:outputLink>
+
+ <ui:insert name="menu"/>
+
+</s:div>
Added: trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,55 @@
+<s:div id="directoryBrowserPathPanel"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:form id="directoryBrowserPathForm">
+ <h:panelGrid columns="2"
+ styleClass="directoryBrowserPathPanel"
+ columnClasses="#{directoryBrowserSettings.treeVisible ? 'treeSwitchOpen':'treeSwitchClosed'}, path"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:fragment>
+
+ <a:commandLink action="#{directoryBrowser.showTree}" tabindex="1"
+ reRender="#{renderOnSelect}, directoryBrowserPath"
+ rendered="#{not directoryBrowserSettings.treeVisible}"
+ status="globalStatus">
+ <h:graphicImage value="#{themePath}/img/menu_right.gif" width="18" height="18"/>
+ </a:commandLink>
+ <a:commandLink action="#{directoryBrowser.hideTree}" tabindex="1"
+ reRender="#{renderOnSelect}"
+ rendered="#{directoryBrowserSettings.treeVisible}"
+ status="globalStatus">
+ <h:graphicImage value="#{themePath}/img/menu_left.gif" width="18" height="18"/>
+ </a:commandLink>
+
+ </s:fragment>
+
+ <s:fragment>
+ <h:panelGroup>
+ <h:outputText value="/" styleClass="separator"/>
+ <ui:repeat var="directory" value="#{directoryBrowser.instance.path}">
+
+ <a:commandLink action="#{directoryBrowser.selectDirectory(directory.id)}"
+ styleClass="button"
+ status="globalStatus"
+ tabindex="1"
+ reRender="#{renderOnSelect}">
+ <h:outputText styleClass="label" value="#{directory.name}"/>
+ </a:commandLink>
+ <h:outputText value="/" styleClass="separator"
+ rendered="#{directory != directoryBrowser.instance}"/>
+
+ </ui:repeat>
+ </h:panelGroup>
+ </s:fragment>
+
+ </h:panelGrid>
+ </h:form>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,46 @@
+<s:div id="directoryBrowserTree"
+ styleClass="directoryBrowserTree smallFont"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:form id="directoryTreeForm" rendered="#{directoryBrowserSettings.treeVisible}">
+ <rich:tree switchType="ajax"
+ ajaxSubmitSelection="true"
+ adviseNodeOpened="#{directoryBrowser.adviseTreeNodeOpened}"
+ adviseNodeSelected="#{directoryBrowser.adviseTreeNodeSelected}"
+ changeExpandListener="#{directoryBrowser.listenTreeNodeExpand}"
+ nodeSelectListener="#{directoryBrowser.listenTreeNodeSelected}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}"
+ onselected="jQuery('.menu-div').hide()">
+
+ <rich:recursiveTreeNodesAdaptor
+ var="dir"
+ roots="#{directoryBrowser.treeRoot.wrappedChildrenSorted}"
+ nodes="#{dir.wrappedChildrenSorted}">
+
+ <rich:treeNode>
+ <f:facet name="icon">
+ <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+
+ <s:div styleClass="directoryTreeLabel">
+ <h:outputText value="#{wiki:truncateString(dir.wrappedNode.name, 40, '...')}"/>
+ </s:div>
+
+ </rich:treeNode>
+
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:tree>
+ </h:form>
+
+</s:div>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/pager.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/pager.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/pager.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,94 @@
+<s:fragment
+ rendered="#{pager.severalPages}"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:panelGrid columns="5"
+ styleClass="pager #{pagerStyleClass}"
+ columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
+ rendered="#{pager.previousPageAvailable and not useAjax}">
+ <f:param name="page" value="0"/>
+ <f:param name="pageSize" value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setFirstPage}" tabindex="1"
+ rendered="#{pager.previousPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ rendered="#{!pager.previousPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
+ rendered="#{pager.previousPageAvailable and not useAjax}">
+ <f:param name="page" value="#{pager.previousPage}"/>
+ <f:param name="pageSize" value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setPreviousPage}" tabindex="1"
+ rendered="#{pager.previousPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ rendered="#{!pager.previousPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <h:outputText value="#{messages['lacewiki.label.dirDisplay.PagerShowing']}
+ #{pager.firstRecord} #{messages['lacewiki.label.dirDisplay.PagerTo']}
+ #{pager.lastRecord} #{messages['lacewiki.label.dirDisplay.PagerOf']}
+ #{pager.numOfRecords} #{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
+ rendered="#{pager.nextPageAvailable and not useAjax}">
+ <f:param name="page" value="#{pager.nextPage}"/>
+ <f:param name="pageSize" value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setNextPage}" tabindex="1"
+ rendered="#{pager.nextPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ rendered="#{!pager.nextPageAvailable}"/>
+ </s:fragment>
+
+ <s:fragment>
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" propagation="none"
+ rendered="#{pager.nextPageAvailable and not useAjax}">
+ <f:param name="page" value="#{pager.lastPage}"/>
+ <f:param name="pageSize" value="#{pager.pageSize}"/>
+ <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ </s:link>
+ <a:commandLink action="#{pager.setLastPage}" tabindex="1"
+ rendered="#{pager.nextPageAvailable and useAjax}"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ </a:commandLink>
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ rendered="#{!pager.nextPageAvailable}"/>
+ </s:fragment>
+
+
+ </h:panelGrid>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/sortableHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/sortableHeader.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/sortableHeader.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,20 @@
+<f:facet name="header"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <a:commandLink action="#{sortAction.sortBy(sortProperty)}" tabindex="1"
+ status="globalStatus"
+ reRender="#{renderOnSelect}">
+ <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" styleClass="sortIndicator"
+ rendered="#{!sortStatus.orderDescending and sortStatus.orderByProperty.toString() == sortProperty}"/>
+ <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" styleClass="sortIndicator"
+ rendered="#{sortStatus.orderDescending and sortStatus.orderByProperty.toString() == sortProperty}"/>
+ <h:outputText value="#{label}"/>
+ </a:commandLink>
+
+</f:facet>
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-02-27 08:35:11 UTC (rev 7489)
@@ -684,37 +684,36 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- white-space: nowrap;
- padding: 7px;
+.directoryBrowser {
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border: 1px solid #C3BBB6;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 20%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
- width: 100%;
- background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
- border-top: 1px solid #C3BBB6;
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
}
-.directoryPathTable .directoryButton {
+.directoryBrowserPathPanel .button {
color: #fff;
padding: 2px;
border-style: none;
@@ -723,32 +722,90 @@
font-weight: bold;
}
-.directoryPathTable .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserMainPanel {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-bottom: 1px solid #C3BBB6;
+ width: 100%;
+}
+
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 20%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
- padding: 5px;
+.directoryBrowserTree {
+ overflow-x: auto;
}
-.directoryEmpty {
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
border-bottom: 1px solid #C3BBB6;
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
}
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
+}
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
+}
+
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
+ padding: 5px;
+}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Generic Lists
----------------------------------------------- */
@@ -815,13 +872,20 @@
.datatable .sortableHeader {
white-space: nowrap;
background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
- text-align: center;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1418,3 +1482,105 @@
.userInfoEntryLink:hover {color: #666}
+
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #962325;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #962325;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ background: #fff url(../img/menu.bg.gif) 0 0 repeat-x;
+ color: white;
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
Deleted: trunk/examples/wiki/view/themes/default/js/jqContextMenu.js
===================================================================
--- trunk/examples/wiki/view/themes/default/js/jqContextMenu.js 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/default/js/jqContextMenu.js 2008-02-27 08:35:11 UTC (rev 7489)
@@ -1 +0,0 @@
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px solid #999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px solid #0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var index=hash.length-1;$(this).bind('contextmenu',function(e){var bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return false});return this};function display(index,trigger,e,options){var cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof val=='object'&&defaults[i]){$.extend(defaults[i],val)}else defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
\ No newline at end of file
Copied: trunk/examples/wiki/view/themes/default/js/jqMenu.js (from rev 7445, trunk/examples/wiki/view/themes/default/js/jqContextMenu.js)
===================================================================
--- trunk/examples/wiki/view/themes/default/js/jqMenu.js (rev 0)
+++ trunk/examples/wiki/view/themes/default/js/jqMenu.js 2008-02-27 08:35:11 UTC (rev 7489)
@@ -0,0 +1,17 @@
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ * http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it accordingly):
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
+ */
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8 g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x" 24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E Y="3E"></E><E Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29 3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E" 24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8 i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8 b=2;$(a.q).1T(5(){4(a.M)s;J(8 i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8 t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s 2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m 27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8 b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v 4(a&&a.V){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m 38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8 m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m 3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v G.1Y();1h}4(e.2c>36&&e.2c<3S)s Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x $.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v 2.O=P},2v:5(a){4(a 2x $.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19 $.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8 b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8 i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8 a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8 a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v 4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8 c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8 i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v 4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s m.V?m:k},1I:5(){8 a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v 2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N 1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19 $.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8 i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g y==\'2e\';4(1C&&2.1D)y=$(\'<a 3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v 4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v 2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8 a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8 i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8 a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N 2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8 a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8 f=5(a){8 b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19 $.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19 $.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8 a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19 $.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8 i,U=j(2,\'2G\');4(U.9){2E=19 $.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s 2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v $(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8 r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
+
Property changes on: trunk/examples/wiki/view/themes/default/js/jqMenu.js
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -29,7 +29,7 @@
<script type="text/javascript" src="#{themePath}/js/jqHistoryRemote.js"></script>
<script type="text/javascript" src="#{themePath}/js/jqProgressBar.js"></script>
<script type="text/javascript" src="#{themePath}/js/jqDimensions.js"></script>
- <script type="text/javascript" src="#{themePath}/js/jqContextMenu.js"></script>
+ <script type="text/javascript" src="#{themePath}/js/jqMenu.js"></script>
<script type="text/javascript" src="#{themePath}/js/lacewiki.js"></script>
<script type="text/javascript">
@@ -204,23 +204,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#EAE8E5',
- border: 'none',
- padding: '4px'
- }
- });
-
wrapBoxes();
}
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-27 08:35:11 UTC (rev 7489)
@@ -697,64 +697,125 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- white-space: nowrap;
- padding: 7px;
+.directoryBrowser {
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border-top: 1px solid #C3BBB6;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 20%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
- width: 100%;
- background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
}
-.directoryPathTable .directoryButton {
+.directoryBrowserPathPanel .button {
color: #d75525;
- padding: 2px;
+ background: none;
+ padding: 2px;
border-style: none;
+ font-size: 85%;
font-weight: bold;
- font-size: 85%;
}
-.directoryPathTable .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserMainPanel {
+ width: 100%;
+}
+
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 20%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
+.directoryBrowserTree {
+ overflow-x: auto;
+}
+
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
+ border-bottom: 1px solid #C3BBB6;
}
-.directoryEmpty {
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
+}
+
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
+}
+
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
padding: 5px;
}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Generic Lists
----------------------------------------------- */
@@ -831,13 +892,20 @@
.datatable .sortableHeader {
white-space: nowrap;
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
- text-align: center;
padding: 2px;
padding-left: 5px;
padding-right: 5px;
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1433,6 +1501,107 @@
.userInfoEntryLink:hover {color: #666}
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #d75525;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #d75525;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
+
+
/* User Control
----------------------------------------------- */
@@ -1539,10 +1708,6 @@
}
-
-/* Main Menu
------------------------------------------------ */
-
/* Main menu
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/js/jqueryPlugins.js 2008-02-27 08:35:11 UTC (rev 7489)
@@ -94,10 +94,22 @@
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){p g=$.19.D,w=$.19.w;$.19.z({D:8(){4(1[0]==h)5 Z.1a||$.I&&7.10.1z||7.q.1z;4(1[0]==7)5 1t.1s(7.q.1H,7.q.13);5 g.1k(1,1h)},w:8(){4(1[0]==h)5 Z.1d||$.I&&7.10.1c||7.q.1c;4(1[0]==7)5 1t.1s(7.q.1B,7.q.11);5 w.1k(1,1h)},1a:8(){5 1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13-f(1,\'k\')-f(1,\'1A\'):1.D()+f(1,\'18\')+f(1,\'1y\')},1d:8(){5 1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11-f(1,\'j\')-f(1,\'1x\'):1.w()+f(1,\'15\')+f(1,\'1u\')},1K:8(){5 1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13:1.D()+f(1,\'k\')+f(1,\'1A\')+f(1,\'18\')+f(1,\'1y\')},1J:8(){5 1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11:1.w()+f(1,\'j\')+f(1,\'1x\')+f(1,\'15\')+f(1,\'1u\')},l:8(a){4(a!=1q)5 1.1!
o(8(){4(1==h||1==7)h.1m(a,$(h).n());o 1.l=a});4(1[0]==h||1[0]==7)5 Z.1G||$.I&&7.10.l||7.q.l;5 1[0].l},n:8(a){4(a!=1q)5 1.1o(8(){4(1==h||1==7)h.1m($(h).l(),a);o 1.n=a});4(1[0]==h||1[0]==7)5 Z.1F||$.I&&7.10.n||7.q.n;5 1[0].n},C:8(c,d){p a=1[0],3=a.S,6=a.R,c=$.z({Q:m,K:m,O:m,t:m},c||{}),x=a.N,y=a.M,v=a.l,u=a.n;4($.i.17||$.i.16){x+=f(a,\'j\');y+=f(a,\'k\')}4(($.i.Y||$.i.X)&&$.r(6,\'C\')!=\'W\'){x-=f(6,\'j\');y-=f(6,\'k\')}4($.i.17){B{4(3!=a&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}4(3==6)1v}H((3=3.S)&&3.s!=\'G\')}4($.i.16&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\')){B{x+=6.N;y+=6.M;x+=f(6,\'j\');y+=f(6,\'k\')}H((6=6.R)&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\'))}p b=e(a,c,x,y,v,u);4(d){$.z(d,b);5 1}o{5 b}},1I:8(b,c){p x=0,y=0,v=0,u=0,9=1[0],3=1[0],6,U,L=$.r(9,\'C\'),A=$.i.17,E=$.i.16,1p=$.i.Y,1n=$.i.X,12=m,14=m,b=$.z({Q:F,K:m,O:m,t:F,1j:m},b||{});4(b.1j)5 1.1i(b,c);4(9.s==\'G\'){x=9.N;y=9.M;4(A){x+=f(9,\'V\')+(f(9,\'j\')*2);y+=f(9,\'T\')+(f(9,\'k\')*2)}o 4(1n){x+=f(9,\'V\');y+=f(9,\'T!
\')}o 4(E&&1l.I){x+=f(9,\'j\');y+=f(9,\'k\')}}o{B{U=$.r(3,\'C\');x+=3.
N;y+=3.M;4(A||E){x+=f(3,\'j\');y+=f(3,\'k\');4(A&&U==\'1g\')12=F;4(E&&U==\'1E\')14=F}6=3.R;4(b.t||A){B{4(b.t){v+=3.l;u+=3.n}4(A&&3!=9&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}3=3.S}H(3!=6)}3=6;4(3.s==\'G\'||3.s==\'1e\'){4((1p||(E&&$.I))&&L!=\'1g\'&&L!=\'1f\'){x+=f(3,\'V\');y+=f(3,\'T\')}4((A&&!12&&L!=\'1f\')||(E&&L==\'W\'&&!14)){x+=f(3,\'j\');y+=f(3,\'k\')}1v}}H(3)}p a=e(9,b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}},1i:8(b,c){p x=0,y=0,v=0,u=0,3=1[0],6,b=$.z({Q:F,K:m,O:m,t:F},b||{});B{x+=3.N;y+=3.M;6=3.R;4(b.t){B{v+=3.l;u+=3.n;3=3.S}H(3!=6)}3=6}H(3&&3.s!=\'G\'&&3.s!=\'1e\');p a=e(1[0],b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}}});p f=8(b,a){5 1D($.r(b.1C?b[0]:b,a))||0};p e=8(b,c,x,y,a,d){4(!c.Q){x-=f(b,\'V\');y-=f(b,\'T\')}4(c.K&&($.i.Y||$.i.X)){x+=f(b,\'j\');y+=f(b,\'k\')}o 4(!c.K&&!($.i.Y||$.i.X)){x-=f(b,\'j\');y-=f(b,\'k\')}4(c.O){x+=f(b,\'15\');y+=f(b,\'18\')}4(c.t){a-=b.l;d-=b.n}5 c.t?{1b:y-d,1r:x-a,n:d,l:a}:{1b:y,1r:x}}})(1l);',62,109,'|this||parent|if|return|op|document|f!
unction|elem||||||||window|browser|borderLeftWidth|borderTopWidth|scrollLeft|false|scrollTop|else|var|body|css|tagName|scroll|st|sl|width|||extend|mo|do|position|height|ie|true|BODY|while|boxModel|visible|border|elemPos|offsetTop|offsetLeft|padding|is|margin|offsetParent|parentNode|marginTop|parPos|marginLeft|static|opera|safari|self|documentElement|offsetWidth|absparent|offsetHeight|relparent|paddingLeft|msie|mozilla|paddingTop|fn|innerHeight|top|clientWidth|innerWidth|HTML|fixed|absolute|arguments|offsetLite|lite|apply|jQuery|scrollTo|oa|each|sf|undefined|left|max|Math|paddingRight|break|overflow|borderRightWidth|paddingBottom|clientHeight|borderBottomWidth|scrollWidth|jquery|parseInt|relative|pageYOffset|pageXOffset|scrollHeight|offset|outerWidth|outerHeight'.split('|'),0,{}));
-/**
- * jQuery context menu
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ * http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it accordingly):
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
*/
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px solid #999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px solid #0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var index=hash.length-1;$(this).bind('contextmenu',function(e){var bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return false});return this};function display(index,trigger,e,options){var cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof val=='object'&&defaults[i]){$.extend(defaults[i],val)}else defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8 g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x" 24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E Y="3E"></E><E Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29 3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E" 24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8 i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8 b=2;$(a.q).1T(5(){4(a.M)s;J(8 i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8 t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s 2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m 27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8 b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v 4(a&&a.V){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m 38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8 m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m 3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v G.1Y();1h}4(e.2c>36&&e.2c<3S)s Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x $.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v 2.O=P},2v:5(a){4(a 2x $.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19 $.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8 b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8 i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8 a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8 a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v 4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8 c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8 i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v 4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s m.V?m:k},1I:5(){8 a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v 2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N 1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19 $.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8 i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g y==\'2e\';4(1C&&2.1D)y=$(\'<a 3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v 4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v 2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8 a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8 i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8 a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N 2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8 a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8 f=5(a){8 b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19 $.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19 $.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8 a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19 $.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8 i,U=j(2,\'2G\');4(U.9){2E=19 $.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s 2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v $(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8 r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
/*
Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -211,23 +211,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#EAE8E5',
- border: 'none',
- padding: '4px'
- }
- });
-
wrapBoxes();
}
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-27 08:35:11 UTC (rev 7489)
@@ -624,6 +624,14 @@
font-weight: bold;
}
+.datatable .sortableHeader .sortIndicator {
+ width: 8px;
+ height: 8px;
+ margin-left: 5px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+
.datatable .regularHeader {
white-space: nowrap;
background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
@@ -1079,72 +1087,129 @@
/* Directory Browser
----------------------------------------------- */
-.directoryControl {
- width: 100%;
- background: #fff url(../img/th.bg.inverse.gif) 0 0 repeat-x;
- border-top: 1px solid #d3d2d1;
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
+.directoryBrowser {
margin-top: 10px;
- padding: 7px;
- white-space: nowrap;
}
-.directorySelectControl {
- text-align: left;
- white-space: nowrap;
+.directoryBrowserPathPanel {
+ width: 100%;
+ background: #fff url(../img/th.bg.gif) 0 0 repeat-x;
+ border: 1px solid #d3d2d1;
}
-.directoryClipboard {
+.directoryBrowserPathPanel .treeSwitchOpen {
+ width: 25%;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
text-align: right;
- white-space: nowrap;
}
-.directoryTrash {
- text-align: right;
- white-space: nowrap;
- width: 125px;
+.directoryBrowserPathPanel .treeSwitchClosed {
+ width: 20px;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPathTable {
+.directoryBrowserPathPanel .path {
+ width: auto;
+ padding: 5px;
+}
+
+.directoryBrowserPathPanel .button {
+ color: #576c74;
+ background: none;
+ padding: 2px;
+ border-style: none;
+ font-size: 85%;
+ font-weight: bold;
+}
+
+.directoryBrowserPathPanel .separator {
+ font-weight: bold;
+ color: #888;
+ padding: 2px;
+ border-style: none;
+}
+
+.directoryBrowserMainPanel {
width: 100%;
- background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
- border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
+ border-bottom: 1px solid #d3d2d1;
}
-.directoryPath {
- text-align: left;
+.directoryBrowserTreePanel {
+ vertical-align: top;
+}
+
+.directoryBrowserTreePanel.closed {
+ display: none;
+}
+
+.directoryBrowserTreePanel.open {
+ width: 25%;
padding-left: 5px;
+ padding-right: 5px;
+ border-right: 1px solid #C3BBB6;
}
-.directoryPagerControl {
- text-align: right;
- white-space: nowrap;
+.directoryBrowserTree {
+ overflow-x: auto;
+}
+
+.directoryBrowserControlPanel {
+ width: 100%;
padding: 5px;
+ border-bottom: 1px solid #C3BBB6;
}
-.directoryPath .directoryButton {
- font-weight: bold;
- padding: 2px;
- border-style: none;
+.directoryBrowserControlPanel .pagerSelector {
+ text-align: right;
}
-.directoryPath .directorySeparator {
- font-weight: bold;
- color: #888;
- padding: 2px;
- border-style: none;
+.directoryBrowserControlPanel .clipboard {
+ text-align: left;
}
-.directoryEmpty {
+.directoryBrowserContentPanel {
+ vertical-align: top;
+}
+
+.directoryBrowserContentPanel .pagerTop,
+.directoryBrowserContentPanel .pagerBottom {
+ border: none;
+}
+
+.directoryBrowserContentPanel .onePercentColumn,
+.directoryBrowserContentPanel .tenPercentColumn,
+.directoryBrowserContentPanel .fifteenPercentColumn,
+.directoryBrowserContentPanel .twentyPercentColumn {
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.directoryBrowserContentPanel .directoryEmpty {
padding: 5px;
- border-bottom: 1px solid #d3d2d1;
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
}
+.directoryBrowserContentPanel .directoryEmpty .icon {
+ vertical-align: middle;
+}
+.dirItemIcon {
+ width: 18px;
+ height: 20px;
+}
+
+.dirItemIcon.mouseOver {
+ width: 18px;
+ height: 18px;
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+
/* Form tabs
----------------------------------------------- */
@@ -1383,6 +1448,107 @@
.userInfoEntryLink:hover {color: #666}
+/* Click Menu/Context Menu
+----------------------------------------------- */
+
+#root-menu-div ul {
+ border: 1px solid #C3BBB6;
+ background-color: #fff;
+}
+
+#root-menu-div li{
+ white-space:nowrap;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+}
+
+* html #root-menu-div li{
+ height: 1.5em; /* fixing ie6 problem */
+}
+
+ul.menu, #root-menu-div ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+li.menu-separator.active{
+ background-color: transparent;
+}
+
+li.active {
+ background-color: #eae8e5;
+}
+
+.activetarget {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+* html div.menu-item {
+ display: inline; /* fixes problem in ie6 */
+}
+
+li.menumain {
+ float: left;
+ padding: 0;
+ margin: 0;
+
+}
+
+div.menu-item {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+div.menu-item a {
+ color: #576c74;
+ text-decoration: none;
+}
+
+img.menu-item-arrow{
+ position: absolute;
+ right: 4px;
+ top: 8px;
+}
+
+li.menu-separator {
+ border-bottom: 1px solid #000;
+ font-size: 0; /* for ie */
+ height: 0;
+ line-height: 0; /* for ie */
+ margin: 2px 0;
+}
+
+.contextMenuItems {
+ display: none;
+}
+
+
+/* Trees
+----------------------------------------------- */
+
+.rich-tree-node {
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted {
+ color: #576c74;
+ text-decoration: none;
+}
+
+.rich-tree-node-selected {
+ font-weight: bold;
+ border: none;
+}
+
+.directoryTreeLabel {
+ padding-top: 2px;
+ cursor: pointer;
+}
+
+
/* User Control
----------------------------------------------- */
Modified: trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/js/jqueryPlugins.js 2008-02-27 08:35:11 UTC (rev 7489)
@@ -94,10 +94,22 @@
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){p g=$.19.D,w=$.19.w;$.19.z({D:8(){4(1[0]==h)5 Z.1a||$.I&&7.10.1z||7.q.1z;4(1[0]==7)5 1t.1s(7.q.1H,7.q.13);5 g.1k(1,1h)},w:8(){4(1[0]==h)5 Z.1d||$.I&&7.10.1c||7.q.1c;4(1[0]==7)5 1t.1s(7.q.1B,7.q.11);5 w.1k(1,1h)},1a:8(){5 1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13-f(1,\'k\')-f(1,\'1A\'):1.D()+f(1,\'18\')+f(1,\'1y\')},1d:8(){5 1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11-f(1,\'j\')-f(1,\'1x\'):1.w()+f(1,\'15\')+f(1,\'1u\')},1K:8(){5 1[0]==h||1[0]==7?1.D():1.P(\':J\')?1[0].13:1.D()+f(1,\'k\')+f(1,\'1A\')+f(1,\'18\')+f(1,\'1y\')},1J:8(){5 1[0]==h||1[0]==7?1.w():1.P(\':J\')?1[0].11:1.w()+f(1,\'j\')+f(1,\'1x\')+f(1,\'15\')+f(1,\'1u\')},l:8(a){4(a!=1q)5 1.1!
o(8(){4(1==h||1==7)h.1m(a,$(h).n());o 1.l=a});4(1[0]==h||1[0]==7)5 Z.1G||$.I&&7.10.l||7.q.l;5 1[0].l},n:8(a){4(a!=1q)5 1.1o(8(){4(1==h||1==7)h.1m($(h).l(),a);o 1.n=a});4(1[0]==h||1[0]==7)5 Z.1F||$.I&&7.10.n||7.q.n;5 1[0].n},C:8(c,d){p a=1[0],3=a.S,6=a.R,c=$.z({Q:m,K:m,O:m,t:m},c||{}),x=a.N,y=a.M,v=a.l,u=a.n;4($.i.17||$.i.16){x+=f(a,\'j\');y+=f(a,\'k\')}4(($.i.Y||$.i.X)&&$.r(6,\'C\')!=\'W\'){x-=f(6,\'j\');y-=f(6,\'k\')}4($.i.17){B{4(3!=a&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}4(3==6)1v}H((3=3.S)&&3.s!=\'G\')}4($.i.16&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\')){B{x+=6.N;y+=6.M;x+=f(6,\'j\');y+=f(6,\'k\')}H((6=6.R)&&(6.s!=\'G\'&&$.r(6,\'C\')==\'W\'))}p b=e(a,c,x,y,v,u);4(d){$.z(d,b);5 1}o{5 b}},1I:8(b,c){p x=0,y=0,v=0,u=0,9=1[0],3=1[0],6,U,L=$.r(9,\'C\'),A=$.i.17,E=$.i.16,1p=$.i.Y,1n=$.i.X,12=m,14=m,b=$.z({Q:F,K:m,O:m,t:F,1j:m},b||{});4(b.1j)5 1.1i(b,c);4(9.s==\'G\'){x=9.N;y=9.M;4(A){x+=f(9,\'V\')+(f(9,\'j\')*2);y+=f(9,\'T\')+(f(9,\'k\')*2)}o 4(1n){x+=f(9,\'V\');y+=f(9,\'T!
\')}o 4(E&&1l.I){x+=f(9,\'j\');y+=f(9,\'k\')}}o{B{U=$.r(3,\'C\');x+=3.
N;y+=3.M;4(A||E){x+=f(3,\'j\');y+=f(3,\'k\');4(A&&U==\'1g\')12=F;4(E&&U==\'1E\')14=F}6=3.R;4(b.t||A){B{4(b.t){v+=3.l;u+=3.n}4(A&&3!=9&&$.r(3,\'1w\')!=\'J\'){x+=f(3,\'j\');y+=f(3,\'k\')}3=3.S}H(3!=6)}3=6;4(3.s==\'G\'||3.s==\'1e\'){4((1p||(E&&$.I))&&L!=\'1g\'&&L!=\'1f\'){x+=f(3,\'V\');y+=f(3,\'T\')}4((A&&!12&&L!=\'1f\')||(E&&L==\'W\'&&!14)){x+=f(3,\'j\');y+=f(3,\'k\')}1v}}H(3)}p a=e(9,b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}},1i:8(b,c){p x=0,y=0,v=0,u=0,3=1[0],6,b=$.z({Q:F,K:m,O:m,t:F},b||{});B{x+=3.N;y+=3.M;6=3.R;4(b.t){B{v+=3.l;u+=3.n;3=3.S}H(3!=6)}3=6}H(3&&3.s!=\'G\'&&3.s!=\'1e\');p a=e(1[0],b,x,y,v,u);4(c){$.z(c,a);5 1}o{5 a}}});p f=8(b,a){5 1D($.r(b.1C?b[0]:b,a))||0};p e=8(b,c,x,y,a,d){4(!c.Q){x-=f(b,\'V\');y-=f(b,\'T\')}4(c.K&&($.i.Y||$.i.X)){x+=f(b,\'j\');y+=f(b,\'k\')}o 4(!c.K&&!($.i.Y||$.i.X)){x-=f(b,\'j\');y-=f(b,\'k\')}4(c.O){x+=f(b,\'15\');y+=f(b,\'18\')}4(c.t){a-=b.l;d-=b.n}5 c.t?{1b:y-d,1r:x-a,n:d,l:a}:{1b:y,1r:x}}})(1l);',62,109,'|this||parent|if|return|op|document|f!
unction|elem||||||||window|browser|borderLeftWidth|borderTopWidth|scrollLeft|false|scrollTop|else|var|body|css|tagName|scroll|st|sl|width|||extend|mo|do|position|height|ie|true|BODY|while|boxModel|visible|border|elemPos|offsetTop|offsetLeft|padding|is|margin|offsetParent|parentNode|marginTop|parPos|marginLeft|static|opera|safari|self|documentElement|offsetWidth|absparent|offsetHeight|relparent|paddingLeft|msie|mozilla|paddingTop|fn|innerHeight|top|clientWidth|innerWidth|HTML|fixed|absolute|arguments|offsetLite|lite|apply|jQuery|scrollTo|oa|each|sf|undefined|left|max|Math|paddingRight|break|overflow|borderRightWidth|paddingBottom|clientHeight|borderBottomWidth|scrollWidth|jquery|parseInt|relative|pageYOffset|pageXOffset|scrollHeight|offset|outerWidth|outerHeight'.split('|'),0,{}));
-/**
- * jQuery context menu
+/*
+ * jQuery Menu plugin
+ * Version: 0.0.9
+ *
+ * Copyright (c) 2007 Roman Weich
+ * http://p.sohei.org
+ *
+ * Dual licensed under the MIT and GPL licenses
+ * (This means that you can choose the license that best suits your project, and use it accordingly):
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Changelog:
+ * v 0.0.9 - 2008-01-19
*/
-(function($){var menu,shadow,trigger,content,hash,currentTarget;var defaults={menuStyle:{listStyle:'none',padding:'1px',margin:'0px',backgroundColor:'#fff',border:'1px solid #999',width:'100px'},itemStyle:{margin:'0px',color:'#000',display:'block',cursor:'default',padding:'3px',border:'1px solid #fff',backgroundColor:'transparent'},itemHoverStyle:{border:'1px solid #0a246a',backgroundColor:'#b6bdd2'},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('<div id="jqContextMenu"></div>').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('<div></div>').css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHove!
rStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var index=hash.length-1;$(this).bind('contextmenu',function(e){var bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return false});return this};function display(index,trigger,e,options){var cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,m!
enu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click'
,function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof val=='object'&&defaults[i]){$.extend(defaults[i],val)}else defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()});
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){8 g=[],B=[],G=12=k,3c=$(\'<E Y="1g-E 3x" 24="1Z:3h;1i:0;1w:0;2r:2X;"><E Y="3G"></E><E Y="3E"></E><E Y="3C"></E></E>\')[0],2L=$(\'<29 Y="1g-29 3q"></29>\')[0],2H=$(\'<X 24="1Z:3j;"><E Y="1g-1k"></E></X>\')[0],3g=$(\'<3Q Y="1g-1k-3P" />\')[0],$1V=$(\'<E 3N="3M-1g-E" 24="1Z:3h;1i:0;1w:0;"></E>\'),1P={34:31,2Y:31,2p:0,2V:0,2U:0,1J:0,2B:k,2i:k,1r:k,2d:k,2M:Q,2J:Q};$(5(){$1V.3s(\'3p\')});$.R({25:5(a){2.11=[];2.1s(a)}});$.R($.25,{1X:{1s:5(a){4(a&&a.9){J(8 i=0;i<a.9;i++){2.2y(a[i]);a[i].V=2}}},2y:5(a){4(a 2x $.C)2.11.16(a);a.V=2;8 b=2;$(a.q).1T(5(){4(a.M)s;J(8 i=0;i<b.11.9;i++){4(b.11[i].M){b.11[i].W();a.14();s}}},5(){})}}});$.R({C:5(a,b,c){2.l=[];2.1c=[];!
2.M=Q;2.O=Q;2.N=k;2.u=$.R({},1P,c);2.q=a;2.$w=k;2.$1q=k;2.17=k;2.V=k;2.1L=k;2.1s();4(b&&b.2T==2S)2.2Q(b)}});$.R($.C,{2m:5(e){8 t=e.q;4(B.9&&t==B[0].q)s;1y(t.2t&&t.2t!=$1V[0])t=t.2t;4(!$(B).3B(5(){s 2.$w[0]==t}).9){$.C.1n()}},2f:5(e){3A(e.2c){1m 13:4(12)12.1a(e,12.$p[0]);1h;1m 27:$.C.1n();1h;1m 37:4(!G)G=B[0];8 a=G;4(a&&a.N){8 b=a.N;b.$p.K(\'1F\').K(\'1E\');a.W();b.15(P);2l(5(){b.23()})}v 4(a&&a.V){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(--c<0)c=F.9-1;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}1h;1m 38:4(G)G.1Y(-1);1h;1m 39:4(!G)G=B[0];8 m,a=G,1t=12?12.x:k;4(a){4(1t&&1t.l.9){1t.14();1t.l[0].15()}v 4((a=a.2C())){8 c,F=a.V.11;4((c=$.18(a,F))>-1){4(++c>=F.9)c=0;$.C.1n();F[c].14();F[c].Z();4(F[c].l.9)F[c].l[0].15(P)}}}1h;1m 3i:4(!G){4(B.9&&B[0].l.9)B[0].l[0].15()}v G.1Y();1h}4(e.2c>36&&e.2c<3S)s Q},1n:5(){1y(B.9)B[0].W()},3R:5(d){$.R(1P,d)},1X:{1s:5(){8 a=2;4(!2.q)s;v 4(2.q 2x $.1j){2.N=2.q;2.q.3f(2);2.q=2.q.$p}g.16(2);2.$w=$(3c.1A(1));2.$1q=$(2L.1A(1));2.$w[0].1z(2.$1q[!
0]);$1V[0].1z(2.$w[0]);4(!2.N){$(2.q).1a(5(e){a.1r(e)}).1T(5(e){a.Z();
4(a.u.2p){a.1L=2l(5(){4(!a.M)a.1r(e)},a.u.2p)}},5(){4(!a.M)$(2).1W(\'2w\');4(a.1L)3e(a.1L)})}v{2.$w.1T(5(){a.Z()},5(){})}},Z:5(){4(!2.N)$(2.q).10(\'2w\');v 2.O=P},2v:5(a){4(a 2x $.1j){4($.18(a,2.l)==-1){2.$1q.3O(a.$p);2.l.16(a);a.A=2;4(a.x)2.1c.16(a.x)}}v{2.2v(19 $.1j(a,2.u))}},2Q:5(a){J(8 i=0;i<a.9;i++){2.2v(a[i])}},3d:5(a){8 b=$.18(a,2.l);4(b>-1)2.l.1U(b,1);a.A=k},W:5(){4(!2.M)s;8 i,I=$.18(2,B);2.$w.W();4(I>=0)B.1U(I,1);2.M=2.O=Q;$(2.q).1W(\'2w\');J(i=0;i<2.1c.9;i++){2.1c[i].W()}J(i=0;i<2.l.9;i++){4(2.l[i].O)2.l[i].1S()}4(!B.9)$(2u).K(\'3b\',$.C.2m).K(\'3a\',$.C.2f);4(G==2)G=k;4(2.u.2i)2.u.2i.1R(2)},14:5(e){4(2.M)s;8 a,D=2.N;4(2.l.9){4(D){a=35(D.A.$w.1e(\'z-33\'));2.$w.1e(\'z-33\',(3L(a)?1:a+1))}2.$w.1e({32:\'3K\',2r:\'3J\'});4(2.u.1J){4(2.$w.L()<2.u.1J)2.$w.1e(\'L\',2.u.1J)}2.30();2.$w.1e({2r:\'2X\',32:\'\'}).14();4($.2Z.3I)2.$1q.1e(\'L\',35($.2Z.3H)==6?2.$w.L()-7:2.$1q.L());4(2.u.2B)2.u.2B.1R(2)}4(B.9==0)$(2u).2W(\'3b\',$.C.2m).2W(\'3a\',$.C.2f);2.M=P;B.16(2)},30:5(){8 a!
,o,S,H,1N,1b,1o,2o=$(1K).L(),1p=$(1K).T(),D=2.N,T=2.$w[0].2R,L=2.$w[0].3F,1M;4(D){o=D.$p.2q();S=o.1w+D.$p.L();H=o.1i}v{a=$(2.q);o=a.2q();S=o.1w+2.u.2U;H=o.1i+a.T()+2.u.2V}4($.2s.2P){1b=$(1K).2P();4(1p<T){H=1b}v 4(1p+1b<H+T){4(D){1N=D.A.$w.2q();1M=D.A.$w[0].2R;4(T<=1M){H=1N.1i+1M-T}v{H=1N.1i}4(1p+1b<H+T){H-=H+T-(1p+1b)}}v{H-=H+T-(1p+1b)}}}4($.2s.2O){1o=$(1K).2O();4(2o+1o<S+L){4(D){S-=D.$p.L()+L;4(S<1o)S=1o}v{S-=S+L-(2o+1o)}}}2.$w.1e({1w:S,1i:H})},1r:5(e){4(2.M){2.W();2.Z()}v{$.C.1n();2.14(e)}},2k:5(a,b){8 c=2;2.17=2l(5(){a.1R(c);c.17=k},b)},1d:5(){4(2.17){3e(2.17);2.17=k}},1Y:5(a){8 i,I=0,1O=2.l.9,o=a||1;J(i=0;i<1O;i++){4(2.l[i].O){I=i;1h}}2.l[I].2j();3D{I+=o;4(I>=1O)I=0;v 4(I<0)I=1O-1}1y(2.l[I].1Q);2.l[I].15(P)},2C:5(){8 m=2;1y(m.N)m=m.N.A;s m.V?m:k},1I:5(){8 a,1k;2.W();4(!2.N)$(2.q).K(\'1a\').K(\'1E\').K(\'1F\');v 2.$w.K(\'1E\').K(\'1F\');1y(2.l.9){1k=2.l[0];1k.1I();2N 1k}4((a=$.18(2,g))>-1)g.1U(a,1);4(2.V){4((a=$.18(2,2.V.11))>-1)2.V.11.1U(a,1)}2.$w.2h()}}});$.R({1j:5(a,b!
){4(2g a==\'2e\')a={y:a};2.y=a.y||\'\';2.1D=a.1D||k;2.20=a.q||k;2.10=a
.10||k;2.1B=a.1B||k;2.$p=k;2.A=k;2.x=k;2.u=$.R({},1P,b);2.O=Q;2.1l=P;2.1Q=Q;2.1s();4(a.x)19 $.C(2,a.x,b)}});$.R($.1j,{1X:{1s:5(){8 i,1C,y=2.y,2b=2;2.$p=$(2H.1A(1));4(2.10)2.$p[0].2K(\'Y\',2.10);4(2.u.2M&&2.1B)2.$p[0].3z=2.1B;4(y==\'\'){2.$p.10(\'1g-1Q\');2.1Q=P}v{1C=2g y==\'2e\';4(1C&&2.1D)y=$(\'<a 3y="\'+2.1D+\'"\'+(2.20?\'q="\'+2.20+\'"\':\'\')+\'>\'+y+\'</a>\');v 4(1C||!y.9)y=[y];J(i=0;i<y.9;i++){4(2g y[i]==\'2e\'){2a=2u.3w(\'3v\');2a.3t=y[i];2.$p[0].1u.1z(2a)}v 2.$p[0].1u.1z(y[i].1A(1))}}2.$p.1a(5(e){2b.1a(e,2)});2.23()},1a:5(e,a){4(2.1l&&2.u.1r)2.u.1r.1R(a,e,2)},23:5(){8 a=2;2.$p.1T(5(){a.15()},5(){a.2j()})},15:5(a){2.1d();8 i,1f=2.A.1c,D=2.A.l,2b=2;4(2.A.17)2.A.1d();4(!2.1l)s;J(i=0;i<D.9;i++){4(D[i].O)D[i].1S()}2.Z();G=2.A;J(i=0;i<1f.9;i++){4(1f[i].M&&1f[i]!=2.x&&!1f[i].17)1f[i].2k(5(){2.W()},1f[i].u.2Y)}4(2.x&&!a){2.x.2k(5(){2.14()},2.x.u.34)}},2j:5(){2.1d();4(!2.1l)s;4(!2.x||!2.x.M)2.1S()},1d:5(){4(2.x){2.x.1d()}},Z:5(){2.O=P;2.$p.10(\'O\');8 a=2.A.N;4(a&&!a.O)a.Z();!
12=2},1S:5(){2.O=Q;2.$p.1W(\'O\');4(2==12)12=k},3r:5(){2.$p.1W(\'2I\');2.1l=P},3u:5(){2.$p.10(\'2I\');2.1l=Q},1I:5(){2.1d();2.$p.2h();2.$p.K(\'1E\').K(\'1F\').K(\'1a\');4(2.x){2.x.1I();2N 2.x}2.A.3d(2)},3f:5(b){4(2.x)s;2.x=b;4(2.A&&$.18(b,2.A.1c)==-1)2.A.1c.16(b);4(2.u.2d){8 a=3g.1A(0);a.2K(\'y\',2.u.2d);2.$p[0].1u.1z(a)}}}});$.R($.2s,{28:5(c,d,e){8 f=5(a){8 b=[],1v,1G,U,$X,i,1H,3o,q,26=k;U=j(a,\'2G\');J(i=0;i<U.9;i++){1v=[];4(!U[i].1x.9){b.16(19 $.1j(\'\',c));3n}4((1H=h(U[i],\'2n\'))){1v=f(1H);$(1H).2h()}$X=$(U[i]);4($X[0].1x.9==1&&$X[0].1x[0].22==3)q=$X[0].1x[0].3m;v q=$X[0].1x;4(c&&c.2J)26=$X.3l(\'Y\');1G=19 $.1j({y:q,10:26},c);b.16(1G);4(1v.9)19 $.C(1G,1v,c)}s b};s 2.2z(5(){8 a,m;4(d||(a=h(2,\'2n\'))){a=d?$(d).3k(P)[0]:a;l=f(a);4(l.9){m=19 $.C(2,l,c);4(e)e.2y(m)}$(a).W()}})},2F:5(a){s 2.2z(5(){8 i,U=j(2,\'2G\');4(U.9){2E=19 $.25();J(i=0;i<U.9;i++)$(U[i]).28(a,k,2E)}})},1g:5(a,b){s 2.2z(5(){4(b&&b.2T==2S)19 $.C(2,b,a);v{4(2.21.2A()==\'2n\')$(2).2F(a);v $(2).28(a,b)}})}})!
;8 h=5(a,b){4(!a)s k;8 n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)s n
}s k};8 j=5(a,b){4(!a)s[];8 r=[],n=a.1u;J(;n;n=n.2D){4(n.22==1&&n.21.2A()==b)r[r.9]=n}s r}})(3T);',62,242,'||this||if|function|||var|length|||||||||||null|menuItems||||eLI|target||return||settings|else|eDIV|subMenu|src||parentMenu|visibleMenus|Menu|pmi|div|mcm|activeMenu|posY|pos|for|unbind|width|visible|parentMenuItem|active|true|false|extend|posX|height|lis|menuCollection|hide|li|class|setActive|addClass|menus|activeItem||show|hoverIn|push|timer|inArray|new|click|wst|subMenus|removeTimer|css|pms|menu|break|top|MenuItem|item|enabled|case|closeAll|wsl|wh|eUL|onClick|init|asm|firstChild|subItems|left|childNodes|while|appendChild|cloneNode|data|isStr|url|mouseover|mouseout|menuItem|subUL|destroy|minWidth|window|openTimer|pheight|pmo|mil|defaults|separator|call|setInactive|hover|splice|rootDiv|removeClass|prototype|selectNextItem|position|urlTarget|nodeName|nodeType|bindHover|style|MenuCollection|classNames||menuFromElement|ul|elem|self|keyCode|arrowSrc|string|checkKey|typeof|r!
emove|onClose|hoverOut|addTimer|setTimeout|checkMouse|UL|ww|hoverOpenDelay|offset|display|fn|parentNode|document|addItem|activetarget|instanceof|addMenu|each|toUpperCase|onOpen|inMenuCollection|nextSibling|bar|menuBarFromUL|LI|menuItemElement|disabled|copyClassAttr|setAttribute|menuULElement|addExpando|delete|scrollLeft|scrollTop|addItems|clientHeight|Array|constructor|offsetLeft|offsetTop|bind|none|hideDelay|browser|setPosition|200|visibility|index|showDelay|parseInt|||||keydown|mousedown|menuDIVElement|removeItem|clearTimeout|addSubMenu|arrowElement|absolute|40|relative|clone|attr|nodeValue|continue|submenu|body|innerbox|enable|appendTo|innerHTML|disable|span|createElement|outerbox|href|menuData|switch|filter|shadowbox3|do|shadowbox2|clientWidth|shadowbox1|version|msie|block|hidden|isNaN|root|id|append|arrow|img|setDefaults|41|jQuery'.split('|'),0,{}));
/*
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -205,22 +205,6 @@
}
function initPage() {
- $.contextMenu.defaults({
- shadow: false,
- menuStyle: {
- padding: '0',
- width: '200px'
- },
- itemStyle: {
- border: 'none',
- padding: '4px'
- },
- itemHoverStyle: {
- backgroundColor: '#f5f5f5',
- border: 'none',
- padding: '4px'
- }
- });
wrapBoxes();
}
@@ -288,7 +272,7 @@
<h3>Controls</h3>
<s:fragment rendered="#{not empty currentDocument and not empty currentDocument.id}">
-
+
<h:outputLink styleClass="linkNavigation" value="#{wikiURLRenderer.renderPermURL(currentDocument)}" target="_top">
<h:outputText value="#{messages['lacewiki.label.PermLink']}"/>
</h:outputLink>
@@ -299,7 +283,9 @@
</s:fragment>
- <ui:insert name="controlTwo"/>
+ <s:div id="control">
+ <ui:insert name="controlTwo"/>
+ </s:div>
</div>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
@@ -321,6 +307,7 @@
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</s:div>
+ <!--
<div style="margin-top: 25px; margin-left: 15px; margin-right: 15px; ">
<h2>See Seam in action...</h2>
<p>
@@ -331,6 +318,7 @@
<a href="http://www.seamframework.org/Download">Seam download package</a>.
</p>
</div>
+ -->
<div style="margin-top: 25px; margin-left: 15px; margin-right: 15px; ">
<h2>Built with Seam</h2>
Modified: trunk/examples/wiki/view/uploadCreate_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,8 +16,8 @@
<ui:define name="controlTwo">
<s:link id="exit" styleClass="linkNavigation" action="exit"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadCreate_m.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadCreate_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -15,8 +15,8 @@
<ui:define name="control">
<s:link id="exit" styleClass="linkNavigation" action="exit"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -18,8 +18,8 @@
<ui:define name="controlTwo">
<s:link id="exit" styleClass="linkNavigation sessionEventTrigger" action="exit"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/uploadEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_m.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/uploadEdit_m.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -16,8 +16,8 @@
<ui:define name="control">
<s:link id="exit" styleClass="linkNavigation" action="exit"
- accesskey="#{messages['lacewiki.button.ExitEditor.accesskey']}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.ExitEditor']}"/>
+ accesskey="#{messages['lacewiki.button.Close.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
</s:link>
</ui:define>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-02-26 19:18:37 UTC (rev 7488)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-02-27 08:35:11 UTC (rev 7489)
@@ -30,6 +30,10 @@
<ui:define name="content">
+ <script type="text/javascript">jQuery(function() {
+ jQuery(".contextMenu").show().menu({offsetLeft: 20});
+ })</script>
+
<h:form id="userSearchForm" styleClass="box">
<div class="form" id="userSearchControl">
@@ -129,13 +133,12 @@
rendered="#{usersList.rowCount >0}"
styleClass="datatable topLeftBottomBorder smallFont"
headerClass="sortableHeader rightBorder alignCenter"
- columnClasses="tenPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- twentyPercentColumn rightBorder alignLeft,
- defaultColumn rightBorder alignLeft,
- tenPercentColumn rightBorder alignCenter"
+ columnClasses="defaultColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft,
+ fifteenPercentColumn rightBorder alignLeft"
rowClasses="rowOdd,rowEven"
cellpadding="0" cellspacing="0" border="0">
@@ -149,15 +152,30 @@
<h:outputText value="#{messages['lacewiki.label.userList.Username']}"/>
</h:commandLink>
</f:facet>
- <s:fragment rendered="#{u.admin or u.guest}">
- <h:outputText value="#{u.username}"/>
- </s:fragment>
- <s:fragment rendered="#{not u.admin and not u.guest}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+
+ <div class="contextMenu">
+ <h:outputLink value="javascript://no-op">
<h:outputText value="#{u.username}"/>
</h:outputLink>
<h:outputText rendered="#{!u.activated}" value=" (#{messages['lacewiki.label.userList.NotActivated']})"/>
- </s:fragment>
+ <ul>
+ <li>
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+ <h:outputText value="#{messages['lacewiki.label.userList.View']}"/>
+ </h:outputLink>
+ </li>
+
+ <s:fragment rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
+ <li>
+ <s:link view="/userHome_#{skin}.xhtml" propagation="none">
+ <f:param name="userId" value="#{u.id}"/>
+ <h:outputText value="#{messages['lacewiki.label.userList.Edit']}"/>
+ </s:link>
+ </li>
+ </s:fragment>
+ </ul>
+ </div>
+
</h:column>
<h:column>
@@ -230,13 +248,6 @@
<h:outputText value="-" rendered="#{empty u.lastLoginOn}"/>
</h:column>
- <h:column rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
- <s:link styleClass="buttonNonpersistent" view="/userHome_#{skin}.xhtml" propagation="none">
- <f:param name="userId" value="#{u.id}"/>
- <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.userList.Edit']}"/>
- </s:link>
- </h:column>
-
</h:dataTable>
</h:form>
16 years, 9 months
Seam SVN: r7488 - in trunk/src: test/unit/org/jboss/seam/test/unit and 1 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-02-26 14:18:37 -0500 (Tue, 26 Feb 2008)
New Revision: 7488
Added:
trunk/src/main/org/jboss/seam/web/IncomingPattern.java
trunk/src/main/org/jboss/seam/web/OutgoingPattern.java
trunk/src/main/org/jboss/seam/web/Pattern.java
trunk/src/main/org/jboss/seam/web/Rewrite.java
trunk/src/main/org/jboss/seam/web/RewriteFilter.java
trunk/src/main/org/jboss/seam/web/RewritingResponse.java
trunk/src/test/unit/org/jboss/seam/test/unit/web/RewriteTest.java
Modified:
trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml
Log:
JBSEAM-274
Added: trunk/src/main/org/jboss/seam/web/IncomingPattern.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/IncomingPattern.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/IncomingPattern.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,149 @@
+package org.jboss.seam.web;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+
+public class IncomingPattern {
+ String view;
+ String pattern;
+
+ java.util.regex.Pattern regexp;
+ List<String> regexpArgs = new ArrayList<String>();
+
+ public IncomingPattern(String view, String pattern) {
+ this.view = view;
+ this.pattern = pattern;
+
+ parsePattern(pattern);
+ }
+
+ public Rewrite rewrite(String path) {
+ return new IncomingRewrite(path);
+ }
+
+ public void parsePattern(String value) {
+ StringBuffer expr = new StringBuffer();
+
+ expr.append("^");
+ while (value.length()>0) {
+ int pos = value.indexOf('{');
+ if (pos == -1) {
+ expr.append(regexpLiteral(value));
+ value = "";
+ } else {
+ int pos2 = value.indexOf('}');
+ if (pos2 == -1) {
+ throw new IllegalArgumentException("invalid pattern");
+ }
+ expr.append(regexpLiteral(value.substring(0,pos)));
+ String arg = value.substring(pos+1,pos2);
+ expr.append(regexpArg(arg));
+ regexpArgs.add(arg);
+ value = value.substring(pos2+1);
+ }
+ }
+ expr.append("$");
+
+ regexp = java.util.regex.Pattern.compile(expr.toString());
+ }
+
+ private String regexpArg(String substring) {
+ return "([^/]+)";
+ }
+
+ private String regexpLiteral(String value) {
+ StringBuffer res = new StringBuffer();
+ for (int i=0; i<value.length(); i++) {
+ char c = value.charAt(i);
+
+ if (Character.isLetterOrDigit(c)) {
+ res.append(c);
+ } else {
+ res.append('\\').append(c);
+ }
+ }
+ return res.toString();
+ }
+
+
+ public class IncomingRewrite
+ implements Rewrite
+ {
+ String incoming;
+ String queryArgs;
+
+ Boolean isMatch = null;
+ private List<String> matchedArgs = new ArrayList<String>();
+
+ public IncomingRewrite(String incoming) {
+ int queryPos = incoming.indexOf('?');
+
+ if (queryPos == -1) {
+ this.incoming = incoming;
+ this.queryArgs = "";
+ } else {
+ this.incoming = incoming.substring(0, queryPos);
+ this.queryArgs = incoming.substring(queryPos+1);
+ }
+
+ this.incoming = stripTrailingSlash(this.incoming);
+ }
+
+ private String stripTrailingSlash(String text) {
+ if (text.endsWith("/")) {
+ return stripTrailingSlash(text.substring(0,text.length()-1));
+ }
+ return text;
+ }
+
+ public boolean isMatch() {
+ if (isMatch == null) {
+ isMatch = match();
+ }
+ return isMatch;
+ }
+
+ protected boolean match() {
+ if (incoming==null) {
+ return false;
+ }
+
+ Matcher matcher = regexp.matcher(incoming);
+ if (matcher.find()) {
+ for (int i=0; i<regexpArgs.size(); i++) {
+ matchedArgs.add(matcher.group(i+1));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ public String rewrite() {
+ StringBuffer result = new StringBuffer();
+ result.append(view);
+
+ boolean first = true;
+
+ if (queryArgs.length()>0) {
+ result.append('?').append(queryArgs);
+ first = false;
+ }
+
+ for (int i=0; i<regexpArgs.size(); i++) {
+ String key = regexpArgs.get(i);
+ String value = matchedArgs.get(i);
+
+ if (first) {
+ result.append('?');
+ first = false;
+ } else {
+ result.append('&');
+ }
+ result.append(key).append('=').append(value);
+ }
+
+ return result.toString();
+ }
+ }
+}
Added: trunk/src/main/org/jboss/seam/web/OutgoingPattern.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/OutgoingPattern.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/OutgoingPattern.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,129 @@
+package org.jboss.seam.web;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OutgoingPattern {
+ String view;
+ String pattern;
+
+ List<String> parts = new ArrayList<String>();
+
+ public OutgoingPattern(String view, String pattern) {
+ this.view = view;
+ this.pattern = pattern;
+
+ parsePattern(pattern);
+ }
+
+ public Rewrite rewrite(String path) {
+ return new OutgoingRewrite(path);
+ }
+
+ private void parsePattern(String value) {
+ while (value.length()>0) {
+ int pos = value.indexOf('{');
+ if (pos == -1) {
+ parts.add(value);
+ value = "";
+ } else {
+ int pos2 = value.indexOf('}');
+ if (pos2 == -1) {
+ throw new IllegalArgumentException("invalid pattern");
+ }
+ parts.add(value.substring(0,pos));
+ parts.add(value.substring(pos,pos2+1));
+ value = value.substring(pos2+1);
+ }
+ }
+ }
+
+ public class OutgoingRewrite
+ implements Rewrite
+ {
+ Boolean isMatch;
+
+ private String base;
+ private List<String> queryArgs = new ArrayList<String>();
+ private List<String> matchedArgs = new ArrayList<String>();
+
+ public OutgoingRewrite(String outgoing) {
+ int queryPos = outgoing.indexOf('?');
+
+ if (queryPos == -1) {
+ this.base = outgoing;
+ } else {
+ this.base = outgoing.substring(0, queryPos);
+ parseArgs(outgoing.substring(queryPos+1));
+ }
+ }
+
+ private void parseArgs(String text) {
+ for (String part: text.split("\\&")) {
+ queryArgs.add(part);
+ }
+ }
+
+ public boolean isMatch() {
+ if (isMatch == null) {
+ isMatch = match();
+ }
+ return isMatch;
+ }
+
+ private boolean match() {
+ if (!base.equals(view)) {
+ return false;
+ }
+
+ for (String part: parts) {
+ if (part.startsWith("{") && part.endsWith("}")) {
+ String name = part.substring(1,part.length()-1);
+ String value = matchArg(name);
+
+ if (value == null) {
+ return false;
+ }
+
+ matchedArgs.add(value);
+ }
+ }
+
+ return true;
+ }
+
+ private String matchArg(String argName) {
+ for (int i=0; i<queryArgs.size(); i++) {
+ String query = queryArgs.get(i);
+ int pos = query.indexOf("=");
+
+ if (query.subSequence(0, pos).equals(argName)) {
+ queryArgs.remove(i);
+ return query.substring(pos+1);
+ }
+ }
+ return null;
+ }
+
+ public String rewrite() {
+ StringBuffer res = new StringBuffer();
+
+ int matchedPosition = 0;
+ for (String part: parts) {
+ if (part.startsWith("{")) {
+ res.append(matchedArgs.get(matchedPosition++));
+ } else {
+ res.append(part);
+ }
+ }
+
+ char sep = '?';
+ for (String arg: queryArgs) {
+ res.append(sep).append(arg);
+ sep = '&';
+ }
+
+ return res.toString();
+ }
+ }
+}
Added: trunk/src/main/org/jboss/seam/web/Pattern.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/Pattern.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/Pattern.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,35 @@
+package org.jboss.seam.web;
+
+public class Pattern
+{
+ String view;
+ String pattern;
+
+ IncomingPattern inPattern;
+ OutgoingPattern outPattern;
+
+ public Pattern(String view, String pattern) {
+ this.view = view;
+ this.pattern = pattern;
+
+ inPattern = new IncomingPattern(view, pattern);
+ outPattern = new OutgoingPattern(view, pattern);
+ }
+
+ public Rewrite matchIncoming(String path) {
+ return returnIfMatch(inPattern.rewrite(path));
+ }
+
+ public Rewrite matchOutgoing(String path) {
+ return returnIfMatch(outPattern.rewrite(path));
+ }
+
+ @Override
+ public String toString() {
+ return "Pattern(" + view + ":" + pattern + ")";
+ }
+
+ private Rewrite returnIfMatch(Rewrite rewrite) {
+ return rewrite.isMatch() ? rewrite : null;
+ }
+}
Added: trunk/src/main/org/jboss/seam/web/Rewrite.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/Rewrite.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/Rewrite.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,6 @@
+package org.jboss.seam.web;
+
+public interface Rewrite {
+ public boolean isMatch();
+ public String rewrite();
+}
Added: trunk/src/main/org/jboss/seam/web/RewriteFilter.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/RewriteFilter.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/RewriteFilter.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,120 @@
+package org.jboss.seam.web;
+
+import static org.jboss.seam.ScopeType.APPLICATION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Map;
+import java.util.TreeSet;
+import java.util.Map.Entry;
+
+import javax.servlet.FilterChain;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.annotations.web.Filter;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+
+@Scope(APPLICATION)
+@Name("org.jboss.seam.web.rewriteFilter")
+@Install(precedence = BUILT_IN, classDependencies="javax.faces.context.FacesContext")
+@BypassInterceptors
+@Filter(around="org.jboss.seam.web.HotDeployFilter")
+public class RewriteFilter
+ extends AbstractFilter
+{
+ private static LogProvider log = Logging.getLogProvider(RewriteFilter.class);
+
+ Collection<Pattern> patterns = null;
+
+ // need to extract this from Pages!
+ public void setPatterns(Map<String,String> patternMap) {
+ patterns = new TreeSet<Pattern>(new Comparator<Pattern>() {
+ public int compare(Pattern p1, Pattern p2) {
+ return p2.pattern.compareTo(p1.pattern);
+ }
+ });
+
+ for(Entry<String, String> entry: patternMap.entrySet()) {
+ patterns.add(new Pattern(entry.getValue(), entry.getKey()));
+ }
+
+ log.info("Rewrite patterns: " + patterns);
+ }
+
+ public void doFilter(ServletRequest request,
+ ServletResponse response,
+ FilterChain chain)
+ throws IOException,
+ ServletException
+ {
+ if (patterns != null) {
+ if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
+ response = new RewritingResponse((HttpServletRequest) request,
+ (HttpServletResponse)response,
+ patterns);
+ process((HttpServletRequest) request, (HttpServletResponse) response);
+ }
+ }
+
+ if (!response.isCommitted()) {
+ chain.doFilter(request, response);
+ }
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public void process(HttpServletRequest request,
+ HttpServletResponse response)
+ throws IOException,
+ ServletException
+ {
+ String fullPath = request.getRequestURI();
+ log.info("incoming URL is " + fullPath);
+
+ String localPath = strip(fullPath, request.getContextPath());
+
+ Rewrite rewrite = matchPatterns(localPath);
+ if (rewrite!=null) {
+ String newPath = rewrite.rewrite();
+
+ log.info("rewritten incoming path is " + localPath);
+
+ if (!fullPath.equals(request.getContextPath() + newPath)) {
+ RequestDispatcher dispatcher = request.getRequestDispatcher(newPath);
+ dispatcher.forward(request, response);
+ }
+ }
+ }
+
+
+ private Rewrite matchPatterns(String localPath) {
+ for (Pattern pattern: patterns) {
+ Rewrite rewrite = pattern.matchIncoming(localPath);
+ if (rewrite!=null && rewrite.isMatch()) {
+ return rewrite;
+ }
+ }
+ return null;
+ }
+
+ private String strip(String fullPath, String contextPath) {
+ if (fullPath.startsWith(contextPath)) {
+ return fullPath.substring(contextPath.length());
+ } else {
+ return fullPath;
+ }
+ }
+}
+
Added: trunk/src/main/org/jboss/seam/web/RewritingResponse.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/RewritingResponse.java (rev 0)
+++ trunk/src/main/org/jboss/seam/web/RewritingResponse.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,76 @@
+package org.jboss.seam.web;
+
+import java.util.Collection;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+
+public class RewritingResponse
+ extends HttpServletResponseWrapper
+{
+ private static LogProvider log = Logging.getLogProvider(RewritingResponse.class);
+
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+ private Collection<Pattern> patterns;
+
+
+ public RewritingResponse(HttpServletRequest request,
+ HttpServletResponse response,
+ Collection<Pattern> patterns)
+ {
+ super(response);
+
+ this.request = request;
+ this.response = response;
+ this.patterns = patterns;
+ }
+
+ @Override
+ public String encodeUrl(String url) {
+ return super.encodeURL(url);
+ }
+
+ @Override
+ public String encodeRedirectUrl(String url) {
+ return encodeRedirectURL(url);
+ }
+
+
+ @Override
+ public String encodeURL(String url) {
+ String result = encode(url);
+ log.info("encodeURL " + url + " -> " + result);
+ return result;
+ }
+
+ @Override
+ public String encodeRedirectURL(String url) {
+ log.info("encode redirectURL called with " + url);
+ return super.encodeRedirectURL(url);
+ }
+
+
+ public String encode(String originalUrl) {
+ String url = originalUrl;
+ String contextPath = request.getContextPath();
+
+ if (url.startsWith(contextPath)) {
+ url = url.substring(contextPath.length());
+ }
+
+ for (Pattern pattern: patterns) {
+ Rewrite rewrite = pattern.matchOutgoing(url);
+ if (rewrite != null) {
+ return request.getContextPath() + rewrite.rewrite();
+ }
+ }
+
+ return originalUrl;
+ }
+
+}
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml 2008-02-26 18:46:10 UTC (rev 7487)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml 2008-02-26 19:18:37 UTC (rev 7488)
@@ -62,4 +62,11 @@
<class name="org.jboss.seam.test.unit.InterpolatorTest"/>
</classes>
</test>
+
+ <test name="Seam Unit Tests: URL Rewrite">
+ <classes>
+ <class name="org.jboss.seam.test.unit.web.RewriteTest" />
+ </classes>
+ </test>
+
</suite>
Added: trunk/src/test/unit/org/jboss/seam/test/unit/web/RewriteTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/web/RewriteTest.java (rev 0)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/web/RewriteTest.java 2008-02-26 19:18:37 UTC (rev 7488)
@@ -0,0 +1,127 @@
+package org.jboss.seam.test.unit.web;
+
+import org.testng.annotations.Test;
+
+import org.jboss.seam.web.Pattern;
+import org.jboss.seam.web.Rewrite;
+
+import static org.testng.Assert.*;
+
+public class RewriteTest
+{
+ @Test
+ public void testBasicInPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo");
+
+ testNoMatchIn(pattern, "/bar");
+ testNoMatchIn(pattern, "/fool");
+ testNoMatchIn(pattern, "/foo.seam");
+ testNoMatchIn(pattern, "/foo/bar");
+
+ testMatchIn(pattern, "/foo", "/foo.seam");
+ testMatchIn(pattern, "/foo/", "/foo.seam");
+ testMatchIn(pattern, "/foo?x=y", "/foo.seam?x=y");
+ }
+
+ @Test
+ public void testSingleArgInPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
+
+ testNoMatchIn(pattern, "/foo");
+ testNoMatchIn(pattern, "/foo/");
+ testNoMatchIn(pattern, "/foo/bar/baz");
+ testNoMatchIn(pattern, "/foo/bar/baz?x=y");
+
+ testMatchIn(pattern, "/foo/bar", "/foo.seam?id=bar");
+ testMatchIn(pattern, "/foo/bar?x=y", "/foo.seam?x=y&id=bar");
+ testMatchIn(pattern, "/foo/bar/?x=y", "/foo.seam?x=y&id=bar");
+ }
+
+ @Test
+ public void testMultiArgInPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
+
+ testNoMatchIn(pattern, "/foo");
+ testNoMatchIn(pattern, "/foo/bar");
+ testNoMatchIn(pattern, "/foo/bar/baz/qux");
+
+ testMatchIn(pattern, "/foo/bar/baz", "/foo.seam?id=bar&action=baz");
+ testMatchIn(pattern, "/foo/bar/baz?x=y", "/foo.seam?x=y&id=bar&action=baz");
+ }
+
+
+ @Test
+ public void testBasicOutPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo");
+
+ testNoMatchOut(pattern, "/bar.seam");
+ testNoMatchOut(pattern, "/fool.seam");
+ testNoMatchOut(pattern, "/foo");
+
+ testMatchOut(pattern, "/foo.seam", "/foo");
+ testMatchOut(pattern, "/foo.seam?x=y", "/foo?x=y");
+ }
+
+
+ @Test
+ public void testSingleArgOutPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
+
+ testNoMatchOut(pattern, "/foo.seam");
+ testNoMatchOut(pattern, "/foo.seam?x=y");
+ testNoMatchOut(pattern, "/foo.seam/bar");
+ testNoMatchOut(pattern, "/foo.seam/bar?id=test");
+
+ testMatchOut(pattern, "/foo.seam?id=bar", "/foo/bar");
+ testMatchOut(pattern, "/foo.seam?x=y&id=bar", "/foo/bar?x=y");
+ testMatchOut(pattern, "/foo.seam?id=bar&x=y", "/foo/bar?x=y");
+ testMatchOut(pattern, "/foo.seam?a=b&x=y&id=bar&c=d&c=e", "/foo/bar?a=b&x=y&c=d&c=e");
+ }
+
+ @Test
+ public void testMultiArgOutPattern()
+ throws Exception
+ {
+ Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
+
+ testNoMatchOut(pattern, "/foo.seam");
+ testNoMatchOut(pattern, "/foo.seam?id=bar");
+ testNoMatchOut(pattern, "/foo.seam?action=baz");
+
+ testMatchOut(pattern, "/foo.seam?action=baz&id=bar", "/foo/bar/baz");
+ testMatchOut(pattern, "/foo.seam?y=z&action=baz&n=one&n=two&id=bar&x=y", "/foo/bar/baz?y=z&n=one&n=two&x=y");
+ }
+
+
+ public void testNoMatchIn(Pattern pattern, String incoming) {
+ assertNull(pattern.matchIncoming(incoming), incoming);
+ }
+
+ public void testNoMatchOut(Pattern pattern, String incoming) {
+ assertNull(pattern.matchOutgoing(incoming), incoming);
+ }
+
+ public void testMatchIn(Pattern pattern, String incoming, String expected) {
+ Rewrite rewrite = pattern.matchIncoming(incoming);
+ assertTrue(rewrite.isMatch(), incoming);
+ assertEquals(rewrite.rewrite(), expected);
+ }
+
+ public void testMatchOut(Pattern pattern, String incoming, String expected) {
+ Rewrite rewrite = pattern.matchOutgoing(incoming);
+ assertTrue(rewrite.isMatch(), incoming);
+ assertEquals(rewrite.rewrite(), expected);
+ }
+
+}
+
16 years, 9 months
Seam SVN: r7487 - trunk/build.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-26 13:46:10 -0500 (Tue, 26 Feb 2008)
New Revision: 7487
Modified:
trunk/build/root.pom.xml
Log:
JBSEAM-2603
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2008-02-26 18:20:14 UTC (rev 7486)
+++ trunk/build/root.pom.xml 2008-02-26 18:46:10 UTC (rev 7487)
@@ -283,6 +283,12 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.GA</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
16 years, 9 months