Using SigInPage with IE9

2011-05-16 Thread Zhubin Salehi
Hi,

I'm using org.apache.wicket.authroles.authentication.pages.SignInPage in my
application to provide a simple way for the users to sign in. It works
perfectly fine in FF4 but I get this error in IE9:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later. 




The operation completed successfully. Error processing resource
'http://192.168.30.76:8080/VDIClientHttp-0.0.1/wicket/bookm...

wicket:panel
--^

Any idea how I can fix this?

By the way I'm using Wicket 1.5 RC4.2.

Thanks,
Zhubin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-SigInPage-with-IE9-tp3526179p3526179.html
Sent from the Users forum 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



NotSerializableException in Wicket 1.5

2011-02-25 Thread Zhubin Salehi

Hi,

Since I migrated to Wicket 1.5 I get exceptions like this in my log file:

2011-02-25 10:28:07,234 [http-8080-Processor21] ERROR
org.apache.wicket.util.lang.WicketObjects - Error serializing object class
com.route1.mobi.map3.web.pages.assemblage.FindHost [object=[Page class =
com.route1.mobi.map3.web.pages.assemblage.FindHost, id = 5, render count =
1]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: $java.util.List$$EnhancerByCGLIB$$d1658214
Field hierarchy is:
  5 [class=com.route1.mobi.map3.web.pages.assemblage.FindHost, path=5]
private java.lang.Object org.apache.wicket.MarkupContainer.children
[class=[Ljava.lang.Object;]
  private java.lang.Object org.apache.wicket.MarkupContainer.children[6]
[class=com.route1.mobi.map3.web.pages.assemblage.FindHost$HostForm,
path=5:logicalEntityForm]
private java.lang.Object org.apache.wicket.MarkupContainer.children
[class=[Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.MarkupContainer.children[0]
[class=org.apache.wicket.markup.html.WebMarkupContainer,
path=5:logicalEntityForm:mainTable]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private java.lang.String
org.apache.wicket.markup.html.form.FormComponent.typeName[2]
[class=org.apache.wicket.markup.html.form.TextField,
path=5:logicalEntityForm:mainTable:name]
java.lang.Object org.apache.wicket.Component.data
[class=org.apache.wicket.model.PropertyModel]
  private java.lang.Object
org.apache.wicket.model.AbstractPropertyModel.target
[class=com.route1.mobi.dao.model.AssemblageItemSearchCriteria$DetailSearchCriteria]
private com.route1.mobi.model.DetailParam
com.route1.mobi.dao.model.AssemblageItemSearchCriteria$DetailSearchCriteria.detailParam
[class=com.route1.mobi.model.DetailParam]
  private java.util.List
com.route1.mobi.model.DetailParam.names
[class=$java.util.List$$EnhancerByCGLIB$$d1658214] - field that is not
serializable
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:387)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:432)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:432)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:432)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:647)
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:570)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:366)
at

Re: NotSerializableException in Wicket 1.5

2011-02-25 Thread Zhubin Salehi

Thanks for your quick reply. I used Wicket 1.4.15.

I think like you said I need to avoid serializing CGLIB objects. Is there
any specific way to do this?

Zhubin


Martin Grigorov-4 wrote:
 
 There are no changes in Wicket related to the serialization checks.
 There were some improvements in latest 1.4.x and 1.5.x code.
 From which 1.4.x version exactly did you upgrade to 1.5 ?
 
 About 'switch off' -
 see getApplication().getPageManager().supportsVersioning().
 Better see how to avoid serializing the DB content than switching off
 serialization.
 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NotSerializableException-in-Wicket-1-5-tp3324650p3324703.html
Sent from the Users forum 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: NotSerializableException in Wicket 1.5

2011-02-25 Thread Zhubin Salehi


Pedro Santos wrote:
 
 Text field name in logicalEntityForm has an PropertyModel targeting a
 DetailSearchCriteria, this class has the field detailParam of type
 DetailParam, and DetailParam has the field names of a not serializable
 property type: List
 A lot of List implementations are serializable, but the one at
 the DetailParam is not.
 
That's right, because the list is lazily loaded from the database. I'm not
sure how to make Wicket not try to serialize those objects... 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NotSerializableException-in-Wicket-1-5-tp3324650p3324902.html
Sent from the Users forum 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: Wicket 1.5 and custom request cycle

2011-02-10 Thread Zhubin Salehi
I had the same issue. Do you have any estimate on the release date of RC2?

Zhubin

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: February 10, 2011 1:54 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.5 and custom request cycle

i just fixed this last night, will be part of rc2.

-igor

On Thu, Feb 10, 2011 at 10:46 AM, Bertrand Guay-Paquet
ber...@step.polymtl.ca wrote:
 Hello,

 Disclaimer: I am a relatively new Wicket user

 I use a custom session to store the current user Id and I want to use the
 request cycle to store the current user object which is fetched from the DB
 on each request following advice from
 http://wicket-users.markmail.org/search/?q=cart+thread+safe#query:cart%20thread%20safe+page:1+mid:m3kgdjxv2fmeebvt+state:results
 and
 http://wicket-users.markmail.org/search/?q=session+thread+safe#query:session%20thread%20safe+page:1+mid:oh4v4ivhubc3ao4s+state:results

 To this end, I followed the instructions from
 https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-RequestCycle
 However, the method WebApplication#addRequestCycleListener() does not exist.
 I searched for a replacement but only found
 Application#getRequestCycleListeners() which gives access to the listener
 list. Its Javadoc however states that the returned list is unmodifiable so I
 avoided this route.

 So instead I used Application#setRequestCycleProvider() to create my
 CustomRequestCycle class. This class has the following method:
 @Override
 protected void onBeginRequest() {
    super.onBeginRequest();
    Long userId = (CustomSession)Session.get().getCurrentUserId();
    if (userId != null)
        // fetch user...
 }

 My problem is that I get a NullPointerException in Session#get(). When first
 accessing a page, there is no session associated with the TheadContext. So
 the following line is then executed in Session#get():
 Application.get().fetchCreateAndSetSession(RequestCycle.get())

 RequestCycle.get() returns null because ThreadContext.requestCycle has not
 been set yet when onBeginRequest() is called.

 I am doing something wrong? Is this a bug?

 Thanks!

 -
 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



RequestCycle.onRequestTargetSet(IRequestTarget requestTarget) equivalant in Wicket 1.5

2011-02-02 Thread Zhubin Salehi
Hi all,

I'm in process of migrating from Wicket 1.4 to Wicket 1.5. I have the following 
method in the 1.4 version of my AuthenticatedWebApplication subclass:

@Override
public RequestCycle newRequestCycle(final Request request, final 
Response response) {
return new WebRequestCycle(this, (WebRequest) request, 
(WebResponse) response) {

@Override
protected void onBeginRequest() {
/* invalidate the session if 
database session has expired */
}

@Override
protected void 
onRequestTargetSet(IRequestTarget requestTarget) {
/* set response page to change 
password page if user's password has expired */
}
};
}


As explained in the Migrating to Wicket 1.5 page I add a subclass of 
AbstractRequestCycleListener in the init() method:

getRequestCycleListeners().add(new 
AbstractRequestCycleListener() {

public void onBeginRequest(RequestCycle 
cycle) {
/* invalidate the session if 
database session has expired */
}
});

Now I'm trying to figure out what to do with onRequestTargetSe()t method. Does 
anyone know how to achieve this?

Thanks,
Zhubin

Zhubin Salehi
Senior Software Engineer
Route1 - Securing the Digital World(tm)
Phone: 416-848-8391 ext. 2262
Mobile: 416-939-6383
[cid:image001.jpg@01CBC2E9.FD70D5B0]
This electronic mail transmission contains information from Route1 Inc. that is 
for the sole use of the intended recipient and may contain confidential, 
privileged or proprietary information. If you are not the intended recipient, 
please be aware that any disclosure, copying, distribution or use of this 
message, its contents, or any attachment is prohibited. Any wrongful 
interception of this message is punishable as a federal crime. If you have 
received this message in error, please return a copy to the sender by 
electronic mail indicating the error. Then, please destroy the original message 
and any copies from your computer.



RE: RequestCycle.onRequestTargetSet(IRequestTarget requestTarget) equivalant in Wicket 1.5

2011-02-02 Thread Zhubin Salehi
Thanks, I just did.

Zhubin

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: February 2, 2011 3:16 PM
To: users@wicket.apache.org
Subject: Re: RequestCycle.onRequestTargetSet(IRequestTarget requestTarget) 
equivalant in Wicket 1.5

dont think that hook exists yet, file a jira

-igor

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



RE: 1.5.x javadoc

2011-01-28 Thread Zhubin Salehi
No 1.5.x!

-Original Message-
From: Steve Swinsburg [mailto:steve.swinsb...@gmail.com] 
Sent: January 28, 2011 12:04 AM
To: users@wicket.apache.org
Subject: Re: 1.5.x javadoc

Wicket By Example has a section for the Javadocs, but it needs a refresh.
http://wicketbyexample.com/api/

cheers,
Steve

On 28/01/2011, at 10:36 AM, Todd Wolff wrote:

 Hi,
 
 
 
 Is there a URL where I can pull up javadoc for latest 1.5 RC without
 having to checkout source and generate myself?  Thanks.
 


-
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: Tree and TabbedPanel components

2009-07-30 Thread Zhubin Salehi

Hi Raj,

I think you need to refresh 'detailPanel' instead of 'panelOnClick'.
Something like this:

.
.
.
Panel panelOnClick = new DetailTabbedPanel(detailPanel, defNode);
panelOnClick.setOutputMarkupId(true);
this.detailPanel.replaceWith(panelOnClick);
this.detailPanel = panelOnClick;
target.addComponent(detailPanel);
.
.
.

panelOnClick panel is not rendered when you add it to detailPanel.

Zhubin




rajkaushik wrote:
 
 Yes I understand this is a refresh problem. 
 
 1. By repainting I am assuming you mean that the right panel should invoke
 the setOutputMarkupId. With this parameter set, the repainting is taken
 care of by Ajaxified component. Please inform if you have different view.
 
 2. If I have invalid markups, what would be the efficient way of debugging
 and pin-pointing the problem.
 
 I really appreciate your prompt answers. Please bear with me for the time
 being.
 
 Raj
 
 
 
 igor.vaynberg wrote:
 
 sounds like you are either not repainting the right component, or you
 have invalid markup and the browser is puking on replacing the dom.
 
 -igor
 
 
 On Tue, Jul 28, 2009 at 11:02 AM, rajkaushikrajv...@yahoo.com wrote:

 Yes Igor,

 I am using the Ajax. Here is my partial code. Please suggest me the
 possible
 misses - Raj


 protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode
 node)
 ...
        Panel panelOnClick = new DetailTabbedPanel(detailPanel,
 defNode);
        panelOnClick.setOutputMarkupId(true);
        this.detailPanel.replaceWith(panelOnClick);
        this.detailPanel = panelOnClick;
        target.addComponent(panelOnClick);
 

 }


 -
 public class DetailTabbedPanel extends Panel {


        private  JMXMutableTreeNode nodeDef;
        private AjaxTabbedPanel ajaxTabbedPanel;


    public DetailTabbedPanel(String id, JMXMutableTreeNode nodeDef) {
        super(id);
        this.nodeDef = nodeDef;
        getTabbedPanel(detailTabbedPanel);
        }

    public void getTabbedPanel(String tabbedId) {

                List ITab tabs=new ArrayListITab();

 /*          tabs.add(new AbstractTab(new
 StringResourceModel(tab.conprops,
 DetailTabbedPanel.this, null)){
                **//**
                         *
                         *//*
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId){

                                if(nodeDef.getUserObject() instanceof
 ObjectInstanceNodeInfo){
                                        return new
 SMBeanTabConnectionPanel(panelId, nodeDef);
                                } else {
                                        return new
 SMTabConnectionPanel(panelId, nodeDef);
                                }
                        //return new EmptyPanel(panelId);
                }
            });*/

            tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(tab.smprops, DetailTabbedPanel.this, null)){
                /**
                         *
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabSMPanel panel1 = new
 SMTabSMPanel(panelId, nodeDef);
                                panel1.setOutputMarkupId(true);
                        return panel1;

                }
            }));

            tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(tab.mobiprops, DetailTabbedPanel.this, null)){
                /**
                         *
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabMobiPanel panel2 = new
 SMTabMobiPanel(panelId, nodeDef);
                                panel2.setOutputMarkupId(true);
                        return panel2;

                }
            }));


            tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(tab.vcprops, DetailTabbedPanel.this, null)){
                /**
                        *
                        */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
                {
                                SMTabVCPanel panel3 = new
 SMTabVCPanel(panelId, nodeDef);
                                panel3.setOutputMarkupId(true);
                        return panel3;

                }
            }));

            tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(tab.poolprops, DetailTabbedPanel.this, null)) {
                /**
                         *
                         */
                        private static final long serialVersionUID = 1L;

                        public Panel getPanel(String panelId)
          

Markup for Disabled Panels and Pages

2009-07-24 Thread Zhubin Salehi
Hi all,

I was wondering if there is a way to change a panel's or page's markup or even 
class when it is disabled. I have two versions of some of my panels and pages: 
a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version has labels 
instead of dropdown menus and text fields. Based on user's roles some 
pages/panels might be view-only for some users and editable for some others. Is 
there a way that I can substitute a panel or page when it is disabled?

Thanks,
Zhubin


Markup for Disabled Panels and Pages

2009-07-23 Thread Zhubin Salehi
Hi all,

I was wondering if there is a way to change a panel's or page's markup or even 
class when it is disabled. I have two versions of some of my panels and pages: 
a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version has labels 
instead of dropdown menus and text fields. Based on user's roles some 
pages/panels might be view-only for some users and editable for some others. Is 
there a way that I can substitute a panel or page when it is disabled?

Thanks,
Zhubin



Zhubin Salehi
Senior Software Engineer
Route1 - Securing the Digital World(tm)
Phone: 416-848-8391 ext. 2262
Mobile: (optional)

This electronic mail transmission contains information from Route1 Inc. that is 
for the sole use of the intended recipient and may contain confidential, 
privileged or proprietary information. If you are not the intended recipient, 
please be aware that any disclosure, copying, distribution or use of this 
message, its contents, or any attachment is prohibited. Any wrongful 
interception of this message is punishable as a federal crime. If you have 
received this message in error, please return a copy to the sender by 
electronic mail indicating the error. Then, please destroy the original message 
and any copies from your computer.


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



RE: Markup for Disabled Panels and Pages

2009-07-23 Thread Zhubin Salehi
I think this is a better idea that using two different pages. I can use both 
editable and non-editable panels in the same page and make one of them 
invisible. Thanks!

Zhubin

-Original Message-
From: Fernando Wermus [mailto:fernando.wer...@gmail.com]
Sent: Thursday, July 23, 2009 2:06 PM
To: users@wicket.apache.org
Subject: Re: Markup for Disabled Panels and Pages

When it is disabled you might want to set invisible it and set visible the
another panel?

On Thu, Jul 23, 2009 at 10:24 AM, Zhubin Salehi zhubin.sal...@route1.comwrote:

 Hi all,

 I was wondering if there is a way to change a panel's or page's markup or
 even class when it is disabled. I have two versions of some of my panels and
 pages: a XXXViewPanel/Page and a XXXEditPanel/Page. The view-only version
 has labels instead of dropdown menus and text fields. Based on user's roles
 some pages/panels might be view-only for some users and editable for some
 others. Is there a way that I can substitute a panel or page when it is
 disabled?

 Thanks,
 Zhubin


 
 Zhubin Salehi
 Senior Software Engineer
 Route1 - Securing the Digital World(tm)
 Phone: 416-848-8391 ext. 2262
 Mobile: (optional)

 This electronic mail transmission contains information from Route1 Inc.
 that is for the sole use of the intended recipient and may contain
 confidential, privileged or proprietary information. If you are not the
 intended recipient, please be aware that any disclosure, copying,
 distribution or use of this message, its contents, or any attachment is
 prohibited. Any wrongful interception of this message is punishable as a
 federal crime. If you have received this message in error, please return a
 copy to the sender by electronic mail indicating the error. Then, please
 destroy the original message and any copies from your computer.


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




--
Fernando Wermus.

www.linkedin.com/in/fernandowermus

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



Session timeout too short?

2009-07-09 Thread Zhubin Salehi
Hi,


I’m using Wicket 1.4-RC6, Tomcat 6.0.20 and JDK 1.5.0_19. The
“session-timeout” timeout value in tomcat/conf/web.xml is 30, but I noticed
my pages timeout after about 10 minutes. If I don’t touch a page for 10
mints, next time I submit a form on that page I get a “Page Expired” error.



Any ideas what might be wrong?



Thanks,

Zhubin


Re: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

Hi guys,

I have a similar problem that NonCachingImage does not solve. I have
implemented a simple expand/collapse button. I check the rendered page
source in FireFox and image name is always /img/expand.gif. Here is the
code:

/* advanced search link */
add(new AjaxSubmitLink(advancedSearch) {

private static final long serialVersionUID = 
3847759110695405700L;

@Override
protected void onSubmit(AjaxRequestTarget 
target, Form? form) {
advancedSearch = !advancedSearch;
target.addComponent(findUserAcountForm);
}
}.add(new NonCachingImage(expandCollapse, new 
ModelString() {

private static final long serialVersionUID = 
3430522655787763141L;

@Override
public String getObject() {
return advancedSearch ? 
/img/collapse.gif : /img/expand.gif;
}
})));

Thanks,
Zhubin


Marco Santos wrote:
 
 Hello there!
 
 I'm with problems refreshing an Image. On my web application i'm trying to
 refresh or change an Image that is on a Panel. On the panel there is a
 Image (it is rendered the first time) and a label. Outside the panel i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the link
 is clicked, the label e refreshed with the new text, but the image still
 the same. The code is the following:
 
 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
 /** Creates a new instance of PhotoPanel*/
 public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
 super(id);
 setOutputMarkupId(true);
 
 MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
 mainPhoto.setOutputMarkupId(true);
 
 Label label = new Label(index, MYLABEL:  + index.toString());
 
 add(mainPhoto);
 add(label);
 }
 }
 
 /** 
  * The AjaxLink's on a Parent panel that holds a panel with the links, and
 the panel with the image
  * to be refreshed
  **/
 private class PhotoSlideLink extends AjaxLink {
 private byte[] photoSlideData = null;
 Integer index = 0;
 public PhotoSlideLink(String id, byte[] photoSlideData ) {
 super(id);
 this.photoSlideData = photoSlideData ;
 
 MyImage photoSlide = new MyImage(photoSlide, photoSlideData
 , 100);
 add(photoSlide );
 }
 
 @Override
 public void onClick(AjaxRequestTarget ajaxRequestTarget) {
 Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
 photoSlideData , MAIN_PHOTO_SIZE, index++);
 newMainPhotoPanel .setOutputMarkupId(true);
 
 /*the first PhotoPanel created when the page was loaded*/
 mainPhotoPanel.replaceWith(newMainPhotoPanel);
 mainPhotoPanel= newMainPhotoPanel ;
 
 ajaxRequestTarget.addComponent(newMainPhotoPanel);
 }
 }
 
 Does any one know why refreshing the panel, the label change, but not the
 image? Am i forgetting to do something? 
 
 Thanks a lot 
 

-- 
View this message in context: 
http://www.nabble.com/Problems-Refreshin-a-Image-from-AjaxLink-tp14472713p22376598.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: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

Here is the source code without tabs:

/* advanced search link */
add(new AjaxSubmitLink(advancedSearch) {

private static final long serialVersionUID = 3847759110695405700L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
advancedSearch = !advancedSearch;
target.addComponent(findUserAcountForm);
}
}.add(new NonCachingImage(expandCollapse, new ModelString() {

private static final long serialVersionUID = 3430522655787763141L;

@Override
public String getObject() {
return advancedSearch ? /img/collapse.gif : /img/expand.gif;
}
})));

I hope it's more readable this way :-)

Zhubin

Zhubin Salehi wrote:
 
 Hi guys,
 
 I have a similar problem that NonCachingImage does not solve. I have
 implemented a simple expand/collapse button. I check the rendered page
 source in FireFox and image name is always /img/expand.gif. Here is the
 code:
 
   /* advanced search link */
   add(new AjaxSubmitLink(advancedSearch) {
 
   private static final long serialVersionUID = 
 3847759110695405700L;
 
   @Override
   protected void onSubmit(AjaxRequestTarget 
 target, Form? form) {
   advancedSearch = !advancedSearch;
   target.addComponent(findUserAcountForm);
   }
   }.add(new NonCachingImage(expandCollapse, new 
 ModelString() {
 
   private static final long serialVersionUID = 
 3430522655787763141L;
 
   @Override
   public String getObject() {
   return advancedSearch ? 
 /img/collapse.gif : /img/expand.gif;
   }
   })));
 
 Thanks,
 Zhubin
 
 
 Marco Santos wrote:
 
 Hello there!
 
 I'm with problems refreshing an Image. On my web application i'm trying
 to refresh or change an Image that is on a Panel. On the panel there is a
 Image (it is rendered the first time) and a label. Outside the panel i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the link
 is clicked, the label e refreshed with the new text, but the image still
 the same. The code is the following:
 
 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
 /** Creates a new instance of PhotoPanel*/
 public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
 super(id);
 setOutputMarkupId(true);
 
 MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
 mainPhoto.setOutputMarkupId(true);
 
 Label label = new Label(index, MYLABEL:  + index.toString());
 
 add(mainPhoto);
 add(label);
 }
 }
 
 /** 
  * The AjaxLink's on a Parent panel that holds a panel with the links,
 and the panel with the image
  * to be refreshed
  **/
 private class PhotoSlideLink extends AjaxLink {
 private byte[] photoSlideData = null;
 Integer index = 0;
 public PhotoSlideLink(String id, byte[] photoSlideData ) {
 super(id);
 this.photoSlideData = photoSlideData ;
 
 MyImage photoSlide = new MyImage(photoSlide, photoSlideData
 , 100);
 add(photoSlide );
 }
 
 @Override
 public void onClick(AjaxRequestTarget ajaxRequestTarget) {
 Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
 photoSlideData , MAIN_PHOTO_SIZE, index++);
 newMainPhotoPanel .setOutputMarkupId(true);
 
 /*the first PhotoPanel created when the page was loaded*/
 mainPhotoPanel.replaceWith(newMainPhotoPanel);
 mainPhotoPanel= newMainPhotoPanel ;
 
 ajaxRequestTarget.addComponent(newMainPhotoPanel);
 }
 }
 
 Does any one know why refreshing the panel, the label change, but not the
 image? Am i forgetting to do something? 
 
 Thanks a lot 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problems-Refreshin-a-Image-from-AjaxLink-tp14472713p22376853.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: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

advancedSearch is in PersonDetailTab that is a panel in an AbstractTab in a
PanelCachingTab in FindUserAcountForm.

Zhubin


igor.vaynberg wrote:
 
 is advancedSearch inside findUserAccountForm?
 
 -igor
 
 On Fri, Mar 6, 2009 at 9:23 AM, Zhubin Salehi zhooz...@yahoo.com wrote:

 Here is the source code without tabs:

 /* advanced search link */
 add(new AjaxSubmitLink(advancedSearch) {

        private static final long serialVersionUID = 3847759110695405700L;

       �...@override
        protected void onSubmit(AjaxRequestTarget target, Form? form) {
                advancedSearch = !advancedSearch;
                target.addComponent(findUserAcountForm);
        }
 }.add(new NonCachingImage(expandCollapse, new ModelString() {

        private static final long serialVersionUID = 3430522655787763141L;

       �...@override
        public String getObject() {
                return advancedSearch ? /img/collapse.gif :
 /img/expand.gif;
        }
 })));

 I hope it's more readable this way :-)

 Zhubin

 Zhubin Salehi wrote:

 Hi guys,

 I have a similar problem that NonCachingImage does not solve. I have
 implemented a simple expand/collapse button. I check the rendered page
 source in FireFox and image name is always /img/expand.gif. Here is
 the
 code:

                       /* advanced search link */
                       add(new AjaxSubmitLink(advancedSearch) {

                               private static final long serialVersionUID
 = 3847759110695405700L;

                               @Override
                               protected void onSubmit(AjaxRequestTarget
 target, Form? form) {
                                       advancedSearch = !advancedSearch;
                                      
 target.addComponent(findUserAcountForm);
                               }
                       }.add(new NonCachingImage(expandCollapse, new
 ModelString() {

                               private static final long serialVersionUID
 = 3430522655787763141L;

                               @Override
                               public String getObject() {
                                       return advancedSearch ?
 /img/collapse.gif : /img/expand.gif;
                               }
                       })));

 Thanks,
 Zhubin


 Marco Santos wrote:

 Hello there!

 I'm with problems refreshing an Image. On my web application i'm trying
 to refresh or change an Image that is on a Panel. On the panel there is
 a
 Image (it is rendered the first time) and a label. Outside the panel i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the
 link
 is clicked, the label e refreshed with the new text, but the image
 still
 the same. The code is the following:

 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
     /** Creates a new instance of PhotoPanel*/
     public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
         super(id);
         setOutputMarkupId(true);

         MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
         mainPhoto.setOutputMarkupId(true);

         Label label = new Label(index, MYLABEL:  +
 index.toString());

         add(mainPhoto);
         add(label);
     }
 }

 /**
  * The AjaxLink's on a Parent panel that holds a panel with the links,
 and the panel with the image
  * to be refreshed
  **/
 private class PhotoSlideLink extends AjaxLink {
         private byte[] photoSlideData = null;
         Integer index = 0;
         public PhotoSlideLink(String id, byte[] photoSlideData ) {
             super(id);
             this.photoSlideData = photoSlideData ;

             MyImage photoSlide = new MyImage(photoSlide,
 photoSlideData
 , 100);
             add(photoSlide );
         }

         @Override
         public void onClick(AjaxRequestTarget ajaxRequestTarget) {
             Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
 photoSlideData , MAIN_PHOTO_SIZE, index++);
             newMainPhotoPanel .setOutputMarkupId(true);

             /*the first PhotoPanel created when the page was loaded*/
             mainPhotoPanel.replaceWith(newMainPhotoPanel);
             mainPhotoPanel= newMainPhotoPanel ;

             ajaxRequestTarget.addComponent(newMainPhotoPanel);
         }
     }

 Does any one know why refreshing the panel, the label change, but not
 the
 image? Am i forgetting to do something?

 Thanks a lot




 --
 View this message in context:
 http://www.nabble.com/Problems-Refreshin-a-Image-from-AjaxLink-tp14472713p22376853.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: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

I figured out if the page starts with 'advancedSearch = false' the image is
always expand.gif and if it starts with 'advancedSearch = true' the image is
always collapse.gif. So the value of Model object is cached somewhere, but
not in the browser for sure.

What I don't understand is that every time the panel is rendered,
getObject() method is called but apparently the return value is ignored.



Zhubin Salehi wrote:
 
 advancedSearch is in PersonDetailTab that is a panel in an AbstractTab in
 a PanelCachingTab in FindUserAcountForm.
 
 Zhubin
 
 
 igor.vaynberg wrote:
 
 is advancedSearch inside findUserAccountForm?
 
 -igor
 
 On Fri, Mar 6, 2009 at 9:23 AM, Zhubin Salehi zhooz...@yahoo.com wrote:

 Here is the source code without tabs:

 /* advanced search link */
 add(new AjaxSubmitLink(advancedSearch) {

        private static final long serialVersionUID =
 3847759110695405700L;

       �...@override
        protected void onSubmit(AjaxRequestTarget target, Form? form) {
                advancedSearch = !advancedSearch;
                target.addComponent(findUserAcountForm);
        }
 }.add(new NonCachingImage(expandCollapse, new ModelString() {

        private static final long serialVersionUID =
 3430522655787763141L;

       �...@override
        public String getObject() {
                return advancedSearch ? /img/collapse.gif :
 /img/expand.gif;
        }
 })));

 I hope it's more readable this way :-)

 Zhubin

 Zhubin Salehi wrote:

 Hi guys,

 I have a similar problem that NonCachingImage does not solve. I have
 implemented a simple expand/collapse button. I check the rendered page
 source in FireFox and image name is always /img/expand.gif. Here is
 the
 code:

                       /* advanced search link */
                       add(new AjaxSubmitLink(advancedSearch) {

                               private static final long
 serialVersionUID = 3847759110695405700L;

                               @Override
                               protected void onSubmit(AjaxRequestTarget
 target, Form? form) {
                                       advancedSearch = !advancedSearch;
                                      
 target.addComponent(findUserAcountForm);
                               }
                       }.add(new NonCachingImage(expandCollapse, new
 ModelString() {

                               private static final long
 serialVersionUID = 3430522655787763141L;

                               @Override
                               public String getObject() {
                                       return advancedSearch ?
 /img/collapse.gif : /img/expand.gif;
                               }
                       })));

 Thanks,
 Zhubin


 Marco Santos wrote:

 Hello there!

 I'm with problems refreshing an Image. On my web application i'm
 trying
 to refresh or change an Image that is on a Panel. On the panel there
 is a
 Image (it is rendered the first time) and a label. Outside the panel i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the
 link
 is clicked, the label e refreshed with the new text, but the image
 still
 the same. The code is the following:

 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
     /** Creates a new instance of PhotoPanel*/
     public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
         super(id);
         setOutputMarkupId(true);

         MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
         mainPhoto.setOutputMarkupId(true);

         Label label = new Label(index, MYLABEL:  +
 index.toString());

         add(mainPhoto);
         add(label);
     }
 }

 /**
  * The AjaxLink's on a Parent panel that holds a panel with the links,
 and the panel with the image
  * to be refreshed
  **/
 private class PhotoSlideLink extends AjaxLink {
         private byte[] photoSlideData = null;
         Integer index = 0;
         public PhotoSlideLink(String id, byte[] photoSlideData ) {
             super(id);
             this.photoSlideData = photoSlideData ;

             MyImage photoSlide = new MyImage(photoSlide,
 photoSlideData
 , 100);
             add(photoSlide );
         }

         @Override
         public void onClick(AjaxRequestTarget ajaxRequestTarget) {
             Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
 photoSlideData , MAIN_PHOTO_SIZE, index++);
             newMainPhotoPanel .setOutputMarkupId(true);

             /*the first PhotoPanel created when the page was loaded*/
             mainPhotoPanel.replaceWith(newMainPhotoPanel);
             mainPhotoPanel= newMainPhotoPanel ;

             ajaxRequestTarget.addComponent(newMainPhotoPanel);
         }
     }

 Does any one know why refreshing the panel, the label change, but not
 the
 image? Am i

Re: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

I figured out if the page starts with 'advancedSearch = false' the image is
always expand.gif and if it starts with 'advancedSearch = true' the image is
always collapse.gif. So the value of Model object is cached somewhere, but
not in the browser for sure.

What I don't understand is that every time the panel is rendered,
getObject() method is called but apparently the return value is ignored.



Zhubin Salehi wrote:
 
 advancedSearch is in PersonDetailTab that is a panel in an AbstractTab in
 a PanelCachingTab in FindUserAcountForm.
 
 Zhubin
 
 
 igor.vaynberg wrote:
 
 is advancedSearch inside findUserAccountForm?
 
 -igor
 
 On Fri, Mar 6, 2009 at 9:23 AM, Zhubin Salehi zhooz...@yahoo.com wrote:

 Here is the source code without tabs:

 /* advanced search link */
 add(new AjaxSubmitLink(advancedSearch) {

        private static final long serialVersionUID =
 3847759110695405700L;

       �...@override
        protected void onSubmit(AjaxRequestTarget target, Form? form) {
                advancedSearch = !advancedSearch;
                target.addComponent(findUserAcountForm);
        }
 }.add(new NonCachingImage(expandCollapse, new ModelString() {

        private static final long serialVersionUID =
 3430522655787763141L;

       �...@override
        public String getObject() {
                return advancedSearch ? /img/collapse.gif :
 /img/expand.gif;
        }
 })));

 I hope it's more readable this way :-)

 Zhubin

 Zhubin Salehi wrote:

 Hi guys,

 I have a similar problem that NonCachingImage does not solve. I have
 implemented a simple expand/collapse button. I check the rendered page
 source in FireFox and image name is always /img/expand.gif. Here is
 the
 code:

                       /* advanced search link */
                       add(new AjaxSubmitLink(advancedSearch) {

                               private static final long
 serialVersionUID = 3847759110695405700L;

                               @Override
                               protected void onSubmit(AjaxRequestTarget
 target, Form? form) {
                                       advancedSearch = !advancedSearch;
                                      
 target.addComponent(findUserAcountForm);
                               }
                       }.add(new NonCachingImage(expandCollapse, new
 ModelString() {

                               private static final long
 serialVersionUID = 3430522655787763141L;

                               @Override
                               public String getObject() {
                                       return advancedSearch ?
 /img/collapse.gif : /img/expand.gif;
                               }
                       })));

 Thanks,
 Zhubin


 Marco Santos wrote:

 Hello there!

 I'm with problems refreshing an Image. On my web application i'm
 trying
 to refresh or change an Image that is on a Panel. On the panel there
 is a
 Image (it is rendered the first time) and a label. Outside the panel i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the
 link
 is clicked, the label e refreshed with the new text, but the image
 still
 the same. The code is the following:

 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
     /** Creates a new instance of PhotoPanel*/
     public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
         super(id);
         setOutputMarkupId(true);

         MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
         mainPhoto.setOutputMarkupId(true);

         Label label = new Label(index, MYLABEL:  +
 index.toString());

         add(mainPhoto);
         add(label);
     }
 }

 /**
  * The AjaxLink's on a Parent panel that holds a panel with the links,
 and the panel with the image
  * to be refreshed
  **/
 private class PhotoSlideLink extends AjaxLink {
         private byte[] photoSlideData = null;
         Integer index = 0;
         public PhotoSlideLink(String id, byte[] photoSlideData ) {
             super(id);
             this.photoSlideData = photoSlideData ;

             MyImage photoSlide = new MyImage(photoSlide,
 photoSlideData
 , 100);
             add(photoSlide );
         }

         @Override
         public void onClick(AjaxRequestTarget ajaxRequestTarget) {
             Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
 photoSlideData , MAIN_PHOTO_SIZE, index++);
             newMainPhotoPanel .setOutputMarkupId(true);

             /*the first PhotoPanel created when the page was loaded*/
             mainPhotoPanel.replaceWith(newMainPhotoPanel);
             mainPhotoPanel= newMainPhotoPanel ;

             ajaxRequestTarget.addComponent(newMainPhotoPanel);
         }
     }

 Does any one know why refreshing the panel, the label change, but not
 the
 image? Am i

Re: Problems Refreshin a Image from AjaxLink

2009-03-06 Thread Zhubin Salehi

OK I couldn't figure out what was wrong so I did it as a last resort:

/* advanced search link */
AjaxSubmitLink advancedSearchLink;
mainTable.add(advancedSearchLink = new AjaxSubmitLink(advancedSearch) {

private static final long serialVersionUID = 4373219220751138123L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
advancedSearch = !advancedSearch;
target.addComponent(mainTable);
}
});
advancedSearchLink.add(new WebComponent(expand) {

private static final long serialVersionUID = 1566267580506427230L;

@Override
public boolean isVisible() {
return !advancedSearch;
}
});
advancedSearchLink.add(new WebComponent(collapse) {

private static final long serialVersionUID = 4204455496315941511L;

@Override
public boolean isVisible() {
return advancedSearch;
}
});

It's not the best way to go, but it works.

Zhubin


Zhubin Salehi wrote:
 
 I figured out if the page starts with 'advancedSearch = false' the image
 is always expand.gif and if it starts with 'advancedSearch = true' the
 image is always collapse.gif. So the value of Model object is cached
 somewhere, but not in the browser for sure.
 
 What I don't understand is that every time the panel is rendered,
 getObject() method is called but apparently the return value is ignored.
 
 
 
 Zhubin Salehi wrote:
 
 advancedSearch is in PersonDetailTab that is a panel in an AbstractTab in
 a PanelCachingTab in FindUserAcountForm.
 
 Zhubin
 
 
 igor.vaynberg wrote:
 
 is advancedSearch inside findUserAccountForm?
 
 -igor
 
 On Fri, Mar 6, 2009 at 9:23 AM, Zhubin Salehi zhooz...@yahoo.com
 wrote:

 Here is the source code without tabs:

 /* advanced search link */
 add(new AjaxSubmitLink(advancedSearch) {

        private static final long serialVersionUID =
 3847759110695405700L;

       �...@override
        protected void onSubmit(AjaxRequestTarget target, Form? form)
 {
                advancedSearch = !advancedSearch;
                target.addComponent(findUserAcountForm);
        }
 }.add(new NonCachingImage(expandCollapse, new ModelString() {

        private static final long serialVersionUID =
 3430522655787763141L;

       �...@override
        public String getObject() {
                return advancedSearch ? /img/collapse.gif :
 /img/expand.gif;
        }
 })));

 I hope it's more readable this way :-)

 Zhubin

 Zhubin Salehi wrote:

 Hi guys,

 I have a similar problem that NonCachingImage does not solve. I have
 implemented a simple expand/collapse button. I check the rendered page
 source in FireFox and image name is always /img/expand.gif. Here is
 the
 code:

                       /* advanced search link */
                       add(new AjaxSubmitLink(advancedSearch) {

                               private static final long
 serialVersionUID = 3847759110695405700L;

                               @Override
                               protected void
 onSubmit(AjaxRequestTarget target, Form? form) {
                                       advancedSearch =
 !advancedSearch;
                                      
 target.addComponent(findUserAcountForm);
                               }
                       }.add(new NonCachingImage(expandCollapse, new
 ModelString() {

                               private static final long
 serialVersionUID = 3430522655787763141L;

                               @Override
                               public String getObject() {
                                       return advancedSearch ?
 /img/collapse.gif : /img/expand.gif;
                               }
                       })));

 Thanks,
 Zhubin


 Marco Santos wrote:

 Hello there!

 I'm with problems refreshing an Image. On my web application i'm
 trying
 to refresh or change an Image that is on a Panel. On the panel there
 is a
 Image (it is rendered the first time) and a label. Outside the panel
 i
 have AjaxLink's (that are images too) that refresh the panel, and
 consequently the components on it, the image and the label. when the
 link
 is clicked, the label e refreshed with the new text, but the image
 still
 the same. The code is the following:

 /**
  *The Panel with the image to be refreshed:
  *(the label on the panel is freshed when the link is pressed.
  **/
 public class PhotoPanel extends Panel {
     /** Creates a new instance of PhotoPanel*/
     public PhotoPanel(String id, byte[] photoData, int size, Integer
 index) {
         super(id);
         setOutputMarkupId(true);

         MyImage mainPhoto = new MyImage(mainPhoto, photoData,
 size);//component that extends Image
         mainPhoto.setOutputMarkupId(true);

         Label label = new Label(index, MYLABEL:  +
 index.toString());

         add(mainPhoto);
         add(label);
     }
 }

 /**
  * The AjaxLink's on a Parent panel that holds a panel with the
 links,
 and the panel

Re: Pageable tree?

2009-02-03 Thread Zhubin Salehi

So each item in the list view is an individual tree?

Zhubin


igor.vaynberg wrote:
 
 no, use the listview to only list your roots. when you click on one it
 refreshes the tree to the right with that root.
 
 -igor
 
 On Mon, Feb 2, 2009 at 7:59 AM, Zhubin Salehi zhooz...@yahoo.com wrote:

 You mean put several trees in a listview or using a single tree and a
 single
 list view? I thought about breaking the original tree into several trees
 and
 put them in a listview, but I don't know how to use a single listview and
 a
 single tree.

 Zhubin


 igor.vaynberg wrote:

 so use two components

 [listview][tree]

 where listview lets you select roots and refreshes the tree with the
 selected root.

 -igor

 On Mon, Feb 2, 2009 at 7:04 AM, Zhubin Salehi zhooz...@yahoo.com
 wrote:

 I have a rootless tree with a large number of nodes on the first level.
 I
 only want to make a first level pageable.

 Zhubin


 Matej Knopp-2 wrote:

 The whole purpose of tree is to structure your data in way that
 doesn't need paging. I never really got the concept of pageable tree.
 How do you know what level you are on second page when your root is on
 first page?

 -Matej

 On Sat, Jan 31, 2009 at 10:53 AM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 The inmethod packages might contains such a thing, but I doubt it.
 See
 wicketstuff svn for the inmethod components.

 Martijn

 On Fri, Jan 30, 2009 at 8:31 PM, Zhubin Salehi zhooz...@yahoo.com
 wrote:

 Hi,

 Is there some kind of pageable tree class in Wicket, or I have to
 break
 up
 my tree to several smaller trees and put them in a PageableListView?

 Thanks,
 Zhubin
 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21754065.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





 --
 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



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




 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21791193.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




 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21792237.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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Pageable-tree--tp21754065p21817293.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: Pageable tree?

2009-02-02 Thread Zhubin Salehi

I have a rootless tree with a large number of nodes on the first level. I
only want to make a first level pageable.

Zhubin


Matej Knopp-2 wrote:
 
 The whole purpose of tree is to structure your data in way that
 doesn't need paging. I never really got the concept of pageable tree.
 How do you know what level you are on second page when your root is on
 first page?
 
 -Matej
 
 On Sat, Jan 31, 2009 at 10:53 AM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 The inmethod packages might contains such a thing, but I doubt it. See
 wicketstuff svn for the inmethod components.

 Martijn

 On Fri, Jan 30, 2009 at 8:31 PM, Zhubin Salehi zhooz...@yahoo.com
 wrote:

 Hi,

 Is there some kind of pageable tree class in Wicket, or I have to break
 up
 my tree to several smaller trees and put them in a PageableListView?

 Thanks,
 Zhubin
 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21754065.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





 --
 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


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

-- 
View this message in context: 
http://www.nabble.com/Pageable-tree--tp21754065p21791193.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: Pageable tree?

2009-02-02 Thread Zhubin Salehi

You mean put several trees in a listview or using a single tree and a single
list view? I thought about breaking the original tree into several trees and
put them in a listview, but I don't know how to use a single listview and a
single tree.

Zhubin


igor.vaynberg wrote:
 
 so use two components
 
 [listview][tree]
 
 where listview lets you select roots and refreshes the tree with the
 selected root.
 
 -igor
 
 On Mon, Feb 2, 2009 at 7:04 AM, Zhubin Salehi zhooz...@yahoo.com wrote:

 I have a rootless tree with a large number of nodes on the first level. I
 only want to make a first level pageable.

 Zhubin


 Matej Knopp-2 wrote:

 The whole purpose of tree is to structure your data in way that
 doesn't need paging. I never really got the concept of pageable tree.
 How do you know what level you are on second page when your root is on
 first page?

 -Matej

 On Sat, Jan 31, 2009 at 10:53 AM, Martijn Dashorst
 martijn.dasho...@gmail.com wrote:
 The inmethod packages might contains such a thing, but I doubt it. See
 wicketstuff svn for the inmethod components.

 Martijn

 On Fri, Jan 30, 2009 at 8:31 PM, Zhubin Salehi zhooz...@yahoo.com
 wrote:

 Hi,

 Is there some kind of pageable tree class in Wicket, or I have to
 break
 up
 my tree to several smaller trees and put them in a PageableListView?

 Thanks,
 Zhubin
 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21754065.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





 --
 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



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




 --
 View this message in context:
 http://www.nabble.com/Pageable-tree--tp21754065p21791193.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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Pageable-tree--tp21754065p21792237.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



Pageable tree?

2009-01-30 Thread Zhubin Salehi

Hi,

Is there some kind of pageable tree class in Wicket, or I have to break up
my tree to several smaller trees and put them in a PageableListView?

Thanks,
Zhubin
-- 
View this message in context: 
http://www.nabble.com/Pageable-tree--tp21754065p21754065.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So every time a tab is selected, a new instance of that panel will be
created?


Erik van Oosten wrote:
 
 Hi Zhubin,
 
 Everytime there is a tab switch, method getPanel from the ITab instance 
 is called.
 
 Regards,
 Erik.
 
 
 Zhubin Salehi wrote:
 Hi all,

 How can I be notified when one of the tabs in a TabbedPanel is selected?
 Where is no onSelect() method in ITab interface, is there a way to
 achieve
 this?

 Thanks,
 Zhubin
   
 
 -- 
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728222.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So which Panel method is a best to monitor when that panel is selected? I
need to set a model property for each of my tabs.

Also I tried to stop Wicket from instantiating a new Panel every time a tab
is selected, here is the code:

/* advanced search check box */
add(new AjaxCheckBox(advancedSearch, new
PropertyModelBoolean(FindUserAccount.this, advancedSearch)) {

private static final long serialVersionUID = 
-4363834871762525665L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(findUserAcountForm);
}
});

/* advanced search container */
final WebMarkupContainer advancedSearchContainer;
add(advancedSearchContainer = new
WebMarkupContainer(advancedSearchContainer) {

private static final long serialVersionUID = 
-6418171712342793920L;

@Override
public boolean isVisible() {
return advancedSearch;
}
});

Is that how PanelCachingTab is supposed to be used?

Thanks,
Zhubin

Martin Makundi wrote:
 
 Yes, simply every time your panel is instantiated, it means someone
 navigated to the particular tab. You can monitor this also in your
 panel class.
 
 **
 Martin
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728481.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

Sorry wrong code fragment! Here is the right one:

/* 'search by MobiNET ID tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byMobinetId,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}));

/* 'search by person's details tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel(title.byPersonDetails,
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
211211104202913141L;

public Panel getPanel(String panelId) {
return new PersonDetailTab(panelId);
}
}));

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728517.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

This code looks cool, thanks a lot!


Erik van Oosten wrote:
 
 How about this:
 
   tabs.add(new PanelCachingTab(new AbstractTab(new
 StringResourceModel(title.byMobinetId,
   FindUserAccount.this, null)) {
 
   private static final long serialVersionUID = 
 5564837747113048306L;
 
   public Panel getPanel(String panelId) {
   return new MobinetTab(panelId);
   }
   }) {
 
 @Override
 public Panel getPanel(final String panelId) {
 
 // ... DO SOMETHING UPON TAB SELECTION ...
 
 return super.getPanel(panelId);
 }
 
 });
 
 This override getPanel from PanelCachingTab. But you could also 
 implement your own ITab.
 
 Regards,
 Erik.
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728759.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



Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-28 Thread Zhubin Salehi

Hi all,

How can I be notified when one of the tabs in a TabbedPanel is selected?
Where is no onSelect() method in ITab interface, is there a way to achieve
this?

Thanks,
Zhubin
-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21713724.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



Navigaion Menu

2008-03-27 Thread Zhubin Salehi
Hi all,

 

Does anybody know any good JavaScript navigation menu that works fine with
Wicket? Out Graphics Designer is trying to create a menu for me and has
problem finding a good one.

 

Thanks,

Zhubin

 

Zhubin Salehi
Senior Software Engineer

Route1, Inc.  
Phone:  (416) 848-8391 Ext. 2262 * Fax:  (416) 848-8394
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] *
blocked::http://www.route1.com/ www.route1.com

This electronic mail transmission contains information from Route1, Inc that
is for the sole use of the intended recipient and may contain confidential,
privileged or proprietary information. If you are not the intended
recipient, please be aware that any disclosure, copying, distribution or use
of this message, its contents, or any attachment is prohibited. Any wrongful
interception of this message is punishable as a federal crime. If you have
received this message in error, please return a copy to the sender by
electronic mail indicating the error. Then, please destroy the original
message and any copies from your computer. Thank you.

 



smime.p7s
Description: S/MIME cryptographic signature


RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
onclick doesn't work either.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components

-igor


On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 i dont think browsers support an onschange event :)

  -igor




  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi [EMAIL PROTECTED] wrote:
   So now I wrote this code:
  
   nanp.add(new Radio(nanpTrue, new Model(new 
 Boolean(true;
   nanp.add(new Radio(nanpFalse, new Model(new 
 Boolean(false;
   nanp.add(new 
 AjaxFormComponentUpdatingBehavior(onschange) {
  
  
   private static final long serialVersionUID = 
 -1406454064553153207L;
  
   protected void onUpdate(AjaxRequestTarget target) {
  
   nanp.processInput();
   target.addComponent(areaCode);
   target.addComponent(countryDialingCode);
   target.addComponent(routingDialingCode);
   }
   });
  
But onUpdate() method is not called when I change selection. What should 
 I do?
  
Thanks,
Zhubin
  
  
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 6:04 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
 FormComponentPanel
  
ajax event behavior does not send over input. try
ajaxformcomponentupdatingbehavior.
  
-igor
  
  
On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi [EMAIL PROTECTED] wrote:
 Hi all,

  I'm trying to update some TextFields in a FormComponentPanel when the 
 user selects a radio button from a RadioGroup.

  Here is a fragment of my code that created Radio and RadioGroup 
 objects:

 add(nanp = new RadioGroup(nanp, new PropertyModel(this, 
 phoneNumber.nanp)));
 nanp.add(new Radio(nanpTrue, new Model(new 
 Boolean(true))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 -1406454064553153207L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));
 nanp.add(new Radio(nanpFalse, new Model(new 
 Boolean(false))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 6475950784724594836L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));

  The problem is that as soon as I click on one of the radio buttons, I 
 get the following exception:

  WicketMessage: Can't convert null value to a primitive class: boolean 
 for setting it on [EMAIL PROTECTED]

  Root cause:

  org.apache.wicket.util.convert.ConversionException: Can't convert null 
 value to a primitive class: boolean for setting it on [EMAIL PROTECTED]
  at 
 org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1079)
  at 
 org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:576)
  at 
 org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:130)
  at 
 org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:164)
  at org.apache.wicket.Component.setModelObject(Component.java:2880)
  at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1052)
  at 
 org.apache.wicket.markup.html.form.FormComponent.processInput(FormComponent.java:934)
  at 
 com.route1.mobi.map3.web.panels.PhoneNumberPanel$2.onEvent(PhoneNumberPanel.java:125)
  at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
  at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:288

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript gets 
added to radio buttons.

-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

onclick doesn't work either.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components

-igor


On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 i dont think browsers support an onschange event :)

  -igor




  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi [EMAIL PROTECTED] wrote:
   So now I wrote this code:
  
   nanp.add(new Radio(nanpTrue, new Model(new 
 Boolean(true;
   nanp.add(new Radio(nanpFalse, new Model(new 
 Boolean(false;
   nanp.add(new 
 AjaxFormComponentUpdatingBehavior(onschange) {
  
  
   private static final long serialVersionUID = 
 -1406454064553153207L;
  
   protected void onUpdate(AjaxRequestTarget target) {
  
   nanp.processInput();
   target.addComponent(areaCode);
   target.addComponent(countryDialingCode);
   target.addComponent(routingDialingCode);
   }
   });
  
But onUpdate() method is not called when I change selection. What should 
 I do?
  
Thanks,
Zhubin
  
  
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 6:04 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
 FormComponentPanel
  
ajax event behavior does not send over input. try
ajaxformcomponentupdatingbehavior.
  
-igor
  
  
On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi [EMAIL PROTECTED] wrote:
 Hi all,

  I'm trying to update some TextFields in a FormComponentPanel when the 
 user selects a radio button from a RadioGroup.

  Here is a fragment of my code that created Radio and RadioGroup 
 objects:

 add(nanp = new RadioGroup(nanp, new PropertyModel(this, 
 phoneNumber.nanp)));
 nanp.add(new Radio(nanpTrue, new Model(new 
 Boolean(true))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 -1406454064553153207L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));
 nanp.add(new Radio(nanpFalse, new Model(new 
 Boolean(false))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 6475950784724594836L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));

  The problem is that as soon as I click on one of the radio buttons, I 
 get the following exception:

  WicketMessage: Can't convert null value to a primitive class: boolean 
 for setting it on [EMAIL PROTECTED]

  Root cause:

  org.apache.wicket.util.convert.ConversionException: Can't convert null 
 value to a primitive class: boolean for setting it on [EMAIL PROTECTED]
  at 
 org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1079)
  at 
 org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:576)
  at 
 org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:130)
  at 
 org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:164)
  at org.apache.wicket.Component.setModelObject(Component.java:2880)
  at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1052)
  at 
 org.apache.wicket.markup.html.form.FormComponent.processInput(FormComponent.java:934)
  at 
 com.route1.mobi.map3.web.panels.PhoneNumberPanel$2

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
Radio I get a runtime exception that says AjaxFormComponentUpdatingBehavior
can only be added to a FormComponent.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 12:59 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

are you adding the bheavior to Radio or RadioGroup, it needs to go to
Radio components

-igor

On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi [EMAIL PROTECTED]
wrote:
 Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript
gets added to radio buttons.


  -Original Message-
  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 20, 2008 9:18 AM
  To: users@wicket.apache.org


 Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

  onclick doesn't work either.

  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 20, 2008 1:56 AM
  To: users@wicket.apache.org
  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

  also, for what its worth, onclick works a lot better for this sort of
  thing when dealing with check/readio html components

  -igor


  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:
   i dont think browsers support an onschange event :)
  
-igor
  
  
  
  
On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
[EMAIL PROTECTED] wrote:
 So now I wrote this code:

 nanp.add(new Radio(nanpTrue, new Model(new
Boolean(true;
 nanp.add(new Radio(nanpFalse, new Model(new
Boolean(false;
 nanp.add(new
AjaxFormComponentUpdatingBehavior(onschange) {


 private static final long serialVersionUID =
-1406454064553153207L;

 protected void onUpdate(AjaxRequestTarget
target) {

 nanp.processInput();
 target.addComponent(areaCode);

target.addComponent(countryDialingCode);

target.addComponent(routingDialingCode);
 }
 });

  But onUpdate() method is not called when I change selection. What
should I do?

  Thanks,
  Zhubin



  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 19, 2008 6:04 PM
  To: users@wicket.apache.org
  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in
a FormComponentPanel

  ajax event behavior does not send over input. try
  ajaxformcomponentupdatingbehavior.

  -igor


  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
[EMAIL PROTECTED] wrote:
   Hi all,
  
I'm trying to update some TextFields in a FormComponentPanel
when the user selects a radio button from a RadioGroup.
  
Here is a fragment of my code that created Radio and RadioGroup
objects:
  
   add(nanp = new RadioGroup(nanp, new
PropertyModel(this, phoneNumber.nanp)));
   nanp.add(new Radio(nanpTrue, new Model(new
Boolean(true))).add(new AjaxEventBehavior(onchange) {
  
 private static final long serialVersionUID =
-1406454064553153207L;
  
 protected void onEvent(AjaxRequestTarget
target) {
   nanp.processInput();
   target.addComponent(areaCode);
   target.addComponent(countryDialingCode);
   target.addComponent(routingDialingCode);
 }
   }));
   nanp.add(new Radio(nanpFalse, new Model(new
Boolean(false))).add(new AjaxEventBehavior(onchange) {
  
 private static final long serialVersionUID =
6475950784724594836L;
  
 protected void onEvent(AjaxRequestTarget
target) {
   nanp.processInput();
   target.addComponent(areaCode);
   target.addComponent(countryDialingCode);
   target.addComponent(routingDialingCode);
 }
   }));
  
The problem is that as soon as I click on one of the radio
buttons, I get the following exception:
  
WicketMessage: Can't convert null value to a primitive class:
boolean for setting it on [EMAIL PROTECTED]
  
Root cause:
  
org.apache.wicket.util.convert.ConversionException: Can't
convert null value to a primitive class: boolean for setting it on
[EMAIL PROTECTED]
at
org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
got a runtime exception (can only be added to...), then I added it to the
RadioGroup and nothing happens when I change the selection!

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:07 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

right. see AjaxFormChoiceComponentUpdatingBehavior

-igor


On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
[EMAIL PROTECTED] wrote:
 I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
  Radio I get a runtime exception that says
AjaxFormComponentUpdatingBehavior
  can only be added to a FormComponent.


  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]


 Sent: Thursday, March 20, 2008 12:59 PM
  To: users@wicket.apache.org
  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel

  are you adding the bheavior to Radio or RadioGroup, it needs to go to
  Radio components

  -igor

  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi [EMAIL PROTECTED]
  wrote:
   Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
JavaScript
  gets added to radio buttons.
  
  
-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
  
  
   Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel
  
onclick doesn't work either.
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel
  
also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components
  
-igor
  
  
On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
[EMAIL PROTECTED]
  wrote:
 i dont think browsers support an onschange event :)

  -igor




  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
  [EMAIL PROTECTED] wrote:
   So now I wrote this code:
  
   nanp.add(new Radio(nanpTrue, new Model(new
  Boolean(true;
   nanp.add(new Radio(nanpFalse, new Model(new
  Boolean(false;
   nanp.add(new
  AjaxFormComponentUpdatingBehavior(onschange) {
  
  
   private static final long
serialVersionUID =
  -1406454064553153207L;
  
   protected void onUpdate(AjaxRequestTarget
  target) {
  
   nanp.processInput();
   target.addComponent(areaCode);
  
  target.addComponent(countryDialingCode);
  
  target.addComponent(routingDialingCode);
   }
   });
  
But onUpdate() method is not called when I change selection.
What
  should I do?
  
Thanks,
Zhubin
  
  
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 6:04 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior
in
  a FormComponentPanel
  
ajax event behavior does not send over input. try
ajaxformcomponentupdatingbehavior.
  
-igor
  
  
On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
  [EMAIL PROTECTED] wrote:
 Hi all,

  I'm trying to update some TextFields in a FormComponentPanel
  when the user selects a radio button from a RadioGroup.

  Here is a fragment of my code that created Radio and
RadioGroup
  objects:

 add(nanp = new RadioGroup(nanp, new
  PropertyModel(this, phoneNumber.nanp)));
 nanp.add(new Radio(nanpTrue, new Model(new
  Boolean(true))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID =
  -1406454064553153207L;

   protected void onEvent(AjaxRequestTarget
  target) {
 nanp.processInput();
 target.addComponent(areaCode);

target.addComponent(countryDialingCode);

target.addComponent(routingDialingCode);
   }
 }));
 nanp.add(new Radio(nanpFalse, new Model(new
  Boolean(false))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID =
  6475950784724594836L;

   protected void onEvent(AjaxRequestTarget
  target

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
OK, now I changed my code to this:

add(nanp = new RadioChoice(nanp, new PropertyModel(this,
phoneNumber.nanp), Arrays.asList(new String[] {
true, false })));
nanp.add(new AjaxFormComponentUpdatingBehavior(onclick) {

private static final long serialVersionUID =
-1406454064553153207L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
nanp.processInput();
target.addComponent(areaCode);
target.addComponent(countryDialingCode);
target.addComponent(routingDialingCode);
}
});

What I don't understand is that when I click on a radio button and
onUpdate() gets called, RadioChoice.convertedInput is null.

-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:17 PM
To: users@wicket.apache.org
Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
got a runtime exception (can only be added to...), then I added it to the
RadioGroup and nothing happens when I change the selection!

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:07 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

right. see AjaxFormChoiceComponentUpdatingBehavior

-igor


On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
[EMAIL PROTECTED] wrote:
 I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
  Radio I get a runtime exception that says
AjaxFormComponentUpdatingBehavior
  can only be added to a FormComponent.


  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]


 Sent: Thursday, March 20, 2008 12:59 PM
  To: users@wicket.apache.org
  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel

  are you adding the bheavior to Radio or RadioGroup, it needs to go to
  Radio components

  -igor

  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi [EMAIL PROTECTED]
  wrote:
   Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
JavaScript
  gets added to radio buttons.
  
  
-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
  
  
   Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel
  
onclick doesn't work either.
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
  FormComponentPanel
  
also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components
  
-igor
  
  
On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
[EMAIL PROTECTED]
  wrote:
 i dont think browsers support an onschange event :)

  -igor




  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
  [EMAIL PROTECTED] wrote:
   So now I wrote this code:
  
   nanp.add(new Radio(nanpTrue, new Model(new
  Boolean(true;
   nanp.add(new Radio(nanpFalse, new Model(new
  Boolean(false;
   nanp.add(new
  AjaxFormComponentUpdatingBehavior(onschange) {
  
  
   private static final long
serialVersionUID =
  -1406454064553153207L;
  
   protected void onUpdate(AjaxRequestTarget
  target) {
  
   nanp.processInput();
   target.addComponent(areaCode);
  
  target.addComponent(countryDialingCode);
  
  target.addComponent(routingDialingCode);
   }
   });
  
But onUpdate() method is not called when I change selection.
What
  should I do?
  
Thanks,
Zhubin
  
  
  
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 6:04 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior
in
  a FormComponentPanel
  
ajax event behavior does not send over input. try
ajaxformcomponentupdatingbehavior.
  
-igor
  
  
On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
  [EMAIL PROTECTED] wrote:
 Hi all,

  I'm trying to update some TextFields in a FormComponentPanel
  when the user selects a radio

Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-19 Thread Zhubin Salehi
 5.5.26 and Firefox 
2.0.0.12

Thanks,
Zhubin
Zhubin Salehi
Senior Software Engineer
Route1, Inc.
Phone:  (416) 848-8391 Ext. 2262 * Fax:  (416) 848-8394
[EMAIL PROTECTED]mailto:[EMAIL PROTECTED] * 
www.route1.comblocked::http://www.route1.com/
This electronic mail transmission contains information from Route1, Inc that is 
for the sole use of the intended recipient and may contain confidential, 
privileged or proprietary information. If you are not the intended recipient, 
please be aware that any disclosure, copying, distribution or use of this 
message, its contents, or any attachment is prohibited. Any wrongful 
interception of this message is punishable as a federal crime. If you have 
received this message in error, please return a copy to the sender by 
electronic mail indicating the error. Then, please destroy the original message 
and any copies from your computer. Thank you.



RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-19 Thread Zhubin Salehi
So now I wrote this code:

nanp.add(new Radio(nanpTrue, new Model(new Boolean(true;
nanp.add(new Radio(nanpFalse, new Model(new Boolean(false;
nanp.add(new AjaxFormComponentUpdatingBehavior(onschange) {

private static final long serialVersionUID = 
-1406454064553153207L;

protected void onUpdate(AjaxRequestTarget target) {
nanp.processInput();
target.addComponent(areaCode);
target.addComponent(countryDialingCode);
target.addComponent(routingDialingCode);
}
});

But onUpdate() method is not called when I change selection. What should I do?

Thanks,
Zhubin

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 6:04 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

ajax event behavior does not send over input. try
ajaxformcomponentupdatingbehavior.

-igor


On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi [EMAIL PROTECTED] wrote:
 Hi all,

  I'm trying to update some TextFields in a FormComponentPanel when the user 
 selects a radio button from a RadioGroup.

  Here is a fragment of my code that created Radio and RadioGroup objects:

 add(nanp = new RadioGroup(nanp, new PropertyModel(this, 
 phoneNumber.nanp)));
 nanp.add(new Radio(nanpTrue, new Model(new 
 Boolean(true))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 -1406454064553153207L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));
 nanp.add(new Radio(nanpFalse, new Model(new 
 Boolean(false))).add(new AjaxEventBehavior(onchange) {

   private static final long serialVersionUID = 
 6475950784724594836L;

   protected void onEvent(AjaxRequestTarget target) {
 nanp.processInput();
 target.addComponent(areaCode);
 target.addComponent(countryDialingCode);
 target.addComponent(routingDialingCode);
   }
 }));

  The problem is that as soon as I click on one of the radio buttons, I get 
 the following exception:

  WicketMessage: Can't convert null value to a primitive class: boolean for 
 setting it on [EMAIL PROTECTED]

  Root cause:

  org.apache.wicket.util.convert.ConversionException: Can't convert null value 
 to a primitive class: boolean for setting it on [EMAIL PROTECTED]
  at 
 org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1079)
  at 
 org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:576)
  at 
 org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:130)
  at 
 org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:164)
  at org.apache.wicket.Component.setModelObject(Component.java:2880)
  at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1052)
  at 
 org.apache.wicket.markup.html.form.FormComponent.processInput(FormComponent.java:934)
  at 
 com.route1.mobi.map3.web.panels.PhoneNumberPanel$2.onEvent(PhoneNumberPanel.java:125)
  at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161)
  at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:288)
  at 
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
  at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
  at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
  at 
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269