[Wicket-user] authentication depending on parameters

2006-11-21 Thread Flemming Seerup
When using the AuthenticatedWebApplication and AuthenticatedWebSession, how do
you implement authentication for MyPage, where MyPage/page/1 is allowed for
UserX, but not MyPage/page/2.

The page is right now protected, so only users with role USER is allowed, but
how/where should I implement the database lookup to verify that page=x is
allowed for the current user, and display either the homepage or SignIn page if
not authorized ?

Regards,
Flemming


This message was sent using IMP, the Internet Messaging Program.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
CheckGroup sounds right ...  but I'm not sure where ICellPopulator should be
used.

And I keep getting Invalid boolean value MasterReference. somehow I 
missing a
method to tell wicket if the checkbox should be checked, right?

My code is currently:

TestModel inputModel = new TestModel();
CheckGroup imageGroup = new CheckGroup(
imagesSelected,
new PropertyModel(inputModel, selected));
add(imageGroup);

GridView gridView = new GridView(rows, provider) {
private static final long serialVersionUID = 4252215707308269580L;

protected void populateItem(Item item) {
final ImageReference reference = (ImageReference) 
item.getModelObject();
log.info(adding thumbnail:  + reference);

ThumbnailImageFragment thumbnail = new ThumbnailImageFragment(
thumbnail,
reference,
item.getModel());
item.add(thumbnail);
}

protected void populateEmptyItem(Item item) {
ThumbnailEmptyFragment thumbnail = new 
ThumbnailEmptyFragment(thumbnail);
log.info(adding filler);
item.add(thumbnail);
}
};

gridView.setRows(3);
gridView.setColumns(3);

imageGroup.add(gridView);

public ThumbnailImageFragment(String id, final ImageReference 
reference, IModel
itemModel) {
super(id);

CheckBox checkBox = new CheckBox(select, itemModel);
add(checkBox);

BookmarkablePageLink imageLink = InboxDisplay.link(imagelink, 
reference);
imageLink.add(new Image(image, getThumbnailResource(reference)));
add(imageLink);

BookmarkablePageLink textLink = InboxDisplay.link(textlink, 
reference);
textLink.add(new Label(imagename, 
reference.getImage().getUniqueName()));
add(textLink);
}



Quoting Frank Bille [EMAIL PROTECTED]:
 I have never used GridView myself, but how about putting a CheckGroup around
 the GridView and then add a Check in the ICellPopulator? Something like
 this:

 public class PojoForTellingWhichChecksHasBeenClicked {
   private Set selectedChecks;
   // Getters and setters
 }

 PojoForTellingWhichChecksHasBeenClicked pojo = new
 PojoForTellingWhichChecksHasBeenClicked();
 CheckGroup cg = new CheckGroup(checkGroup, new PropertyModel(pojo,
 selectedChecks));
 GridView gv = new GridView(gw, SOME_PARAMETERS);
 cg.add(gv);

 And then a ICellPopulator:

 new ICellPopulator() {
   public void populateItem(final Item cellItem, final String componentId,
 final IModel rowModel) {
  cellItem.add(new Check(componentId, rowModel));
   }
 };


 Makes sense?

 Frank


 On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote:

 How do I use CheckBox in a GridView component, and find the seleted in the
 onSubmit method ?

 /Flemming


 
 This message was sent using IMP, the Internet Messaging Program.

 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user






This message was sent using IMP, the Internet Messaging Program.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
DataGridView is not related to GridView, but as more like a plain 
table.  I need
the features of GridView  :-/

Quoting Frank Bille [EMAIL PROTECTED]:
 I looked at DataGridView. Please take a look at that to see if it is what
 you need (that has ICellPopulator).

 Frank


 On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote:

 CheckGroup sounds right ...  but I'm not sure where ICellPopulator should
 be
 used.

 And I keep getting Invalid boolean value MasterReference. somehow I
 missing a
 method to tell wicket if the checkbox should be checked, right?

 My code is currently:
 
 TestModel inputModel = new TestModel();
 CheckGroup imageGroup = new CheckGroup(
 imagesSelected,
 new PropertyModel(inputModel, selected));
 add(imageGroup);

 GridView gridView = new GridView(rows, provider) {
 private static final long serialVersionUID = 4252215707308269580L;

 protected void populateItem(Item item) {
 final ImageReference reference = (ImageReference)
 item.getModelObject();
 log.info(adding thumbnail:  + reference);

 ThumbnailImageFragment thumbnail = new
 ThumbnailImageFragment(
 thumbnail,
 reference,
 item.getModel());
 item.add(thumbnail);
 }

 protected void populateEmptyItem(Item item) {
 ThumbnailEmptyFragment thumbnail = new
 ThumbnailEmptyFragment(thumbnail);
 log.info(adding filler);
 item.add(thumbnail);
 }
 };

 gridView.setRows(3);
 gridView.setColumns(3);

 imageGroup.add(gridView);
 
 public ThumbnailImageFragment(String id, final ImageReference
 reference, IModel
 itemModel) {
 super(id);

 CheckBox checkBox = new CheckBox(select, itemModel);
 add(checkBox);

 BookmarkablePageLink imageLink = InboxDisplay.link(imagelink,
 reference);
 imageLink.add(new Image(image,
 getThumbnailResource(reference)));
 add(imageLink);

 BookmarkablePageLink textLink = InboxDisplay.link(textlink,
 reference);
 textLink.add(new Label(imagename, reference.getImage
 ().getUniqueName()));
 add(textLink);
 }

 

 Quoting Frank Bille [EMAIL PROTECTED]:
  I have never used GridView myself, but how about putting a CheckGroup
 around
  the GridView and then add a Check in the ICellPopulator? Something like
  this:
 
  public class PojoForTellingWhichChecksHasBeenClicked {
private Set selectedChecks;
// Getters and setters
  }
 
  PojoForTellingWhichChecksHasBeenClicked pojo = new
  PojoForTellingWhichChecksHasBeenClicked();
  CheckGroup cg = new CheckGroup(checkGroup, new PropertyModel(pojo,
  selectedChecks));
  GridView gv = new GridView(gw, SOME_PARAMETERS);
  cg.add(gv);
 
  And then a ICellPopulator:
 
  new ICellPopulator() {
public void populateItem(final Item cellItem, final String
 componentId,
  final IModel rowModel) {
   cellItem.add(new Check(componentId, rowModel));
}
  };
 
 
  Makes sense?
 
  Frank
 
 
  On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote:
 
  How do I use CheckBox in a GridView component, and find the seleted in
 the
  onSubmit method ?
 
  /Flemming
 
 
  
  This message was sent using IMP, the Internet Messaging Program.
 
 
 -
  Using Tomcat but need to do more? Need to support web services,
 security?
  Get stuff done quickly with pre-integrated technology to make your job
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



 
 This message was sent using IMP, the Internet Messaging Program.


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user






This message was sent using IMP, the Internet Messaging Program

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
YES, that worked...   what a stupid mistake!  ;-)

Quoting Frank Bille [EMAIL PROTECTED]:
 On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote

 public ThumbnailImageFragment(String id, final ImageReference
 reference, IModel
 itemModel) {
 super(id);

 CheckBox checkBox = new CheckBox(select, itemModel);
 add(checkBox);



 Try to use Check instead of CheckBox. I think that is your problem :)

 http://wicket.sourceforge.net/apidocs/wicket/markup/html/form/CheckGroup.html

 Frank





This message was sent using IMP, the Internet Messaging Program.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user