wicket logo

2009-05-27 Thread Luther Baker
Is there an official Wicket website badge?

Any problems with dropping the orange Wicket logo into a Power By Wicket
slogan at the bottom of a site?

-Luther


Re: What's the simplest way to do Context-sensitive Authorization in Wicket?

2009-05-27 Thread Igor Vaynberg
i was being facetious :)

-igor

On Tue, May 26, 2009 at 10:39 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 I didn't mean than yours - Igor - I meant more than the original
 request.  He simply requested basically exactly what you gave him.  In
 mine, each permission can be granted dynamically in the DB.  You can
 be given edit, delete, view, or add permissions each by section of the
 site / category of the content within that section, etc.  It's much
 more extensible, at the cost of being much more complicated.

 So, I was just adding to it - not putting yours down - since yours is
 exactly what he requested.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, May 27, 2009 at 12:26 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 On Tue, May 26, 2009 at 9:57 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:

 (mine is actually much more complex
 and dynamic than yours, but this is the basic idea that you could
 apply to yours and build with your domain)

 i hope so - seeing how mine was written in about ten seconds :)

 -igor

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: how to control/locate which html to load

2009-05-27 Thread Anirban Basak
Wow! Great... I love wicket and this group :) 


BTW, sorry I misunderstood you on the 1st place

Warm Regards,
Anirban Basak
Ph : 91 33 2357 7177 Extn: 277



-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Wednesday, May 27, 2009 11:00 AM
To: users@wicket.apache.org
Subject: Re: how to control/locate which html to load

why do you assume that session.setstyle() has something to do with
css? you should read
http://cwiki.apache.org/confluence/display/WICKET/Localization+and+Skinning+
of+Applications

-igor

On Tue, May 26, 2009 at 10:16 PM, Anirban Basak
anirban.ba...@rebaca.com wrote:
 Thanks Igor! But in my case, this is not about changing the css properties
 only. I need few html changes as well. For example, in higher resolution
 screen form input fields needs to be displayed besides label to make it
look
 professional. Is there any other way (or hack!) to determine markup file
 location at runtime (on every request - so that I can load/locate html
based
 on device category)!


 Warm Regards,
 Anirban Basak
 Ph : 91 33 2357 7177 Extn: 277


 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Tuesday, May 26, 2009 11:06 PM
 To: users@wicket.apache.org
 Subject: Re: how to control/locate which html to load

 you should use session.setstyle() and have a seperate style per screen
 resolution variant

 -igor

 2009/5/26 Anirban Basak anirban.ba...@rebaca.com:
 Hi!

 I’m writing a mobile web interface using wicket. Since there are mobile
 devices with various screen resolutions, I need to maintain separate set
 of
 htmls (per component class) based on category/resolution. I’m able to
 define
 custom place for htmls (thanks to


http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
 ), but having problem with locating correct file at runtime. Wicket is
 invoking locate(Class clazz, String path) of my custom
 ResourceStreamLocator
 for the 1st time only. Then, I assume, its remembering the file path or
 stream and always showing htmls for the 1st requesting device category!
Is
 there any way (a hack may be!) to instruct/force wicket to invoke
 locate(…)
 everytime a request comes?



 Below a snippet of my current implementation:



 public class MyWebApplication extends WebApplication {

            …



            protected void init() {

                        IResourceSettings resourceSettings =
 getResourceSettings();

                        resourceSettings.setResourceStreamLocator(new
 MyResourceLocator());

            }

 }



 public class MyResourceLocator extends ResourceStreamLocator {

            …



 public IResourceStream locate(final Class clazz, final String path) {

                        MySession session = MySession.get();

                        IResourceStream located =
 locateByClassLoader(clazz,
 getHtmlPath(path, session.getDevice()));

                        return located;

            }



            private String getHtmlPath(String path, PlainDevice d) {

                        if (category-1) {

                                    return category-1-folder-path +
 path.substring(path.lastIndexOf(/) + 1);

                        } else {

                                    return category-2-folder-path +
 path.substring(path.lastIndexOf(/) + 1);

                        }

            }



            protected IResourceStream locateByClassLoader(final Class
 clazz,
 final String path) {

                        ClassLoader classLoader = null;



        if (classLoader == null) {

            // use context classloader when no specific classloader is set

            // (package resources for instance)

            classLoader = Thread.currentThread().getContextClassLoader();

        }



        if (clazz != null) {

            classLoader = clazz.getClassLoader();

        }



        if (classLoader == null) {

            // use Wicket classloader when no specific classloader is set

            classLoader = getClass().getClassLoader();

        }



        logger.debug(path :  + path);

        // Try loading path using classloader

        final URL url = classLoader.getResource(path);

        if (url != null) {

            return new UrlResourceStream(url);

        }

        return null;

            }

 }





 /Anirban







 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.339 / Virus Database: 270.12.41/2136 - Release Date: 05/26/09
 20:20:00

 No virus found in this outgoing message.
 Checked by AVG - www.avg.com
 Version: 8.5.339 / Virus Database: 270.12.41/2136 - Release Date: 05/26/09
 20:20:00


 -
 To unsubscribe, e-mail: 

when will be wicket 1.4 final release

2009-05-27 Thread danisevsky
Hi,
I would like ask you when I can expect wicket 1.4 final release? I am asking
because I am waiting for wicket web beans which will be release after filnal
wicket 1.4 release.
Thanks for answer.


Re: [announce] WicketStuff Artwork new release

2009-05-27 Thread Stefan Jozsa


Thanks a lot Nino,

Stefan Jozsa


  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: What's the simplest way to do Context-sensitive Authorization in Wicket?

2009-05-27 Thread Sam Stainsby
My code was bigger but I didn't want to brag :-)

On Tue, 26 May 2009 23:11:06 -0700, Igor Vaynberg wrote:

 i was being facetious :)
 
 -igor
 
 On Tue, May 26, 2009 at 10:39 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 I didn't mean than yours - Igor - I meant more than the original
 request.  He simply requested basically exactly what you gave him.  In
 mine, each permission can be granted dynamically in the DB.  You can be
 given edit, delete, view, or add permissions each by section of the
 site / category of the content within that section, etc.  It's much
 more extensible, at the cost of being much more complicated.

 So, I was just adding to it - not putting yours down - since yours is
 exactly what he requested.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, May 27, 2009 at 12:26 AM, Igor Vaynberg
 igor.vaynb...@gmail.com wrote:
 On Tue, May 26, 2009 at 9:57 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:

 (mine is actually much more complex
 and dynamic than yours, but this is the basic idea that you could
 apply to yours and build with your domain)

 i hope so - seeing how mine was written in about ten seconds :)

 -igor

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
 additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
 additional commands, e-mail: users-h...@wicket.apache.org



 - To
 unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional
 commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



ComponentModel

2009-05-27 Thread Petr Nejedlík
Hi,

Class ComponentModel in version 1.4rc4 is generic but setObject methods
still use Object instead of T.
Is there any reason why setObject methods in ComponentModel and in inner
class WrapModel does not use type T as input parameter?

I recommend to change from

public final void setObject(Object object)
{
throw new RuntimeException(set object call not expected on a
IComponentAssignedModel);
}

to

public final void setObject(T object)
{
throw new RuntimeException(set object call not expected on a
IComponentAssignedModel);
}

and this

protected void setObject(Component component, Object object)
{
}

to

protected void setObject(Component component, T object)
{
}

and this

/**
 * @see org.apache.wicket.model.IModel#setObject(java.lang.Object)
 */
public void setObject(Object object)
{
ComponentModel.this.setObject(component, object);
}

to

/**
 * @see org.apache.wicket.model.IModel#setObject(java.lang.Object)
 */
public void setObject(T object)
{
ComponentModel.this.setObject(component, object);
}

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Panel switching in LinkTree.onNodeLinkClicked() doesn't work

2009-05-27 Thread Bucyrus

Im using a org.apache.wicket.extensions.markup.html.tree.Tree now instead of
a LinkTree. This seems to work.
Don't forget to call setOutputMarkupId ( true) for all panels before they
get displayed.
-- 
View this message in context: 
http://www.nabble.com/Panel-switching-in-LinkTree.onNodeLinkClicked%28%29-doesn%27t-work-tp23708299p23738359.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Date Format in Wicket

2009-05-27 Thread srinivas

Hi,

How to set the date format at the project level. I have dates displaying 
at no. of locations in my project.
Currently i have to format the date patter in each and every page as the 
default date patter of wicket is (MM/DD/).
But i want the date formate to be (DD/MM/). so if any one knows this 
tell me.

Thanks in advance.

Regards,
Srinivasa Raju CH.





Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail  notify us 
immediately at ad...@sifycorp.com


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Date Format in Wicket

2009-05-27 Thread Martin Makundi
Setting user locale might help.

**
Martin

2009/5/27 srinivas srinivas.r...@sifycorp.com:
 Hi,

 How to set the date format at the project level. I have dates displaying at
 no. of locations in my project.
 Currently i have to format the date patter in each and every page as the
 default date patter of wicket is (MM/DD/).
 But i want the date formate to be (DD/MM/). so if any one knows this
 tell me.
 Thanks in advance.

 Regards,
 Srinivasa Raju CH.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Panel switching in LinkTree.onNodeLinkClicked() doesn't work

2009-05-27 Thread Bucyrus



Andreas Bürgel (Bucyrus) wrote:
 
 Im using a org.apache.wicket.extensions.markup.html.tree.Tree now instead
 of a LinkTree. This seems to work.
 Don't forget to call setOutputMarkupId ( true) for all panels before
 they get displayed.
 

I forgot to say that had to add the panel to the AjaxRequestTarget to make
it really work: 

-8-
protected void onNodeLinkClicked ( AjaxRequestTarget pTarget, TreeNode
pNode) {
NavigationTreeNode lNode = (NavigationTreeNode) pNode;
switch ( lNode.getType ()) {
case PANEL:
System.out.println ( PANEL_NODE);
Object lPayLoad = lNode.getPayLoad ();
setMainPanel ( lMMCSystemPanel);

if ( null != pTarget) {
pTarget.addComponent ( lMMCSystemPanel);
}
break;
-8--

Enough said on this issue, I hope.
-- 
View this message in context: 
http://www.nabble.com/Panel-switching-in-LinkTree.onNodeLinkClicked%28%29-doesn%27t-work-tp23708299p23738707.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Date Format in Wicket

2009-05-27 Thread Eyal Golan
we used a general converter:

@Override
protected IConverterLocator newConverterLocator() {
ConverterLocator locator = new ConverterLocator();
locator.set(Date.class, new CustomDateConverter());
return locator;
}

public class  CustomDateConverter extends DateConverter {
private static final long serialVersionUID = 1L;

@Override
/**
 * @see
org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
 */
public DateFormat getDateFormat(Locale locale) {
DateFormat dateFormat = super.getDateFormat(locale);
// fix bug 1366: don't allow negative numbers in dates
dateFormat.setLenient(false);
return dateFormat;
}
}

We also have a CustomeDateTextField .
This component has it's own converter (class member)
The getConverter returns

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Wed, May 27, 2009 at 11:34 AM, srinivas srinivas.r...@sifycorp.comwrote:

 Hi,

 How to set the date format at the project level. I have dates displaying at
 no. of locations in my project.
 Currently i have to format the date patter in each and every page as the
 default date patter of wicket is (MM/DD/).
 But i want the date formate to be (DD/MM/). so if any one knows this
 tell me.
 Thanks in advance.

 Regards,
 Srinivasa Raju CH.





 Get your world in your inbox!

 Mail, widgets, documents, spreadsheets, organizer and much more with your
 Sifymail WIYI id!
 Log on to http://www.sify.com

 ** DISCLAIMER **
 Information contained and transmitted by this E-MAIL is proprietary to Sify
 Limited and is intended for use only by the individual or entity to which it
 is addressed, and may contain information that is privileged, confidential
 or exempt from disclosure under applicable law. If this is a forwarded
 message, the content of this E-MAIL may not have been sent with the
 authority of the Company. If you are not the intended recipient, an agent of
 the intended recipient or a  person responsible for delivering the
 information to the named recipient,  you are notified that any use,
 distribution, transmission, printing, copying or dissemination of this
 information in any way or in any manner is strictly prohibited. If you have
 received this communication in error, please delete this mail  notify us
 immediately at ad...@sifycorp.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Ajax request and lifecycle of model attach/detach

2009-05-27 Thread Wilter du Toit
Hi

When I use an AjaxLink and it's onClick event is called, it seems that none
of the components of the page that the AjaxLink is on has its attach/detach
model methods called.
Here is an example (I just made this quickly and roughly in order to
demonstrate the issue):

-

package com.company.web.wicket.pages;

import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.company.web.dao.AccountManager;
import com.company.web.dao.UsageLogManager;
import com.company.web.domain.UsageLog;

@SuppressWarnings(serial)
public class HibernateTestPage extends ExternalPage
{
private static final Logger logger =
LoggerFactory.getLogger(HibernateTestPage.class);


@SpringBean
protected AccountManager accountManager;

@SpringBean
private UsageLogManager usageLogManager;

@SpringBean
private SessionFactory sessionFactory;

protected class HibernateLoadableDetachableModel extends
LoadableDetachableModel
{
@Override
protected Object load()
{
logger.debug(Loading usageLogs...);

ListUsageLog usageLogs =
usageLogManager.getUsageLogs(accountManager.findById(1));

return usageLogs;
}
}


public HibernateTestPage()
{
final WebMarkupContainer container = new
WebMarkupContainer(container);

final ListView listView = new ListView(logsView,new
HibernateLoadableDetachableModel())
{
@Override
protected void populateItem(ListItem listItem)
{

final UsageLog usageLog = (UsageLog)
listItem.getModelObject();

Session session = sessionFactory.getCurrentSession();

logger.debug(usageLog in populate item is in hibernate
session? + session.contains(usageLog) );

Label ipAddress = new
Label(ipAddress,usageLog.getIpAddress());
listItem.add(ipAddress);

Label outcome = new
Label(outcome,usageLog.getOutcome().toString());
listItem.add(outcome);

Label outcomeMsg = new
Label(outcomeMsg,usageLog.getOutcomeMsg());
listItem.add(outcomeMsg);

AjaxLink checkLink = new AjaxLink(checkHibernateLink)
{
@Override
public void onClick(AjaxRequestTarget target)
{
Session session =
sessionFactory.getCurrentSession();

logger.debug(usageLog in checkLink is in hibernate
session? + session.contains(usageLog) );


}
};

listItem.add(checkLink);
}
};

add(container);
container.add(listView);


}
}

-

The output when the page is first accessed prints:

Loading usageLogs...
usageLog in populate item is in hibernate session? true   # For each item


However, When the checkLink is clicked it prints

usageLog in checkLink is in hibernate session? false


The logs show that the ListView's model is not loaded when the checkLink is
clicked.

I always thought that when a page is accessed by a request that all the
components are told to attach their model at the start of the request. This
does not seem to be the case. I have read
all the available request lifecycle documentation I have found but still
have not found why the model is not loaded for the page's components on an
AjaxLink click.

Can anyone explain this behavior and maybe give me a bit more detail how the
request lifecycle and the component model's work together.

If I add target.addComponent(container) in the onClick method of checkLink
the model for the ListView is loaded and populateItem is called again, with
printing true for in hibernate session. But I need to be able to access
the attached instance of the hibernate object in the AjaxLink's onClick
method. What is the best way to achieve this?

Thanks


Problem passing anonym-classes-models to pages

2009-05-27 Thread Jens Zastrow

Hi,

I use a lot of anonym-classes-models which a want to pass to Page 
instances (no need for be bookmarkable)


class HomePage() {
// some Models here
IModelEntity model = new LoadableDetachableModel();

// some Buttons-eventhandler
public onClick() {
 IModelString m = new AbstractReadOnlyModelString() {
public String getObject() {
  return hello page.
}
 }

 setResponsePage( new HelloPage(m) );
}

//
public void detach() {
model.detach();
}

As i discovered now, this seems not to fit conceptually.

1. using anonym model-classes m javac always generates a reference to 
to enclosing class-instance, here HomePage
2. during detachment of page HelloPage the model m will ne detached 
correctly (clearing transient all objects)
3. after detachment the page HelloPage is going to be serialized, 
which the effect that the reference to the page HomePage

   is serialized as well, without detaching thier models.

Are there any best-practices related to this issue?
Maybe pushing the HomePage on the page-map-stack forking 
setResponsePage?


Thanks
Jens Zastrow

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Problem passing anonym-classes-models to pages

2009-05-27 Thread Martijn Dashorst
Don't pass IModels around, use the model values they represent. Unless
of course, you know what you are doing. For example, if you share a
Model between two pages, it actually becomes two different instances
after being passed on: one in the first page PageA (serialized with
PageA), and one in the response page PageB (serialized with PageB).
When you try to check whether PageA.getModel() == PageB.getModel()
then you'll discover that they are not the same (might be equal, but
not the same instance).

Anonymous IModels should never be passed around.

In our apps we always let each page wrap the domain classes in their
own IModel copy (for example an HibernateModel).

Martijn

On Wed, May 27, 2009 at 1:22 PM, Jens Zastrow m...@jens-zastrow.de wrote:
 Hi,

 I use a lot of anonym-classes-models which a want to pass to Page
 instances (no need for be bookmarkable)

 class HomePage() {
 // some Models here
 IModelEntity model = new LoadableDetachableModel();

 // some Buttons-eventhandler
 public onClick() {
     IModelString m = new AbstractReadOnlyModelString() {
            public String getObject() {
                  return hello page.
            }
     }

     setResponsePage( new HelloPage(m) );
 }

 //
 public void detach() {
    model.detach();
 }

 As i discovered now, this seems not to fit conceptually.

 1. using anonym model-classes m javac always generates a reference to to
 enclosing class-instance, here HomePage
 2. during detachment of page HelloPage the model m will ne detached
 correctly (clearing transient all objects)
 3. after detachment the page HelloPage is going to be serialized, which
 the effect that the reference to the page HomePage
   is serialized as well, without detaching thier models.

 Are there any best-practices related to this issue?
 Maybe pushing the HomePage on the page-map-stack forking
 setResponsePage?

 Thanks
 Jens Zastrow

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CompoundPropertyModel and Combobox

2009-05-27 Thread Marcin Palka

The code below works just fine for me. Instead of using complex type as a
model object for a drop down I use an instance of IChoiceRenderer to control
what's used for an id and what's displayed as a value. 

User user = ;
setModel(new CompoundPropertyModel(user));

add(new DropDownChoice(usrRole, SystemRole.asStringList(), new
IChoiceRenderer() {

@Override
public String getDisplayValue(Object object) {
return Enum.valueOf(SystemRole.class,
object.toString()).getRoleName();
}

@Override
public String getIdValue(Object object, int index) {
if (index == -1) {
return SystemRole.SALESMAN.toString();
}
return SystemRole.asStringList().get(index);
}
}).setRequired(true));

The combo items are populated from Enum values:

public enum SystemRole {

SYS_ADMIN(Administrator systemu),
SERVICEMAN(Serwisant),
NETWORK_ADMIN(Administrator sieci),
SALESMAN(Pracownik punktu),
ANY(Bez roli);
private final String roleName;

SystemRole(String roleName) {
this.roleName = roleName;
}

public String getRoleName() {
return roleName;
}
private static ListString stringList;

public static ListString asStringList() {
if (stringList == null) {
stringList = new ArrayListString();
for (SystemRole sr : values()) {
stringList.add(sr.toString());
}
}
return stringList;
}
}

And this is how model object looks like:

public class User {
private Integer usrId;
private String usrLogin;
private String usrPasswrd;
private String usrEmail;
private String usrMobile;
private String usrLandline;
private String usrFirstName;
private String usrLastName;
private String usrRole;
}

Hope this helps :-)

cheers,
Marcin

-- 
View this message in context: 
http://www.nabble.com/CompoundPropertyModel-and-Combobox-tp23733910p23741340.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Storing css and image files

2009-05-27 Thread Steve Swinsburg
I don't see the issue that you all seem to be experiencing but I can  
offer some advice:


CSS, Javascript, images etc should be stored in the webapp directory  
NOT mixed in with the rest of the classes and HTML. Your CSS can then  
get at them easily if you are using any background images etc. Martijn  
mentioned this and its a valid point, you can then unmount the  
directories and let the web server serve them statically rather than  
Tomcat serve them which takes up threads.


You can use an IHeaderContributor to add any CSS or Javascript  
references into the HTML header:


public class BasePage extends WebPage implements IHeaderContributor {

public void renderHead(IHeaderResponse response) {
response.renderCSSReference(css/jquery.cluetip.css);
response.renderJavascriptReference(javascript/jquery.dimensions.js);
response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
response.renderJavascriptReference(javascript/jquery.cluetip.js);
}

If you need to add any images in your page, use a ContextImage which  
is relative to the context always.


I tend to use a BasePage which setups the header and have my other  
pages extend BasePage you might find it useful as well.



cheers,
Steve






On 27 May 2009, at 06:40, Luther Baker wrote:

On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan  
vasy...@gmail.com wrote:



@Luther:

Yes - I'm using the ImageButton it to submit a form.

Thanks for the suggestion to use the modifier. I will try that.



Great. I think it should work for you.




On a side note, I thought that having the images/css/js etc served  
from
webserver is pretty common and would be supported by wicket without  
having

to add the names within java code.



If I had to guess ... it is probably just a matter of time. There are
probably a lot of design and Wicket Way considerations the team  
iterates
through and prioritizes. I think cases like yours bring some of  
these usage
points into clearer focus after-which, maybe they'll get some  
traction.


My guess is that these folks are pretty busy and that there are  
probably 10s
of 100s of similar requests in the queue - so just need some  
time ... or

bodies :)


I understand the reasoning behind using new ResourceReference as it  
makes
loading locale specific images very simple. But why should wicket  
prepend
classpath etc. -- i'm not clear on that. Can't wicket simply ignore  
the
src attribute if ResourceReference is not present and use  
whatever was
already in the html template? That way I do not have to specify the  
image

name within the java code and the separation between java and html is
clean.



It sounds reasonable to me - but I'm not knee deep in the code  
either/yet.


-Luther




smime.p7s
Description: S/MIME cryptographic signature


Re: HTTP pseudo streaming for Wicket

2009-05-27 Thread Kaspar Fischer

Ok, thanks. I think what you are saying holds for FLV streaming, but MP4
streaming looks more complicated:

  
http://www.longtailvideo.com/support/forum/General-Chat/15793/pseudo-stream-mp4-

It seems, as Jeremey pointed out, that lighttpd can do that. (I am  
looking

for a Tomcat-only solution.)

Kaspar

On 25.05.2009, at 23:13, Matej Knopp wrote:


I'm not sure why there should be any logic regarding mp4 on the
server. I don't know how exactly flash mp4 players work but the player
should be able to request the exact byte offset and length from the
server. Content-Range header basically provides random access to
remote files which should be enough for streaming playback with
seeking.

-Matej

On Mon, May 25, 2009 at 10:00 PM, Kaspar Fischer h...@rapsak.com  
wrote:
Sorry: the link I gave is already outdated; a new version is  
available:


 http://h264.code-shop.com/trac/wiki

P.S. Unfortunately I need a solution for Tomcat as I am hosting at  
a Tomcat

provider.

On 25.05.2009, at 22:57, Kaspar Fischer wrote:

Thanks, Matej, for the pointer. I have not read a lot about MP4  
Pseudo
Streaming but as far as I currently understand it, the server  
needs to
analyse the MP4 file (its meta data, actually) in order to know  
which part

of the file to return -- the latter task can then be done using you
Streamer.java. For instance,


 http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Introduction-Version1

analyses the MP4 file in order to get from a time-input (start  
playing at
00:01:23) to a file offset. Does anymore have or know of Java  
code/port for

the MP4/h264 pseudo-streaming and is willing to share it?

Kaspar

On 13.04.2009, at 21:10, Matej Knopp wrote:


If you want to support http streaming you need to implements
servlet/filter that supports Content-Range and Accept-Range  
headers.

You can take a look at

http://code.google.com/p/brix-cms/source/browse/trunk/brix-core/src/main/java/brix/plugin/site/resource/Streamer.java
to get the idea.

-Matej

On Mon, Apr 13, 2009 at 6:16 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:


I think lighttpd does this - although I've never personally used  
it.  I

just
remember it form some research I was doing on a similar subject.
http://blog.lighttpd.net/articles/2006/03/09/flv-streaming-with-lighttpd

--
Jeremy Thomerson
http://www.wickettraining.com



On Sat, Apr 11, 2009 at 5:10 AM, Kaspar Fischer h...@rapsak.com  
wrote:


I need to stream H264 .mp4 movies to a Flash video player (JW  
Player)

and
want to support HTTP pseudo streaming, i.e., the user should be  
able to

seek
within the movie. Does anybody know of a Wicket implementation  
for

this,
something like xmoov-php [1] for Java with a corresponding Wicket
component?

The video itself lies in a JackRabbit repository, not directly  
on the

file
system.

Red5 [2] offers streaming and a lot more. However, I need a  
solution

that
also works in low memory situations and from the Red5 specs [2]  
it

seems
that this might be difficult.

Regards,
Kaspar
--

[1] http://xmoov.com/xmoov-php/
[2] http://code.google.com/p/red5/
[3]

http://jira.red5.org/confluence/display/docs/Chapter+11.+System+Requirements+For+Red5

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Expired sign in link after signing out

2009-05-27 Thread Tim Moose

add(new BookmarkablePageLink(signin, SigninPage.class));

That is one thing I tried, but it didn't work for me. I am using
org.apache.wicket.authentication.panel.SignInPanel and with the above
bookmarkable link, I get the following exception in onSignInSucceeded:

java.lang.IllegalArgumentException: wrong number of arguments
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
 at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149)
 at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88)
 at org.apache.wicket.authentication.panel.SignInPanel
onSignInSucceeded(SignInPage.java:65)

I'm not able to spot the problem from the 1.3.2 source code:

protected void onSignInSucceeded()
{
// If login has been called because the user was not yet
// logged in, than continue to the original destination,
// otherwise to the Home page
if (!continueToOriginalDestination())
{
   
setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage(
getApplication().getHomePage(), (PageParameters)null));
}
}

I did verify that getHomePage() is correctly returning my home page class
and my home page constructors look like this:

public Index() {
this(null);
}

public Index(final PageParameters parameters) {
super(parameters);
}

Any idea what I'm doing wrong?

Thanks,

Tim
-- 
View this message in context: 
http://www.nabble.com/Expired-sign-in-link-after-signing-out-tp23732685p23741603.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Problem passing anonym-classes-models to pages

2009-05-27 Thread Jens Zastrow

Hi Martijn,
Think of the following use-case.

There is reusable PersonSelectionPage which should select one person 
from a list.
These page should be usable from some other pages which have entities 
which can be assigned a person to.

A IModelPerson will be passed to the PersonSelectionPage,
which invokes later model.setObject(Person) after successfull selection.
The specialized assignment code now is contained in the 
setObject(Person) method.


IModelPerson pm = new IModelPerson() {
 public void setObject() {
  // do something clever here
 }
}
setResponsePage( new PersonSelectionPage(pm, getPage()) );

The PersonSelectionPage also gets the return-to-page as parameter, to 
be able to go-back
(never got this working with 
redirectToInterceptPage+continueToOriginalDestination)


Is such a usage out of the best-practices/idea of wicket?

Jens

Martijn Dashorst schrieb:

Don't pass IModels around, use the model values they represent. Unless
of course, you know what you are doing. For example, if you share a
Model between two pages, it actually becomes two different instances
after being passed on: one in the first page PageA (serialized with
PageA), and one in the response page PageB (serialized with PageB).
When you try to check whether PageA.getModel() == PageB.getModel()
then you'll discover that they are not the same (might be equal, but
not the same instance).

Anonymous IModels should never be passed around.

In our apps we always let each page wrap the domain classes in their
own IModel copy (for example an HibernateModel).

Martijn

On Wed, May 27, 2009 at 1:22 PM, Jens Zastrow m...@jens-zastrow.de wrote:
  

Hi,

I use a lot of anonym-classes-models which a want to pass to Page
instances (no need for be bookmarkable)

class HomePage() {
// some Models here
IModelEntity model = new LoadableDetachableModel();

// some Buttons-eventhandler
public onClick() {
IModelString m = new AbstractReadOnlyModelString() {
   public String getObject() {
 return hello page.
   }
}

setResponsePage( new HelloPage(m) );
}

//
public void detach() {
   model.detach();
}

As i discovered now, this seems not to fit conceptually.

1. using anonym model-classes m javac always generates a reference to to
enclosing class-instance, here HomePage
2. during detachment of page HelloPage the model m will ne detached
correctly (clearing transient all objects)
3. after detachment the page HelloPage is going to be serialized, which
the effect that the reference to the page HomePage
  is serialized as well, without detaching thier models.

Are there any best-practices related to this issue?
Maybe pushing the HomePage on the page-map-stack forking
setResponsePage?

Thanks
Jens Zastrow

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org







  


--
dipl. inform jens zastrow

phone | +49.152.04840108
mail  | m...@jens-zastrow.de
web   | http://jens-zastrow.de
xing  | http://www.xing.com/profile/Jens_Zastrow


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Storing css and image files

2009-05-27 Thread Vasu Srinivasan
@Steve

 NOT mixed in with the rest of the classes and HTML.

i totally agree with that.

 CSS, Javascript, images etc should be stored in the webapp directory

my point is this may not be the case for all. in a big company i worked
before, the css and continue/reset/submit/go buttons etc are stored in a
central repository and had to be src-ed from there. Noway i could copy and
put them into webapp. Now referencing them in my java code would mean that
any change (say new image version) would have to be done within java instead
of just having to change the template.

thanks!
vasya


On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
s.swinsb...@lancaster.ac.uk wrote:

 I don't see the issue that you all seem to be experiencing but I can offer
 some advice:
 CSS, Javascript, images etc should be stored in the webapp directory NOT
 mixed in with the rest of the classes and HTML. Your CSS can then get at
 them easily if you are using any background images etc. Martijn mentioned
 this and its a valid point, you can then unmount the directories and let the
 web server serve them statically rather than Tomcat serve them which takes
 up threads.

 You can use an IHeaderContributor to add any CSS or Javascript references
 into the HTML header:

 public class BasePage extends WebPage implements IHeaderContributor {

 public void renderHead(IHeaderResponse response) {
 response.renderCSSReference(css/jquery.cluetip.css);
 response.renderJavascriptReference(javascript/jquery.dimensions.js);
 response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
 response.renderJavascriptReference(javascript/jquery.cluetip.js);
 }

 If you need to add any images in your page, use a ContextImage which is
 relative to the context always.

 I tend to use a BasePage which setups the header and have my other pages
 extend BasePage you might find it useful as well.


 cheers,
 Steve






 On 27 May 2009, at 06:40, Luther Baker wrote:

 On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:

 @Luther:


 Yes - I'm using the ImageButton it to submit a form.


 Thanks for the suggestion to use the modifier. I will try that.



 Great. I think it should work for you.



 On a side note, I thought that having the images/css/js etc served from

 webserver is pretty common and would be supported by wicket without having

 to add the names within java code.



 If I had to guess ... it is probably just a matter of time. There are
 probably a lot of design and Wicket Way considerations the team iterates
 through and prioritizes. I think cases like yours bring some of these usage
 points into clearer focus after-which, maybe they'll get some traction.

 My guess is that these folks are pretty busy and that there are probably
 10s
 of 100s of similar requests in the queue - so just need some time ... or
 bodies :)


 I understand the reasoning behind using new ResourceReference as it makes

 loading locale specific images very simple. But why should wicket prepend

 classpath etc. -- i'm not clear on that. Can't wicket simply ignore the

 src attribute if ResourceReference is not present and use whatever was

 already in the html template? That way I do not have to specify the image

 name within the java code and the separation between java and html is

 clean.



 It sounds reasonable to me - but I'm not knee deep in the code either/yet.

 -Luther





-- 
Regards,
Vasu Srinivasan


RequestLogger and session invalidation

2009-05-27 Thread Taneli Korri
Hi,

I'm using Wicket 1.3.6 and RequestLogger.getLiveSessions to get the current
sessions in my web application, but I'm experience strange behaviour when
session invalidation occurs.

When the user logs out of the application, the session is invalidated. This
leads to WebApplication.sessionDestroyed to be called, which removes the
session from the RequestLogger.liveSessions Map and everything seems to be
fine.

But the execution continues and eventually RequestCycle.detach gets called,
which leads to RequestLogger.requestTime. And that's where the strangest
thing happens, on line 254 of RequestLogger.java the invalidated session is
created again and added back to the liveSessions Map.

Is this the expected behaviour? Since this ensures that the liveSessions Map
includes all sessions, even the invalidated ones.


And another thing, are there any downsides in keeping RequestLogger on in
production environment? I'm thinking that it might hog a lot of resources,
but is that the case?


Regards,

Taneli Korri


Re: Storing css and image files

2009-05-27 Thread Steve Swinsburg
CSS could still take care of this if your CSS could handle all the  
images, included via the IHeaderContributor and then you don't need to  
mix the display with the code.


Or setup some constants that take the main prefix to the common  
repository so at least you only need to change it in one spot, not  
everywhere the images etc are being used.


cheers,
Steve





On 27 May 2009, at 14:21, Vasu Srinivasan wrote:


@Steve


NOT mixed in with the rest of the classes and HTML.


i totally agree with that.


CSS, Javascript, images etc should be stored in the webapp directory


my point is this may not be the case for all. in a big company i  
worked
before, the css and continue/reset/submit/go buttons etc are stored  
in a
central repository and had to be src-ed from there. Noway i could  
copy and
put them into webapp. Now referencing them in my java code would  
mean that
any change (say new image version) would have to be done within java  
instead

of just having to change the template.

thanks!
vasya


On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
s.swinsb...@lancaster.ac.uk wrote:

I don't see the issue that you all seem to be experiencing but I  
can offer

some advice:
CSS, Javascript, images etc should be stored in the webapp  
directory NOT
mixed in with the rest of the classes and HTML. Your CSS can then  
get at
them easily if you are using any background images etc. Martijn  
mentioned
this and its a valid point, you can then unmount the directories  
and let the
web server serve them statically rather than Tomcat serve them  
which takes

up threads.

You can use an IHeaderContributor to add any CSS or Javascript  
references

into the HTML header:

public class BasePage extends WebPage implements IHeaderContributor {

public void renderHead(IHeaderResponse response) {
response.renderCSSReference(css/jquery.cluetip.css);
response.renderJavascriptReference(javascript/ 
jquery.dimensions.js);
response.renderJavascriptReference(javascript/ 
jquery.hoverIntent.js);

response.renderJavascriptReference(javascript/jquery.cluetip.js);
}

If you need to add any images in your page, use a ContextImage  
which is

relative to the context always.

I tend to use a BasePage which setups the header and have my other  
pages

extend BasePage you might find it useful as well.


cheers,
Steve






On 27 May 2009, at 06:40, Luther Baker wrote:

On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
wrote:

@Luther:


Yes - I'm using the ImageButton it to submit a form.


Thanks for the suggestion to use the modifier. I will try that.



Great. I think it should work for you.



On a side note, I thought that having the images/css/js etc served  
from


webserver is pretty common and would be supported by wicket without  
having


to add the names within java code.



If I had to guess ... it is probably just a matter of time. There are
probably a lot of design and Wicket Way considerations the team  
iterates
through and prioritizes. I think cases like yours bring some of  
these usage
points into clearer focus after-which, maybe they'll get some  
traction.


My guess is that these folks are pretty busy and that there are  
probably

10s
of 100s of similar requests in the queue - so just need some  
time ... or

bodies :)


I understand the reasoning behind using new ResourceReference as it  
makes


loading locale specific images very simple. But why should wicket  
prepend


classpath etc. -- i'm not clear on that. Can't wicket simply ignore  
the


src attribute if ResourceReference is not present and use  
whatever was


already in the html template? That way I do not have to specify the  
image


name within the java code and the separation between java and html is

clean.



It sounds reasonable to me - but I'm not knee deep in the code  
either/yet.


-Luther






--
Regards,
Vasu Srinivasan




smime.p7s
Description: S/MIME cryptographic signature


Re: Storing css and image files

2009-05-27 Thread Luther Baker
Hi Steve,

Continue your example and mount a url to an existing page that extends
BasePage:

mountBookmarkablePage(/im/going/home, About.class);

and tell me what happens to your js and css references when you visit that
url.

Hope that helps,

-Luther



On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
s.swinsb...@lancaster.ac.uk wrote:

 I don't see the issue that you all seem to be experiencing but I can offer
 some advice:
 CSS, Javascript, images etc should be stored in the webapp directory NOT
 mixed in with the rest of the classes and HTML. Your CSS can then get at
 them easily if you are using any background images etc. Martijn mentioned
 this and its a valid point, you can then unmount the directories and let the
 web server serve them statically rather than Tomcat serve them which takes
 up threads.

 You can use an IHeaderContributor to add any CSS or Javascript references
 into the HTML header:

 public class BasePage extends WebPage implements IHeaderContributor {

 public void renderHead(IHeaderResponse response) {
 response.renderCSSReference(css/jquery.cluetip.css);
 response.renderJavascriptReference(javascript/jquery.dimensions.js);
 response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
 response.renderJavascriptReference(javascript/jquery.cluetip.js);
 }

 If you need to add any images in your page, use a ContextImage which is
 relative to the context always.

 I tend to use a BasePage which setups the header and have my other pages
 extend BasePage you might find it useful as well.


 cheers,
 Steve






 On 27 May 2009, at 06:40, Luther Baker wrote:

 On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:

 @Luther:


 Yes - I'm using the ImageButton it to submit a form.


 Thanks for the suggestion to use the modifier. I will try that.



 Great. I think it should work for you.



 On a side note, I thought that having the images/css/js etc served from

 webserver is pretty common and would be supported by wicket without having

 to add the names within java code.



 If I had to guess ... it is probably just a matter of time. There are
 probably a lot of design and Wicket Way considerations the team iterates
 through and prioritizes. I think cases like yours bring some of these usage
 points into clearer focus after-which, maybe they'll get some traction.

 My guess is that these folks are pretty busy and that there are probably
 10s
 of 100s of similar requests in the queue - so just need some time ... or
 bodies :)


 I understand the reasoning behind using new ResourceReference as it makes

 loading locale specific images very simple. But why should wicket prepend

 classpath etc. -- i'm not clear on that. Can't wicket simply ignore the

 src attribute if ResourceReference is not present and use whatever was

 already in the html template? That way I do not have to specify the image

 name within the java code and the separation between java and html is

 clean.



 It sounds reasonable to me - but I'm not knee deep in the code either/yet.

 -Luther





Re: Storing css and image files

2009-05-27 Thread Luther Baker
Admittedly, I think this is slightly out of context here ... but a few days
back, Martijn posted (no bashing intended - I try to adhere to this):


There is no sane reason why anyone would put the html, js, css and
properties resources in any place except *next* to the
corresponding.java file. Your .java file can not function without the
.html file. Your component will fail if the .properties file is not
available. When the js file can't be found your component is useless.

Wicket goes beyond the call of duty to provide developers with the
means to encapsulate your components, bringing Object Oriented design
and programming to the web tier. Moving the necessary resources
outside the package folder into a separate directory structure breaks
this encapsulation is definitely not the Wicket Way (tm).

http://osdir.com/ml/users-wicket.apache.org/2009-03/msg01100.html




On Wed, May 27, 2009 at 8:36 AM, Luther Baker lutherba...@gmail.com wrote:

 Hi Steve,

 Continue your example and mount a url to an existing page that extends
 BasePage:

 mountBookmarkablePage(/im/going/home, About.class);

 and tell me what happens to your js and css references when you visit that
 url.

 Hope that helps,

 -Luther



 On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
 s.swinsb...@lancaster.ac.uk wrote:

 I don't see the issue that you all seem to be experiencing but I can offer
 some advice:
 CSS, Javascript, images etc should be stored in the webapp directory NOT
 mixed in with the rest of the classes and HTML. Your CSS can then get at
 them easily if you are using any background images etc. Martijn mentioned
 this and its a valid point, you can then unmount the directories and let the
 web server serve them statically rather than Tomcat serve them which takes
 up threads.

 You can use an IHeaderContributor to add any CSS or Javascript references
 into the HTML header:

 public class BasePage extends WebPage implements IHeaderContributor {

 public void renderHead(IHeaderResponse response) {
 response.renderCSSReference(css/jquery.cluetip.css);response.renderJavascriptReference(
 javascript/jquery.dimensions.js);
 response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
 response.renderJavascriptReference(javascript/jquery.cluetip.js);
   }

 If you need to add any images in your page, use a ContextImage which is
 relative to the context always.

 I tend to use a BasePage which setups the header and have my other pages
 extend BasePage you might find it useful as well.


 cheers,
 Steve






 On 27 May 2009, at 06:40, Luther Baker wrote:

 On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:

 @Luther:


 Yes - I'm using the ImageButton it to submit a form.


 Thanks for the suggestion to use the modifier. I will try that.



 Great. I think it should work for you.



 On a side note, I thought that having the images/css/js etc served from

 webserver is pretty common and would be supported by wicket without having

 to add the names within java code.



 If I had to guess ... it is probably just a matter of time. There are
 probably a lot of design and Wicket Way considerations the team iterates
 through and prioritizes. I think cases like yours bring some of these
 usage
 points into clearer focus after-which, maybe they'll get some traction.

 My guess is that these folks are pretty busy and that there are probably
 10s
 of 100s of similar requests in the queue - so just need some time ... or
 bodies :)


 I understand the reasoning behind using new ResourceReference as it makes

 loading locale specific images very simple. But why should wicket prepend

 classpath etc. -- i'm not clear on that. Can't wicket simply ignore the

 src attribute if ResourceReference is not present and use whatever was

 already in the html template? That way I do not have to specify the image

 name within the java code and the separation between java and html is

 clean.



 It sounds reasonable to me - but I'm not knee deep in the code either/yet.

 -Luther






Re: London Wicket Event - 3rd June @ Google (2 years on)

2009-05-27 Thread jWeekend

Alexander,

It is unlikely that we will record and publish next Wednesday's event.
We post many of our presentations and some movies at our Google Code site
[1].

Regards - Cemal
jWeekend http://jWeekend.com
Training, Consulting, Development

[1] http://code.google.com/p/londonwicket/


Alexander Shopov wrote:
 
 Will the event be taped and made available onle?
 Kind regards:
 al_shopov
 

jWeekend wrote:
 
 We will hold our next London Wicket Event on Wednesday, 3rd June, from
 18:30. Our event is being generously hosted by Google. Join us for some
 very
 interesting, high quality presentations and to chat with fellow Wicket
 users
 and developers at all levels. We had over 65 registrants last time, so
 book
 early [1] if you can make it.
 
 Event details and registration are at the usual place [1]. After Pizza
 (18:15), the schedule (from 18:30) will be:
 
 Cemal Bayramoglu: Introduction and Welcome
 Our guests will be invited to talk about their Wicket
 apps/architectures/issues
 Oli Evans: Our Wicket Jira Evening at jWeekend - How To Contribute!
 Alastair Maw: The Al Talk
 General Wicket QA with Al and Cemal
 
 I especially want to hear from anybody using Wicket with Google Apps - let
 me know if you would like to give us a 15 minute introduction.
 
 It is 2 years since we started running these events. Alastair and everyone
 at jWeekend would like to thank you all for your consistently kind
 feedback
 and solid support; we look forward to seeing you on June 3rd. To
 celebrate,
 I'm also pleased to say that Dima (AKA syl on the Wicket Wiki) from
 Moscow, one of our first jWeekend Wicket developers and course developer,
 and Richard Wilkinson, our latest recruit, will both be attending and will
 be helping us answer all your questions.
 
 Regards - Cemal
 jWeekend http://jWeekend.com
 Training, Consulting, Development
 
 [1] http://jweekend.com/dev/LWUGReg/ 
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Event---3rd-June-%40-Google-%282-years-on%29-tp23611378p23743031.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Storing css and image files

2009-05-27 Thread Martijn Dashorst
This only refers to component (page) specific resources. Not global
resources for your application. If you want to create reusable
components/pages that you can share between projects, then they need
to be on the classpath. If you have a app specific CSS that you
include from your app specific BasePage, there is no reason not to put
it in src/webapp/style.css (similar for javascript files, e.g. a
minimized jquery.js that is concatenated with your global app specific
js files, to minimize the number of connects to your server)

As with any rule: use that gray matter locked between your ears and
common sense!

Martijn

On Wed, May 27, 2009 at 3:41 PM, Luther Baker lutherba...@gmail.com wrote:
 Admittedly, I think this is slightly out of context here ... but a few days
 back, Martijn posted (no bashing intended - I try to adhere to this):


 There is no sane reason why anyone would put the html, js, css and
 properties resources in any place except *next* to the
 corresponding.java file. Your .java file can not function without the
 .html file. Your component will fail if the .properties file is not
 available. When the js file can't be found your component is useless.

 Wicket goes beyond the call of duty to provide developers with the
 means to encapsulate your components, bringing Object Oriented design
 and programming to the web tier. Moving the necessary resources
 outside the package folder into a separate directory structure breaks
 this encapsulation is definitely not the Wicket Way (tm).

 http://osdir.com/ml/users-wicket.apache.org/2009-03/msg01100.html




 On Wed, May 27, 2009 at 8:36 AM, Luther Baker lutherba...@gmail.com wrote:

 Hi Steve,

 Continue your example and mount a url to an existing page that extends
 BasePage:

         mountBookmarkablePage(/im/going/home, About.class);

 and tell me what happens to your js and css references when you visit that
 url.

 Hope that helps,

 -Luther



 On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
 s.swinsb...@lancaster.ac.uk wrote:

 I don't see the issue that you all seem to be experiencing but I can offer
 some advice:
 CSS, Javascript, images etc should be stored in the webapp directory NOT
 mixed in with the rest of the classes and HTML. Your CSS can then get at
 them easily if you are using any background images etc. Martijn mentioned
 this and its a valid point, you can then unmount the directories and let the
 web server serve them statically rather than Tomcat serve them which takes
 up threads.

 You can use an IHeaderContributor to add any CSS or Javascript references
 into the HTML header:

 public class BasePage extends WebPage implements IHeaderContributor {

 public void renderHead(IHeaderResponse response) {
 response.renderCSSReference(css/jquery.cluetip.css);response.renderJavascriptReference(
 javascript/jquery.dimensions.js);
 response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
 response.renderJavascriptReference(javascript/jquery.cluetip.js);
   }

 If you need to add any images in your page, use a ContextImage which is
 relative to the context always.

 I tend to use a BasePage which setups the header and have my other pages
 extend BasePage you might find it useful as well.


 cheers,
 Steve






 On 27 May 2009, at 06:40, Luther Baker wrote:

 On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:

 @Luther:


 Yes - I'm using the ImageButton it to submit a form.


 Thanks for the suggestion to use the modifier. I will try that.



 Great. I think it should work for you.



 On a side note, I thought that having the images/css/js etc served from

 webserver is pretty common and would be supported by wicket without having

 to add the names within java code.



 If I had to guess ... it is probably just a matter of time. There are
 probably a lot of design and Wicket Way considerations the team iterates
 through and prioritizes. I think cases like yours bring some of these
 usage
 points into clearer focus after-which, maybe they'll get some traction.

 My guess is that these folks are pretty busy and that there are probably
 10s
 of 100s of similar requests in the queue - so just need some time ... or
 bodies :)


 I understand the reasoning behind using new ResourceReference as it makes

 loading locale specific images very simple. But why should wicket prepend

 classpath etc. -- i'm not clear on that. Can't wicket simply ignore the

 src attribute if ResourceReference is not present and use whatever was

 already in the html template? That way I do not have to specify the image

 name within the java code and the separation between java and html is

 clean.



 It sounds reasonable to me - but I'm not knee deep in the code either/yet.

 -Luther








-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.


Ordering a list component?

2009-05-27 Thread Phillip Rhodes
I was wondering if anyone had a component that allows you to order a list of 
items?

Thanks, wicket is the best!


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to test for a redirect after form submit, eg. setting RedirectRequestTarget?

2009-05-27 Thread Jörn Zaefferer
Thanks Igor! After figuring out that onRequestTargetSet is called
afterwards again with null as an argument (probably on closing the
RequestCycle), it worked.

Jörn

On Tue, May 26, 2009 at 6:03 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 subclass requestcycle, override onrequesttargetset (may only be in
 1.4) and set some flag when you see the redirect, or add it to some
 list you have visibility into.

 -igor

 On Mon, May 25, 2009 at 8:32 AM, Jörn Zaefferer
 joern.zaeffe...@googlemail.com wrote:
 Hi,

 in one of my Wicket unit tests I'd like to assert that after a
 successful submit, a RedirectRequestTarget was set. Its not even
 necessary to check the exact URL of that redirect, just that it
 happens.

 I can't find any support for that via WicketTester, and
 RequestCycle.get().getRequestTarget() (or accessed via
 tester.getLastRenderedPage().getRequestCycle().getRequestTarget())
 returns null.

 Any ideas?

 Regards
 Jörn Zaefferer

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ordering a list component?

2009-05-27 Thread Martin Makundi
Collections.sort

2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:
 I was wondering if anyone had a component that allows you to order a list of 
 items?

 Thanks, wicket is the best!


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Storing css and image files

2009-05-27 Thread Vasu Srinivasan
I went thru the thread to understand the context. I agree with
html/java/properties being together, i do not have issues with that. If I
have a standalone app, I will have no issues putting css /js in the
src/main/webapp.

But its the reusability of js/css/images across several projects is whats
bothering me. I think adding javacode like imageButton.add(new
SimpleAttributeModifier(src, /images/continue.gif)) for each and every
page is superfluous. I can minimize the impact several ways (Constants.IMAGE
path or building a Continue Image button etc), but I still think the Java
code should not need to know about the name of the image and where it is
located (classpath or apache webserver). The imagebutton is just responding
to an event related to the wicket:id, where its srced from is the
responsibility of the template.

Ideally the location where the image is sourced from could be left to
template, while the image file name itself could be generated by Wicket
based on locale.

The clean way in my case is as Steve suggested , to use css to display the
image for button.


On Wed, May 27, 2009 at 8:41 AM, Luther Baker lutherba...@gmail.com wrote:

 Admittedly, I think this is slightly out of context here ... but a few days
 back, Martijn posted (no bashing intended - I try to adhere to this):


 There is no sane reason why anyone would put the html, js, css and
 properties resources in any place except *next* to the
 corresponding.java file. Your .java file can not function without the
 .html file. Your component will fail if the .properties file is not
 available. When the js file can't be found your component is useless.

 Wicket goes beyond the call of duty to provide developers with the
 means to encapsulate your components, bringing Object Oriented design
 and programming to the web tier. Moving the necessary resources
 outside the package folder into a separate directory structure breaks
 this encapsulation is definitely not the Wicket Way (tm).

 http://osdir.com/ml/users-wicket.apache.org/2009-03/msg01100.html




 On Wed, May 27, 2009 at 8:36 AM, Luther Baker lutherba...@gmail.com
 wrote:

  Hi Steve,
 
  Continue your example and mount a url to an existing page that extends
  BasePage:
 
  mountBookmarkablePage(/im/going/home, About.class);
 
  and tell me what happens to your js and css references when you visit
 that
  url.
 
  Hope that helps,
 
  -Luther
 
 
 
  On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg 
  s.swinsb...@lancaster.ac.uk wrote:
 
  I don't see the issue that you all seem to be experiencing but I can
 offer
  some advice:
  CSS, Javascript, images etc should be stored in the webapp directory NOT
  mixed in with the rest of the classes and HTML. Your CSS can then get at
  them easily if you are using any background images etc. Martijn
 mentioned
  this and its a valid point, you can then unmount the directories and let
 the
  web server serve them statically rather than Tomcat serve them which
 takes
  up threads.
 
  You can use an IHeaderContributor to add any CSS or Javascript
 references
  into the HTML header:
 
  public class BasePage extends WebPage implements IHeaderContributor {
 
  public void renderHead(IHeaderResponse response) {
 
 response.renderCSSReference(css/jquery.cluetip.css);response.renderJavascriptReference(
  javascript/jquery.dimensions.js);
  response.renderJavascriptReference(javascript/jquery.hoverIntent.js);
  response.renderJavascriptReference(javascript/jquery.cluetip.js);
}
 
  If you need to add any images in your page, use a ContextImage which is
  relative to the context always.
 
  I tend to use a BasePage which setups the header and have my other pages
  extend BasePage you might find it useful as well.
 
 
  cheers,
  Steve
 
 
 
 
 
 
  On 27 May 2009, at 06:40, Luther Baker wrote:
 
  On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan vasy...@gmail.com
  wrote:
 
  @Luther:
 
 
  Yes - I'm using the ImageButton it to submit a form.
 
 
  Thanks for the suggestion to use the modifier. I will try that.
 
 
 
  Great. I think it should work for you.
 
 
 
  On a side note, I thought that having the images/css/js etc served from
 
  webserver is pretty common and would be supported by wicket without
 having
 
  to add the names within java code.
 
 
 
  If I had to guess ... it is probably just a matter of time. There are
  probably a lot of design and Wicket Way considerations the team
 iterates
  through and prioritizes. I think cases like yours bring some of these
  usage
  points into clearer focus after-which, maybe they'll get some traction.
 
  My guess is that these folks are pretty busy and that there are probably
  10s
  of 100s of similar requests in the queue - so just need some time ... or
  bodies :)
 
 
  I understand the reasoning behind using new ResourceReference as it
 makes
 
  loading locale specific images very simple. But why should wicket
 prepend
 
  classpath etc. -- i'm not clear on that. Can't wicket 

Re: when will be wicket 1.4 final release

2009-05-27 Thread Daniel Toffetti
danisevsky danisevsky at gmail.com writes:
 
 Hi,
 I would like ask you when I can expect wicket 1.4 final release? I am asking
 because I am waiting for wicket web beans which will be release after filnal
 wicket 1.4 release.
 Thanks for answer.
 

Hi,

With some luck, there will be an alpha of WWB for Wicket 1.4 committed to
trunk in a week or so.

hth,

Daniel




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Refreshing a list while using ListDataProvider

2009-05-27 Thread Vasu Srinivasan
Rereading the link
http://cwiki.apache.org/WICKET/reading-from-a-database.html
http://cwiki.apache.org/WICKET/reading-from-a-database.html

clearly says that the objects are created only once, this includes the List
results i guess. But the line --

results = getResultsFromCriteria(criteria);

is kinda misleading.. In this case the results should never be a new
ArrayList object for DataView to work. (If using ListView, the setList must
be used).

For eg, when using Spring's JdbcTemplate.queryForList() it always returns a
new list object. To make DataView work, this is probably what should happen:

List tempResult = getResultsFromCriteria(criteria);
results.clear();
results.addAll(tempResult);

Pls correct me if im wrong...


On Tue, May 26, 2009 at 4:48 PM, Vasu Srinivasan vasy...@gmail.com wrote:

 Ok I think I am understanding it a little better now.
 For now Im still extending myDataProvider  from ListDataProvider, but no
 longer using  a new ArrayList() for every search. Im clearing it out and
 adding new data, which is okay.

 One question though -- What is the responsibility scope of the
 ListDataProvider / IDataProvider?

 Am I correct in assuming the following --

 1) only operate on the given List/Data (already manipulated)
 2) *should not* contain a Dao, and refresh its own list/data.

 Because if (2), then I am seeing an issue -- where do I call the
 dao.query() ? In the constructor or in the iterator() ? If I do in the
 constructor, its not refreshed for further queries. If I do in the
 iterator(), then the size() is queried before the DataView calls the
  iterator(), so it always returns 0 records for the first time. And also
 calling dao.query() in the iterator() will make it query the whole list for
 every pagination, which is probably not a good idea.

 I liked the idea of dataprovider encapsulating dao, but not clear where
 would I refresh it.
 Thanks !
 Vasya

 On Tue, May 26, 2009 at 3:25 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 i meant implement IDataProvider directly if ListDataProvider doesnt
 work for you. most of the time you modify an existing instance of
 List, not create a new one, so ListDataProvider is useful there.

 -igor

 On Tue, May 26, 2009 at 1:15 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:
  Thanks for the reply ...
 
  I tried doing this :
  class MyDataProvider extends  ListDataProvider {
 
   DataDao dataDao;
   Criteria criteria;
 
   public MyDataProvider(List list, Criteria criteria) {
   super(list);
...
   }
 
   //providing my own iterator which goes to the dataDao and gets the data
   //But now I cannot set the list, because private... So I have to use my
  own list member...If I do that, then what is the point of calling the
  constructor with List?
  }
 
  Looks like ListDataProvider is not useful for reusable Lists. Not sure
 why
  this should be so ? If I am able to set a new List into the provider, I
  would not be breaking anything because the data is anyway retrieved only
 via
  an Iterator.
 
  The problem is even if I create a new ListDataProvider for every new
 list, I
  am not able to set that again in my data view. DataView does not have
 any
  thing similar to setList (a la ListView.setList). I dont think I should
 be
  creating a new DataView for every search, because all i'm doing is only
  changing contents of the underlying list.
 
  Am I missing something ?
 
 
  On Tue, May 26, 2009 at 12:29 PM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:
 
  you can build your own analog of listdataprovider that pulls the list
  directly from whatever property contains the latest.
 
  -igor
 
  On Tue, May 26, 2009 at 9:38 AM, Vasu Srinivasan vasy...@gmail.com
  wrote:
   Hello:
   I have a simple search form , where some criteria refreshes the table
  based
   on the db. I got it working with ListView, but im trying to use
   ListDataProvider, I feel missing something:
  
   class MyForm {
List myList;
MyDataView myDataView;
MyDataProvider myDataProvider;
  
public MyForm() {
  @Override public void onSubmit() {
 myList  = refreshData(criteria);
 //Question: How do I set this list into the myDataView or
   myDataProvider ? I thought myDataView or the provider will auto pick
 it
  up,
   because its a member variable and is a RefreshingView
  }
  
  //First time
  myList = refreshData(defaultCriteria);
  myDataView = new MyDataView(myDataView , new
  MyDataProvider(myList));
  add(myListView);
}
   }
  
  
   class MyDataView extends DataView {
 public MyDataView(String id, IDataProvider provider) { super(id,
   provider); }
  
 @Override public void populateItem(Item item) {  }
   }
  
   class MyDataProvider extends ListDataProvider {
public MyDataProvider(List list) {
   super(list);
}
   }
  
   I looked at the example that uses ListView
   http://cwiki.apache.org/WICKET/reading-from-a-database.html
   

Re: Ordering a list component?

2009-05-27 Thread Phillip Rhodes

Sorry, should have been more specific.

Allow the user to perform custom ordering of a list of items.
Sort of like the palette component, but only half of it.


-Original Message-
From: Martin Makundi martin.maku...@koodaripalvelut.com
Sent: Wednesday, May 27, 2009 10:37am
To: users@wicket.apache.org
Subject: Re: Ordering a list component?

Collections.sort

2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:
 I was wondering if anyone had a component that allows you to order a list of 
 items?

 Thanks, wicket is the best!


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to receive digested emails once a day from this mailing list ???

2009-05-27 Thread David Chang

I am new to this mailing list and I like it very much. I like the active 
community and the questions and answers, but I prefer to receive all the emails 
combined together in a single email once a day. I want to stay in the loop.

I tried user-digest-subscr...@wicket.apache.org and there is no such list.

Do you happen to know how I can do this? I looked at the Wicket project website 
but failed to find such a way.

Thanks for your help!



  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to receive digested emails once a day from this mailing list ???

2009-05-27 Thread Martijn Dashorst
Not sure if it is possible, but try sending a message to
users-h...@wicket.apache.org, and see if it is an option...

Martijn

On Wed, May 27, 2009 at 5:06 PM, David Chang david_q_zh...@yahoo.com wrote:

 I am new to this mailing list and I like it very much. I like the active 
 community and the questions and answers, but I prefer to receive all the 
 emails combined together in a single email once a day. I want to stay in the 
 loop.

 I tried user-digest-subscr...@wicket.apache.org and there is no such list.

 Do you happen to know how I can do this? I looked at the Wicket project 
 website but failed to find such a way.

 Thanks for your help!





 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ordering a list component?

2009-05-27 Thread Martin Makundi
Why don't you just set the half of the palette invisible.

**
Martin

2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:

 Sorry, should have been more specific.

 Allow the user to perform custom ordering of a list of items.
 Sort of like the palette component, but only half of it.


 -Original Message-
 From: Martin Makundi martin.maku...@koodaripalvelut.com
 Sent: Wednesday, May 27, 2009 10:37am
 To: users@wicket.apache.org
 Subject: Re: Ordering a list component?

 Collections.sort

 2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:
 I was wondering if anyone had a component that allows you to order a list of 
 items?

 Thanks, wicket is the best!


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ordering a list component?

2009-05-27 Thread Martijn Dashorst
ListView has up and down links incorporated. I haven't used them, so I
didn't document their use in WIA. You could take a look at them...

see ListView#moveUpLink()

They're not ajaxy enabled, but I think you can use them in a:

select
option wicket:id=items
/select

kind of way.

Martijn

On Wed, May 27, 2009 at 5:04 PM, Phillip Rhodes
spamsu...@rhoderunner.com wrote:

 Sorry, should have been more specific.

 Allow the user to perform custom ordering of a list of items.
 Sort of like the palette component, but only half of it.


 -Original Message-
 From: Martin Makundi martin.maku...@koodaripalvelut.com
 Sent: Wednesday, May 27, 2009 10:37am
 To: users@wicket.apache.org
 Subject: Re: Ordering a list component?

 Collections.sort

 2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:
 I was wondering if anyone had a component that allows you to order a list of 
 items?

 Thanks, wicket is the best!


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to receive digested emails once a day from this mailing list ???

2009-05-27 Thread Frank Tegtmeyer
 I tried user-digest-subscr...@wicket.apache.org

This has to be users-digest...  (note the s)

Regards, Frank

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Refreshing a list while using ListDataProvider

2009-05-27 Thread Igor Vaynberg
like i said you can roll your own provider that can work with new
instances of list. it is very simple.

class mysuperprovider implements idataprovider {
  private transient List list;
  private list query() {
 if (list==null) { list=querywhatever(); }
   }
   public iterator itereator() { return query().itearator(); }
   public int size() { return query().size(); }
   public void detach() { list=null; }
}

-igor

On Wed, May 27, 2009 at 7:54 AM, Vasu Srinivasan vasy...@gmail.com wrote:
 Rereading the link
 http://cwiki.apache.org/WICKET/reading-from-a-database.html
 http://cwiki.apache.org/WICKET/reading-from-a-database.html

 clearly says that the objects are created only once, this includes the List
 results i guess. But the line --

 results = getResultsFromCriteria(criteria);

 is kinda misleading.. In this case the results should never be a new
 ArrayList object for DataView to work. (If using ListView, the setList must
 be used).

 For eg, when using Spring's JdbcTemplate.queryForList() it always returns a
 new list object. To make DataView work, this is probably what should happen:

 List tempResult = getResultsFromCriteria(criteria);
 results.clear();
 results.addAll(tempResult);

 Pls correct me if im wrong...


 On Tue, May 26, 2009 at 4:48 PM, Vasu Srinivasan vasy...@gmail.com wrote:

 Ok I think I am understanding it a little better now.
 For now Im still extending myDataProvider  from ListDataProvider, but no
 longer using  a new ArrayList() for every search. Im clearing it out and
 adding new data, which is okay.

 One question though -- What is the responsibility scope of the
 ListDataProvider / IDataProvider?

 Am I correct in assuming the following --

 1) only operate on the given List/Data (already manipulated)
 2) *should not* contain a Dao, and refresh its own list/data.

 Because if (2), then I am seeing an issue -- where do I call the
 dao.query() ? In the constructor or in the iterator() ? If I do in the
 constructor, its not refreshed for further queries. If I do in the
 iterator(), then the size() is queried before the DataView calls the
  iterator(), so it always returns 0 records for the first time. And also
 calling dao.query() in the iterator() will make it query the whole list for
 every pagination, which is probably not a good idea.

 I liked the idea of dataprovider encapsulating dao, but not clear where
 would I refresh it.
 Thanks !
 Vasya

 On Tue, May 26, 2009 at 3:25 PM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 i meant implement IDataProvider directly if ListDataProvider doesnt
 work for you. most of the time you modify an existing instance of
 List, not create a new one, so ListDataProvider is useful there.

 -igor

 On Tue, May 26, 2009 at 1:15 PM, Vasu Srinivasan vasy...@gmail.com
 wrote:
  Thanks for the reply ...
 
  I tried doing this :
  class MyDataProvider extends  ListDataProvider {
 
   DataDao dataDao;
   Criteria criteria;
 
   public MyDataProvider(List list, Criteria criteria) {
       super(list);
        ...
   }
 
   //providing my own iterator which goes to the dataDao and gets the data
   //But now I cannot set the list, because private... So I have to use my
  own list member...If I do that, then what is the point of calling the
  constructor with List?
  }
 
  Looks like ListDataProvider is not useful for reusable Lists. Not sure
 why
  this should be so ? If I am able to set a new List into the provider, I
  would not be breaking anything because the data is anyway retrieved only
 via
  an Iterator.
 
  The problem is even if I create a new ListDataProvider for every new
 list, I
  am not able to set that again in my data view. DataView does not have
 any
  thing similar to setList (a la ListView.setList). I dont think I should
 be
  creating a new DataView for every search, because all i'm doing is only
  changing contents of the underlying list.
 
  Am I missing something ?
 
 
  On Tue, May 26, 2009 at 12:29 PM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:
 
  you can build your own analog of listdataprovider that pulls the list
  directly from whatever property contains the latest.
 
  -igor
 
  On Tue, May 26, 2009 at 9:38 AM, Vasu Srinivasan vasy...@gmail.com
  wrote:
   Hello:
   I have a simple search form , where some criteria refreshes the table
  based
   on the db. I got it working with ListView, but im trying to use
   ListDataProvider, I feel missing something:
  
   class MyForm {
    List myList;
    MyDataView myDataView;
    MyDataProvider myDataProvider;
  
    public MyForm() {
     �...@override public void onSubmit() {
         myList  = refreshData(criteria);
         //Question: How do I set this list into the myDataView or
   myDataProvider ? I thought myDataView or the provider will auto pick
 it
  up,
   because its a member variable and is a RefreshingView
      }
  
      //First time
      myList = refreshData(defaultCriteria);
      myDataView = new MyDataView(myDataView , new
  

Re: Ordering a list component?

2009-05-27 Thread Maarten Bosteels
http://londonwicket.googlecode.com/files/LondonWicket-ListEditor.pdf

I vaguely remember that the code didn't work for 100% when I tested it, but
it sure is a good start.

Maarten

On Wed, May 27, 2009 at 5:14 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 ListView has up and down links incorporated. I haven't used them, so I
 didn't document their use in WIA. You could take a look at them...

 see ListView#moveUpLink()

 They're not ajaxy enabled, but I think you can use them in a:

 select
option wicket:id=items
 /select

 kind of way.

 Martijn

 On Wed, May 27, 2009 at 5:04 PM, Phillip Rhodes
 spamsu...@rhoderunner.com wrote:
 
  Sorry, should have been more specific.
 
  Allow the user to perform custom ordering of a list of items.
  Sort of like the palette component, but only half of it.
 
 
  -Original Message-
  From: Martin Makundi martin.maku...@koodaripalvelut.com
  Sent: Wednesday, May 27, 2009 10:37am
  To: users@wicket.apache.org
  Subject: Re: Ordering a list component?
 
  Collections.sort
 
  2009/5/27 Phillip Rhodes spamsu...@rhoderunner.com:
  I was wondering if anyone had a component that allows you to order a
 list of items?
 
  Thanks, wicket is the best!
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Storing css and image files

2009-05-27 Thread Luther Baker

 The clean way in my case is as Steve suggested , to use css to display the
 image for button.


Thanks for all the inputs. Sorry this has dragged out a bit.

In my case, I am not sharing static resources across apps. I'm just looking
at the best way for each page in my application to retrieve each of the
core, application-wide, application-specific, static resource files (js,
css, gif, jpg, etc). I might have common.css, header.css, footer.css. Maybe
that falls under keep it with the source -- which works just fine / albeit
somewhat limiting.

So maybe the point is moot and wicket:link/ is the solution for my case. I
think physically dropping files in webapp/**/*.css is just fine. I'm really
just suggesting the idea of making a robust, infallible way to refer to them
that can be written and included just once (in an abstract BaseLayoutPage)
and never talked about again :) ... and was entertaining the idea of using
the webapp/ directory for this.

The suggested IHeaderContributor solution has a few problems in my case. If
a developer adds a page 6 mos from now and mounts it to a new, arbitrary
URL, */products/cable/offer* - I'd like the css files to all show up -
automatically. Unfortunately, IHeaderContributor will not dynamically refer
to the original css/styles.css pages. The paths are just echo'd as entered
which means ... the single css isn't found.

My other made up example - if Wicket (for whatever reason) decides that 1.5
should default to RESTful URLs, would also break anywhere people were
hardcoding link href=css/styles.css ... since the new RESTful URLs
wouldn't look in the proper location.

On the other hand, wicket:link/ continues to work through all of these
changes - with no effort or manual management.

My initial posts/examples were around c:url value=/css/styles.css/ when
included on base base pages, always works no matter what page the user has
navigated to ... no matter how deep or shallow the url is. It creates an
ABSOLUTE path that simply prepends the context the app is deployed to
(which, is free to change or go to root).

For what its worth, I think that provides some amount of value to my app.

For my specific case, I think Igor's suggestion of a tag like
wicket:context/ hit the nail on the head. I can't tell if the other
suggestions here are just workarounds or really trying to address my
specific use case. IHeaderContribute (thanks for including) doesn't actually
do much more than hardcode a fixed path in the  markup.

Incidentally, I looked - and man, there are alot of pieces to wicket:link/
:-) Is there an online tutorial for, not just writing components, but
implementing a markup component like wicket:link/?

A ... thanks,

-Luther


Re: Ajax request and lifecycle of model attach/detach

2009-05-27 Thread Igor Vaynberg
models are loaded lazily, eg imodel does not have an attach(), only a
detach(). so unless your link accesses the model - eg invokes
getobject() on it nothing will be loaded. at the end of request all
models should get detach() called.

-igor

On Wed, May 27, 2009 at 2:30 AM, Wilter du Toit wpdut...@gmail.com wrote:
 Hi

 When I use an AjaxLink and it's onClick event is called, it seems that none
 of the components of the page that the AjaxLink is on has its attach/detach
 model methods called.
 Here is an example (I just made this quickly and roughly in order to
 demonstrate the issue):

 -

 package com.company.web.wicket.pages;

 import java.util.List;

 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

 import com.company.web.dao.AccountManager;
 import com.company.web.dao.UsageLogManager;
 import com.company.web.domain.UsageLog;

 @SuppressWarnings(serial)
 public class HibernateTestPage extends ExternalPage
 {
    private static final Logger logger =
 LoggerFactory.getLogger(HibernateTestPage.class);


   �...@springbean
    protected AccountManager accountManager;

   �...@springbean
    private UsageLogManager usageLogManager;

   �...@springbean
    private SessionFactory sessionFactory;

    protected class HibernateLoadableDetachableModel extends
 LoadableDetachableModel
    {
       �...@override
        protected Object load()
        {
            logger.debug(Loading usageLogs...);

            ListUsageLog usageLogs =
 usageLogManager.getUsageLogs(accountManager.findById(1));

            return usageLogs;
        }
    }


    public HibernateTestPage()
    {
        final WebMarkupContainer container = new
 WebMarkupContainer(container);

        final ListView listView = new ListView(logsView,new
 HibernateLoadableDetachableModel())
        {
           �...@override
            protected void populateItem(ListItem listItem)
            {

                final UsageLog usageLog = (UsageLog)
 listItem.getModelObject();

                Session session = sessionFactory.getCurrentSession();

                logger.debug(usageLog in populate item is in hibernate
 session? + session.contains(usageLog) );

                Label ipAddress = new
 Label(ipAddress,usageLog.getIpAddress());
                listItem.add(ipAddress);

                Label outcome = new
 Label(outcome,usageLog.getOutcome().toString());
                listItem.add(outcome);

                Label outcomeMsg = new
 Label(outcomeMsg,usageLog.getOutcomeMsg());
                listItem.add(outcomeMsg);

                AjaxLink checkLink = new AjaxLink(checkHibernateLink)
                {
                   �...@override
                    public void onClick(AjaxRequestTarget target)
                    {
                        Session session =
 sessionFactory.getCurrentSession();

                        logger.debug(usageLog in checkLink is in hibernate
 session? + session.contains(usageLog) );


                    }
                };

                listItem.add(checkLink);
            }
        };

        add(container);
        container.add(listView);


    }
 }

 -

 The output when the page is first accessed prints:

 Loading usageLogs...
 usageLog in populate item is in hibernate session? true   # For each item


 However, When the checkLink is clicked it prints

 usageLog in checkLink is in hibernate session? false


 The logs show that the ListView's model is not loaded when the checkLink is
 clicked.

 I always thought that when a page is accessed by a request that all the
 components are told to attach their model at the start of the request. This
 does not seem to be the case. I have read
 all the available request lifecycle documentation I have found but still
 have not found why the model is not loaded for the page's components on an
 AjaxLink click.

 Can anyone explain this behavior and maybe give me a bit more detail how the
 request lifecycle and the component model's work together.

 If I add target.addComponent(container) in the onClick method of checkLink
 the model for the ListView is loaded and populateItem is called again, with
 printing true for in hibernate session. But I need to be able to access
 the attached instance of the hibernate object in the AjaxLink's onClick
 method. What is the best way to achieve this?

 Thanks


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For 

Open a Modal Window within a Panel from a FileUpload form

2009-05-27 Thread Lina Thomas
Hi Hi

 I have a page that has a FileUpload form. Once the file is uploaded
successfully onSubmit of the form I need to open a panel in ModalWindow.
There is no Ajax event to fire which leaves me searching for ways to open
the ModalWindow.

I need to open the ModalWindow only on successful upload of the file.

 W hen I say success page, I mean within the onSubmit method on the same
page.

 Something like this
 Form Form = new Form(FORM_NAME, model)
  {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit()
{
  FileUpload upload = uploadField.getFileUpload();
  //open ModalWindow
}
  }

Thanks
-Lina


Re: Open a Modal Window within a Panel from a FileUpload form

2009-05-27 Thread Douglas Ferguson

Lina Thomas wrote:

Hi Hi

 I have a page that has a FileUpload form. Once the file is uploaded
successfully onSubmit of the form I need to open a panel in ModalWindow.
There is no Ajax event to fire which leaves me searching for ways to open
the ModalWindow.

I need to open the ModalWindow only on successful upload of the file.

 W hen I say success page, I mean within the onSubmit method on the same
page.

 Something like this
 Form Form = new Form(FORM_NAME, model)
  {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit()
{
  FileUpload upload = uploadField.getFileUpload();
  //open ModalWindow
}
  }

Thanks
-Lina
  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Open a Modal Window within a Panel from a FileUpload form

2009-05-27 Thread Douglas Ferguson

You could use AjaxButton.

This would give you an onSubmit with AjaxRequestTarget in the signature.

D/



Lina Thomas wrote:

Hi Hi

 I have a page that has a FileUpload form. Once the file is uploaded
successfully onSubmit of the form I need to open a panel in ModalWindow.
There is no Ajax event to fire which leaves me searching for ways to open
the ModalWindow.

I need to open the ModalWindow only on successful upload of the file.

 W hen I say success page, I mean within the onSubmit method on the same
page.

 Something like this
 Form Form = new Form(FORM_NAME, model)
  {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit()
{
  FileUpload upload = uploadField.getFileUpload();
  //open ModalWindow
}
  }

Thanks
-Lina
  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



dynamically add additional components

2009-05-27 Thread tubin gen
is it possible to   modify  html at runtime and add  new components ? for
example I have a panel,   html code below.

wicket:panel
div class=contentTittle
label wicket:id=pageTittle /
/div
div class=pageheader
div align=center
table style=margin-bottom: 0.5em;
tbody
tr
tdAudit Number:/tdgo
tdlabel wicket:id=auditNumber//td
/tr
tr
tdGrantee:/td
tdlabel wicket:id=grantee//td
/tr
/tbody
/table
/div
/div
div class=pagedescription
pspan wicket:id=pageDescription //p
/div
/wicket:panel

I use this panel  in several  pages,  but for one page I have to add
additional informationbetween wicket:id=grantee  and
wicket:id=pageDescription  , so I am wondering If I can I create a new
class which extends from this panel and if this new class can add a new
component to this html  and add the component to hirearchy , something  like
this  ,html below has a third   tr tag  ?

wicket:panel
div class=contentTittle
label wicket:id=pageTittle /
/div
div class=pageheader
div align=center
table style=margin-bottom: 0.5em;
tbody
tr
tdAudit Number:/tdgo
tdlabel wicket:id=auditNumber//td
/tr
tr
tdGrantee:/td
tdlabel wicket:id=grantee//td
/tr
tr
tdProgram:/td
tdlabel wicket:id=program//td
/tr

/tbody
/table
/div
/div
div class=pagedescription
pspan wicket:id=pageDescription //p
/div
/wicket:panel


please suggest me if it is possible to do this , I donot want to add the
third tr tag and call set visible false for all pages and only for one page
set it to true ?


DropDownChoice with Id Value

2009-05-27 Thread Dane Laverty
I'm using a DropDownChoice that looks like this:

DropDownChoice component = new DropDownChoice(component,
new PropertyModel(task,
componentId),
new PropertyModel(task,
project.components),
new ChoiceRenderer(name, id));

The problem is that task.project.components is a ListComponent and
task.componentId is an int, so I get an error that says:

No get method defined for class: class java.lang.Integer expression: id

I know that I can fix the problem by making the DropDownChoice's model a
Component instead of an int. However, I would like to avoid that, since that
would require reworking the Task class. Is there a way to make this work?


Re: [announce] WicketStuff Artwork new release

2009-05-27 Thread Erik van Oosten

Hi Nino,

Nice stuff. Do you have a link to liquid? Its not a nice google word.

Regards,
   Erik.


nino martinez wael wrote:

Hi Guys

Just wanted to tell that theres a new release of wicketstuff artwork
out.  This time including niftycornerscube...

  




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread J.-F. Rompre
 I am trying to do something that should be easy to do, and may already be
 available from the API (I am still usin 1.3.5).

 How can one duplicate rendered strings?

 In other words, I am trying to render once but copy a number of times for
 better performance - e.g., putting a page navigator both at the top and
 bottom of the list (the bottom is simply a label generated from copying the
 rendered top one) or something more complex such as a calendar.

 I tried using IBehavior.onRendered to copy getResponse.toString() for later
 reuse, but myComponent.renderComponent() throws IllegalStateException: Page
 not found - even though I am adding the component to a panel as instructed
 by Component.renderComponent() - any ideas? My code is below.

 I also thought of overriding one of the rendering methods to write directly
 to the response, but Component.renderXXX() methods are all final - there
 has to be a way to do this simply.

 Any ideas?

 Thanks!
 JF

 The containing panel java (groovy) code - 'ppn' is the component we want to
 render only once
 .//ProductPanel
 //...
productsContainer.add( products )
 ProductsPagingNavigator ppn = new ProductsPagingNavigator(
 productsPagerTop, products)
 ppn.add( new MakeRenderedStringBehavior())

productsContainer.add(  ppn)
ppn.renderComponent()   //THOWS 'Page not found... exc.
   //save the rendering for reuse
CharSequence ppnOut = ppn.getRendered()
  //reuse it here
productsContainer.add new Label( productsPagerBottom, ppnOut)
 //

 //***
 The Behavior code attached to ppn above:
 .// MakeRenderedStringBehavior
 //...
public void onRendered(final Component component)
{
  //
//  Copy the rendering if this component can store it..
CharSequence output = response.toString();
if ( component instanceof IRenderedString )
((IRenderedString )component ).setRendered( output);
webResponse.write(output);
}
 //
 //*
 The containing ProductPanel markup:
 wicket:panel
 
 div class=Products wicket:id=products id=
div wicket:id=productsPagerTop class=Navigation/div !--
 rendered --
ul
li wicket:id=productsList id=
 ...
/div/li
/ul
div wicket:id=productsPagerBottom class=Navigation/div !--
 pasted in--
 /div
 /wicket:panel


Issue regarding refresh a wicket page portlet in Jetspeed portal

2009-05-27 Thread Arun Wagle
Hello ,

I have an issue with refreshing the portlet in jetspeed. I will try to
explain the issue below

I have a navigation in Jetspeed which point to a psml file. This psml file
will bring up a wicket portlet.

In the wicket portlet, I am having multiple pages.
So when we click on the navigation link(psml url), I get to the home page of
the wicket portlet.
I do some action on the home page(Page A) and then use setResponsePage
method of the Component class to redirect to a different page(Page B)

Now when I click on the navigation page again, instead of going to the home
page(Page A) it goes to the Page B directly.

I want that whenever I click on the navigation link (which points to a psml
file), it should always go to home page(Page A) and not to any intermediate
page (Page B in this case)
I think what is happenning here is, whenever I click on the navigation link,
the last rendered response is rendered by the portlet.


Let me know if more details are needed.


Regards,
Arun Wagle


OutOfMemory on certain combinations of controls

2009-05-27 Thread Flavius
 
I ran into an issue where I'm getting an OutOfMemory error using
autocomplete textbox functionality.

I haven't nailed down the root culprit, but the symptoms seem to
occur when I have a page with a border that also has controls,
such as a panel or two.

On the page, if I pop a modal dialog box (with ajax auto-complete) 
and type into the auto-complete textbox, after some 15-20 
key presses, I'll get the OutOfMemory error.

If I remove the reference to the window in the modal dialog
box, it doesn't occur.  Also, if I use inheritance and a child
page instead of a page with border, it doesn't seem to occur.

I'm testing this with JDK 1.6_07 and ran it in Tomcat 6.0.14.
I used Jconsole to watch the heap.  After some 15-20 key
presses, each subsequent keypress is increasing the heap
memory usage by several megs.

I looked at the heap dump in MAT and it's showing me 3 huge
byte[].  I just started using this tool.  If I'm reading this right,
it seems to have a lot of threads eating up the heap.

This might be hard to reproduce, so I put together a little
demo app that can be downloaded at 
http://silverlion.com/tmp2/wicket_test.zip. It's an eclipse
project I just zipped up.

I did all this with wicket 1.3.6, but also went back to 1.3.5
to test that.  I get the same results.

I wanted to post the question here before I opened an issue
in jira to see if anybody experienced this.

I tried running this with -Xmx256m -Xms256m and also 512
MB of memory.  I still get the error on my dev box running
tomcat in eclipse and also building the war and deploying
it to tomcat outside a dev env.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AutoCompletetextField misbehavior in IE

2009-05-27 Thread slowery23

Did you have to do anything else to get this to work?  I am having the same
issue in both 1.4rc1 and 1.4rc2.


cbchhaya wrote:
 
 Never mind, I was doing something daft but have now correctly replaced
 with the Mar 10 snapshot for 1.3.5 and the thing works fine.
 
 Thanks everyone for your help!
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompletetextField-misbehavior-in-IE-tp22459455p23750605.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Open a Modal Window within a Panel from a FileUpload form

2009-05-27 Thread Steve Swinsburg
You can't submit files with an AjaxButton as AJAX doesn't do multipart  
(yet). There are solutions with iframes. You could try that.


cheers,
Steve

On 27/05/2009, at 7:46 PM, Douglas Ferguson wrote:


You could use AjaxButton.

This would give you an onSubmit with AjaxRequestTarget in the  
signature.


D/



Lina Thomas wrote:

Hi Hi

I have a page that has a FileUpload form. Once the file is uploaded
successfully onSubmit of the form I need to open a panel in  
ModalWindow.
There is no Ajax event to fire which leaves me searching for ways  
to open

the ModalWindow.

I need to open the ModalWindow only on successful upload of the file.

W hen I say success page, I mean within the onSubmit method on  
the same

page.

Something like this
Form Form = new Form(FORM_NAME, model)
 {
   private static final long serialVersionUID = 1L;

   @Override
   protected void onSubmit()
   {
 FileUpload upload = uploadField.getFileUpload();
 //open ModalWindow
   }
 }

Thanks
-Lina




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





smime.p7s
Description: S/MIME cryptographic signature


Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread Martijn Dashorst
You don't. Did a profiler tell you that this is a hotspot? Or are you
optimizing for optimizing's sake?

Martijn

On Wed, May 27, 2009 at 9:53 PM, J.-F. Rompre jrom...@gmail.com wrote:
  I am trying to do something that should be easy to do, and may already be
  available from the API (I am still usin 1.3.5).

  How can one duplicate rendered strings?

  In other words, I am trying to render once but copy a number of times for
  better performance - e.g., putting a page navigator both at the top and
  bottom of the list (the bottom is simply a label generated from copying the
  rendered top one) or something more complex such as a calendar.

  I tried using IBehavior.onRendered to copy getResponse.toString() for later
  reuse, but myComponent.renderComponent() throws IllegalStateException: Page
  not found - even though I am adding the component to a panel as instructed
  by Component.renderComponent() - any ideas? My code is below.

  I also thought of overriding one of the rendering methods to write directly
  to the response, but Component.renderXXX() methods are all final - there
  has to be a way to do this simply.

  Any ideas?

  Thanks!
  JF

  The containing panel java (groovy) code - 'ppn' is the component we want to
  render only once
  .//ProductPanel
  //...
        productsContainer.add( products )
         ProductsPagingNavigator ppn = new ProductsPagingNavigator(
  productsPagerTop, products)
         ppn.add( new MakeRenderedStringBehavior())

        productsContainer.add(  ppn)
        ppn.renderComponent()       //THOWS 'Page not found... exc.
                   //save the rendering for reuse
        CharSequence ppnOut = ppn.getRendered()
                  //reuse it here
        productsContainer.add new Label( productsPagerBottom, ppnOut)
  //

  //***
  The Behavior code attached to ppn above:
  .// MakeRenderedStringBehavior
     //...
    public void onRendered(final Component component)
    {
  //
            //  Copy the rendering if this component can store it..
            CharSequence output = response.toString();
            if ( component instanceof IRenderedString )
                ((IRenderedString )component ).setRendered( output);
            webResponse.write(output);
        }
  //
  //*
  The containing ProductPanel markup:
  wicket:panel
  
  div class=Products wicket:id=products id=
    div wicket:id=productsPagerTop class=Navigation/div !--
  rendered --
    ul
        li wicket:id=productsList id=
             ...
        /div/li
    /ul
    div wicket:id=productsPagerBottom class=Navigation/div !--
  pasted in--
  /div
  /wicket:panel




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread Jeremy Thomerson
The real question that has been asked time and time again on this list
when such a question is received is this:

WHY?  It's premature (and almost certainly unnecessary) optimization.
Doing it needlessly couples multiple components together - reducing
reuse.

As always, we are more than interested in seeing any results of
performance analysis that you have done that says that this will
reduce your page load time by any significant factor.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 2:53 PM, J.-F. Rompre jrom...@gmail.com wrote:
  I am trying to do something that should be easy to do, and may already be
  available from the API (I am still usin 1.3.5).

  How can one duplicate rendered strings?

  In other words, I am trying to render once but copy a number of times for
  better performance - e.g., putting a page navigator both at the top and
  bottom of the list (the bottom is simply a label generated from copying the
  rendered top one) or something more complex such as a calendar.

  I tried using IBehavior.onRendered to copy getResponse.toString() for later
  reuse, but myComponent.renderComponent() throws IllegalStateException: Page
  not found - even though I am adding the component to a panel as instructed
  by Component.renderComponent() - any ideas? My code is below.

  I also thought of overriding one of the rendering methods to write directly
  to the response, but Component.renderXXX() methods are all final - there
  has to be a way to do this simply.

  Any ideas?

  Thanks!
  JF

  The containing panel java (groovy) code - 'ppn' is the component we want to
  render only once
  .//ProductPanel
  //...
        productsContainer.add( products )
         ProductsPagingNavigator ppn = new ProductsPagingNavigator(
  productsPagerTop, products)
         ppn.add( new MakeRenderedStringBehavior())

        productsContainer.add(  ppn)
        ppn.renderComponent()       //THOWS 'Page not found... exc.
                   //save the rendering for reuse
        CharSequence ppnOut = ppn.getRendered()
                  //reuse it here
        productsContainer.add new Label( productsPagerBottom, ppnOut)
  //

  //***
  The Behavior code attached to ppn above:
  .// MakeRenderedStringBehavior
     //...
    public void onRendered(final Component component)
    {
  //
            //  Copy the rendering if this component can store it..
            CharSequence output = response.toString();
            if ( component instanceof IRenderedString )
                ((IRenderedString )component ).setRendered( output);
            webResponse.write(output);
        }
  //
  //*
  The containing ProductPanel markup:
  wicket:panel
  
  div class=Products wicket:id=products id=
    div wicket:id=productsPagerTop class=Navigation/div !--
  rendered --
    ul
        li wicket:id=productsList id=
             ...
        /div/li
    /ul
    div wicket:id=productsPagerBottom class=Navigation/div !--
  pasted in--
  /div
  /wicket:panel


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: dynamically add additional components

2009-05-27 Thread Jeremy Thomerson
You could use markup inheritance to allow the subclass to insert
markup in that location.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 1:42 PM, tubin gen fachh...@gmail.com wrote:
 is it possible to   modify  html at runtime and add  new components ? for
 example I have a panel,   html code below.

 wicket:panel
    div class=contentTittle
        label wicket:id=pageTittle /
    /div
    div class=pageheader
        div align=center
            table style=margin-bottom: 0.5em;
                tbody
                    tr
                        tdAudit Number:/tdgo
                        tdlabel wicket:id=auditNumber//td
                    /tr
                    tr
                        tdGrantee:/td
                        tdlabel wicket:id=grantee//td
                    /tr
                /tbody
            /table
        /div
    /div
    div class=pagedescription
        pspan wicket:id=pageDescription //p
    /div
 /wicket:panel

 I use this panel  in several  pages,  but for one page I have to add
 additional information    between wicket:id=grantee  and
 wicket:id=pageDescription  , so I am wondering If I can I create a new
 class which extends from this panel and if this new class can add a new
 component to this html  and add the component to hirearchy , something  like
 this  ,html below has a third   tr tag  ?

 wicket:panel
    div class=contentTittle
        label wicket:id=pageTittle /
    /div
    div class=pageheader
        div align=center
            table style=margin-bottom: 0.5em;
                tbody
                    tr
                        tdAudit Number:/tdgo
                        tdlabel wicket:id=auditNumber//td
                    /tr
                    tr
                        tdGrantee:/td
                        tdlabel wicket:id=grantee//td
                    /tr
                    tr
                        tdProgram:/td
                        tdlabel wicket:id=program//td
                    /tr

                /tbody
            /table
        /div
    /div
    div class=pagedescription
        pspan wicket:id=pageDescription //p
    /div
 /wicket:panel


 please suggest me if it is possible to do this , I donot want to add the
 third tr tag and call set visible false for all pages and only for one page
 set it to true ?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Last call job opening: Senior Java Engineer with wicket experience

2009-05-27 Thread Clint Popetz
Hi,

I sent this to the list about a month ago, and we've received several good
applicants, but I'll accept applications through the end of this month
before making a decision.  Since the last posting I've hired a part time
person, and at this point I'm really only looking for full-time candidates.
In particular, I need someone with a fair amount of wicket experience, who
can immediately dive in to implement pages.

The job posting is at:

 http://42lines.net/employment

Thanks!
-Clint

P.S.  If sending job openings for wicket engineers to the list is bad form,
please let me know.

-- 
Clint Popetz
http://42lines.net
Scalable Web Application Development


Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread Jeremy Thomerson
If you're optimizing for optimization's sake, spend your time
optimizing where it is worth optimizing.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 6:04 PM, J.-F. Rompre jrom...@gmail.com wrote:
 I am optimizing for optimizing's sake - is there built-in efficiency that
 prevents duplicate rendering for component instances of the same type with
 different markup ids?

 Thanks,

 JF

 On Wed, May 27, 2009 at 6:04 PM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:

 You don't. Did a profiler tell you that this is a hotspot? Or are you
 optimizing for optimizing's sake?

 Martijn

 On Wed, May 27, 2009 at 9:53 PM, J.-F. Rompre jrom...@gmail.com wrote:
   I am trying to do something that should be easy to do, and may already
 be
   available from the API (I am still usin 1.3.5).
 
   How can one duplicate rendered strings?
 
   In other words, I am trying to render once but copy a number of times
 for
   better performance - e.g., putting a page navigator both at the top and
   bottom of the list (the bottom is simply a label generated from copying
 the
   rendered top one) or something more complex such as a calendar.
 
   I tried using IBehavior.onRendered to copy getResponse.toString() for
 later
   reuse, but myComponent.renderComponent() throws IllegalStateException:
 Page
   not found - even though I am adding the component to a panel as
 instructed
   by Component.renderComponent() - any ideas? My code is below.
 
   I also thought of overriding one of the rendering methods to write
 directly
   to the response, but Component.renderXXX() methods are all final - there
   has to be a way to do this simply.
 
   Any ideas?
 
   Thanks!
   JF
 
   The containing panel java (groovy) code - 'ppn' is the component we want
 to
   render only once
   .//ProductPanel
   //...
         productsContainer.add( products )
          ProductsPagingNavigator ppn = new ProductsPagingNavigator(
   productsPagerTop, products)
          ppn.add( new MakeRenderedStringBehavior())
 
         productsContainer.add(  ppn)
         ppn.renderComponent()       //THOWS 'Page not found... exc.
                    //save the rendering for reuse
         CharSequence ppnOut = ppn.getRendered()
                   //reuse it here
         productsContainer.add new Label( productsPagerBottom, ppnOut)
   //
 
   //***
   The Behavior code attached to ppn above:
   .// MakeRenderedStringBehavior
      //...
     public void onRendered(final Component component)
     {
   //
             //  Copy the rendering if this component can store it..
             CharSequence output = response.toString();
             if ( component instanceof IRenderedString )
                 ((IRenderedString )component ).setRendered( output);
             webResponse.write(output);
         }
   //
   //*
   The containing ProductPanel markup:
   wicket:panel
   
   div class=Products wicket:id=products id=
     div wicket:id=productsPagerTop class=Navigation/div !--
   rendered --
     ul
         li wicket:id=productsList id=
              ...
         /div/li
     /ul
     div wicket:id=productsPagerBottom class=Navigation/div !--
   pasted in--
   /div
   /wicket:panel
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 JF
 Borrow money from pessimists - they don't expect it back. -- Steven Wright


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Refreshing a list while using ListDataProvider

2009-05-27 Thread Andreas Petersson

Vasu Srinivasan schrieb:

Hello:
I have a simple search form , where some criteria refreshes the table based
on the db. I got it working with ListView, but im trying to use
ListDataProvider, I feel missing something:
  

the trick that worked for me:
just re-use the existing list instance.

final List l = ...
new ListDataProvider(l);

..then in an ajax button l.clear();
l.add(stuff)...

so just use the instance , the ListDataProvider will pick up the changes.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread J.-F. Rompre
OK, thanks Martjin and Jeremy - I think mentioning performance was a mistake
on my part..let me try again.

I am not trying to couple different components, only to reuse what I know is
never going to change within the same rendering - actually, avoiding the use
of multiple component instances of the same subtype where a single instance
would suffice.

My question is: Is it possible to capture a rendered string for reuse? In
other words, if I have a component subtype that I am currently instantiating
multiple times with exactly the same state (therefore the output is exactly
the same), is it possible to render it once and once only and reuse the
string from that rendering within the same container or page?

At this stage I am only trying to know how to do something instead of why
(optimization or other reason, such as saving markup coding, or some other
reason). I went through the source and searched on forums as well to find
out, but didn't.

My apologies if that question has been answered elsewhere - please let me
know where I can look.

Thanks,

JF

On Wed, May 27, 2009 at 6:33 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 The real question that has been asked time and time again on this list
 when such a question is received is this:

 WHY?  It's premature (and almost certainly unnecessary) optimization.
 Doing it needlessly couples multiple components together - reducing
 reuse.

 As always, we are more than interested in seeing any results of
 performance analysis that you have done that says that this will
 reduce your page load time by any significant factor.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, May 27, 2009 at 2:53 PM, J.-F. Rompre jrom...@gmail.com wrote:
   I am trying to do something that should be easy to do, and may already
 be
   available from the API (I am still usin 1.3.5).
 
   How can one duplicate rendered strings?
 
   In other words, I am trying to render once but copy a number of times
 for
   better performance - e.g., putting a page navigator both at the top and
   bottom of the list (the bottom is simply a label generated from copying
 the
   rendered top one) or something more complex such as a calendar.
 
   I tried using IBehavior.onRendered to copy getResponse.toString() for
 later
   reuse, but myComponent.renderComponent() throws IllegalStateException:
 Page
   not found - even though I am adding the component to a panel as
 instructed
   by Component.renderComponent() - any ideas? My code is below.
 
   I also thought of overriding one of the rendering methods to write
 directly
   to the response, but Component.renderXXX() methods are all final - there
   has to be a way to do this simply.
 
   Any ideas?
 
   Thanks!
   JF
 
   The containing panel java (groovy) code - 'ppn' is the component we want
 to
   render only once
   .//ProductPanel
   //...
 productsContainer.add( products )
  ProductsPagingNavigator ppn = new ProductsPagingNavigator(
   productsPagerTop, products)
  ppn.add( new MakeRenderedStringBehavior())
 
 productsContainer.add(  ppn)
 ppn.renderComponent()   //THOWS 'Page not found... exc.
//save the rendering for reuse
 CharSequence ppnOut = ppn.getRendered()
   //reuse it here
 productsContainer.add new Label( productsPagerBottom, ppnOut)
   //
 
   //***
   The Behavior code attached to ppn above:
   .// MakeRenderedStringBehavior
  //...
 public void onRendered(final Component component)
 {
   //
 //  Copy the rendering if this component can store it..
 CharSequence output = response.toString();
 if ( component instanceof IRenderedString )
 ((IRenderedString )component ).setRendered( output);
 webResponse.write(output);
 }
   //
   //*
   The containing ProductPanel markup:
   wicket:panel
   
   div class=Products wicket:id=products id=
 div wicket:id=productsPagerTop class=Navigation/div !--
   rendered --
 ul
 li wicket:id=productsList id=
  ...
 /div/li
 /ul
 div wicket:id=productsPagerBottom class=Navigation/div !--
   pasted in--
   /div
   /wicket:panel
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
JF
Half the people you know are below average. -- Steven Wright


Re: How do I reuse a rendered string, i.e. render once and past in multiple locations, e.g. paging nav at top and bottom?

2009-05-27 Thread Igor Vaynberg
no it is not possible and does not make sense to do so.

imagine you have a panel that renders div id=1div id=2/div/div

not only would you have to rewrite the id of the top tag, but also of
the inner tags. this becomes even more complicated if components
output header contributors, eg javascript, that depends on those ids.

if you are instantiating components with the same state then you
should simply connect them all to the same state via models so the
state is reused and does not present overhead.

makes sense?

-igor

On Wed, May 27, 2009 at 5:03 PM, J.-F. Rompre jrom...@gmail.com wrote:
 OK, thanks Martjin and Jeremy - I think mentioning performance was a mistake
 on my part..let me try again.

 I am not trying to couple different components, only to reuse what I know is
 never going to change within the same rendering - actually, avoiding the use
 of multiple component instances of the same subtype where a single instance
 would suffice.

 My question is: Is it possible to capture a rendered string for reuse? In
 other words, if I have a component subtype that I am currently instantiating
 multiple times with exactly the same state (therefore the output is exactly
 the same), is it possible to render it once and once only and reuse the
 string from that rendering within the same container or page?

 At this stage I am only trying to know how to do something instead of why
 (optimization or other reason, such as saving markup coding, or some other
 reason). I went through the source and searched on forums as well to find
 out, but didn't.

 My apologies if that question has been answered elsewhere - please let me
 know where I can look.

 Thanks,

 JF

 On Wed, May 27, 2009 at 6:33 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 The real question that has been asked time and time again on this list
 when such a question is received is this:

 WHY?  It's premature (and almost certainly unnecessary) optimization.
 Doing it needlessly couples multiple components together - reducing
 reuse.

 As always, we are more than interested in seeing any results of
 performance analysis that you have done that says that this will
 reduce your page load time by any significant factor.

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, May 27, 2009 at 2:53 PM, J.-F. Rompre jrom...@gmail.com wrote:
   I am trying to do something that should be easy to do, and may already
 be
   available from the API (I am still usin 1.3.5).
 
   How can one duplicate rendered strings?
 
   In other words, I am trying to render once but copy a number of times
 for
   better performance - e.g., putting a page navigator both at the top and
   bottom of the list (the bottom is simply a label generated from copying
 the
   rendered top one) or something more complex such as a calendar.
 
   I tried using IBehavior.onRendered to copy getResponse.toString() for
 later
   reuse, but myComponent.renderComponent() throws IllegalStateException:
 Page
   not found - even though I am adding the component to a panel as
 instructed
   by Component.renderComponent() - any ideas? My code is below.
 
   I also thought of overriding one of the rendering methods to write
 directly
   to the response, but Component.renderXXX() methods are all final - there
   has to be a way to do this simply.
 
   Any ideas?
 
   Thanks!
   JF
 
   The containing panel java (groovy) code - 'ppn' is the component we want
 to
   render only once
   .//ProductPanel
   //...
         productsContainer.add( products )
          ProductsPagingNavigator ppn = new ProductsPagingNavigator(
   productsPagerTop, products)
          ppn.add( new MakeRenderedStringBehavior())
 
         productsContainer.add(  ppn)
         ppn.renderComponent()       //THOWS 'Page not found... exc.
                    //save the rendering for reuse
         CharSequence ppnOut = ppn.getRendered()
                   //reuse it here
         productsContainer.add new Label( productsPagerBottom, ppnOut)
   //
 
   //***
   The Behavior code attached to ppn above:
   .// MakeRenderedStringBehavior
      //...
     public void onRendered(final Component component)
     {
   //
             //  Copy the rendering if this component can store it..
             CharSequence output = response.toString();
             if ( component instanceof IRenderedString )
                 ((IRenderedString )component ).setRendered( output);
             webResponse.write(output);
         }
   //
   //*
   The containing ProductPanel markup:
   wicket:panel
   
   div class=Products wicket:id=products id=
     div wicket:id=productsPagerTop class=Navigation/div !--
   rendered --
     ul
         li wicket:id=productsList id=
              ...
         /div/li
     /ul
     div wicket:id=productsPagerBottom class=Navigation/div !--
   pasted in--
   /div
   /wicket:panel
 

 

Re: simple model question

2009-05-27 Thread Igor Vaynberg
if you chain your models properly its no problem..

imodel ldm=new loadabledetachablemodel(..)
imodel prop=new propertymodel(ldm, prop);

-igor

On Wed, May 27, 2009 at 1:20 PM, bf b...@juno.com wrote:
 I constructed a Page that uses a LoadableDetachableModel.  The 
 LoadableDetachableModel retrieves an object from the Session and displays 
 Panels from a list in the object.  The Panels have TextFields which use 
 elements from the List but it puts the object into a PropertyModel in order 
 to access the attributes.
 My question is whether it is a problem to update the TextField via the 
 PropertyModel or does the PropertyModel have to use a LoadableDetachableModel 
 as well in order to get the object from the Session before doing an update?
 Thanks
 
  Study criminal justice and earn your degree. Click here to request free 
 program info!
 http://thirdpartyoffers.juno.com/TGL2131/fc/BLSrjnsC7KBxeazkJEKLTcG5VrnBxiF6Isv6JgQMUhUTSRgwIiVlASqMnxG/

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: OutOfMemory on certain combinations of controls

2009-05-27 Thread Igor Vaynberg
make sure you dont keep page references across pages. that may be it.

-igor

On Wed, May 27, 2009 at 1:41 PM, Flavius flav...@silverlion.com wrote:

 I ran into an issue where I'm getting an OutOfMemory error using
 autocomplete textbox functionality.

 I haven't nailed down the root culprit, but the symptoms seem to
 occur when I have a page with a border that also has controls,
 such as a panel or two.

 On the page, if I pop a modal dialog box (with ajax auto-complete)
 and type into the auto-complete textbox, after some 15-20
 key presses, I'll get the OutOfMemory error.

 If I remove the reference to the window in the modal dialog
 box, it doesn't occur.  Also, if I use inheritance and a child
 page instead of a page with border, it doesn't seem to occur.

 I'm testing this with JDK 1.6_07 and ran it in Tomcat 6.0.14.
 I used Jconsole to watch the heap.  After some 15-20 key
 presses, each subsequent keypress is increasing the heap
 memory usage by several megs.

 I looked at the heap dump in MAT and it's showing me 3 huge
 byte[].  I just started using this tool.  If I'm reading this right,
 it seems to have a lot of threads eating up the heap.

 This might be hard to reproduce, so I put together a little
 demo app that can be downloaded at
 http://silverlion.com/tmp2/wicket_test.zip. It's an eclipse
 project I just zipped up.

 I did all this with wicket 1.3.6, but also went back to 1.3.5
 to test that.  I get the same results.

 I wanted to post the question here before I opened an issue
 in jira to see if anybody experienced this.

 I tried running this with -Xmx256m -Xms256m and also 512
 MB of memory.  I still get the error on my dev box running
 tomcat in eclipse and also building the war and deploying
 it to tomcat outside a dev env.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ComponentModel

2009-05-27 Thread Jeremy Thomerson
Please open a JIRA so it doesn't get lost.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 2:59 AM, Petr Nejedlík petr.nejed...@abra.eu wrote:
 Hi,

 Class ComponentModel in version 1.4rc4 is generic but setObject methods
 still use Object instead of T.
 Is there any reason why setObject methods in ComponentModel and in inner
 class WrapModel does not use type T as input parameter?

 I recommend to change from

    public final void setObject(Object object)
    {
        throw new RuntimeException(set object call not expected on a
 IComponentAssignedModel);
    }

 to

    public final void setObject(T object)
    {
        throw new RuntimeException(set object call not expected on a
 IComponentAssignedModel);
    }

 and this

    protected void setObject(Component component, Object object)
    {
    }

 to

    protected void setObject(Component component, T object)
    {
    }

 and this

        /**
         * @see org.apache.wicket.model.IModel#setObject(java.lang.Object)
         */
        public void setObject(Object object)
        {
            ComponentModel.this.setObject(component, object);
        }

 to

        /**
         * @see org.apache.wicket.model.IModel#setObject(java.lang.Object)
         */
        public void setObject(T object)
        {
            ComponentModel.this.setObject(component, object);
        }

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Expired sign in link after signing out

2009-05-27 Thread Jeremy Thomerson
If you're on 1.3.2 can you try upgrading to at least the latest 1.3.X
release (or even better, 1.4-rc4) to see if that doesn't fix it?

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 7:34 AM, Tim Moose hungl...@gmail.com wrote:

add(new BookmarkablePageLink(signin, SigninPage.class));

 That is one thing I tried, but it didn't work for me. I am using
 org.apache.wicket.authentication.panel.SignInPanel and with the above
 bookmarkable link, I get the following exception in onSignInSucceeded:

    java.lang.IllegalArgumentException: wrong number of arguments
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
         at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149)
         at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:88)
         at org.apache.wicket.authentication.panel.SignInPanel
 onSignInSucceeded(SignInPage.java:65)

 I'm not able to spot the problem from the 1.3.2 source code:

    protected void onSignInSucceeded()
    {
        // If login has been called because the user was not yet
        // logged in, than continue to the original destination,
        // otherwise to the Home page
        if (!continueToOriginalDestination())
        {

 setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage(
                    getApplication().getHomePage(), (PageParameters)null));
        }
    }

 I did verify that getHomePage() is correctly returning my home page class
 and my home page constructors look like this:

    public Index() {
        this(null);
    }

    public Index(final PageParameters parameters) {
        super(parameters);
    }

 Any idea what I'm doing wrong?

 Thanks,

 Tim
 --
 View this message in context: 
 http://www.nabble.com/Expired-sign-in-link-after-signing-out-tp23732685p23741603.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: RequestLogger and session invalidation

2009-05-27 Thread Jeremy Thomerson
Please open a JIRA so this doesn't get lost.  I haven't looked, but it
sounds wrong if it truly recreates an invalidated session in some
end-of-request logging, even if it doesn't bind the session.  Post the
link back here.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 8:25 AM, Taneli Korri tko...@gmail.com wrote:
 Hi,

 I'm using Wicket 1.3.6 and RequestLogger.getLiveSessions to get the current
 sessions in my web application, but I'm experience strange behaviour when
 session invalidation occurs.

 When the user logs out of the application, the session is invalidated. This
 leads to WebApplication.sessionDestroyed to be called, which removes the
 session from the RequestLogger.liveSessions Map and everything seems to be
 fine.

 But the execution continues and eventually RequestCycle.detach gets called,
 which leads to RequestLogger.requestTime. And that's where the strangest
 thing happens, on line 254 of RequestLogger.java the invalidated session is
 created again and added back to the liveSessions Map.

 Is this the expected behaviour? Since this ensures that the liveSessions Map
 includes all sessions, even the invalidated ones.


 And another thing, are there any downsides in keeping RequestLogger on in
 production environment? I'm thinking that it might hog a lot of resources,
 but is that the case?


 Regards,

 Taneli Korri


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to receive digested emails once a day from this mailing list ???

2009-05-27 Thread Jeremy Thomerson
Well, I don't know because I've never tried, but I would suspect that
if your email address was anywhere close to being right, you'd need it
to have an S on users.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, May 27, 2009 at 10:06 AM, David Chang david_q_zh...@yahoo.com wrote:

 I am new to this mailing list and I like it very much. I like the active 
 community and the questions and answers, but I prefer to receive all the 
 emails combined together in a single email once a day. I want to stay in the 
 loop.

 I tried user-digest-subscr...@wicket.apache.org and there is no such list.

 Do you happen to know how I can do this? I looked at the Wicket project 
 website but failed to find such a way.

 Thanks for your help!





 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org