Re: Search Use-Case - Retaining the model against the text field

2008-05-29 Thread Johan Compagner
Use Hybridurlencoding for that page

On 5/29/08, mfs [EMAIL PROTECTED] wrote:

 Guys,

 Need some suggested here..

 I have a search-page which has an Ajaxform with a search-criteria
 TextField, the same search-page has a DataView implementation (alongwith
 DataProvider) of the searchresults...

 So basically i do an ajax submit of the search criteria and repaint just the
 dataview-container, so far so good..everything as i expect..The problem
 occurs when i do a refresh, where the Search Criteria TextField is
 re-initialized and so is the model associated with it (same holds true for
 the entire page) and thats why the dataview displays result against an empty
 search-criteria.

 Now what i want is to be able to retain the search-criteria TextField's
 model (which my IDataProvider implementation relies on) when the page is
 refreshed, so that a search is performed on the same criteria as the last
 search.

 Thanks in advance,

 --
 View this message in context:
 http://www.nabble.com/Search-Use-Case---Retaining-the-model-against-the-text-field-tp17525310p17525310.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: displaying video problem

2008-05-29 Thread shrimpywu

dude...

for displaying image
have a look at this sample...

http://www.wicketstuff.org/wicket13/images/
-- 
View this message in context: 
http://www.nabble.com/displaying-video-problem-tp17527994p17528415.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multi-window application problem

2008-05-29 Thread Johan Compagner
Close it your self please

On 5/28/08, Jürgen Lind [EMAIL PROTECTED] wrote:
 Hi,

 the Problem has been solved (the Model Objects were not Serializable).
 Should
 I simply close the issue or will that be done by someone of the development
 team.

 As a general improvement, I would suggest that the Exceptions that are
 caused by non-serializable Objects should be more obvious for the developer.

 I'm sorry for any effort that my question might have caused now that the
 solution is quite straightforward.

 Cheers,

 J.


 Gwyn Evans wrote:
 Enough to demonstrate the problem...

 What he's meaning is that you should, using a quickstart app as a
 base, try  reproduce the behaviour with the minimum amount of
 'surplus' code, so that it can be investigated  debugged by one of
 the developers.  Using QS means that it's easier for the devs to build
  debug, rather than having to get to investigate various other build
 systems.  It's a basic (and standard) Maven2 build environment.

 /Gwyn

 On Mon, May 26, 2008 at 8:00 AM, Jürgen Lind [EMAIL PROTECTED]
 wrote:
 Hi Igor,

 thanks for the reply. Unfortunately, I am not using quickstart for my
 test application. So which part of the application is best to  be
 included
 in the ticket?

 J.

 Igor Vaynberg wrote:
 seems like a bug. please create a jira ticket with the quickstart
 attached.

 -igor

 On Sun, May 25, 2008 at 1:14 PM, Jürgen Lind [EMAIL PROTECTED]
 wrote:
 Hi,

 I am currently evaluating Wicket for our next project and so far,
 Wicket
 has
 met or exceeded all my expectations. A very good and intuitive
 framework!

 However, for some time now, I am stuck with getting my test application
 to
 work
 in multi-window mode. The use-case is quite standard: I have a list of
 items
 and
 each item has a link that takes me to the details page for that item.
 Now
 I
 want
 to be able to have several detail pages open at the same time. The
 problem
 that
 I am facing is, that whenever I open a details link using the browsers
 open
 in
 new window feature for a new window, I get a page expired error in
 the
 list
 page whenever I try to open a second window. I have already striped
 down
 the
 code to find out that the error occurs whenever the details page has a
 form
 inside. Without the form, I can open as many windows as I like, if I
 have
 a
 form
 the application fails.

 I have already done some research on Wicket and Multi-window
 applications
 and
 while I have found out some aspects (such as setting the
  automaticMultiWindowSupport flag to true) I have not found anything
 with
 respect to the behavior I am experiencing right now.

 Is there anything apparent (or perhaps not so apparent) that I have
 been
  missing?

 Kind regards,

 Jürgen

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf
 Menzel


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 --
 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 --
 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DefaultDataTable not paging correctly

2008-05-29 Thread LarryT

I have a similar problem in that the behavior of SortableDataProvider differs
between systems it's running on. Deploy the same war to dev or test system
and pagination works but in production it doesn't - go figure.

I find that when pagination works there are two calls to size() before the
iterator() call, which has the correct first value, when a navigation link
is requested. When it doesn't work there is only one call to size() and the
following iterator() call sticks at first = 0.

Any insight is greatly appreciated.



Kenny Stainback wrote:
 
 In the constructor that takes the company id in SortableUserDataProvider,
 you are retrieving all users for the specified company id and assigning
 that to the users class-level variable.  But, in the iterator() method,
 you retrieve another subset (page) of users and assign it to the same
 users class-level variable.  The size() method would then just return
 the number of records in the subset, but actually needs the total number
 of rows to page.
 
 Here's an example SortableDataProvider (mostly stolen from the Wicket
 examples) which uses 2 queries... 1 to get the paged number of users and 1
 to get the total count.  Notice there is no need to return all users in
 the system (or in your case, for a specific company), which may be
 problematic from a performance standpoint.  Feedback welcome:
 
 public class SortableUserDataProvider extends SortableDataProvider{
 
   private static final long serialVersionUID = 271688819644192359L;
 
 /**
  * constructor
  */
 public SortableUserDataProvider()
 {
 // set default sort
 setSort(firstName, true);
 }
 
 protected IUserService getUserService()
 {
 return ((KsxApplication)Application.get())
   .getUserService();
 }
 
 /**
  * @see
 org.apache.wicket.markup.repeater.data.IDataProvider#iterator(int, int)
  */
 public Iterator iterator(int first, int pageSize)
 {
 SortParam sp = getSort();
 int page = 0;
 if (first != 0) {
   page = first / pageSize;
 }
 
 return getUserService().findPage(page, pageSize, sp.getProperty(),
 sp.isAscending()).iterator();
 }
 
 /**
  * @see org.apache.wicket.markup.repeater.data.IDataProvider#size()
  */
 public int size()
 {
 return getUserService().findTotalCount();
 }
 
 /**
  * @see
 org.apache.wicket.markup.repeater.data.IDataProvider#model(java.lang.Object)
  */
 public IModel model(Object object)
 {
 return new DetachableUserModel((User)object);
 }
   
 }
 

-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p17528548.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems toggling visibility on nested borders

2008-05-29 Thread Peter Gardfjell

Hi all,

I am trying to implement a reusable CollapsableBorder component.
I intend to use it to create collapsable sections on my web page (clicking a
link collapses/expands the section, i.e. the border contents).
The component seems to work just fine for basic usage.
The problem, however, occurs when I attempt to nest a collapsable border
inside another collapsable border.

The following code shows how the CollapsableBorder component is implemented:

public class CollapsableBorder extends Border {
   
private boolean isCollapsed = false;
   
public CollapsableBorder(final String id, String header) {
super(id);
   
// Create a markup container that wraps the border's body
final WebMarkupContainer bodyWrapper = new
WebMarkupContainer(body) {   
@Override
public boolean isVisible() {
return !CollapsableBorder.this.isCollapsed;
}   
};   
bodyWrapper.setOutputMarkupPlaceholderTag(true);   
   
final AjaxLink collapseLink = new AjaxLink(collapseLink) {   
@Override
public void onClick(AjaxRequestTarget target) {
// Toggle visibility of border's body
CollapsableBorder.this.isCollapsed =
!CollapsableBorder.this.isCollapsed;
target.addComponent(bodyWrapper);   
}   
};
   
add(collapseLink);
collapseLink.add(new Label(header, header));
add(bodyWrapper);
bodyWrapper.setVisible(true);
bodyWrapper.add(getBodyContainer());   
} 
}

with the following markup:

html
body

  wicket:border

   #  [Header goes here]  
  div wicket:id=body
wicket:body/
  /div   

  /wicket:border
 
/body
/html

I also use it in a very simple example where I nest two CollapsableBorders
as follows:
html xmlns=http://www.w3.org/1999/xhtml;
body
   
div wicket:id=outerBorder
  Outer border content 
  div style=margin: 10px; wicket:id=innerBorder
Inner border content
  /div
/div
 
/body
/html

with corresponding code:

public class NestedBordersTestPage extends WebPage {
public NestedBordersTestPage() {
super();   
   
CollapsableBorder outerBorder = new
CollapsableBorder(outerBorder, Outer border);
CollapsableBorder innerBorder = new
CollapsableBorder(innerBorder, Inner border);
add(outerBorder);
outerBorder.add(innerBorder);
}   
}


Find the source code for this example (generated from the quickstart maven
archetype) attached to this mail (
http://www.nabble.com/file/p17528668/collapsable.border.tar.gz
collapsable.border.tar.gz ).
On the attached example application, the following particular sequence of
steps results in an exception being thrown:

1. Click Inner border link (i.e., collapse inner border)
2. Click Outer border link (collapse outer border)
3. Click Outer border link again (try to expand outer border)

This results in WicketMessage: Expected close tag for div style=margin:
10px; wicket:id=innerBorder

I am sure many of you folks have implemented similar functionality. Any
pointers on
what I'm doing wrong and how to fix it would really be appreciated.

Thanks, Peter
-- 
View this message in context: 
http://www.nabble.com/Problems-toggling-visibility-on-nested-borders-tp17528668p17528668.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Swarm: SecureWebPage Access denied Message

2008-05-29 Thread Maurice Marrink
On Thu, May 29, 2008 at 12:57 AM, Monica D'Arcy [EMAIL PROTECTED] wrote:
 Hello,
 I am currently trying to implement some authorization/authentication using
 SWARM and am running into some problems.  After Logging on with a class that
 extends the UsernamePasswordContext class, I attempt to redirect to a secure
 page (a page that extends SecureWebPage).  At login, I create a
 DefaultSubject, and add a  SimplePrincipal with admin permissions (if
 appropriate) to the DefaultSubject.  I get the Access Denied page regardless
 of whether I am the correct user (admin) and should therefore be
 authorized to view the page or am not an authorized user.   I had also tried
 something similar with the SecurePageLink.  The link is  never rendered
 regardless of whether all users are granted permission to view the link, the
 correct user is logged on, or an unauthorized user is logged on.

 My very basic understanding of logging in to view a secureWebPage via SWARM
 is as follows:
 1) application must extend SwarmWebApplication (following instructions
 listed @
 http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)
 2) create a class that extends UsernamePasswordContext which is created when
 attempting to logon

Or extend LoginContext and implement your own authentication.

 3) there is a hive file that delineates which permissions are associated
 with which principals???

Each principal that can be assigned to a user/subject should be
specified in a hive file (aka policy file)
Each principal holds one or more permissions for
pages/components/data/ whatever you can think of.

 4) when logging on, a Subject is created and a principal is given to that
 subject

One or more.

 5) pages that are to be secure extend SecureWebPage

Or implement ISecurePage, SecureWebPage is just a default implementation.




 Is there something very basic I am missing here?  I apologize if this is an
 ignorant question... I am very new to the wicket  Swarm scene.
 Any help would be greatly appreciated.

 Below is what appears in my hive file

 grant principal
 org.apache.wicket.security.hive.authorization.SimplePrincipal admin
 {
permission
 org.apache.wicket.security.hive.authorization.permissions.ComponentPermission
 ${cnv}.MyCNV, inherit, render;
permission
 org.apache.wicket.security.hive.authorization.permissions.ComponentPermission
 ${cnv}.MyCNV, enable;
 };

Like Gabriel said, ${cnv}.MyCNV should be quoted like this ${cnv}.MyCNV

Also you can shorten the line a bit by using ${ComponentPermission}
instead of 
org.apache.wicket.security.hive.authorization.permissions.ComponentPermission

So optimally your file looks like this:
grant principal
org.apache.wicket.security.hive.authorization.SimplePrincipal admin
{
permission ${ComponentPermission} ${cnv}.MyCNV, inherit, render;
permission ${ComponentPermission} ${cnv}.MyCNV, enable;
};

The enable permission is used by your SecurePageLink, the render
permission for rendering the page.


Maurice


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



hi all, how to get things from abnormal wicketstuff-rome respone??

2008-05-29 Thread shrimpywu

suppose we have something like below..
how can i fetch the summary part ???

can we use xpath in rome??

ResultSet xsi:schemaLocation=urn:yahoo:yn
http://api.search.yahoo.com/NewsSearchService/V1/NewsSearchResponse.xsd;
totalResultsAvailable=1720 totalResultsReturned=2
firstResultPosition=1

Result
TitleJudge Approves Adoption by Madonna/Title

Summary
Madonna?s adoption of David Banda, below, a Malawian boy she met in an
orphanage in 2006, was approved by a judge in Malawi on Wednesday, The
Associated Press reported. 
/Summary

Url
http://www.nytimes.com/2008/05/29/arts/29arts-JUDGEAPPROVE_BRF.html
/Url

ClickUrl
http://www.nytimes.com/2008/05/29/arts/29arts-JUDGEAPPROVE_BRF.html
/ClickUrl
NewsSourceNew York Times/NewsSource
NewsSourceUrlhttp://www.nytimes.com//NewsSourceUrl
Languageen/Language
PublishDate1212038515/PublishDate
ModificationDate1212038516/ModificationDate
/Result
/ResultSet
-- 
View this message in context: 
http://www.nabble.com/hi-all%2C-how-to-get-things-from-abnormal-wicketstuff-rome-respone---tp17530285p17530285.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Usability?

2008-05-29 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I've run into the problem of having users om my system:) So I'd like to 
make things a little more useable for them. Do any of you guys have some 
links to websites with before and after screenshots. Like this was our 
page before, and now it looks like this and are much more usable.


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Usability?

2008-05-29 Thread Michael Sparer

Well start reading Nieslen's alertbox ... that's a good entry point
(www.useit.com/alertbox). anyway, I'd recommend reading books, if you
haven't got plenty of time take Steve Krug's Don't Make Me Think there are
a few examples how to make things right, Nielsen's 2006 book Prioritizing
Web Usability is also a good read. 
From my point of view the column and the two mentioned books are good entry
points in webusability, and if you apply the suggested patterns your site's
usability may increase a lot. but to find the real problems I'd suggest
making a usability test with real people from your target group ... but
gathering information about that and implementing a test isn't a two book's
read ;-)

michael


Nino.Martinez wrote:
 
 Hi
 
 I've run into the problem of having users om my system:) So I'd like to 
 make things a little more useable for them. Do any of you guys have some 
 links to websites with before and after screenshots. Like this was our 
 page before, and now it looks like this and are much more usable.
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Usability--tp17532190p17532431.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing DataTable simulating click on link, checkbox etc...

2008-05-29 Thread Nino Saturnino Martinez Vazquez Wael

Could'nt you do one of two things:

  1. Give the selector the fully path,  something like
 :tabel:row:column:checkpoxpanel:check
  2. Grab the check by using the full path like above and set the model
 on it..


Daniele Dellafiore wrote:

Hi.

I want to unit test a DefaultDataTable that have a column with some check boxes
To achieve this, I have a panel defined as:

wicket:panel
input type=checkbox wicket:id=select /
/wicket:panel

and the table is simply:

table wicket:id=table border=0[Table]/table

and I add this column:

AbstractColumn checkBoxColumn = new AbstractColumn(new 
Model(Select)) {
@Override
public void populateItem(Item cellItem, String 
componentId, IModel
rowModel) {
cellItem.add(new CheckBoxPanel(componentId, 
rowModel));
}
};

it works and all but I do not know how to unit test the code.

The problem is to select a desired checkBox via WicketTester.
I have the same problem if I have a link in the table: how to simulate
the click on, say, link at row 5, column 1?

Thanks for advices.

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Testing DataTable simulating click on link, checkbox etc...

2008-05-29 Thread Daniele Dellafiore
Hi.

I want to unit test a DefaultDataTable that have a column with some check boxes
To achieve this, I have a panel defined as:

wicket:panel
input type=checkbox wicket:id=select /
/wicket:panel

and the table is simply:

table wicket:id=table border=0[Table]/table

and I add this column:

AbstractColumn checkBoxColumn = new AbstractColumn(new 
Model(Select)) {
@Override
public void populateItem(Item cellItem, String 
componentId, IModel
rowModel) {
cellItem.add(new CheckBoxPanel(componentId, 
rowModel));
}
};

it works and all but I do not know how to unit test the code.

The problem is to select a desired checkBox via WicketTester.
I have the same problem if I have a link in the table: how to simulate
the click on, say, link at row 5, column 1?

Thanks for advices.

-- 
Daniele Dellafiore
http://blog.ildella.net/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



two pages have same id in the default pagemap

2008-05-29 Thread xiefei
Not sure whether this is a bug or not. 
 
I have two wicket WebAppilcation in one webapp. When I open two browser window 
each pointing to a page in one of them,
 
they both get id=0 in the default pagemap. Then in the subsequent requests 
Session.getPage() sometimes return wrong page.
 
Maybe I should assign an individual pagemap for each wicket WebApplication? and 
how ?
 
wicket version is 1.4m1
_
Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
http://get.live.cn/product/photo.html

Re: more getting started documents

2008-05-29 Thread Gwyn Evans
On Wed, May 28, 2008 at 10:30 PM, anirelles [EMAIL PROTECTED] wrote:

 is there any step by step CRUD for wicket?

 i would like to use wicked for a personal website but i'm losing to much
 time
 integrating the live examples in my own project

 i'll return to wicket when more documentation for new users will be
 available

Or you could just look at the available documentation now - For a
start, http://cwiki.apache.org/WICKET/documentation-index.html will
provide you with pointers to Wicket-phonebook, QWicket  Databinder,
all of which would help.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: two pages have same id in the default pagemap

2008-05-29 Thread Johan Compagner
is the page really created twice?

Or is it the same page really but you just few it through 2 browsers?
If you page version works correctly then in 1.3+ this shouldnt be any
problem
You can create a pagemap per window if you want. by creating a page in a
different pagemap

johan


2008/5/29 xiefei [EMAIL PROTECTED]:

 Not sure whether this is a bug or not.

 I have two wicket WebAppilcation in one webapp. When I open two browser
 window each pointing to a page in one of them,

 they both get id=0 in the default pagemap. Then in the subsequent
 requests Session.getPage() sometimes return wrong page.

 Maybe I should assign an individual pagemap for each wicket WebApplication?
 and how ?

 wicket version is 1.4m1
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html


Re: more getting started documents

2008-05-29 Thread Nino Saturnino Martinez Vazquez Wael
You could also try the wicket iolite maven archetype.. It's a extremely 
simple crud application...


anirelles wrote:

is there any step by step CRUD for wicket?

i would like to use wicked for a personal website but i'm losing to much
time
integrating the live examples in my own project

i'll return to wicket when more documentation for new users will be
available

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Sortable Paging DataView inside a tabpanel and backbutton

2008-05-29 Thread jensiator

okey.. Has anyone done this. I have a DataView that uses a
SortableDataProvider so that the dataview can be paged and sortable. The
dataview is contained in a tabpanel in a TabbedPanel(no Ajax). When I select
the dataview tabpanel I see the rows. I then select another tab and then
press backbutton. My grid shows again but it has no rows. The
SortableProvider.iterator methods runs with value count=0. 
Im not setting any Model in the tabpanel with the Dataview, instead Im
sending in a UUID  as a constructor parameter in the Panel. I do a Db call
in my implementation of SortableProvider.iterator to get the collection for
the UUID.
Does anyone have any idea of what could be wrong?  
-- 
View this message in context: 
http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17534314.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing DataTable simulating click on link, checkbox etc...

2008-05-29 Thread Daniele Dellafiore
On Thu, May 29, 2008 at 1:03 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 Could'nt you do one of two things:

  1. Give the selector the fully path,  something like
 :tabel:row:column:checkpoxpanel:check
  2. Grab the check by using the full path like above and set the model
 on it..

umm, but in example above, what column and row number are grabbed?

there is a way to show the complete graph of a wicket page hierarchy?



 Daniele Dellafiore wrote:

 Hi.

 I want to unit test a DefaultDataTable that have a column with some check
 boxes
 To achieve this, I have a panel defined as:

 wicket:panel
 input type=checkbox wicket:id=select /
 /wicket:panel

 and the table is simply:

 table wicket:id=table border=0[Table]/table

 and I add this column:

AbstractColumn checkBoxColumn = new AbstractColumn(new
 Model(Select)) {
@Override
public void populateItem(Item cellItem, String
 componentId, IModel
 rowModel) {
cellItem.add(new CheckBoxPanel(componentId,
 rowModel));
}
};

 it works and all but I do not know how to unit test the code.

 The problem is to select a desired checkBox via WicketTester.
 I have the same problem if I have a link in the table: how to simulate
 the click on, say, link at row 5, column 1?

 Thanks for advices.



 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Daniele Dellafiore
http://blog.ildella.net/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: two pages have same id in the default pagemap

2008-05-29 Thread xiefei

These two pages are in different WebApplication and are definitely different 
subclasses of WebPage.



 Date: Thu, 29 May 2008 13:30:30 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap
 
 is the page really created twice?
 
 Or is it the same page really but you just few it through 2 browsers?
 If you page version works correctly then in 1.3+ this shouldnt be any
 problem
 You can create a pagemap per window if you want. by creating a page in a
 different pagemap
 
 johan
 
 
 2008/5/29 xiefei :
 
 Not sure whether this is a bug or not.

 I have two wicket WebAppilcation in one webapp. When I open two browser
 window each pointing to a page in one of them,

 they both get id=0 in the default pagemap. Then in the subsequent
 requests Session.getPage() sometimes return wrong page.

 Maybe I should assign an individual pagemap for each wicket WebApplication?
 and how ?

 wicket version is 1.4m1
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html

_
多个邮箱同步管理,live mail客户端万人抢用中
http://get.live.cn/product/mail.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PagingNavigator WICKET-1548 - customization question

2008-05-29 Thread Daniel Stoch
Hi,

I've just made an upgrade to 1.3-SNAPSHOT. And now I have a problem
with customizing PagingNavigator component, because of moving creation
of components to onBeforeRender() method.
In out navigator we want to hide (remove) some links (eg. first and
last). So I have a constructor like this:

  public FooterPagingNavigator(String id, IPageable pageable) {
super(id, pageable);
remove(first);
remove(last);
  }

Now the exception is thrown because these links are added in
onBeforeRender(). So I can change our component and move code from
constructor to  onBeforeRender(), but now in this method in
PagingNavigator there is a condition:

  if (get(first) == null)
  {
...
  }

So each time I remove first component the code inside condition will
be called - so exception will be thrown then.
The question is why this condition is in such form:

  if (get(first) == null)

and no like this:

  if (!hasBeenRendered())

?
Then I will be able to remove components using the same condition.

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



testing feedback message without being too rigid

2008-05-29 Thread Daniele Dellafiore
Hi.

If I make an assert like:

tester.assertErrorMessages(new String[] { Field 'code' is required. });

the tests fails on the continuous integrator couse locale on that
machine is IT and the error message is in italian. On my machine it
works. This is a problem, also for I18N.
I would like to write something like

assertErrorMessagesContains(...);

This test will be enough and more less breackable. But I cannot get
the error message in any other way, if I do something like:

FeedbackPanel feedback = (FeedbackPanel)
tester.getComponentFromLastRenderedPage(feedback);
FeedbackMessage feedbackMessage = feedback.getFeedbackMessage();
assertEquals(, feedbackMessage);

the tests fails and tell me that feedbackMessage is null...
Same if I do: renderedPage.getFeedbackMessage();

BTW, the feedback message pass the assertErrorMessages above and at
runtime I can see the message in the 'feedback' field.

How may I get the feedbackPanel messages from a test?

-- 
Daniele Dellafiore
http://blog.ildella.net/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField - autocomplete multiple fields

2008-05-29 Thread francisco treacy
eager to see it. let us know when you upload it :)

On Wed, May 28, 2008 at 6:37 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 Hi,

 On Wed, May 28, 2008 at 12:31 AM, francisco treacy
 [EMAIL PROTECTED] wrote:
 something i was exactly looking for is this:
 http://digitarald.de/project/autocompleter/1-1/showcase/delicious-tags/
 , i.e. the ability to autocomplete multiple fields. and i also wanted
 to integrate it with wicket. if i understand correctly, what you've
 done is analogous.

 Probably yes, it has the ability to autocomplete multiple fields :)


 so, haven't myself implemented it yet, i'm interested in your work.
 i'll also be waiting for someone else's advice on how to integrate
 that code. let me know if i can help.


 I haven't integrated other javascript libraries in my solution, but I
 have changed the default Wicket component (from wicket-extensions).
 I'll try to prepare quickstart demo with this modified component to
 show how it works.

 --
 Daniel

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi all, how to get things from abnormal wicketstuff-rome respone??

2008-05-29 Thread Ryan Sonnek
As I posted on my blog, you have complete access to the ROME SyndEntry which
should contain all the information from the RSS feed you're consuming.  you
should have no issues inspecting the feed for the data you want.  If you're
unable to extract the information, you'll need to talk with the ROME
developers since this has nothing really to do with wicket.

On Thu, May 29, 2008 at 3:48 AM, shrimpywu [EMAIL PROTECTED] wrote:


 suppose we have something like below..
 how can i fetch the summary part ???

 can we use xpath in rome??

 ResultSet xsi:schemaLocation=urn:yahoo:yn
 http://api.search.yahoo.com/NewsSearchService/V1/NewsSearchResponse.xsd;
 totalResultsAvailable=1720 totalResultsReturned=2
 firstResultPosition=1

 Result
 TitleJudge Approves Adoption by Madonna/Title

 Summary
 Madonna?s adoption of David Banda, below, a Malawian boy she met in an
 orphanage in 2006, was approved by a judge in Malawi on Wednesday, The
 Associated Press reported.
 /Summary

 Url
 http://www.nytimes.com/2008/05/29/arts/29arts-JUDGEAPPROVE_BRF.html
 /Url

 ClickUrl
 http://www.nytimes.com/2008/05/29/arts/29arts-JUDGEAPPROVE_BRF.html
 /ClickUrl
 NewsSourceNew York Times/NewsSource
 NewsSourceUrlhttp://www.nytimes.com//NewsSourceUrl
 Languageen/Language
 PublishDate1212038515/PublishDate
 ModificationDate1212038516/ModificationDate
 /Result
 /ResultSet
 --
 View this message in context:
 http://www.nabble.com/hi-all%2C-how-to-get-things-from-abnormal-wicketstuff-rome-respone---tp17530285p17530285.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: displaying video problem

2008-05-29 Thread Martijn Lindhout
what do you want to do with videos? I created a simple Wicket
FlashVideoPlayer component that streams SWF videos from the server. It works
fine (at least for me ;-))

2008/5/29 shrimpywu [EMAIL PROTECTED]:


 dude...

 for displaying image
 have a look at this sample...

 http://www.wicketstuff.org/wicket13/images/
 --
 View this message in context:
 http://www.nabble.com/displaying-video-problem-tp17527994p17528415.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Mounting dynamic content

2008-05-29 Thread Martijn Lindhout
setting the HTTP Content-Disposition may help. The value should be something
like

attachment; filename=DummyFilename.doc

2008/5/26 Martin Makundi [EMAIL PROTECTED]:

 Hi!

 I have a web page whose content the user is supposed to save as a
 XYZ.doc file. With Firefox it is sufficient to set the content-type to
 application/msword.

 However, Internet Explorer takes my context path (the part before the
 url parameters) as the filename, say webapp and forgets about the
 content type already. Is there a simple way to mount my dnyamic page
 as DummyFilename.doc?

 I would rather not use BookmarkablePage because the parameters are
 huge. Ofcourse I could pass the parameters via an internal model, but
 if there is a fast moujnting strategy for a dynamic page, I would be
 interested.

 **
 Martin

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Martijn Lindhout
Where do you want to use REST for in your app? I use some REST url's in mij
application using the IndexedParamUrlCodingStrategy (of course REST is far
more than URL's only...).

Sample URL's are:

/activate/some very long encoded key  - Activates a profile after initial
signup
/profile/scott - shows Scott's profile
/reset/scott - Resets Scott's password


2008/5/27 Brill Pappin [EMAIL PROTECTED]:

 chuckle

 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of what is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

  rest is for services, wicket is for ui. why does anything need to be
  integrated?
 
  -igor
 
  On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:
  
   hi everyone, does anyone know how can we use RESTFUL in wicket?
  
   now the RestFul framework is quite popular..
   doest anyone know how can we put it into wicket??
  
   do we need to integrate some other framework with wicket? or wicket
  already
   support that?
   --
   View this message in context:
  http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
  ESTFUL-in-wicket--tp17473242p17473242.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl
I just uploaded a patch a few days ago to support indexed resource  
urls. Hopefully the wicket devs will apply it to the codebase.


I guess it would be a good base for RESTful resources without explicit  
session state.


It's like Martijn describes, but for shared resources.

Cheers
Peter


Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:

Where do you want to use REST for in your app? I use some REST url's  
in mij
application using the IndexedParamUrlCodingStrategy (of course REST  
is far

more than URL's only...).

Sample URL's are:

/activate/some very long encoded key  - Activates a profile after  
initial

signup
/profile/scott - shows Scott's profile
/reset/scott - Resets Scott's password


2008/5/27 Brill Pappin [EMAIL PROTECTED]:


chuckle

There's that word I keep hearing... should :)
Actually I keep saying it too, and give myself a slap.

IMO, REST is great for services, but it's pretty strict in terms of  
what is

RESTful.
I think something *like* wicket could work in a RESTful way, but  
Wicket

does
not and I doubt ever will (if it ever does, it won't be wicket code  
your

using today).

- Brill Pappin

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Monday, May 26, 2008 12:02 PM
To: users@wicket.apache.org
Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
wicket?

But REST is how http/internet should work!

On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg [EMAIL PROTECTED] 


wrote:


rest is for services, wicket is for ui. why does anything need to be
integrated?

-igor

On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


hi everyone, does anyone know how can we use RESTFUL in wicket?

now the RestFul framework is quite popular..
doest anyone know how can we put it into wicket??

do we need to integrate some other framework with wicket? or wicket

already

support that?
--
View this message in context:

http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
ESTFUL-in-wicket--tp17473242p17473242.html

Sent from the Wicket - User mailing list archive at Nabble.com.



- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl

Damn it, forgot to mention the jira issue:

https://issues.apache.org/jira/browse/WICKET-1666

I don't think there already something in wicket like this...

Am 29.05.2008 um 17:01 schrieb Peter Ertl:

I just uploaded a patch a few days ago to support indexed resource  
urls. Hopefully the wicket devs will apply it to the codebase.


I guess it would be a good base for RESTful resources without  
explicit session state.


It's like Martijn describes, but for shared resources.

Cheers
Peter


Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:

Where do you want to use REST for in your app? I use some REST  
url's in mij
application using the IndexedParamUrlCodingStrategy (of course REST  
is far

more than URL's only...).

Sample URL's are:

/activate/some very long encoded key  - Activates a profile after  
initial

signup
/profile/scott - shows Scott's profile
/reset/scott - Resets Scott's password


2008/5/27 Brill Pappin [EMAIL PROTECTED]:


chuckle

There's that word I keep hearing... should :)
Actually I keep saying it too, and give myself a slap.

IMO, REST is great for services, but it's pretty strict in terms  
of what is

RESTful.
I think something *like* wicket could work in a RESTful way, but  
Wicket

does
not and I doubt ever will (if it ever does, it won't be wicket  
code your

using today).

- Brill Pappin

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Monday, May 26, 2008 12:02 PM
To: users@wicket.apache.org
Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
wicket?

But REST is how http/internet should work!

On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg [EMAIL PROTECTED] 


wrote:

rest is for services, wicket is for ui. why does anything need to  
be

integrated?

-igor

On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED]  
wrote:


hi everyone, does anyone know how can we use RESTFUL in wicket?

now the RestFul framework is quite popular..
doest anyone know how can we put it into wicket??

do we need to integrate some other framework with wicket? or  
wicket

already

support that?
--
View this message in context:

http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
ESTFUL-in-wicket--tp17473242p17473242.html

Sent from the Wicket - User mailing list archive at Nabble.com.



- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Johan Compagner
we already can mount shared resources
and you can give them parameters so that you dont have to have session but
can create the same resource depending on the params

johan


On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED] wrote:

 I just uploaded a patch a few days ago to support indexed resource urls.
 Hopefully the wicket devs will apply it to the codebase.

 I guess it would be a good base for RESTful resources without explicit
 session state.

 It's like Martijn describes, but for shared resources.

 Cheers
 Peter


 Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


  Where do you want to use REST for in your app? I use some REST url's in
 mij
 application using the IndexedParamUrlCodingStrategy (of course REST is far
 more than URL's only...).

 Sample URL's are:

 /activate/some very long encoded key  - Activates a profile after
 initial
 signup
 /profile/scott - shows Scott's profile
 /reset/scott - Resets Scott's password


 2008/5/27 Brill Pappin [EMAIL PROTECTED]:

  chuckle

 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of what
 is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

  rest is for services, wicket is for ui. why does anything need to be
 integrated?

 -igor

 On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


 hi everyone, does anyone know how can we use RESTFUL in wicket?

 now the RestFul framework is quite popular..
 doest anyone know how can we put it into wicket??

 do we need to integrate some other framework with wicket? or wicket

 already

 support that?
 --
 View this message in context:

 http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
 ESTFUL-in-wicket--tp17473242p17473242.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Peter Ertl

Yeah, I know...

the patch I committed is about having indexed urls

like /blog/2008/06/13/hello.html with /blog being the resource  
mount path


so /2008/06/13/hello.html are the actual parameters

having /blog?year=2008month=06day=13item=hello.html doesn't look  
so nice and is not so much of REST *imho*





Am 29.05.2008 um 17:05 schrieb Johan Compagner:


we already can mount shared resources
and you can give them parameters so that you dont have to have  
session but

can create the same resource depending on the params

johan


On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED]  
wrote:


I just uploaded a patch a few days ago to support indexed resource  
urls.

Hopefully the wicket devs will apply it to the codebase.

I guess it would be a good base for RESTful resources without  
explicit

session state.

It's like Martijn describes, but for shared resources.

Cheers
Peter


Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


Where do you want to use REST for in your app? I use some REST  
url's in

mij
application using the IndexedParamUrlCodingStrategy (of course  
REST is far

more than URL's only...).

Sample URL's are:

/activate/some very long encoded key  - Activates a profile after
initial
signup
/profile/scott - shows Scott's profile
/reset/scott - Resets Scott's password


2008/5/27 Brill Pappin [EMAIL PROTECTED]:

chuckle


There's that word I keep hearing... should :)
Actually I keep saying it too, and give myself a slap.

IMO, REST is great for services, but it's pretty strict in terms  
of what

is
RESTful.
I think something *like* wicket could work in a RESTful way, but  
Wicket

does
not and I doubt ever will (if it ever does, it won't be wicket  
code your

using today).

- Brill Pappin

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Monday, May 26, 2008 12:02 PM
To: users@wicket.apache.org
Subject: Re: hi everyone, does anyone know how can we use RESTFUL  
in

wicket?

But REST is how http/internet should work!

On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg [EMAIL PROTECTED] 


wrote:

rest is for services, wicket is for ui. why does anything need to  
be

integrated?

-igor

On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED]  
wrote:




hi everyone, does anyone know how can we use RESTFUL in wicket?

now the RestFul framework is quite popular..
doest anyone know how can we put it into wicket??

do we need to integrate some other framework with wicket? or  
wicket



already


support that?
--
View this message in context:


http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
ESTFUL-in-wicket--tp17473242p17473242.html


Sent from the Wicket - User mailing list archive at Nabble.com.



- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29




-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax ListView as Gmail

2008-05-29 Thread Davidoff

finally i had an answer to my questions... was an email handling issue...but
the problems are far to finish, then now i've a listview that refreshes
dinamically, but a label i've put with the number of messages doesn't
refresh its content...this is the code as you can see:

public class AccountPage extends WebPage{
   
private Manager manager;
private User user;
private Folder folder;
private ModalWindow modal;
private Store store;
private Label contains;

public AccountPage(final String username,final String password)
throws MessagingException{
manager=new Manager(AjaxUbiMailDB,1000);  
user=manager.authenticate(username, password);
add(new Label(hello,Hello + user.firstName() +   +
user.lastName()));
   
IModel mailList =  new LoadableDetachableModel()
{
protected Object load(){

Message[] messages=null;
try {
if (folder==null )
{
folder=user.openPopServer();
}

else if (folder.isOpen())
{
folder.close(false);

folder=user.openPopServer();


}
contains=new
Label(contains,+folder.getMessageCount());

addOrReplace(contains);
messages=folder.getMessages();
} catch (MessagingException e) {
// TODO Auto-generated catch 
block
e.printStackTrace();
}
  ListMessage messagesList=Arrays.asList(messages);
   return messagesList;
   }
};
  modal=new ModalWindow(modal);
   ListView listTable=new ListView(listView,mailList)
{
   
private int index;
   public void populateItem(ListItem item)
   {
try {
final Message msg=(Message)
item.getModelObject();
   
//Address[]
add=msg.getFolder().open(Folder.READ_ONLY).getFrom();
  index=msg.getMessageNumber();
   AjaxLink rate = new
AjaxLink(mess) {
public void
onClick(AjaxRequestTarget target) {
   

   
GetMessage getMessage;

   
getMessage = new GetMessage(modal.getContentId(), msg){};
   

   
modal.setContent(getMessage);

   
modal.setInitialHeight(400);

   
modal.setInitialWidth(800);

   
modal.show(target);

   
modal.setTitle(Mail View);
   
   
}
   };
rate.add(new
Label(prova,String.valueOf(msg.getMessageNumber(;
item.add(rate);
item.add(new
AttributeAppender(class, true, new Model(index % 2 ==0 ? odd: even), 
));
item.add(new Label(subject,
msg.getSubject().toString()));
item.add(new Label(from,
msg.getFrom()[0].toString()));
if (msg.getSentDate()!=null)
item.add(new Label(date,
msg.getSentDate().toString()));
else
item.add(new Label(date,
Nothing));
   
} catch (MessagingException e) {
   
System.out.println(Error populate item);

Re: Swarm: SecureWebPage Access denied Message

2008-05-29 Thread Monica D'Arcy

Thanks Maurice and Gabriel... it was a matter of missing quotes!!!
On May 29, 2008, at 2:47 AM, Maurice Marrink wrote:

On Thu, May 29, 2008 at 12:57 AM, Monica D'Arcy  
[EMAIL PROTECTED] wrote:

Hello,
I am currently trying to implement some authorization/ 
authentication using
SWARM and am running into some problems.  After Logging on with a  
class that
extends the UsernamePasswordContext class, I attempt to redirect  
to a secure

page (a page that extends SecureWebPage).  At login, I create a
DefaultSubject, and add a  SimplePrincipal with admin  
permissions (if
appropriate) to the DefaultSubject.  I get the Access Denied page  
regardless

of whether I am the correct user (admin) and should therefore be
authorized to view the page or am not an authorized user.   I had  
also tried
something similar with the SecurePageLink.  The link is  never  
rendered
regardless of whether all users are granted permission to view the  
link, the

correct user is logged on, or an unauthorized user is logged on.

My very basic understanding of logging in to view a secureWebPage  
via SWARM

is as follows:
1) application must extend SwarmWebApplication (following  
instructions

listed @
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started 
+with+Swarm)
2) create a class that extends UsernamePasswordContext which is  
created when

attempting to logon


Or extend LoginContext and implement your own authentication.

3) there is a hive file that delineates which permissions are  
associated

with which principals???


Each principal that can be assigned to a user/subject should be
specified in a hive file (aka policy file)
Each principal holds one or more permissions for
pages/components/data/ whatever you can think of.

4) when logging on, a Subject is created and a principal is given  
to that

subject


One or more.


5) pages that are to be secure extend SecureWebPage


Or implement ISecurePage, SecureWebPage is just a default  
implementation.






Is there something very basic I am missing here?  I apologize if  
this is an

ignorant question... I am very new to the wicket  Swarm scene.
Any help would be greatly appreciated.

Below is what appears in my hive file

grant principal
org.apache.wicket.security.hive.authorization.SimplePrincipal admin
{
   permission
org.apache.wicket.security.hive.authorization.permissions.ComponentPe 
rmission

${cnv}.MyCNV, inherit, render;
   permission
org.apache.wicket.security.hive.authorization.permissions.ComponentPe 
rmission

${cnv}.MyCNV, enable;
};


Like Gabriel said, ${cnv}.MyCNV should be quoted like this $ 
{cnv}.MyCNV


Also you can shorten the line a bit by using ${ComponentPermission}
instead of  
org.apache.wicket.security.hive.authorization.permissions.ComponentPer 
mission


So optimally your file looks like this:
grant principal
org.apache.wicket.security.hive.authorization.SimplePrincipal admin
{
permission ${ComponentPermission} ${cnv}.MyCNV, inherit, render;
permission ${ComponentPermission} ${cnv}.MyCNV, enable;
};

The enable permission is used by your SecurePageLink, the render
permission for rendering the page.


Maurice



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sortable Paging DataView inside a tabpanel and backbutton

2008-05-29 Thread Igor Vaynberg
so you use no-store headers and force the page to reload on
backbutton? because usually when you press back you get the cached
version the browser keeps around.

-igor

On Thu, May 29, 2008 at 5:11 AM, jensiator [EMAIL PROTECTED] wrote:

 okey.. Has anyone done this. I have a DataView that uses a
 SortableDataProvider so that the dataview can be paged and sortable. The
 dataview is contained in a tabpanel in a TabbedPanel(no Ajax). When I select
 the dataview tabpanel I see the rows. I then select another tab and then
 press backbutton. My grid shows again but it has no rows. The
 SortableProvider.iterator methods runs with value count=0.
 Im not setting any Model in the tabpanel with the Dataview, instead Im
 sending in a UUID  as a constructor parameter in the Panel. I do a Db call
 in my implementation of SortableProvider.iterator to get the collection for
 the UUID.
 Does anyone have any idea of what could be wrong?
 --
 View this message in context: 
 http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17534314.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PagingNavigator WICKET-1548 - customization question

2008-05-29 Thread Igor Vaynberg
class mypager extends pagingnavigator {
  newPagingNavigationLink(String id, IPageable pageable, int pageNumber) {
 Link l=super.newPagingNavigationLink(...);
 if (pageNumber1) {
  l.setvisible(false);
 }
 return l;
   }
}

-igor

On Thu, May 29, 2008 at 5:49 AM, Daniel Stoch [EMAIL PROTECTED] wrote:
 Hi,

 I've just made an upgrade to 1.3-SNAPSHOT. And now I have a problem
 with customizing PagingNavigator component, because of moving creation
 of components to onBeforeRender() method.
 In out navigator we want to hide (remove) some links (eg. first and
 last). So I have a constructor like this:

  public FooterPagingNavigator(String id, IPageable pageable) {
super(id, pageable);
remove(first);
remove(last);
  }

 Now the exception is thrown because these links are added in
 onBeforeRender(). So I can change our component and move code from
 constructor to  onBeforeRender(), but now in this method in
 PagingNavigator there is a condition:

  if (get(first) == null)
  {
...
  }

 So each time I remove first component the code inside condition will
 be called - so exception will be thrown then.
 The question is why this condition is in such form:

  if (get(first) == null)

 and no like this:

  if (!hasBeenRendered())

 ?
 Then I will be able to remove components using the same condition.

 --
 Daniel

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: testing feedback message without being too rigid

2008-05-29 Thread Igor Vaynberg
easiest thing is probably to force the locale on the integration server

-igor

On Thu, May 29, 2008 at 6:05 AM, Daniele Dellafiore [EMAIL PROTECTED] wrote:
 Hi.

 If I make an assert like:

 tester.assertErrorMessages(new String[] { Field 'code' is required. });

 the tests fails on the continuous integrator couse locale on that
 machine is IT and the error message is in italian. On my machine it
 works. This is a problem, also for I18N.
 I would like to write something like

 assertErrorMessagesContains(...);

 This test will be enough and more less breackable. But I cannot get
 the error message in any other way, if I do something like:

FeedbackPanel feedback = (FeedbackPanel)
 tester.getComponentFromLastRenderedPage(feedback);
FeedbackMessage feedbackMessage = 
 feedback.getFeedbackMessage();
assertEquals(, feedbackMessage);

 the tests fails and tell me that feedbackMessage is null...
 Same if I do: renderedPage.getFeedbackMessage();

 BTW, the feedback message pass the assertErrorMessages above and at
 runtime I can see the message in the 'feedback' field.

 How may I get the feedbackPanel messages from a test?

 --
 Daniele Dellafiore
 http://blog.ildella.net/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax ListView as Gmail

2008-05-29 Thread Igor Vaynberg
you have to use a detachable model for your label. i suggest you read
the models wiki page

-igor

On Thu, May 29, 2008 at 9:24 AM, Davidoff [EMAIL PROTECTED] wrote:

 finally i had an answer to my questions... was an email handling issue...but
 the problems are far to finish, then now i've a listview that refreshes
 dinamically, but a label i've put with the number of messages doesn't
 refresh its content...this is the code as you can see:

 public class AccountPage extends WebPage{

private Manager manager;
private User user;
private Folder folder;
private ModalWindow modal;
private Store store;
private Label contains;

public AccountPage(final String username,final String password)
 throws MessagingException{
manager=new Manager(AjaxUbiMailDB,1000);
user=manager.authenticate(username, password);
add(new Label(hello,Hello + user.firstName() +   +
 user.lastName()));

IModel mailList =  new LoadableDetachableModel()
{
protected Object load(){

Message[] messages=null;
try {
if (folder==null )
{
folder=user.openPopServer();
}

else if (folder.isOpen())
{
folder.close(false);

folder=user.openPopServer();


}
contains=new
 Label(contains,+folder.getMessageCount());

addOrReplace(contains);
messages=folder.getMessages();
} catch (MessagingException e) {
// TODO Auto-generated catch 
 block
e.printStackTrace();
}
  ListMessage messagesList=Arrays.asList(messages);
   return messagesList;
   }
};
  modal=new ModalWindow(modal);
   ListView listTable=new ListView(listView,mailList)
{

private int index;
   public void populateItem(ListItem item)
   {
try {
final Message msg=(Message)
 item.getModelObject();

//Address[]
 add=msg.getFolder().open(Folder.READ_ONLY).getFrom();
  index=msg.getMessageNumber();
   AjaxLink rate = new
 AjaxLink(mess) {
public void
 onClick(AjaxRequestTarget target) {


 GetMessage getMessage;

 getMessage = new GetMessage(modal.getContentId(), msg){};


 modal.setContent(getMessage);

 modal.setInitialHeight(400);

 modal.setInitialWidth(800);

 modal.show(target);

 modal.setTitle(Mail View);


 }
   };
rate.add(new
 Label(prova,String.valueOf(msg.getMessageNumber(;
item.add(rate);
item.add(new
 AttributeAppender(class, true, new Model(index % 2 ==0 ? odd: even), 
 ));
item.add(new Label(subject,
 msg.getSubject().toString()));
item.add(new Label(from,
 msg.getFrom()[0].toString()));
if (msg.getSentDate()!=null)
item.add(new Label(date,
 msg.getSentDate().toString()));
else
item.add(new Label(date,
 Nothing));

} catch (MessagingException e) {

 System.out.println(Error populate item);
//
 e.printStackTrace();
}



   }
};


WebMarkupContainer listContainer = new
 WebMarkupContainer(theContainer);
//generate a markup-id so the contents can be updated
 through an AJAX call
listContainer.setOutputMarkupId(true);
listContainer.add(new
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(20)));
// add the list view to the container
listContainer.add(listTable);
// finally add the container to the page

add(listContainer);
add(modal);

}


 AccountPage.html

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 html 

Re: testing feedback message without being too rigid

2008-05-29 Thread Martijn Dashorst
Or to force the locale on the testing session.

Martijn

On Thu, May 29, 2008 at 7:00 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 easiest thing is probably to force the locale on the integration server

 -igor

 On Thu, May 29, 2008 at 6:05 AM, Daniele Dellafiore [EMAIL PROTECTED] wrote:
 Hi.

 If I make an assert like:

 tester.assertErrorMessages(new String[] { Field 'code' is required. });

 the tests fails on the continuous integrator couse locale on that
 machine is IT and the error message is in italian. On my machine it
 works. This is a problem, also for I18N.
 I would like to write something like

 assertErrorMessagesContains(...);

 This test will be enough and more less breackable. But I cannot get
 the error message in any other way, if I do something like:

FeedbackPanel feedback = (FeedbackPanel)
 tester.getComponentFromLastRenderedPage(feedback);
FeedbackMessage feedbackMessage = 
 feedback.getFeedbackMessage();
assertEquals(, feedbackMessage);

 the tests fails and tell me that feedbackMessage is null...
 Same if I do: renderedPage.getFeedbackMessage();

 BTW, the feedback message pass the assertErrorMessages above and at
 runtime I can see the message in the 'feedback' field.

 How may I get the feedbackPanel messages from a test?

 --
 Daniele Dellafiore
 http://blog.ildella.net/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: two pages have same id in the default pagemap

2008-05-29 Thread Johan Compagner
Those pages are in a different WebApplication? Then they also should
have a different wicket session. So you have 2 applications in 1
webapp? Just like our examples?

Hmm need to check something out then, because if they share the same
http session then the application should be in the name of the
diskpage store i guess.

On 5/29/08, xiefei [EMAIL PROTECTED] wrote:

 These two pages are in different WebApplication and are definitely different
 subclasses of WebPage.


 
 Date: Thu, 29 May 2008 13:30:30 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap

 is the page really created twice?

 Or is it the same page really but you just few it through 2 browsers?
 If you page version works correctly then in 1.3+ this shouldnt be any
 problem
 You can create a pagemap per window if you want. by creating a page in a
 different pagemap

 johan


 2008/5/29 xiefei :

 Not sure whether this is a bug or not.

 I have two wicket WebAppilcation in one webapp. When I open two browser
 window each pointing to a page in one of them,

 they both get id=0 in the default pagemap. Then in the subsequent
 requests Session.getPage() sometimes return wrong page.

 Maybe I should assign an individual pagemap for each wicket
 WebApplication?
 and how ?

 wicket version is 1.4m1
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html

 _
 多个邮箱同步管理,live mail客户端万人抢用中
 http://get.live.cn/product/mail.html

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mounting dynamic content

2008-05-29 Thread Rodolfo Hansen
I think maybe what you want is to use a DynamicWebResource
and customize the ResourceState to return the correct content type...

It makes more sense that a .doc link be of that type I think...

On Thu, May 29, 2008 at 10:18 AM, Martijn Lindhout [EMAIL PROTECTED]
wrote:

 setting the HTTP Content-Disposition may help. The value should be
 something
 like

 attachment; filename=DummyFilename.doc

 2008/5/26 Martin Makundi [EMAIL PROTECTED]:

  Hi!
 
  I have a web page whose content the user is supposed to save as a
  XYZ.doc file. With Firefox it is sufficient to set the content-type to
  application/msword.
 
  However, Internet Explorer takes my context path (the part before the
  url parameters) as the filename, say webapp and forgets about the
  content type already. Is there a simple way to mount my dnyamic page
  as DummyFilename.doc?
 
  I would rather not use BookmarkablePage because the parameters are
  huge. Ofcourse I could pass the parameters via an internal model, but
  if there is a fast moujnting strategy for a dynamic page, I would be
  interested.
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



autoComplete event question

2008-05-29 Thread Beyonder Unknown

Hi All,

I have an autoComplete component that works  if I use the arrow key, in 
selecting the choices, but doesn't work if I use a mouse to click the choices. 
If you guys have some idea, please let lead me to the right the direction. 

I'm actually clueless on how to fix this.

Thanks in advance,
Wen Tong

 --
The only constant in life is change.



  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Martijn Lindhout
nice thing!

2008/5/29 Peter Ertl [EMAIL PROTECTED]:

 Yeah, I know...

 the patch I committed is about having indexed urls

 like /blog/2008/06/13/hello.html with /blog being the resource mount
 path

 so /2008/06/13/hello.html are the actual parameters

 having /blog?year=2008month=06day=13item=hello.html doesn't look so
 nice and is not so much of REST *imho*




 Am 29.05.2008 um 17:05 schrieb Johan Compagner:


  we already can mount shared resources
 and you can give them parameters so that you dont have to have session but
 can create the same resource depending on the params

 johan


 On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED] wrote:

  I just uploaded a patch a few days ago to support indexed resource urls.
 Hopefully the wicket devs will apply it to the codebase.

 I guess it would be a good base for RESTful resources without explicit
 session state.

 It's like Martijn describes, but for shared resources.

 Cheers
 Peter


 Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


 Where do you want to use REST for in your app? I use some REST url's in

 mij
 application using the IndexedParamUrlCodingStrategy (of course REST is
 far
 more than URL's only...).

 Sample URL's are:

 /activate/some very long encoded key  - Activates a profile after
 initial
 signup
 /profile/scott - shows Scott's profile
 /reset/scott - Resets Scott's password


 2008/5/27 Brill Pappin [EMAIL PROTECTED]:

 chuckle


 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of
 what
 is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code
 your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
 wrote:

 rest is for services, wicket is for ui. why does anything need to be

 integrated?

 -igor

 On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


 hi everyone, does anyone know how can we use RESTFUL in wicket?

 now the RestFul framework is quite popular..
 doest anyone know how can we put it into wicket??

 do we need to integrate some other framework with wicket? or wicket

  already

  support that?
 --
 View this message in context:


 http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
 ESTFUL-in-wicket--tp17473242p17473242.html

  Sent from the Wicket - User mailing list archive at Nabble.com.


 
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Igor Vaynberg
glad you liked it martijn, check your jira issues :P

-igor

On Thu, May 29, 2008 at 11:07 AM, Martijn Lindhout
[EMAIL PROTECTED] wrote:
 nice thing!

 2008/5/29 Peter Ertl [EMAIL PROTECTED]:

 Yeah, I know...

 the patch I committed is about having indexed urls

 like /blog/2008/06/13/hello.html with /blog being the resource mount
 path

 so /2008/06/13/hello.html are the actual parameters

 having /blog?year=2008month=06day=13item=hello.html doesn't look so
 nice and is not so much of REST *imho*




 Am 29.05.2008 um 17:05 schrieb Johan Compagner:


  we already can mount shared resources
 and you can give them parameters so that you dont have to have session but
 can create the same resource depending on the params

 johan


 On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED] wrote:

  I just uploaded a patch a few days ago to support indexed resource urls.
 Hopefully the wicket devs will apply it to the codebase.

 I guess it would be a good base for RESTful resources without explicit
 session state.

 It's like Martijn describes, but for shared resources.

 Cheers
 Peter


 Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


 Where do you want to use REST for in your app? I use some REST url's in

 mij
 application using the IndexedParamUrlCodingStrategy (of course REST is
 far
 more than URL's only...).

 Sample URL's are:

 /activate/some very long encoded key  - Activates a profile after
 initial
 signup
 /profile/scott - shows Scott's profile
 /reset/scott - Resets Scott's password


 2008/5/27 Brill Pappin [EMAIL PROTECTED]:

 chuckle


 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of
 what
 is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code
 your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
 wrote:

 rest is for services, wicket is for ui. why does anything need to be

 integrated?

 -igor

 On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


 hi everyone, does anyone know how can we use RESTFUL in wicket?

 now the RestFul framework is quite popular..
 doest anyone know how can we put it into wicket??

 do we need to integrate some other framework with wicket? or wicket

  already

  support that?
 --
 View this message in context:


 http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
 ESTFUL-in-wicket--tp17473242p17473242.html

  Sent from the Wicket - User mailing list archive at Nabble.com.


 
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Martijn Dashorst
Different Martijn!

/me curses 70s popularity of naming kids Martijn

On Thu, May 29, 2008 at 8:13 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 glad you liked it martijn, check your jira issues :P

 -igor

 On Thu, May 29, 2008 at 11:07 AM, Martijn Lindhout
 [EMAIL PROTECTED] wrote:
 nice thing!

 2008/5/29 Peter Ertl [EMAIL PROTECTED]:

 Yeah, I know...

 the patch I committed is about having indexed urls

 like /blog/2008/06/13/hello.html with /blog being the resource mount
 path

 so /2008/06/13/hello.html are the actual parameters

 having /blog?year=2008month=06day=13item=hello.html doesn't look so
 nice and is not so much of REST *imho*




 Am 29.05.2008 um 17:05 schrieb Johan Compagner:


  we already can mount shared resources
 and you can give them parameters so that you dont have to have session but
 can create the same resource depending on the params

 johan


 On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED] wrote:

  I just uploaded a patch a few days ago to support indexed resource urls.
 Hopefully the wicket devs will apply it to the codebase.

 I guess it would be a good base for RESTful resources without explicit
 session state.

 It's like Martijn describes, but for shared resources.

 Cheers
 Peter


 Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


 Where do you want to use REST for in your app? I use some REST url's in

 mij
 application using the IndexedParamUrlCodingStrategy (of course REST is
 far
 more than URL's only...).

 Sample URL's are:

 /activate/some very long encoded key  - Activates a profile after
 initial
 signup
 /profile/scott - shows Scott's profile
 /reset/scott - Resets Scott's password


 2008/5/27 Brill Pappin [EMAIL PROTECTED]:

 chuckle


 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of
 what
 is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code
 your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
 wrote:

 rest is for services, wicket is for ui. why does anything need to be

 integrated?

 -igor

 On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


 hi everyone, does anyone know how can we use RESTFUL in wicket?

 now the RestFul framework is quite popular..
 doest anyone know how can we put it into wicket??

 do we need to integrate some other framework with wicket? or wicket

  already

  support that?
 --
 View this message in context:


 http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
 ESTFUL-in-wicket--tp17473242p17473242.html

  Sent from the Wicket - User mailing list archive at Nabble.com.


 
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem redeploying wicket application

2008-05-29 Thread Mehdi Riahi
Hi,

I'm writing a web application using wicket. I package wicket
related java classes and resource files in a jar file and put it in the
lib directory of my web application. When I redeploy the application in
tomcat, html files are not reloaded and wicket still uses old html
files (and a lot of exception pages!). I have to restart tomcat each
time I redeploy the web application to view modifications. Can any one
help?

Thanks,


  

Re: autoComplete event question

2008-05-29 Thread Enrique Rodriguez
On Thu, May 29, 2008 at 11:06 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 I have an autoComplete component that works  if I use the arrow key, in 
 selecting the choices, but doesn't work if I use a mouse to click the 
 choices. If you guys have some idea, please let lead me to the right the 
 direction.

Which Wicket version are you on?  I saw a couple of issues with
auto-complete go away when I upgraded from Wicket 1.3.1 to 1.3.3.  In
reviewing the release notes, 1.3.2 and 1.3.3 addressed several
auto-complete issues.  I was having the most trouble with the
following issue, which is fixed in 1.3.3:

WICKET-1280 - Autocomplete onchange event gets fired twice when
selecting with mouse click

Enrique

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using DataTable

2008-05-29 Thread nanotech

Hi,
I have a search form (in a panel)with various search fields(as text fields)
on it. User should be able to fill in any number of search parameters  and
the results are to be displayed in table (with pagenation + sorting
capablity on columns) in a different panel on the same page under the search
panel.

I started looking at DataTable. It seems a option that will solve my need.

Looking at the datatable example on
http://www.wicket-library.com/wicket-examples/repeater/

I observed that the following methods get called in the order 

1. size() from CustomSortableDataProvider.
2. iterator() from CustomSortableDataProvider
3. load() from CustomLoadableDetachableModel.

If I understand it correctly:-(Please  correct me if I am wrong)
 * size() requires , the number of records that provider will be working
with. So, in above case i'll have to make query thrrough service layer /DAO 
like this  Select count(*) from Employees where  firstName Like 'ABC' and
lastName Like 'XYZ'

* iterator(final int first, final int count) will call Service layer/DAO to
do the actual query like this  Select * from Employees where firstName Like
'ABC' and lastName Like 'XYZ'

* finally in model ...I will call the CustomLoadableDetachableModel and its
load() method will load the actual Employee model  for each item that will
be displayed on first page of the list being rendered in data table.


It seems that there are too many queries in case of datatable. If the result
set has thousands of records and we are displaying 100 per page then it will
do 100+ queries to render all the items.

Questions:
1. Did I sum up about DataTable correctly? If yes, Won't this be a
bottleneck considering the number of queries?
2. Is there a better way of doing this?

Thanks,
RG







-- 
View this message in context: 
http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi everyone, does anyone know how can we use RESTFUL in wicket?

2008-05-29 Thread Igor Vaynberg
what? different martijns! there is only one on the wicket team...

-igor

On Thu, May 29, 2008 at 11:25 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:
 Different Martijn!

 /me curses 70s popularity of naming kids Martijn

 On Thu, May 29, 2008 at 8:13 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 glad you liked it martijn, check your jira issues :P

 -igor

 On Thu, May 29, 2008 at 11:07 AM, Martijn Lindhout
 [EMAIL PROTECTED] wrote:
 nice thing!

 2008/5/29 Peter Ertl [EMAIL PROTECTED]:

 Yeah, I know...

 the patch I committed is about having indexed urls

 like /blog/2008/06/13/hello.html with /blog being the resource mount
 path

 so /2008/06/13/hello.html are the actual parameters

 having /blog?year=2008month=06day=13item=hello.html doesn't look so
 nice and is not so much of REST *imho*




 Am 29.05.2008 um 17:05 schrieb Johan Compagner:


  we already can mount shared resources
 and you can give them parameters so that you dont have to have session but
 can create the same resource depending on the params

 johan


 On Thu, May 29, 2008 at 5:01 PM, Peter Ertl [EMAIL PROTECTED] wrote:

  I just uploaded a patch a few days ago to support indexed resource urls.
 Hopefully the wicket devs will apply it to the codebase.

 I guess it would be a good base for RESTful resources without explicit
 session state.

 It's like Martijn describes, but for shared resources.

 Cheers
 Peter


 Am 29.05.2008 um 16:24 schrieb Martijn Lindhout:


 Where do you want to use REST for in your app? I use some REST url's in

 mij
 application using the IndexedParamUrlCodingStrategy (of course REST is
 far
 more than URL's only...).

 Sample URL's are:

 /activate/some very long encoded key  - Activates a profile after
 initial
 signup
 /profile/scott - shows Scott's profile
 /reset/scott - Resets Scott's password


 2008/5/27 Brill Pappin [EMAIL PROTECTED]:

 chuckle


 There's that word I keep hearing... should :)
 Actually I keep saying it too, and give myself a slap.

 IMO, REST is great for services, but it's pretty strict in terms of
 what
 is
 RESTful.
 I think something *like* wicket could work in a RESTful way, but Wicket
 does
 not and I doubt ever will (if it ever does, it won't be wicket code
 your
 using today).

 - Brill Pappin

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 26, 2008 12:02 PM
 To: users@wicket.apache.org
 Subject: Re: hi everyone, does anyone know how can we use RESTFUL in
 wicket?

 But REST is how http/internet should work!

 On Mon, May 26, 2008 at 5:59 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
 wrote:

 rest is for services, wicket is for ui. why does anything need to be

 integrated?

 -igor

 On Mon, May 26, 2008 at 7:47 AM, shrimpywu [EMAIL PROTECTED] wrote:


 hi everyone, does anyone know how can we use RESTFUL in wicket?

 now the RestFul framework is quite popular..
 doest anyone know how can we put it into wicket??

 do we need to integrate some other framework with wicket? or wicket

  already

  support that?
 --
 View this message in context:


 http://www.nabble.com/hi-everyone%2C-does-anyone-know-how-can-we-use-R
 ESTFUL-in-wicket--tp17473242p17473242.html

  Sent from the Wicket - User mailing list archive at Nabble.com.


 
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.3 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using DataTable

2008-05-29 Thread Igor Vaynberg
On Thu, May 29, 2008 at 12:09 PM, nanotech [EMAIL PROTECTED] wrote:

 Hi,
 I have a search form (in a panel)with various search fields(as text fields)
 on it. User should be able to fill in any number of search parameters  and
 the results are to be displayed in table (with pagenation + sorting
 capablity on columns) in a different panel on the same page under the search
 panel.

 I started looking at DataTable. It seems a option that will solve my need.

 Looking at the datatable example on
 http://www.wicket-library.com/wicket-examples/repeater/

 I observed that the following methods get called in the order

 1. size() from CustomSortableDataProvider.
 2. iterator() from CustomSortableDataProvider
 3. load() from CustomLoadableDetachableModel.

 If I understand it correctly:-(Please  correct me if I am wrong)
  * size() requires , the number of records that provider will be working
 with. So, in above case i'll have to make query thrrough service layer /DAO
 like this  Select count(*) from Employees where  firstName Like 'ABC' and
 lastName Like 'XYZ'

 * iterator(final int first, final int count) will call Service layer/DAO to
 do the actual query like this  Select * from Employees where firstName Like
 'ABC' and lastName Like 'XYZ'

 * finally in model ...I will call the CustomLoadableDetachableModel and its
 load() method will load the actual Employee model  for each item that will
 be displayed on first page of the list being rendered in data table.


 It seems that there are too many queries in case of datatable. If the result
 set has thousands of records and we are displaying 100 per page then it will
 do 100+ queries to render all the items.

 Questions:
 1. Did I sum up about DataTable correctly?

no, there are only two queries per page render of datatable.

 If yes, Won't this be a
 bottleneck considering the number of queries?

 2. Is there a better way of doing this?

not until someone finds one.

-igor


 Thanks,
 RG







 --
 View this message in context: 
 http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clone a WebPage

2008-05-29 Thread Mathias P.W Nilsson

I'm going mad I can't get this working.

Here is some code. It is quite a bit so

ItemListPage

package se.edgesoft.hairless.web.page.site.item;

import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import org.apache.wicket.PageParameters;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.Radio;
import org.apache.wicket.markup.html.form.RadioGroup;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.IDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;

import se.edgesoft.hairless.entities.brand.Brand;
import se.edgesoft.hairless.entities.category.Category;
import se.edgesoft.hairless.entities.colorstory.ColorStory;
import se.edgesoft.hairless.entities.department.Department;
import se.edgesoft.hairless.entities.item.Item;
import se.edgesoft.hairless.entities.presentation.Presentation;
import se.edgesoft.hairless.entities.translation.Translation;
import se.edgesoft.hairless.model.filter.item.BalanceFilter;
import se.edgesoft.hairless.model.filter.item.BrandFilter;
import se.edgesoft.hairless.model.filter.item.CategoryFilter;
import se.edgesoft.hairless.model.filter.item.ColorStoryFilter;
import se.edgesoft.hairless.model.filter.item.DepartmentFilter;
import se.edgesoft.hairless.model.filter.item.GenderFilter;
import se.edgesoft.hairless.model.filter.item.ItemBreadcrumb;
import se.edgesoft.hairless.model.filter.item.ItemFilter;
import se.edgesoft.hairless.model.filter.item.ItemResourceBreadcrumb;
import se.edgesoft.hairless.model.filter.item.ObjectFilter;
import se.edgesoft.hairless.model.filter.item.OutletFilter;
import se.edgesoft.hairless.model.filter.item.Presentational;
import se.edgesoft.hairless.model.filter.item.StoreFilter;
import se.edgesoft.hairless.model.filter.item.TypePresentational;
import se.edgesoft.hairless.model.format.item.ItemFormatter;
import se.edgesoft.hairless.model.presentation.PresentationManager;
import se.edgesoft.hairless.model.sort.item.ItemSort;
import se.edgesoft.hairless.model.sort.item.Sort;
import se.edgesoft.hairless.model.translation.Translator;
import se.edgesoft.hairless.model.translation.TranslatorManager;
import se.edgesoft.hairless.web.components.ExternalImageUrl;
import se.edgesoft.hairless.web.components.models.TranslatableCategoryModel;
import
se.edgesoft.hairless.web.page.administration.renderers.BrandChoiceRenderer;
import
se.edgesoft.hairless.web.page.administration.renderers.CategoryChoiceRenderer;
import
se.edgesoft.hairless.web.page.administration.renderers.ColorStoryChoiceRenderer;
import se.edgesoft.hairless.web.page.site.RootPage;
import se.edgesoft.hairless.web.panels.ItemPageNavigation;

public class ItemListPage extends RootPage{

ListItemFilter filters;
ListItemSort sorts;
private Presentation presentation;
private Translation translation;

public ListItemFilter getFilters() {
return filters;
}

public void setFilters(ListItemFilter filters) {
this.filters = filters;
/**
 * Check if the outlet filter exists. This can
 * happen if the outlet is pressed
 * If no outlet filter is present we add a new outlet filter
 * to filter only the items that is in date scope.
 */
if( ! containsFilter( OutletFilter.class ) ){
addFilter( new OutletFilter( false ));
}
/** Always add balance and store filter when getting items */
if( ! containsFilter( BalanceFilter.class ) ){
addFilter( new BalanceFilter( new Long( 1 ) ));
}
/** Add store filter */
if( ! containsFilter( StoreFilter.class ) ){
addFilter( new StoreFilter( getStore() ) );
}
/**
 * Add default family as gender filter
 */
if( ! containsFilter( GenderFilter.class ) ){
addFilter( new GenderFilter( Item.Gender.FAMILY ) );
}

}

public ListItemBreadcrumb getBreadCrumbs(){

if( 

Re: Clone a WebPage

2008-05-29 Thread Mathias P.W Nilsson

You are perfectly right. All my LoadableDetachable models are called again.
Problem is that the cart is a Fragment and it does not get called.

final class CartFragment extends Fragment{
private static final long serialVersionUID = 1L;
Cart cart = getCart();
Translator translator = new Translator( getStore() );
private Long getAmount(){
Long amount = new Long( 0 );
for( CartItem item : cart.getCartItems() ){
amount += item.getAmount();
}

return amount;

}

private Float getPrice(){
float price = 0;
for( CartItem cartItem : cart.getCartItems() ){
Item item = cartItem.getSubItem().getItem();
new ItemFormatter( item ).format( getStore() );
price += item.getFormattedPrice() * 
cartItem.getAmount();
}

return price;

}

private Float getMemberPrice(){
float memberPrice = 0;
for( CartItem cartItem : cart.getCartItems() ){
Item item = cartItem.getSubItem().getItem();
new ItemFormatter( item ).format( getStore() );
memberPrice += item.getFormattedMemberPrice() * 
cartItem.getAmount();
}

return memberPrice;

}

public CartFragment( String panel, String id ){
super( panel, id, RootPage.this );
// ALL labels are added here
}
}
}

In my item page I update the cart via Ajax and call updateCart(
AjaxRequestTarget target )
this add a container with the cart fragment

Any tip of getting around this?
-- 
View this message in context: 
http://www.nabble.com/Clone-a-WebPage-tp17468163p17544341.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting dynamic content

2008-05-29 Thread Martin Makundi
It is an IE bug or feature that it disregards the content type
after opening up the download (file save/open) dialog - It uses
windows file extension detection after that ;) On Firefox the content
type suffices, but for IE I must hack the filename too.

**
Martin

2008/5/29 Rodolfo Hansen [EMAIL PROTECTED]:
 I think maybe what you want is to use a DynamicWebResource
 and customize the ResourceState to return the correct content type...

 It makes more sense that a .doc link be of that type I think...

 On Thu, May 29, 2008 at 10:18 AM, Martijn Lindhout [EMAIL PROTECTED]
 wrote:

 setting the HTTP Content-Disposition may help. The value should be
 something
 like

 attachment; filename=DummyFilename.doc

 2008/5/26 Martin Makundi [EMAIL PROTECTED]:

  Hi!
 
  I have a web page whose content the user is supposed to save as a
  XYZ.doc file. With Firefox it is sufficient to set the content-type to
  application/msword.
 
  However, Internet Explorer takes my context path (the part before the
  url parameters) as the filename, say webapp and forgets about the
  content type already. Is there a simple way to mount my dnyamic page
  as DummyFilename.doc?
 
  I would rather not use BookmarkablePage because the parameters are
  huge. Ofcourse I could pass the parameters via an internal model, but
  if there is a fast moujnting strategy for a dynamic page, I would be
  interested.
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using DataTable

2008-05-29 Thread nanotech

Thanks Igor for your reply.
 
So, what do you suggest I should do:

1. After making the call in iterator() method Should I store the result
object (Employee object ) in EmployeeDAO and then refer it later when I call 
public IModel model(Object object) {
return new DetachableEmployeeModel((Employee)object);
}
and then look it up (by employee Id) from that stored object?

2. Do I need to take care of synchronization when I store the object?

Any other suggestions?

Thanks,
RG

 



igor.vaynberg wrote:
 
 On Thu, May 29, 2008 at 12:09 PM, nanotech [EMAIL PROTECTED]
 wrote:

 Hi,
 I have a search form (in a panel)with various search fields(as text
 fields)
 on it. User should be able to fill in any number of search parameters 
 and
 the results are to be displayed in table (with pagenation + sorting
 capablity on columns) in a different panel on the same page under the
 search
 panel.

 I started looking at DataTable. It seems a option that will solve my
 need.

 Looking at the datatable example on
 http://www.wicket-library.com/wicket-examples/repeater/

 I observed that the following methods get called in the order

 1. size() from CustomSortableDataProvider.
 2. iterator() from CustomSortableDataProvider
 3. load() from CustomLoadableDetachableModel.

 If I understand it correctly:-(Please  correct me if I am wrong)
  * size() requires , the number of records that provider will be working
 with. So, in above case i'll have to make query thrrough service layer
 /DAO
 like this  Select count(*) from Employees where  firstName Like 'ABC' and
 lastName Like 'XYZ'

 * iterator(final int first, final int count) will call Service layer/DAO
 to
 do the actual query like this  Select * from Employees where firstName
 Like
 'ABC' and lastName Like 'XYZ'

 * finally in model ...I will call the CustomLoadableDetachableModel and
 its
 load() method will load the actual Employee model  for each item that
 will
 be displayed on first page of the list being rendered in data table.


 It seems that there are too many queries in case of datatable. If the
 result
 set has thousands of records and we are displaying 100 per page then it
 will
 do 100+ queries to render all the items.

 Questions:
 1. Did I sum up about DataTable correctly?
 
 no, there are only two queries per page render of datatable.
 
 If yes, Won't this be a
 bottleneck considering the number of queries?
 
 2. Is there a better way of doing this?
 
 not until someone finds one.
 
 -igor
 

 Thanks,
 RG







 --
 View this message in context:
 http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Using-DataTable-tp17543606p17545174.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using DataTable

2008-05-29 Thread Igor Vaynberg
i dont really get what the problem is

iterator() loads the list of employee instances

in model() you give each of your detachable models an instance of the
employee, so during that request the model doesnt need to load
anything because its already there...

-igor

On Thu, May 29, 2008 at 1:31 PM, nanotech [EMAIL PROTECTED] wrote:

 Thanks Igor for your reply.

 So, what do you suggest I should do:

 1. After making the call in iterator() method Should I store the result
 object (Employee object ) in EmployeeDAO and then refer it later when I call
public IModel model(Object object) {
return new DetachableEmployeeModel((Employee)object);
}
 and then look it up (by employee Id) from that stored object?

 2. Do I need to take care of synchronization when I store the object?

 Any other suggestions?

 Thanks,
 RG





 igor.vaynberg wrote:

 On Thu, May 29, 2008 at 12:09 PM, nanotech [EMAIL PROTECTED]
 wrote:

 Hi,
 I have a search form (in a panel)with various search fields(as text
 fields)
 on it. User should be able to fill in any number of search parameters
 and
 the results are to be displayed in table (with pagenation + sorting
 capablity on columns) in a different panel on the same page under the
 search
 panel.

 I started looking at DataTable. It seems a option that will solve my
 need.

 Looking at the datatable example on
 http://www.wicket-library.com/wicket-examples/repeater/

 I observed that the following methods get called in the order

 1. size() from CustomSortableDataProvider.
 2. iterator() from CustomSortableDataProvider
 3. load() from CustomLoadableDetachableModel.

 If I understand it correctly:-(Please  correct me if I am wrong)
  * size() requires , the number of records that provider will be working
 with. So, in above case i'll have to make query thrrough service layer
 /DAO
 like this  Select count(*) from Employees where  firstName Like 'ABC' and
 lastName Like 'XYZ'

 * iterator(final int first, final int count) will call Service layer/DAO
 to
 do the actual query like this  Select * from Employees where firstName
 Like
 'ABC' and lastName Like 'XYZ'

 * finally in model ...I will call the CustomLoadableDetachableModel and
 its
 load() method will load the actual Employee model  for each item that
 will
 be displayed on first page of the list being rendered in data table.


 It seems that there are too many queries in case of datatable. If the
 result
 set has thousands of records and we are displaying 100 per page then it
 will
 do 100+ queries to render all the items.

 Questions:
 1. Did I sum up about DataTable correctly?

 no, there are only two queries per page render of datatable.

 If yes, Won't this be a
 bottleneck considering the number of queries?

 2. Is there a better way of doing this?

 not until someone finds one.

 -igor


 Thanks,
 RG







 --
 View this message in context:
 http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context: 
 http://www.nabble.com/Using-DataTable-tp17543606p17545174.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using DataTable

2008-05-29 Thread nanotech

Thanks for the reply...

Herre is What I have...

iterator() loads the list of employee instances 
public Iterator iterator(int first, int count) 
{
List employees = empService.getEmployees(); 
 
return employees.iterator();
}

in model() you give each of your detachable models an instance of the
employee, 
public IModel model(Object object) 
{
  return new EmployeeModel((Employee) object, empService);
}

and in EmployeeModel.java

public class EmployeeModel extends LoadableDetachableModel {
 
private EmployeeService empService;
 private   Long id;
public EmployeeModel(Employee emp, EmployeeService empService) {
super(emp);
this.id = emp.getId();
this.empService= empService;
}

protected Object load() {
 return empService.getEmployee(String.valueOf(id));
}
}

So, I my question is: when load() gets called from model() then where should
it look it up...as you said it does not need to go to database
againbecause we already have the object. But, we did not store the
object anywhereso that empService.getEmployee(String.valueOf(id)); can
go and look it up. When I retrieved Object in iterator() it was stored
locally. Where should I store it...so that above method can read it again?

Thanks for your help,
RG  



igor.vaynberg wrote:
 
 i dont really get what the problem is
 
 iterator() loads the list of employee instances
 
 in model() you give each of your detachable models an instance of the
 employee, so during that request the model doesnt need to load
 anything because its already there...
 
 -igor
 
 On Thu, May 29, 2008 at 1:31 PM, nanotech [EMAIL PROTECTED] wrote:

 Thanks Igor for your reply.

 So, what do you suggest I should do:

 1. After making the call in iterator() method Should I store the result
 object (Employee object ) in EmployeeDAO and then refer it later when I
 call
public IModel model(Object object) {
return new DetachableEmployeeModel((Employee)object);
}
 and then look it up (by employee Id) from that stored object?

 2. Do I need to take care of synchronization when I store the object?

 Any other suggestions?

 Thanks,
 RG





 igor.vaynberg wrote:

 On Thu, May 29, 2008 at 12:09 PM, nanotech [EMAIL PROTECTED]
 wrote:

 Hi,
 I have a search form (in a panel)with various search fields(as text
 fields)
 on it. User should be able to fill in any number of search parameters
 and
 the results are to be displayed in table (with pagenation + sorting
 capablity on columns) in a different panel on the same page under the
 search
 panel.

 I started looking at DataTable. It seems a option that will solve my
 need.

 Looking at the datatable example on
 http://www.wicket-library.com/wicket-examples/repeater/

 I observed that the following methods get called in the order

 1. size() from CustomSortableDataProvider.
 2. iterator() from CustomSortableDataProvider
 3. load() from CustomLoadableDetachableModel.

 If I understand it correctly:-(Please  correct me if I am wrong)
  * size() requires , the number of records that provider will be
 working
 with. So, in above case i'll have to make query thrrough service layer
 /DAO
 like this  Select count(*) from Employees where  firstName Like 'ABC'
 and
 lastName Like 'XYZ'

 * iterator(final int first, final int count) will call Service
 layer/DAO
 to
 do the actual query like this  Select * from Employees where firstName
 Like
 'ABC' and lastName Like 'XYZ'

 * finally in model ...I will call the CustomLoadableDetachableModel and
 its
 load() method will load the actual Employee model  for each item that
 will
 be displayed on first page of the list being rendered in data table.


 It seems that there are too many queries in case of datatable. If the
 result
 set has thousands of records and we are displaying 100 per page then it
 will
 do 100+ queries to render all the items.

 Questions:
 1. Did I sum up about DataTable correctly?

 no, there are only two queries per page render of datatable.

 If yes, Won't this be a
 bottleneck considering the number of queries?

 2. Is there a better way of doing this?

 not until someone finds one.

 -igor


 Thanks,
 RG







 --
 View this message in context:
 http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context:
 http://www.nabble.com/Using-DataTable-tp17543606p17545174.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To 

Re: Sanity check. Can't inject DAO

2008-05-29 Thread Michael O'Cleirigh

Hi David,

Have you tried with naming the dao to be injected explicitly? i.e.

@SpringBean (name=ProtocolDAO)
   private ProtocolDAO dao;

Regards,

Mike

Could someone take a look at the following to see if they see any 
issues? I'm going to ask on the Spring forums as well, but they have a 
new requirement that you now must have created fifteen new threads in 
order to post anything with URLs or the @ sign. Urgh.


So, using the panel below, the following is thrown...

WicketMessage: Method onLinkClicked of interface 
org.apache.wicket.markup.html.link.ILinkListener targeted at component 
[MarkupContainer [Component id = link, page = 
com.foo.FilterRequest.pages.HomePage, path = 
2:tabs:tabs:panel:tabs:tabs-container:tabs:1:link.TabbedPanel$5, 
isVisible = true, isVersioned = true]] threw an exception


Root cause:

java.lang.IllegalStateException: bean of type [com.foo.ProtocolDAO] 
not found




I believe I have everything in place, config-wise.


/* begin ShowProtocolsPanel.java */
public class ShowProtocolsPanel extends Panel {
@SpringBean
private ProtocolDAO dao;

public ShowProtocolsPanel(String id) {
super(id);

IModel protocolModel = new LoadableDetachableModel() {
protected Object load() {
return dao.findAll();
}
};

add(new ListView(eachItem, protocolModel) {
@Override protected void populateItem(ListItem item) {
final Protocol protocol = (Protocol) 
item.getModelObject();


item.add(new Label(keyword, protocol.getKeyword()));
item.add(new Label(description, 
protocol.getDescription()));

}
});
}
}
/* end ShowProtocolsPanel.java */


!-- begin web.xml --
?xml version=1.0 encoding=UTF-8?
web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
descriptionThis application provides a web frontend to the ACL 
tool./description

display-nameFilter Request Tool/display-name
!-- Additional Spring config --
context-param
descriptionLoad the application context file for bean 
definitions, etc./description

param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param
filter
descriptionServlet 2.3 Filter that binds a JPA EntityManager 
to the thread for the entire
processing of the request. Intended for the Open 
EntityManager in View pattern, i.e.
to allow for lazy loading in web views despite the 
original transactions already being

completed. /description
filter-namelazyLoadingFilter/filter-name

filter-classorg.springframework.orm.jpa.support.OpenEntityManagerInViewFilter/filter-class 


/filter
!-- acegi filter--
filter
descriptionDelegates Filter requests to a Spring-managed 
bean./description

filter-nameAcegi HTTP Request Security Filter/filter-name

filter-classorg.acegisecurity.util.FilterToBeanProxy/filter-class

init-param
descriptionDelegates Filter requests to a list of 
Spring-managed beans./description

param-nametargetClass/param-name

param-valueorg.acegisecurity.util.FilterChainProxy/param-value

/init-param
/filter
!-- Spring Wicket app--
filter
descriptionFilter for initiating handling of Wicket 
requests./description

filter-namewicket-spring/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param
descriptionImplementation of IWebApplicationFactory that 
pulls the WebApplication

object out of spring application context/description
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value 


/init-param
/filter
!-- Acegi filter first, only for /acegi urls --
filter-mapping
filter-nameAcegi HTTP Request Security Filter/filter-name
url-pattern/frtool/*/url-pattern
/filter-mapping
!-- regular mapping for spring wicket app --
filter-mapping
filter-namewicket-spring/filter-name
url-pattern/frtool/*/url-pattern
/filter-mapping
filter-mapping
filter-namelazyLoadingFilter/filter-name
url-pattern/frtool/*/url-pattern
/filter-mapping
!-- Listener for Spring --
listener
descriptionBootstrap listener to start up Spring's root 
WebApplicationContext. Simply

delegates to ContextLoader. /description

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class 


/listener
session-config
session-timeout 30 /session-timeout
/session-config

Re: Using DataTable

2008-05-29 Thread Igor Vaynberg
but you did store the object

 super(emp); == stores it in the model's cache for this request, so
load() never gets called on the same request

-igor

On Thu, May 29, 2008 at 2:13 PM, nanotech [EMAIL PROTECTED] wrote:

 Thanks for the reply...

 Herre is What I have...

 iterator() loads the list of employee instances
public Iterator iterator(int first, int count)
{
List employees = empService.getEmployees();

return employees.iterator();
}

 in model() you give each of your detachable models an instance of the
 employee,
public IModel model(Object object)
{
  return new EmployeeModel((Employee) object, empService);
}

 and in EmployeeModel.java

 public class EmployeeModel extends LoadableDetachableModel {

 private EmployeeService empService;
  private   Long id;
public EmployeeModel(Employee emp, EmployeeService empService) {
super(emp);
this.id = emp.getId();
this.empService= empService;
}

protected Object load() {
 return empService.getEmployee(String.valueOf(id));
}
 }

 So, I my question is: when load() gets called from model() then where should
 it look it up...as you said it does not need to go to database
 againbecause we already have the object. But, we did not store the
 object anywhereso that empService.getEmployee(String.valueOf(id)); can
 go and look it up. When I retrieved Object in iterator() it was stored
 locally. Where should I store it...so that above method can read it again?

 Thanks for your help,
 RG



 igor.vaynberg wrote:

 i dont really get what the problem is

 iterator() loads the list of employee instances

 in model() you give each of your detachable models an instance of the
 employee, so during that request the model doesnt need to load
 anything because its already there...

 -igor

 On Thu, May 29, 2008 at 1:31 PM, nanotech [EMAIL PROTECTED] wrote:

 Thanks Igor for your reply.

 So, what do you suggest I should do:

 1. After making the call in iterator() method Should I store the result
 object (Employee object ) in EmployeeDAO and then refer it later when I
 call
public IModel model(Object object) {
return new DetachableEmployeeModel((Employee)object);
}
 and then look it up (by employee Id) from that stored object?

 2. Do I need to take care of synchronization when I store the object?

 Any other suggestions?

 Thanks,
 RG





 igor.vaynberg wrote:

 On Thu, May 29, 2008 at 12:09 PM, nanotech [EMAIL PROTECTED]
 wrote:

 Hi,
 I have a search form (in a panel)with various search fields(as text
 fields)
 on it. User should be able to fill in any number of search parameters
 and
 the results are to be displayed in table (with pagenation + sorting
 capablity on columns) in a different panel on the same page under the
 search
 panel.

 I started looking at DataTable. It seems a option that will solve my
 need.

 Looking at the datatable example on
 http://www.wicket-library.com/wicket-examples/repeater/

 I observed that the following methods get called in the order

 1. size() from CustomSortableDataProvider.
 2. iterator() from CustomSortableDataProvider
 3. load() from CustomLoadableDetachableModel.

 If I understand it correctly:-(Please  correct me if I am wrong)
  * size() requires , the number of records that provider will be
 working
 with. So, in above case i'll have to make query thrrough service layer
 /DAO
 like this  Select count(*) from Employees where  firstName Like 'ABC'
 and
 lastName Like 'XYZ'

 * iterator(final int first, final int count) will call Service
 layer/DAO
 to
 do the actual query like this  Select * from Employees where firstName
 Like
 'ABC' and lastName Like 'XYZ'

 * finally in model ...I will call the CustomLoadableDetachableModel and
 its
 load() method will load the actual Employee model  for each item that
 will
 be displayed on first page of the list being rendered in data table.


 It seems that there are too many queries in case of datatable. If the
 result
 set has thousands of records and we are displaying 100 per page then it
 will
 do 100+ queries to render all the items.

 Questions:
 1. Did I sum up about DataTable correctly?

 no, there are only two queries per page render of datatable.

 If yes, Won't this be a
 bottleneck considering the number of queries?

 2. Is there a better way of doing this?

 not until someone finds one.

 -igor


 Thanks,
 RG







 --
 View this message in context:
 http://www.nabble.com/Using-DataTable-tp17543606p17543606.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in 

Problem with javascript when using wicket ajax component

2008-05-29 Thread Karen Schaper
Hi Wicket Users,

I need help with a problem I am having when changing the submit button to be
an ajax component.

I am using org.wicketstuff.dojo.markup.html.tooltip.DojoTooltip to create a
tooltip on an image in a datatable.  The tool tips work great until I try to
use an ajax component that filters the data in the table.

My problem is very similar to the post below.


http://www.nabble.com/Problem-with-JavaScript-when-using-Wicket-AJAX-Compo
nents-td14432037.html#a14438456

EXCEPT this person uses the sweetTitles  tooltips.

Is there a solution for this if using the dojo tooltips?

Thank You Very Much,

Karen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default Focus Behavior?

2008-05-29 Thread Doug Donohoe

This helped me.  Thanks, jwcarman!

-Doug


jwcarman wrote:
 
 On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 I suggest wiki.

 
 Done:
 
 http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component
 
 I'm happy now.  My work (no matter how trivial) may help someone
 someday! :)  I don't have time to do so now, but I might add in some
 examples on how to do focus on errors, etc.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Default-Focus-Behavior--tp15934889p17547678.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems toggling visibility on nested borders

2008-05-29 Thread Igor Vaynberg
please create a quickstart and attach it to a jira issue. this is one
area of wicket that is currently weak, and will need to be rebuilt in
the future 1.5/2.0 release. for now we will try to find a solution for
you.

-igor

On Wed, May 28, 2008 at 11:47 PM, Peter Gardfjell
[EMAIL PROTECTED] wrote:

 Hi all,

 I am trying to implement a reusable CollapsableBorder component.
 I intend to use it to create collapsable sections on my web page (clicking a
 link collapses/expands the section, i.e. the border contents).
 The component seems to work just fine for basic usage.
 The problem, however, occurs when I attempt to nest a collapsable border
 inside another collapsable border.

 The following code shows how the CollapsableBorder component is implemented:

public class CollapsableBorder extends Border {

private boolean isCollapsed = false;

public CollapsableBorder(final String id, String header) {
super(id);

// Create a markup container that wraps the border's body
final WebMarkupContainer bodyWrapper = new
 WebMarkupContainer(body) {
@Override
public boolean isVisible() {
return !CollapsableBorder.this.isCollapsed;
}
};
bodyWrapper.setOutputMarkupPlaceholderTag(true);

final AjaxLink collapseLink = new AjaxLink(collapseLink) {
@Override
public void onClick(AjaxRequestTarget target) {
// Toggle visibility of border's body
CollapsableBorder.this.isCollapsed =
 !CollapsableBorder.this.isCollapsed;
target.addComponent(bodyWrapper);
}
};

add(collapseLink);
collapseLink.add(new Label(header, header));
add(bodyWrapper);
bodyWrapper.setVisible(true);
bodyWrapper.add(getBodyContainer());
}
}

 with the following markup:

html
body

  wicket:border

   #  [Header goes here]
  div wicket:id=body
wicket:body/
  /div

  /wicket:border

/body
/html

 I also use it in a very simple example where I nest two CollapsableBorders
 as follows:
html xmlns=http://www.w3.org/1999/xhtml;
body

div wicket:id=outerBorder
  Outer border content
  div style=margin: 10px; wicket:id=innerBorder
Inner border content
  /div
/div

/body
/html

 with corresponding code:

public class NestedBordersTestPage extends WebPage {
public NestedBordersTestPage() {
super();

CollapsableBorder outerBorder = new
 CollapsableBorder(outerBorder, Outer border);
CollapsableBorder innerBorder = new
 CollapsableBorder(innerBorder, Inner border);
add(outerBorder);
outerBorder.add(innerBorder);
}
}


 Find the source code for this example (generated from the quickstart maven
 archetype) attached to this mail (
 http://www.nabble.com/file/p17528668/collapsable.border.tar.gz
 collapsable.border.tar.gz ).
 On the attached example application, the following particular sequence of
 steps results in an exception being thrown:

 1. Click Inner border link (i.e., collapse inner border)
 2. Click Outer border link (collapse outer border)
 3. Click Outer border link again (try to expand outer border)

 This results in WicketMessage: Expected close tag for div style=margin:
 10px; wicket:id=innerBorder

 I am sure many of you folks have implemented similar functionality. Any
 pointers on
 what I'm doing wrong and how to fix it would really be appreciated.

 Thanks, Peter
 --
 View this message in context: 
 http://www.nabble.com/Problems-toggling-visibility-on-nested-borders-tp17528668p17528668.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread David Nedrow


On May 29, 2008, at 5:18 PM, Michael O'Cleirigh wrote:


Hi David,

Have you tried with naming the dao to be injected explicitly? i.e.

@SpringBean (name=ProtocolDAO)
  private ProtocolDAO dao;


Interesting. That seems to get me closer...

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean  
named 'ProtocolDAO' must be of type  
[com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually of  
type [$Proxy30]


Checking google...

-David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Draggable table row using dojo

2008-05-29 Thread craigchapman

Hi,

I currently have an AjaxFallbackDefaultDataTable that displays a bunch of
user data. I want each row in the table to be draggable, so I can, for
example, drag a user into particular user group.

I started out using scriptaculous contrib but found the only release I could
find had compatibility issues (I'm using wicket version 1.3.3), so I'm now
trying the dojo contrib.

The code I have for the table is:

List columns = new ArrayList();
columns.add(new PropertyColumn(new Model(ID), id, id));
columns.add(new PropertyColumn(new Model(Username), 
username,
username));

columns.add(new PropertyColumn(new Model(First Name),
userProfile.firstName, userProfile.firstName));
columns.add(new PropertyColumn(new Model(Surname),
userProfile.surname, userProfile.surname));

// add a label Yes or No depending on whether competition is
// active
columns.add(new PropertyColumn(new Model(Enabled), enabled, 
enabled)
{
@Override
public void populateItem(Item cellItem, String 
componentId, IModel model)
{
if (((User) model.getObject()).isEnabled()) {
cellItem.add(new Label(componentId, 
Yes));
} else {
cellItem.add(new Label(componentId, 
No));
}
}
});

columns.add(new AbstractColumn(new Model()) {
public void populateItem(Item cellItem, String 
componentId, IModel model)
{
cellItem.add(new ActionPanel(componentId, 
model));
}
});

add(new AjaxFallbackDefaultDataTable(userTable, columns, 
dataProvider,
10));


How do I make each row draggable using the dojo library?

Thanks in advance,
Craig
-- 
View this message in context: 
http://www.nabble.com/Draggable-table-row-using-dojo-tp17548853p17548853.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Default Focus Behavior?

2008-05-29 Thread James Carman
Glad to hear it!  If you are using it to highlight/focus on errors and
you have the time, update the wiki with a little example since I never
got around to it. :)


On Thu, May 29, 2008 at 6:43 PM, Doug Donohoe [EMAIL PROTECTED] wrote:

 This helped me.  Thanks, jwcarman!

 -Doug


 jwcarman wrote:

 On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 I suggest wiki.


 Done:

 http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component

 I'm happy now.  My work (no matter how trivial) may help someone
 someday! :)  I don't have time to do so now, but I might add in some
 examples on how to do focus on errors, etc.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context: 
 http://www.nabble.com/Default-Focus-Behavior--tp15934889p17547678.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread James Carman
I don't think the proxy stuff is your problem.  Is your DAO class
interface-based (it should be).  Meaning, do you have a DAO interface
that your implementation class implements (this part is key)?  I have
had situations where I forgot to add in the implements FooDao to my
implementation class even though it had all the required methods.

On Thu, May 29, 2008 at 7:58 PM, David Nedrow [EMAIL PROTECTED] wrote:

 On May 29, 2008, at 7:50 PM, David Nedrow wrote:


 On May 29, 2008, at 5:18 PM, Michael O'Cleirigh wrote:

 Hi David,

 Have you tried with naming the dao to be injected explicitly? i.e.

 @SpringBean (name=ProtocolDAO)
  private ProtocolDAO dao;

 Interesting. That seems to get me closer...

 org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean
 named 'ProtocolDAO' must be of type
 [com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually of type
 [$Proxy30]

 Checking google...


 Looks like I may need to add 'proxy-target-class=true' to my
 tx:annotation-driven/ element. That gets me all the way to the actual data
 object, though there is a failure there I'll have to look at.

 Thanks for getting me pointed in the right direction.

 -David


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: two pages have same id in the default pagemap

2008-05-29 Thread xiefei

I have create a jira issue as http://issues.apache.org/jira/browse/WICKET-1672


 Date: Thu, 29 May 2008 19:13:37 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap
 
 Those pages are in a different WebApplication? Then they also should
 have a different wicket session. So you have 2 applications in 1
 webapp? Just like our examples?
 
 Hmm need to check something out then, because if they share the same
 http session then the application should be in the name of the
 diskpage store i guess.
 
 On 5/29/08, xiefei  wrote:

 These two pages are in different WebApplication and are definitely different
 subclasses of WebPage.


 
 Date: Thu, 29 May 2008 13:30:30 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap

 is the page really created twice?

 Or is it the same page really but you just few it through 2 browsers?
 If you page version works correctly then in 1.3+ this shouldnt be any
 problem
 You can create a pagemap per window if you want. by creating a page in a
 different pagemap

 johan


 2008/5/29 xiefei :

 Not sure whether this is a bug or not.

 I have two wicket WebAppilcation in one webapp. When I open two browser
 window each pointing to a page in one of them,

 they both get id=0 in the default pagemap. Then in the subsequent
 requests Session.getPage() sometimes return wrong page.

 Maybe I should assign an individual pagemap for each wicket
 WebApplication?
 and how ?

 wicket version is 1.4m1
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html

 _
 多个邮箱同步管理,live mail客户端万人抢用中
 http://get.live.cn/product/mail.html

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



_
用手机MSN聊天写邮件看空间,无限沟通,分享精彩!
http://mobile.msn.com.cn/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: two pages have same id in the default pagemap

2008-05-29 Thread Igor Vaynberg
it would be great if you could provide a quickstart. we have hundreds
of issues between less then ten of us, and if each person who creates
an issue could save as twenty minutes by creating the quickstart
themselves it would take us a whole lot less time to go through them.

-igor

2008/5/29 xiefei [EMAIL PROTECTED]:

 I have create a jira issue as http://issues.apache.org/jira/browse/WICKET-1672

 
 Date: Thu, 29 May 2008 19:13:37 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap

 Those pages are in a different WebApplication? Then they also should
 have a different wicket session. So you have 2 applications in 1
 webapp? Just like our examples?

 Hmm need to check something out then, because if they share the same
 http session then the application should be in the name of the
 diskpage store i guess.

 On 5/29/08, xiefei  wrote:

 These two pages are in different WebApplication and are definitely different
 subclasses of WebPage.


 
 Date: Thu, 29 May 2008 13:30:30 +0200
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: two pages have same id in the default pagemap

 is the page really created twice?

 Or is it the same page really but you just few it through 2 browsers?
 If you page version works correctly then in 1.3+ this shouldnt be any
 problem
 You can create a pagemap per window if you want. by creating a page in a
 different pagemap

 johan


 2008/5/29 xiefei :

 Not sure whether this is a bug or not.

 I have two wicket WebAppilcation in one webapp. When I open two browser
 window each pointing to a page in one of them,

 they both get id=0 in the default pagemap. Then in the subsequent
 requests Session.getPage() sometimes return wrong page.

 Maybe I should assign an individual pagemap for each wicket
 WebApplication?
 and how ?

 wicket version is 1.4m1
 _
 Windows Live Photo gallery 数码相机的超级伴侣,轻松管理和编辑照片,还能制作全景美图!
 http://get.live.cn/product/photo.html

 _
 多个邮箱同步管理,live mail客户端万人抢用中
 http://get.live.cn/product/mail.html

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 _
 用手机MSN聊天写邮件看空间,无限沟通,分享精彩!
 http://mobile.msn.com.cn/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Inheritance at the panel level

2008-05-29 Thread Chris Colman
I know markup inheritance (wicket:child/wicket:child) works at the Page
level but does wicket also support markup inheritance at the in Panel
level?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Inheritance at the panel level

2008-05-29 Thread James Carman
Yes, all components support markup inheritance.  Give it a try!

On Thu, May 29, 2008 at 9:14 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 I know markup inheritance (wicket:child/wicket:child) works at the Page
 level but does wicket also support markup inheritance at the in Panel
 level?

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sanity check. Can't inject DAO

2008-05-29 Thread Chris Colman
Pardon my possible ignorance but didn't the need to use DAOs evaporate
once transparent persistence (eg., Hibernate, JDO) hit the streets a few
years back?

I always thought the DAO architecture was what we used in the old days
in the absence of mature transparent persistence solutions when we had a
DAO per persistent class to help with the persistence of that class. Now
that persistence is effectively transparent (using Hibernate, JPOX
etc.,) aren't they now redundant?

  Have you tried with naming the dao to be injected explicitly? i.e.
 
  @SpringBean (name=ProtocolDAO)
   private ProtocolDAO dao;
 
  Interesting. That seems to get me closer...
 
  org.springframework.beans.factory.BeanNotOfRequiredTypeException:
Bean
  named 'ProtocolDAO' must be of type
  [com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually of
type
  [$Proxy30]
 
  Checking google...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Inheritance at the panel level

2008-05-29 Thread Chris Colman
Great news, thanks!

 Yes, all components support markup inheritance.  Give it a try!
 
 On Thu, May 29, 2008 at 9:14 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  I know markup inheritance (wicket:child/wicket:child) works at the
Page
  level but does wicket also support markup inheritance at the in
Panel
  level?
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread James Carman
You should still abstract your data access behind some interface.

On Thu, May 29, 2008 at 9:19 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 Pardon my possible ignorance but didn't the need to use DAOs evaporate
 once transparent persistence (eg., Hibernate, JDO) hit the streets a few
 years back?

 I always thought the DAO architecture was what we used in the old days
 in the absence of mature transparent persistence solutions when we had a
 DAO per persistent class to help with the persistence of that class. Now
 that persistence is effectively transparent (using Hibernate, JPOX
 etc.,) aren't they now redundant?

  Have you tried with naming the dao to be injected explicitly? i.e.
 
  @SpringBean (name=ProtocolDAO)
   private ProtocolDAO dao;
 
  Interesting. That seems to get me closer...
 
  org.springframework.beans.factory.BeanNotOfRequiredTypeException:
 Bean
  named 'ProtocolDAO' must be of type
  [com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually of
 type
  [$Proxy30]
 
  Checking google...

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread Igor Vaynberg
the need for dao per entity class has gone away with transparent
persistence, however there is still a dao that is a hibenate
session, jpa entitymanager, cayenne context, or whatever.

also, some people still use dao to store finder/batch update methods.

-igor

On Thu, May 29, 2008 at 6:19 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 Pardon my possible ignorance but didn't the need to use DAOs evaporate
 once transparent persistence (eg., Hibernate, JDO) hit the streets a few
 years back?

 I always thought the DAO architecture was what we used in the old days
 in the absence of mature transparent persistence solutions when we had a
 DAO per persistent class to help with the persistence of that class. Now
 that persistence is effectively transparent (using Hibernate, JPOX
 etc.,) aren't they now redundant?

  Have you tried with naming the dao to be injected explicitly? i.e.
 
  @SpringBean (name=ProtocolDAO)
   private ProtocolDAO dao;
 
  Interesting. That seems to get me closer...
 
  org.springframework.beans.factory.BeanNotOfRequiredTypeException:
 Bean
  named 'ProtocolDAO' must be of type
  [com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually of
 type
  [$Proxy30]
 
  Checking google...

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ajaxed panel invisible in IE

2008-05-29 Thread achu18

hi all,
i have an ajax link that targets another panel. when i click that link, i
see nothing in IE, works ok in FireFox. in the wicket ajax debug console got
an Exception evaluating javascript
INFO: 
?xml version=1.0
encoding=UTF-8?ajax-responseevaluate![CDATA[animationManager.setupTransitionFade('infoPanel53');]]/evaluatecomponent
id=infoPanel53 ![CDATA[div class=infopanel style=visibility:
hidden; id=infoPanel53 
  div id=info__panel54 
  div class=helpPanel!--  -- 
div class=helpContent !--  --  
  Terms Of Usebr/br/ 
  doda ka ppoooedbr/ 
/div 
this is the new shit! 
  /div 
/div 
/div]]/componentevaluate![CDATA[ajaxBlocked = false;
]]/evaluateevaluate![CDATA[Wicket.Focus.setFocusOnId(null);]]/evaluateevaluate![CDATA[animationManager.doTransitionFade('infoPanel53',
400);]]/evaluate/ajax-response
INFO: Response parsed. Now invoking steps...
ERROR: Exception evaluating javascript: [object Error]

after some more debugging i found that if i removed all the styles from my
divs (commented class=title stuff), i could see the panel, but text was
all pixelated. the wierd thing is if i do a page refresh, i see my panel and
the text is not pixelated.

Any help appreciated. 
Cheers...
-- 
View this message in context: 
http://www.nabble.com/ajaxed-panel-invisible-in-IE-tp17550407p17550407.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sanity check. Can't inject DAO

2008-05-29 Thread Chris Colman
Oh ok, it's probably just a terminology issue then. We use JDO and hence
the PersistenceManager is our equivalent to the others you speak of.

In the past DAOs were always a beast that had to be dealt with
explicitly to store and retrieve objects. The Hibernate Session, JDO
PersistenceManager etc., are a lot less 'manual' with automatic 'load on
demand' and update of dirty objects and so I never associated them with
the old fashioned DAOs we used to create.

We also use the Exposed POJO Domain Model pattern with its
'repositories' (for locating objects) and 'services' (for making
significant model changes according to embedded business rules) which
allows us to write code that can be easily ported to any transparent
persistence provider and it manages all the dependency injection in a
very light weight manner in simple Java rather than a 'sea of XML' which
really turned me off Spring.


 the need for dao per entity class has gone away with transparent
 persistence, however there is still a dao that is a hibenate
 session, jpa entitymanager, cayenne context, or whatever.
 
 also, some people still use dao to store finder/batch update methods.
 
 -igor
 
 On Thu, May 29, 2008 at 6:19 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  Pardon my possible ignorance but didn't the need to use DAOs
evaporate
  once transparent persistence (eg., Hibernate, JDO) hit the streets a
few
  years back?
 
  I always thought the DAO architecture was what we used in the old
days
  in the absence of mature transparent persistence solutions when we
had a
  DAO per persistent class to help with the persistence of that class.
Now
  that persistence is effectively transparent (using Hibernate, JPOX
  etc.,) aren't they now redundant?
 
   Have you tried with naming the dao to be injected explicitly?
i.e.
  
   @SpringBean (name=ProtocolDAO)
private ProtocolDAO dao;
  
   Interesting. That seems to get me closer...
  
  
org.springframework.beans.factory.BeanNotOfRequiredTypeException:
  Bean
   named 'ProtocolDAO' must be of type
   [com.vzbi.ncs.argfrp.jpa.netconf.ProtocolDAO], but was actually
of
  type
   [$Proxy30]
  
   Checking google...
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread James Carman
On Thu, May 29, 2008 at 10:47 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 Oh ok, it's probably just a terminology issue then. We use JDO and hence
 the PersistenceManager is our equivalent to the others you speak of.

The PersistenceManager shouldn't be part of your domain model.


 In the past DAOs were always a beast that had to be dealt with
 explicitly to store and retrieve objects. The Hibernate Session, JDO
 PersistenceManager etc., are a lot less 'manual' with automatic 'load on
 demand' and update of dirty objects and so I never associated them with
 the old fashioned DAOs we used to create.


Hibernate vs. JDO vs. iBATIS vs. JPA is still an implementation
detail.  Your true domain shouldn't care what persistence technology
you're using.

 We also use the Exposed POJO Domain Model pattern with its
 'repositories' (for locating objects) and 'services' (for making
 significant model changes according to embedded business rules) which
 allows us to write code that can be easily ported to any transparent
 persistence provider and it manages all the dependency injection in a
 very light weight manner in simple Java rather than a 'sea of XML' which
 really turned me off Spring.



The Exposed POJO Domain Model would prescribe that you use an
interface for your repositories.  The implementation of those
repositories would be based on the persistence technology, but it
could be switched out without changing any of your other domain
classes (the interface would stay that same).  So, you still need the
repository/dao abstraction (most folks still use the term DAO rather
than repository in my experience).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread David Nedrow


On May 29, 2008, at 8:51 PM, James Carman wrote:


I don't think the proxy stuff is your problem.  Is your DAO class
interface-based (it should be).  Meaning, do you have a DAO interface
that your implementation class implements (this part is key)?



Yes, the classes are interface-based. Eg.,

public class ProtocolDAO extends JpaDaoSupport implements IProtocolDAO

I think it's down to fiuring out what I've done wrong in my Panel. I  
get a classcastexception at the (Protocol) item.getModelObject();  
line. Listed below is both my Panel and the appropriate signature from  
ProtocolDAO.findAll().


public class ShowProtocolsPanel extends Panel {
@SpringBean(name=ProtocolDAO)
private ProtocolDAO dao;

public ShowProtocolsPanel(String id) {
super(id);

IModel protocolModel = new LoadableDetachableModel() {
protected Object load() {
return dao.findAll();
}
};

add(new ListView(eachItem, protocolModel) {
@Override protected void populateItem(ListItem item) {
final Protocol protocol = (Protocol)  
item.getModelObject();


item.add(new Label(keyword, protocol.getKeyword()));
item.add(new Label(description,  
protocol.getDescription()));

}
});
}
}


public class ProtocolDAO extends JpaDaoSupport implements IProtocolDAO {
...
   @Transactional(readOnly = true)
@SuppressWarnings(unchecked)
@Override
public ListProtocol findAll(final int... rowStartIdxAndCount) {
 ...
 }
 ...
}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ajax works in DEVELOPMENT, not in DEPLOYMENT

2008-05-29 Thread Sam Barnum
I'm using an AjaxFormChoiceComponentUpdatingBehavior on a RadioGroup  
to show/hide a component elsewhere on the page.


This works great in development mode.  When I push it up to the  
server, I get nothing, clicking on the various radio buttons doesn't  
do anything.  And unfortunately, the handy wicket ajax debugger isn't  
there in deployment mode.


I've looked at the javascript code, and aside from the markup IDs  
being different, everything looks all right.  No javascript errors in  
FireFox.


I've tried tracing through it in Firebug, but it gets really  
convoluted.  A lot of ajax stuff, doPost() etc. happens.  It's hard  
to get a break point in the callback though.


What are the possible reasons this might work in development but not  
in deployment?


How can I debug code that's on the server? Is there any way to get  
the ajax feedback panel to come up on the server?


-Sam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax works in DEVELOPMENT, not in DEPLOYMENT

2008-05-29 Thread Igor Vaynberg
On Thu, May 29, 2008 at 9:10 PM, Sam Barnum [EMAIL PROTECTED] wrote:
 I'm using an AjaxFormChoiceComponentUpdatingBehavior on a RadioGroup to
 show/hide a component elsewhere on the page.

 This works great in development mode.  When I push it up to the server, I
 get nothing, clicking on the various radio buttons doesn't do anything.  And
 unfortunately, the handy wicket ajax debugger isn't there in deployment
 mode.

 I've looked at the javascript code, and aside from the markup IDs being
 different, everything looks all right.  No javascript errors in FireFox.

 I've tried tracing through it in Firebug, but it gets really convoluted.  A
 lot of ajax stuff, doPost() etc. happens.  It's hard to get a break point in
 the callback though.

 What are the possible reasons this might work in development but not in
 deployment?

 How can I debug code that's on the server? Is there any way to get the ajax
 feedback panel to come up on the server?

getDebugSettings().setAjaxDebugModeEnabled(true);

-igor



 -Sam

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting dynamic content

2008-05-29 Thread Rodolfo Hansen
there is a DynamicWebResource (String filename) constructor you can use to
specify the filename you want for the resource...

On Thu, May 29, 2008 at 4:27 PM, Martin Makundi 
[EMAIL PROTECTED] wrote:

 It is an IE bug or feature that it disregards the content type
 after opening up the download (file save/open) dialog - It uses
 windows file extension detection after that ;) On Firefox the content
 type suffices, but for IE I must hack the filename too.

 **
 Martin

 2008/5/29 Rodolfo Hansen [EMAIL PROTECTED]:
  I think maybe what you want is to use a DynamicWebResource
  and customize the ResourceState to return the correct content type...
 
  It makes more sense that a .doc link be of that type I think...
 
  On Thu, May 29, 2008 at 10:18 AM, Martijn Lindhout 
 [EMAIL PROTECTED]
  wrote:
 
  setting the HTTP Content-Disposition may help. The value should be
  something
  like
 
  attachment; filename=DummyFilename.doc
 
  2008/5/26 Martin Makundi [EMAIL PROTECTED]:
 
   Hi!
  
   I have a web page whose content the user is supposed to save as a
   XYZ.doc file. With Firefox it is sufficient to set the content-type to
   application/msword.
  
   However, Internet Explorer takes my context path (the part before the
   url parameters) as the filename, say webapp and forgets about the
   content type already. Is there a simple way to mount my dnyamic page
   as DummyFilename.doc?
  
   I would rather not use BookmarkablePage because the parameters are
   huge. Ofcourse I could pass the parameters via an internal model, but
   if there is a fast moujnting strategy for a dynamic page, I would be
   interested.
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Martijn Lindhout
  JointEffort IT Services
  http://www.jointeffort.nl
  [EMAIL PROTECTED]
  +31 (0)6 18 47 25 29
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mounting dynamic content

2008-05-29 Thread Martin Makundi
This is already performed automatically by ResourceStreamRequestTarget
but IE disregards the header after opening the download-dialog:

// and content disposition if any
String file = getFileName();
if (file != null  (response instanceof WebResponse))
{
((WebResponse)response).setAttachmentHeader(file);
}

My code:

  public void onClick() {
IResourceStream resourceStream = new AbstractResourceStream() {
  private ByteArrayInputStream byteStream;

  public synchronized void close() throws IOException {
if (byteStream != null) {
  byteStream.close();
  byteStream = null;
}
  }

  public synchronized InputStream getInputStream()
  throws ResourceStreamNotFoundException {
FileAttachment fileAttachmentWithBytes = DatabaseServices
.getById(fileAttachment);
return byteStream = new ByteArrayInputStream(
fileAttachmentWithBytes.getBytes());
  }

};

getRequestCycle().setRequestTarget(
new ResourceStreamRequestTarget(resourceStream,
fileAttachment.getName()));
  }



**
Martin


2008/5/30 Rodolfo Hansen [EMAIL PROTECTED]:
 there is a DynamicWebResource (String filename) constructor you can use to
 specify the filename you want for the resource...

 On Thu, May 29, 2008 at 4:27 PM, Martin Makundi 
 [EMAIL PROTECTED] wrote:

 It is an IE bug or feature that it disregards the content type
 after opening up the download (file save/open) dialog - It uses
 windows file extension detection after that ;) On Firefox the content
 type suffices, but for IE I must hack the filename too.

 **
 Martin

 2008/5/29 Rodolfo Hansen [EMAIL PROTECTED]:
  I think maybe what you want is to use a DynamicWebResource
  and customize the ResourceState to return the correct content type...
 
  It makes more sense that a .doc link be of that type I think...
 
  On Thu, May 29, 2008 at 10:18 AM, Martijn Lindhout 
 [EMAIL PROTECTED]
  wrote:
 
  setting the HTTP Content-Disposition may help. The value should be
  something
  like
 
  attachment; filename=DummyFilename.doc
 
  2008/5/26 Martin Makundi [EMAIL PROTECTED]:
 
   Hi!
  
   I have a web page whose content the user is supposed to save as a
   XYZ.doc file. With Firefox it is sufficient to set the content-type to
   application/msword.
  
   However, Internet Explorer takes my context path (the part before the
   url parameters) as the filename, say webapp and forgets about the
   content type already. Is there a simple way to mount my dnyamic page
   as DummyFilename.doc?
  
   I would rather not use BookmarkablePage because the parameters are
   huge. Ofcourse I could pass the parameters via an internal model, but
   if there is a fast moujnting strategy for a dynamic page, I would be
   interested.
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Martijn Lindhout
  JointEffort IT Services
  http://www.jointeffort.nl
  [EMAIL PROTECTED]
  +31 (0)6 18 47 25 29
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax works in DEVELOPMENT, not in DEPLOYMENT

2008-05-29 Thread Sam Barnum

Thanks as always, Igor




getDebugSettings().setAjaxDebugModeEnabled(true);

-igor




-Sam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Sanity check. Can't inject DAO

2008-05-29 Thread Timo Rantalaiho
On Thu, 29 May 2008, David Nedrow wrote:
 public class ProtocolDAO extends JpaDaoSupport implements IProtocolDAO
...
 
 public class ShowProtocolsPanel extends Panel {
 @SpringBean(name=ProtocolDAO)
 private ProtocolDAO dao;

Clearly this should be IProtocolDao, so that the component
depends on interface and not on implementation.

I'm not sure if this affects your issue though, we use both 
forms all the time with Spring 2.5.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best Wicket Books or Tutorials

2008-05-29 Thread Samit

Knowfree.net is having 2 best books of WICKET..

1. Pro Wicket
2. _Programming__Java__Wicket__Enjoying_Web_Development_with_Wicket

Download is free...Just search for the book on the site and download
it.

Bye
Samit

-
Samit :confused:
-- 
View this message in context: 
http://www.nabble.com/Best-Wicket-Books-or-Tutorials-tp16392413p17551921.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



hi, is it that the wicketstuff website broken??

2008-05-29 Thread shrimpywu

hi, is it that the wicketstuff website broken??

i can not get into it.
-- 
View this message in context: 
http://www.nabble.com/hi%2C-is-it-that-the-wicketstuff-website-broken---tp17552072p17552072.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]