incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1390214 - in /incubator/isis/trunk/framework/viewer/wicket: wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ wicket-ui/src/main/java/org/apa...
Date Tue, 25 Sep 2012 23:20:32 GMT
Author: danhaywood
Date: Tue Sep 25 23:20:31 2012
New Revision: 1390214

URL: http://svn.apache.org/viewvc?rev=1390214&view=rev
Log:
ISIS-232: further improvements on breadcrumbs

* tidying up the titles on each breadcrumb link
* adding a 'clear' link
* implementing a void return panel for actions that return null.

Added:
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.css
      - copied, changed from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.html
      - copied, changed from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.java
      - copied, changed from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
Modified:
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkedPagesModel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
Tue Sep 25 23:20:31 2012
@@ -108,14 +108,11 @@ public class ActionModel extends Bookmar
      */
     public static PageParameters createPageParameters(final ObjectAdapter adapter, final
ObjectAction objectAction, final ObjectAdapter contextAdapter, final SingleResultsMode singleResultsMode)
{
         
-        final boolean persistent = adapter.representsPersistent();
-        if (!persistent) {
-            // REVIEW: can this happen?
-            return new PageParameters();
-        }
-
         final PageParameters pageParameters = createPageParameters(adapter, objectAction,
singleResultsMode);
 
+        final String actionTitle = objectAction.getName();
+        PageParameterNames.PAGE_TITLE.addStringTo(pageParameters, actionTitle);
+
         final Mode actionMode = determineActionMode(objectAction, contextAdapter);
         PageParameterNames.ACTION_MODE.addEnumTo(pageParameters, actionMode);
 
@@ -126,25 +123,23 @@ public class ActionModel extends Bookmar
     private static PageParameters createPageParameters(final ObjectAdapter adapter, final
ObjectAction objectAction, final SingleResultsMode singleResultsMode) {
         final PageParameters pageParameters = new PageParameters();
 
+        PageParameterNames.PAGE_TYPE.addEnumTo(pageParameters, PageType.ACTION);
+        PageParameterNames.ACTION_SINGLE_RESULTS_MODE.addEnumTo(pageParameters, singleResultsMode);
+
         final String oidStr = adapter.getOid().enString(getOidMarshaller());
         PageParameterNames.OBJECT_OID.addStringTo(pageParameters, oidStr);
 
         final ActionType actionType = objectAction.getType();
-        final String actionId = determineActionId(objectAction);
-
-        PageParameterNames.PAGE_TYPE.addEnumTo(pageParameters, PageType.ACTION);
-
         PageParameterNames.ACTION_TYPE.addEnumTo(pageParameters, actionType);
+        
         final ObjectSpecification actionOnTypeSpec = objectAction.getOnType();
         if (actionOnTypeSpec != null) {
             PageParameterNames.ACTION_OWNING_SPEC.addStringTo(pageParameters, actionOnTypeSpec.getFullIdentifier());
         }
 
+        final String actionId = determineActionId(objectAction);
         PageParameterNames.ACTION_ID.addStringTo(pageParameters, actionId);
         
-        PageParameterNames.ACTION_SINGLE_RESULTS_MODE.addEnumTo(pageParameters, singleResultsMode);
-
-        PageParameterNames.PAGE_TITLE.addStringTo(pageParameters, actionId);
         return pageParameters;
     }
 
@@ -152,16 +147,34 @@ public class ActionModel extends Bookmar
         final ObjectAdapter adapter = getTargetAdapter();
         final ObjectAction objectAction = getActionMemento().getAction();
         final PageParameters pageParameters = createPageParameters(adapter, objectAction,
SingleResultsMode.REDIRECT);
-        
-        // capture argument values
-        ObjectAdapter[] argumentsAsArray = getArgumentsAsArray();
+
+
+        // capture argument values and build up a title
+        final StringBuilder buf = new StringBuilder();
+        final ObjectAdapter[] argumentsAsArray = getArgumentsAsArray();
         for(ObjectAdapter argumentAdapter: argumentsAsArray) {
             final String encodedArg = encodeArg(argumentAdapter);
-            PageParameterNames.ACTION_ARGS.addStringTo(pageParameters, encodedArg);    
+            PageParameterNames.ACTION_ARGS.addStringTo(pageParameters, encodedArg);
+            if(buf.length() > 0) {
+                buf.append(",");
+            }
+            buf.append(abbreviated(titleOf(argumentAdapter), 8));
         }
-        
+
+        final String actionTitle = adapter.titleString() + "." + objectAction.getName() +
(buf.length()>0?"(" + buf.toString() + ")":"");
+        PageParameterNames.PAGE_TITLE.addStringTo(pageParameters, actionTitle);
+
         return pageParameters;
     }
+    
+    private static String titleOf(ObjectAdapter argumentAdapter) {
+        return argumentAdapter!=null?argumentAdapter.titleString():"";
+    }
+    
+    private static String abbreviated(final String str, final int maxLength) {
+        return str.length() < maxLength ? str : str.substring(0, maxLength - 3) + "...";
+    }
+
 
     private static Mode determineActionMode(final ObjectAction objectAction, final ObjectAdapter
contextAdapter) {
         return objectAction.promptForParameters(contextAdapter)?Mode.PARAMETERS:Mode.RESULTS;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkedPagesModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkedPagesModel.java?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkedPagesModel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkedPagesModel.java
Tue Sep 25 23:20:31 2012
@@ -76,4 +76,12 @@ public class BookmarkedPagesModel extend
         return PageParameterNames.PAGE_TITLE.getStringFrom(pageParameters);
     }
 
+    public void clear() {
+        list.clear();
+    }
+
+    public boolean isEmpty() {
+        return list.isEmpty();
+    }
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
Tue Sep 25 23:20:31 2012
@@ -127,11 +127,6 @@ public class ActionPanel extends PanelAb
             // executes the action
             ObjectAdapter resultAdapter = actionModel.getObject();
             
-            if(resultAdapter == null) {
-                // handle void methods
-                resultAdapter = targetAdapter;
-            }
-
             final ResultType resultType = ResultType.determineFor(resultAdapter);
             resultType.addResults(this, resultAdapter);
             
@@ -256,9 +251,7 @@ public class ActionPanel extends PanelAb
             @Override
             public void addResults(final ActionPanel panel, final ObjectAdapter resultAdapter)
{
                 panel.hideAllBut(ComponentType.VOID_RETURN);
-
-                // TODO: implement panel for void
-                panel.permanentlyHide(ComponentType.VOID_RETURN);
+                panel.getComponentFactoryRegistry().addOrReplaceComponent(panel, ComponentType.VOID_RETURN,
null);
             }
         };
 
@@ -269,6 +262,9 @@ public class ActionPanel extends PanelAb
         }
 
         static ResultType determineFor(final ObjectAdapter resultAdapter) {
+            if(resultAdapter == null) {
+                return ResultType.VOID;
+            }
             final ObjectSpecification resultSpec = resultAdapter.getSpecification();
             if (resultSpec.isNotCollection()) {
                 if (resultSpec.getFacet(ValueFacet.class) != null) {

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
Tue Sep 25 23:20:31 2012
@@ -17,14 +17,23 @@
  *  under the License.
  */
 
-#bookmarkedPagesList {
+#bookmarkedPages {
 	font-size: smaller;
 }
 
-#bookmarkedPagesList span {
+#bookmarkedPages .bookmarkedPagesList {
+	display: inline;
+}
+
+#bookmarkedPages .bookmarkedPagesList span {
 	margin-right: 10px;
 }
 
-.bookmarkedPageItem {
+#bookmarkedPages .bookmarkedPageItem {
+	display: inline;
+}
+
+#bookmarkedPages .clearBookmarks {
 	display: inline;
+	color: rgb(128,0,0);
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
Tue Sep 25 23:20:31 2012
@@ -24,11 +24,14 @@
       lang="en">
 	<body>
 		<wicket:panel>
-			<ul id="bookmarkedPagesList">
-			  <li wicket:id="bookmarkedPageItem" class="bookmarkedPageItem">
-			  	<a href="#" wicket:id="bookmarkedPageLink"><span wicket:id="bookmarkedPageTitle">[link
title]</span></a>
-		  	  </li>
-			</ul>
+			<div id="bookmarkedPages">
+				<ul wicket:id="bookmarkList" class="bookmarkedPagesList">
+				  <li wicket:id="bookmarkedPageItem" class="bookmarkedPageItem">
+				  	<a href="#" wicket:id="bookmarkedPageLink"><span wicket:id="bookmarkedPageTitle">[link
title]</span></a>
+			  	  </li>
+				</ul>
+			  	<a href="#" wicket:id="clearBookmarks" class="clearBookmarks">clear</a>
+			</div>
 		</wicket:panel>
 	</body>
 </html>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.java?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.java
Tue Sep 25 23:20:31 2012
@@ -22,6 +22,9 @@ package org.apache.isis.viewer.wicket.ui
 import com.google.inject.Inject;
 
 import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.AbstractLink;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -39,9 +42,12 @@ public class BookmarkedPagesPanel extend
 
     private static final long serialVersionUID = 1L;
     
+    private static final String BOOKMARK_LIST = "bookmarkList";
     private static final String BOOKMARKED_PAGE_LINK = "bookmarkedPageLink";
     private static final String BOOKMARKED_PAGE_ITEM = "bookmarkedPageItem";
     private static final String BOOKMARKED_PAGE_TITLE = "bookmarkedPageTitle";
+    
+    private static final String CLEAR_BOOKMARKS = "clearBookmarks";
 
     @Inject
     private PageClassRegistry pageClassRegistry;
@@ -52,7 +58,14 @@ public class BookmarkedPagesPanel extend
     }
 
     private void buildGui() {
+
+        final WebMarkupContainer container = new WebMarkupContainer(BOOKMARK_LIST);
+        // allow to be updated by AjaxLink
+        container.setOutputMarkupId(true); 
+        add(container);
+
         final BookmarkedPagesModel bookmarkedPagesModel = getModel();
+
         final ListView<PageParameters> listView = new ListView<PageParameters>(BOOKMARKED_PAGE_ITEM,
bookmarkedPagesModel) {
 
             private static final long serialVersionUID = 1L;
@@ -70,6 +83,25 @@ public class BookmarkedPagesPanel extend
                 link.setEnabled(!bookmarkedPagesModel.isCurrent(pageParameters));
             }
         };
-        add(listView);
+        container.add(listView);
+        
+        if(!getModel().isEmpty()) {
+            final AjaxLink<Void> ajaxLink = new AjaxLink<Void>(CLEAR_BOOKMARKS){
+    
+                private static final long serialVersionUID = 1L;
+    
+                @Override
+                public void onClick(AjaxRequestTarget target) {
+                    BookmarkedPagesPanel.this.getModel().clear();
+                    setEnabled(false);
+                    target.add(container, this);
+                }
+            };
+            ajaxLink.setOutputMarkupId(true);
+            add(ajaxLink);
+        } else {
+            permanentlyHide(CLEAR_BOOKMARKS);
+        }
+
     }
 }

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.css
(from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.css?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.css&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css&r1=1390176&r2=1390214&rev=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.css
Tue Sep 25 23:20:31 2012
@@ -1,30 +1,18 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-#bookmarkedPagesList {
-	font-size: smaller;
-}
-
-#bookmarkedPagesList span {
-	margin-right: 10px;
-}
-
-.bookmarkedPageItem {
-	display: inline;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.html
(from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.html?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.html&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html&r1=1390176&r2=1390214&rev=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.html
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.html
Tue Sep 25 23:20:31 2012
@@ -1,34 +1,33 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-         http://www.apache.org/licenses/LICENSE-2.0
-         
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"  
-      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"  
-      xml:lang="en"  
-      lang="en">
-	<body>
-		<wicket:panel>
-			<ul id="bookmarkedPagesList">
-			  <li wicket:id="bookmarkedPageItem" class="bookmarkedPageItem">
-			  	<a href="#" wicket:id="bookmarkedPageLink"><span wicket:id="bookmarkedPageTitle">[link
title]</span></a>
-		  	  </li>
-			</ul>
-		</wicket:panel>
-	</body>
-</html>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+         http://www.apache.org/licenses/LICENSE-2.0
+         
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"  
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"  
+      xml:lang="en"  
+      lang="en">
+	<head></head>
+	<body>
+		<wicket:panel>
+			<div class="voidReturnPanel panel">
+				<label>No results</label>
+			</div>
+		</wicket:panel>
+	</body>
+</html>

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.java
(from r1390176, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.java?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.java&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css&r1=1390176&r2=1390214&rev=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/bookmarkedpages/BookmarkedPagesPanel.css
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanel.java
Tue Sep 25 23:20:31 2012
@@ -1,30 +1,38 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-#bookmarkedPagesList {
-	font-size: smaller;
-}
-
-#bookmarkedPagesList span {
-	margin-right: 10px;
-}
-
-.bookmarkedPageItem {
-	display: inline;
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.viewer.wicket.ui.components.voidreturn;
+
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.wicket.model.models.EntityModel;
+import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+
+public class VoidReturnPanel extends PanelAbstract<IModel<?>> {
+
+    private static final long serialVersionUID = 1L;
+
+    public VoidReturnPanel(final String id) {
+        super(id);
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java?rev=1390214&r1=1390213&r2=1390214&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java
(original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/voidreturn/VoidReturnPanelFactory.java
Tue Sep 25 23:20:31 2012
@@ -29,10 +29,6 @@ import org.apache.isis.viewer.wicket.ui.
 
 /**
  * {@link ComponentFactory} to represent an action that returns void.
- * 
- * <p>
- * TODO: not yet implemented; what should we do here? Perhaps render the object
- * on which the action was invoked, along with an informational message?
  */
 public class VoidReturnPanelFactory extends ComponentFactoryAbstract {
 
@@ -49,7 +45,7 @@ public class VoidReturnPanelFactory exte
 
     @Override
     public Component createComponent(final String id, final IModel<?> model) {
-        throw new NotYetImplementedException();
+        return new VoidReturnPanel(id);
     }
 
 }



Mime
View raw message