Author: pete.muir(a)jboss.org
Date: 2008-02-05 16:38:39 -0500 (Tue, 05 Feb 2008)
New Revision: 7375
Removed:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/test/
Modified:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/AuthenticatorAction.java
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/BookingListAction.java
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelBookingAction.java
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelSearchingAction.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/FormInputBorder.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Home.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Password.java
trunk/src/wicket/org/jboss/seam/wicket/ioc/InjectionInterceptor.java
Log:
More cleanup and fixes
Modified:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/AuthenticatorAction.java
===================================================================
---
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/AuthenticatorAction.java 2008-02-05
20:13:11 UTC (rev 7374)
+++
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/AuthenticatorAction.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -10,7 +10,6 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
-import org.jboss.seam.security.Identity;
@Stateless
@Name("authenticator")
@@ -19,6 +18,7 @@
@PersistenceContext
private EntityManager em;
+ @SuppressWarnings("unused")
@Out(required=false, scope = SESSION)
private User user;
Modified:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/BookingListAction.java
===================================================================
---
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/BookingListAction.java 2008-02-05
20:13:11 UTC (rev 7374)
+++
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/BookingListAction.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -39,6 +39,7 @@
@In
private User user;
+ @SuppressWarnings("unused")
@Out
private List<Booking> bookings;
Modified:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelBookingAction.java
===================================================================
---
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelBookingAction.java 2008-02-05
20:13:11 UTC (rev 7374)
+++
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelBookingAction.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -18,7 +18,6 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
@Stateful
Modified:
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelSearchingAction.java
===================================================================
---
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelSearchingAction.java 2008-02-05
20:13:11 UTC (rev 7374)
+++
trunk/examples/wicket/src/action/org/jboss/seam/example/wicket/action/HotelSearchingAction.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -13,7 +13,6 @@
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.security.Restrict;
@Stateful
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -18,7 +18,6 @@
import java.util.Arrays;
import java.util.List;
-import java.util.Locale;
import org.apache.wicket.Component;
import org.apache.wicket.PageParameters;
@@ -32,10 +31,7 @@
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.ComponentFeedbackPanel;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converters.BooleanConverter;
import org.apache.wicket.validation.ValidationError;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.security.Restrict;
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -39,7 +39,6 @@
@Override
public void onClick()
{
- hotelBooking.bookHotel();
setResponsePage(Book.class);
}
});
Modified:
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/FormInputBorder.java
===================================================================
---
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/FormInputBorder.java 2008-02-05
20:13:11 UTC (rev 7374)
+++
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/FormInputBorder.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -47,7 +47,7 @@
* @param label Label to add
* @param component The component to wrap
* @param model The model to attach the component to
- * @param ajax Whether to use ajax validation
+ * @param ajaxValidate Whether to use ajax validation
*/
public FormInputBorder(String id, String label, FormComponent component, PropertyModel
model, boolean ajaxValidate)
{
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Home.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Home.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Home.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -26,7 +26,6 @@
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.validation.ValidationError;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -3,7 +3,6 @@
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.link.Link;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.example.wicket.action.HotelBooking;
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -34,7 +34,6 @@
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.markup.html.panel.ComponentFeedbackPanel;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.model.PropertyModel;
@@ -44,6 +43,7 @@
import org.jboss.seam.example.wicket.action.BookingList;
import org.jboss.seam.example.wicket.action.Hotel;
import org.jboss.seam.example.wicket.action.HotelSearching;
+import org.jboss.seam.security.Identity;
@Restrict
public class Main extends WebPage
@@ -62,8 +62,10 @@
private DataView bookedHotelDataView;
private HotelSearchForm hotelSearchForm;
private WebMarkupContainer hotels;
- private Component noHotelsFound;
+ private Component noHotelsFound;
+
+
public Main(final PageParameters parameters)
{
Template body = new Template("body");
@@ -83,7 +85,7 @@
@Override
public boolean isVisible()
{
- return hotelSearch.getHotels().size() == 0;
+ return Identity.instance().isLoggedIn() &&
hotelSearch.getHotels().size() == 0;
}
};
body.add(noHotelsFound.setOutputMarkupId(true));
@@ -118,7 +120,7 @@
@Override
public boolean isVisible()
{
- return hotelSearch.getHotels().size() > 0;
+ return Identity.instance().isLoggedIn() &&
hotelSearch.getHotels().size() > 0;
}
};
@@ -188,7 +190,7 @@
@Override
public boolean isVisible()
{
- return bookings.size() > 0;
+ return Identity.instance().isLoggedIn() && bookings.size() > 0;
}
};
@@ -198,7 +200,7 @@
@Override
public boolean isVisible()
{
- return bookings.size() == 0;
+ return Identity.instance().isLoggedIn() && bookings.size() == 0;
}
});
}
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Password.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Password.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Password.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -7,7 +7,6 @@
import org.apache.wicket.markup.html.form.validation.EqualInputValidator;
import org.apache.wicket.markup.html.link.PageLink;
import org.apache.wicket.markup.html.panel.ComponentFeedbackPanel;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.security.Restrict;
Modified: trunk/src/wicket/org/jboss/seam/wicket/ioc/InjectionInterceptor.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/ioc/InjectionInterceptor.java 2008-02-05
20:13:11 UTC (rev 7374)
+++ trunk/src/wicket/org/jboss/seam/wicket/ioc/InjectionInterceptor.java 2008-02-05
21:38:39 UTC (rev 7375)
@@ -37,7 +37,14 @@
public Object invoke(final Object proxy, final Method method, final Method proceed,
final Object[] params) throws Throwable
{
- return Reflections.invoke(method, getValueToInject(proxy), params);
+ if (!org.jboss.seam.web.Session.instance().isInvalid())
+ {
+ return Reflections.invoke(method, getValueToInject(proxy), params);
+ }
+ else
+ {
+ return null;
+ }
}
private Object getValueToInject(Object bean)