Re: Exception adding a SimpleAttributeModifier to a TextField

2009-08-10 Thread Kuga

Hi,
Did this issue get solved for you? 
I am also facing the similar issue. I am just adding and AttributeReplacer
and this issue happens when i Click on an AjaxButton.

Can you please share with me about the soution?
thanks
Kuga


Miguel Munoz wrote:
 
 Comrades,
 
   I'm getting a strange exception. I created a SimpleAttributeModifier and
 added it to a TextField component, like this:
 
   textField.add(modifier);
 
 When I run it, I get an exception that says this:
 
 java.lang.ClassCastException:
 org.apache.wicket.behavior.SimpleAttributeModifier cannot be cast to
 org.apache.wicket.behavior.IBehaviorListener
  at
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:91)
 
 The line of code that generates the exception looks like this:
 
   behaviorListener =
 (IBehaviorListener)component.getBehaviors().get(idAsInt);
 
 It appears to be extracting from a list of IBehaviors, so I have no idea
 why it's trying to cast it as an IBehaviorListener. Does anybody know what
 I'm doing wrong? Or is this a bug in Wicket?
 

-- 
View this message in context: 
http://www.nabble.com/Exception-adding-a-SimpleAttributeModifier-to-a-TextField-tp16262822p24910082.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: Issue with AjaxLinks in ListView

2009-08-04 Thread Kuga

Replaced it with Repeating views, and seems to work so far, will know better
results in couple of days if there are any issues. Thanks JK for the support
 help with some ideas. Much appreciated.

Really wonder why that should give such wierd behavior for ListView
Thanks
Kuga

John Krasnay wrote:
 
 On Sat, Aug 01, 2009 at 09:19:05AM -0700, Kuga wrote:

 I have not tried replacing to RepeatingView. Will it make a difference?
 
 
 I have no idea. Why don't you try it?
 
 jk
 
 -
 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/Issue-with-AjaxLinks-in-ListView-tp24765587p24803494.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: Issue with AjaxLinks in ListView

2009-08-02 Thread Kuga

Anyone???
Thanks
Kuga
-- 
View this message in context: 
http://www.nabble.com/Issue-with-AjaxLinks-in-ListView-tp24765587p24775312.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: Issue with AjaxLinks in ListView

2009-08-01 Thread Kuga

Hi,
Thank you for your response,
here is the ListView code:
private final class SubMenuListView extends ListView {
private static final long serialVersionUID = 0L;

private int selectedIndex = 0;

private SubMenuListView(final String id, final IModel model) {
super(id, model);
}

private SubMenuListView(final String id, final ListMenuItem list)
{
super(id, list);
}

/* (non-Javadoc)
 * @see org.apache.wicket.markup.html.list.ListView#newItem(int)
 */
@Override
protected ListItem newItem(int index) {
// TODO Auto-generated method stub
return new ListItem(index, getListItemModel(getModel(), 
index)){

/* (non-Javadoc)
 * @see
org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
 */
@Override
protected void onComponentTag(ComponentTag tag) 
{   
String cssClass = 
(String)tag.getString(class); //$NON-NLS-1$
if (cssClass == null)
{
cssClass =  ; //$NON-NLS-1$
}   
if 
(((MenuItem)getModelObject()).isSelected())
{
cssClass = 
menu2-selected-long; //$NON-NLS-1$
} else{
cssClass =  ; //$NON-NLS-1$
}
tag.put(class, cssClass.trim()); 
//$NON-NLS-1$
super.onComponentTag(tag);
}

};
}

@Override
protected void populateItem(final ListItem item) {
final MenuItem menuItem = (MenuItem) item.getModelObject();
if (menuItem.isSelected()) {
if(menuLevel.equals(MenuLevel.TOP)) {
item.add(menuIsSelected); //set CSS class if the
top-level menu item is selected
}
else if(menuLevel.equals(MenuLevel.SECOND)) {
item.add(menuIsSelectedLong); //set CSS class if the
second-level menu item is selected
}
}
item.add(new MenuItemFragment(menuItem));
}

/**
 * @param selectedIndex the selectedIndex to set
 */
public void setSelectedIndex(int selectedIndex) {
this.selectedIndex = selectedIndex;
}

/**
 * @return the selectedIndex
 */
public int getSelectedIndex() {
return selectedIndex;
}
}
-- 
View this message in context: 
http://www.nabble.com/Issue-with-AjaxLinks-in-ListView-tp24765587p24766483.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: Issue with AjaxLinks in ListView

2009-08-01 Thread Kuga

Hi,
I tried using the setReusableItems(true) in the constructor,
 still no luck.
I have not tried replacing to RepeatingView. Will it make a difference?
Thanks
Kuga
-- 
View this message in context: 
http://www.nabble.com/Issue-with-AjaxLinks-in-ListView-tp24765587p24770473.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: wicket-ajax and IE performance problems for pages with many links

2009-05-21 Thread Kuga

Hi,
I have checked the 1.4-rc2 or 1.3.6, and have not seen this patch. Can
anyone please confirm the exact release in which this issue is fixed. 
Thanks
Kuga
-- 
View this message in context: 
http://www.nabble.com/wicket-ajax-and-IE-performance-problems-for-pages-with-many-links-tp23078336p23664596.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: Setting title dynamically on Modalwindow

2008-10-20 Thread Kuga

Can anyone please help me with this?
Kind of not getting any clue.
Appreciate any help.
thanks
Kuga

Kuga wrote:
 
 Hi,
 Can anyone help me with the following. Thanks in advance for any help.
 I need to update the Title of the Modalwindow based on some actions on the
 dialog. For example say i have added wizard in my modalwindow, the Title
 needs to displayed as follows:
 Test Title : Step 1 of 2, if i go to the next step, the title needs to
 be chaged to Test Title  Step 2 of 2.
 
 Note: I have the ajax request target for any updates.
 thanks
 Kuga
 

-- 
View this message in context: 
http://www.nabble.com/Setting-title-dynamically-on-Modalwindow-tp20062552p20083274.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Setting title dynamically on Modalwindow

2008-10-19 Thread Kuga

Hi,
Can anyone help me with the following. Thanks in advance for any help.
I need to update the Title of the Modalwindow based on some actions on the
dialog. For example say i have added wizard in my modalwindow, the Title
needs to displayed as follows:
Test Title : Step 1 of 2, if i go to the next step, the title needs to be
chaged to Test Title  Step 2 of 2.

Note: I have the ajax request target for any updates.
thanks
Kuga
-- 
View this message in context: 
http://www.nabble.com/Setting-title-dynamically-on-Modalwindow-tp20062552p20062552.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-24 Thread Kuga

Hi,
I have added a jira issue for this. Can you please let me know?
thanks
kuga

Matej Knopp-2 wrote:
 
 Please create jira issue for this. Quickstart project to demonstrate
 the behavior would be welcome.
 
 -Matej
 
 On Wed, Sep 24, 2008 at 7:45 AM, Kuga [EMAIL PROTECTED] wrote:

 Can anyone please help me with any possible solution or hints?
 Greatly appreciate your comments, help.
 Thanks
 kuga

 Kuga wrote:

 Hi,

 I was browsing through the wicket forums, for one of the problems I am
 having using Wicket wizard in ModalWindow.

 I am iusing Wicket 1.3.4

 Wondering if anyone could help me with any possible solutions. Greatly
 appreciate you time and response.

 I have changed the WizardButtons to use Ajax buttons. The following is
 the
 behavior:

 In the wizard Ajax button I added the following:

 protected void onSubmit(AjaxRequestTarget target, Form form) {
 onClick(target);
 target.addComponent((Wizard)wizard);
   }

 1. I have added 3 IWizardStep to the model
 2. Added the wizard to a panel, and then added this panel as
 setContent()
 to the ModalWindow.
 3. Lauched the modalwindow,
 a. Observed the right behavior (button enabled state) of the
 buttons at launch
 b. Now Clicked on Next button – traverses to the next
 step.
 c. Now clicked on the Previous button – instead of going
 to
 Previous – I got the annoying alert message.
 d. added the javascript (Wicket.windo.unloadConfirmatoin =
 false;
 e. Adding the above scrip was just suppressing the alert
 message, and just closes the wizard window without going to the previous
 screen.

 Not really sure where I am going wrong. Have been trying to Debug, but
 since the previous button doesn't get the onClick() due to closing,
 could
 not even debug this issue.

 Can you please let me know about your experience in solving this issue,
 and also if you feel that I am doing any mistake, please let me know.
 Thanks  Best Regards
 Kuga



 --
 View this message in context:
 http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19642382.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19661874.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-23 Thread Kuga

Hi,

I was browsing through the wicket forums, for one of the problems I am
having using Wicket wizard in ModalWindow.

I am iusing Wicket 1.3.4 

Wondering if anyone could help me with any possible solutions. Greatly
appreciate you time and response.

I have changed the WizardButtons to use Ajax buttons. The following is the
behavior:

In the wizard Ajax button I added the following:

protected void onSubmit(AjaxRequestTarget target, Form form) {
onClick(target);
target.addComponent((Wizard)wizard);
  }

1. I have added 3 IWizardStep to the model 
2. Added the wizard to a panel, and then added this panel as setContent() to
the ModalWindow.
3. Lauched the modalwindow, 
a. Observed the right behavior (button enabled state) of the
buttons at launch
b. Now Clicked on “Next” button – traverses to the next step.
c. Now clicked on the “Previous” button – instead of going to
Previous – I got the annoying alert message. 
d. added the javascript (Wicket.windo.unloadConfirmatoin =
false;
e. Adding the above scrip was just suppressing the alert
message, and just closes the wizard window without going to the previous
screen.

Not really sure where I am going wrong. Have been trying to Debug, but since
the previous button doesn’t get the onClick() due to closing, could not even
debug this issue.

Can you please let me know about your experience in solving this issue, and
also if you feel that I am doing any mistake, please let me know.
Thanks  Best Regards
Kuga

-- 
View this message in context: 
http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19631049.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-23 Thread Kuga

Upon further analysis, 
I was having the panel as the ModalWindow.setContent(WizardPanel) and
doesn’t seem to work in terms of multiple button clicks ie., Next/Previous.

Good news is that I tried to replace the panel with the Page using
ModelWindow.createPage(), and the wizard seems to be functional as expected
in terms of buttons.

But:

Using the Panel approach here is what I have seen by debugging the
javascript:
upon click of Next button: 
executes the wicketSubmitByFormId() 
  i.  return call.submitFormBytId(formId, sumbitButton)
  ii.  further goes to submitForm:function(form, submitButton)
  iii.  var s=Wicket.Form.serialoze(form)
  iv.  this call further goes into Wicket.Form.serialoze(form)

1.   if(element.tagName.toLowerCase == “form”)

Everthing above works fine, and Navigates to the next panel 
Now when I click on any other buttons 
It tries to execute the above four steps (but there is an error in the “iv”
step ie., the values are null, so when trying to execute the
element.tagName.toLowerCase() results in an error (null pointer) dies to
which I am seeing the annoying alert message. 
 

I guess I nailed out the problem. But not sure why this should happen
though. Looks like upon one submit action (Next/previous or any buttons) the
modalwindow gets reset to null, as such it doesn’t have the reference of the
form or its contents (everything is set to null)

Can you please help me with any information. Highly appreciate your
response.

Thanks  Best Regards,

Kuga



Kuga wrote:
 
 Hi,
 
 I was browsing through the wicket forums, for one of the problems I am
 having using Wicket wizard in ModalWindow.
 
 I am iusing Wicket 1.3.4 
 
 Wondering if anyone could help me with any possible solutions. Greatly
 appreciate you time and response.
 
 I have changed the WizardButtons to use Ajax buttons. The following is the
 behavior:
 
 In the wizard Ajax button I added the following:
 
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 onClick(target);
 target.addComponent((Wizard)wizard);
   }
 
 1. I have added 3 IWizardStep to the model 
 2. Added the wizard to a panel, and then added this panel as setContent()
 to the ModalWindow.
 3. Lauched the modalwindow, 
 a. Observed the right behavior (button enabled state) of the
 buttons at launch
 b. Now Clicked on “Next” button – traverses to the next step.
 c. Now clicked on the “Previous” button – instead of going to
 Previous – I got the annoying alert message. 
 d. added the javascript (Wicket.windo.unloadConfirmatoin =
 false;
 e. Adding the above scrip was just suppressing the alert
 message, and just closes the wizard window without going to the previous
 screen.
 
 Not really sure where I am going wrong. Have been trying to Debug, but
 since the previous button doesn’t get the onClick() due to closing, could
 not even debug this issue.
 
 Can you please let me know about your experience in solving this issue,
 and also if you feel that I am doing any mistake, please let me know.
 Thanks  Best Regards
 Kuga
 
 

-- 
View this message in context: 
http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19631131.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-23 Thread Kuga

Can anyone please help me with any possible solution or hints?
Greatly appreciate your comments, help.
Thanks
kuga

Kuga wrote:
 
 Hi,
 
 I was browsing through the wicket forums, for one of the problems I am
 having using Wicket wizard in ModalWindow.
 
 I am iusing Wicket 1.3.4 
 
 Wondering if anyone could help me with any possible solutions. Greatly
 appreciate you time and response.
 
 I have changed the WizardButtons to use Ajax buttons. The following is the
 behavior:
 
 In the wizard Ajax button I added the following:
 
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 onClick(target);
 target.addComponent((Wizard)wizard);
   }
 
 1. I have added 3 IWizardStep to the model 
 2. Added the wizard to a panel, and then added this panel as setContent()
 to the ModalWindow.
 3. Lauched the modalwindow, 
 a. Observed the right behavior (button enabled state) of the
 buttons at launch
 b. Now Clicked on “Next” button – traverses to the next step.
 c. Now clicked on the “Previous” button – instead of going to
 Previous – I got the annoying alert message. 
 d. added the javascript (Wicket.windo.unloadConfirmatoin =
 false;
 e. Adding the above scrip was just suppressing the alert
 message, and just closes the wizard window without going to the previous
 screen.
 
 Not really sure where I am going wrong. Have been trying to Debug, but
 since the previous button doesn’t get the onClick() due to closing, could
 not even debug this issue.
 
 Can you please let me know about your experience in solving this issue,
 and also if you feel that I am doing any mistake, please let me know.
 Thanks  Best Regards
 Kuga
 
 

-- 
View this message in context: 
http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19642382.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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