Re: Illegal State Exception on DefaultTeeModel.removeNodeFromParent

2009-05-20 Thread skatz

I posted a bug (WICKET-2178) with a test case/source code.  The last action I
saw on it was it was assigned to Matej Knopp back in April.

I tested the same code against the 1.4 code and it seemed to work.


Leena wrote:
 
 Any resolution on this? Or may be some workaround? I am facing a similar
 issue, so thought this could be related.
 
 I am getting a NullPointerException while trying to move nodes within the
 tree (ajax requests)
 
 Partial Stack trace:
 java.lang.NullPointerException
  at
 org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:790)
  at javax.swing.tree.DefaultTreeModel.fireTreeNodesInserted(Unknown
 Source)
  at javax.swing.tree.DefaultTreeModel.nodesWereInserted(Unknown
 Source)
  at javax.swing.tree.DefaultTreeModel.insertNodeInto(Unknown Source)
 
 Please let me know if there is any solution/workaround to this. I am using
 wicket-1.3.5.
 
 +Leena
 
 
 skatz wrote:
 
 I have the same problem using 1.3.5, but not when using 1.3.3.  I spent
 some time tracing the source code and it seems related to the addition of
 this line:
 
 getTreeState().selectNode((TreeNode)item.getModelObject(), false);
 
 at the very end of the function (line 835):
 
 AbstractTree.treeNodesRemoved()
 
 This line results (eventually) in a call to 
 
 AbstractTree.invalidateNode()
 
 which on line 1295 calls:
 
 item.remove()
 
 which alters the state of item such that the call to item.remove() in
 AbstractTree.treeNodesRemoved() fails with the exception mentioned
 previously.
 
 I note that the IItemCallback() code, immediately above, calls two
 identical lines in the reverse order.  I wonder reversing the later two
 would fix the problem?
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Illegal-State-Exception-on-DefaultTeeModel.removeNodeFromParent-tp20185042p23640768.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: Illegal State Exception on DefaultTeeModel.removeNodeFromParent

2009-03-16 Thread skatz

I have the same problem using 1.3.5, but not when using 1.3.3.  I spent some
time tracing the source code and it seems related to the addition of this
line:

getTreeState().selectNode((TreeNode)item.getModelObject(), false);

at the very end of the function (line 835):

AbstractTree.treeNodesRemoved()

This line results (eventually) in a call to 

AbstractTree.invalidateNode()

which on line 1295 calls:

item.remove()

which alters the state of item such that the call to item.remove() in
AbstractTree.treeNodesRemoved() fails with the exception mentioned
previously.

I note that the IItemCallback() code, immediately above, calls two identical
lines in the reverse order.  I wonder reversing the later two would fix the
problem?

-- 
View this message in context: 
http://www.nabble.com/Illegal-State-Exception-on-DefaultTeeModel.removeNodeFromParent-tp20185042p22547387.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: Help understaning AjaxCallDecorator problem

2007-11-07 Thread skatz

So the ultimate result of the onClick() method, in this case, is to move to a
whole new page, i.e the last line is: setResponsePage(...);, so technically,
it probably does not need to be an ajax request, but because of the way we
are reusing some code it is.

I commented out the setResponsePage() as a test and the Ajax Console still
disappeared.


Timo Rantalaiho wrote:
 
 On Wed, 07 Nov 2007, skatz wrote:
 The Ajax debug console disappears before I can read what it is saying,
 and
 
 Hmm, I think that normally the ajax debug console should
 stay there for javascript executions and ajax requests.
 Could it be that the whole page gets loaded somehow?
 
 Best wishes,
 Timo
 
 -- 
 Timo Rantalaiho   
 Reaktor Innovations OyURL: http://www.ri.fi/ 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Help-understaning-AjaxCallDecorator-problem-tf4760426.html#a13635149
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Help understaning AjaxCallDecorator problem

2007-11-06 Thread skatz

I have created an anonymous innner class of AjaxFallbackLink this overrides
onClick and getAjaxCallDecorator as such:

...
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return  new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;
@Override
public CharSequence decorateScript(CharSequence pScript)
{
return  saveAllForms(); + pScript;
}
};
}

@Override
public void onClick(AjaxRequestTarget pArg0) {
// update selected state of creatives to false


this results in HTML that looks like:

onclick=saveAllForms();var
wcall=wicketAjaxGet('?wicket:interface=:7:controlbar:right:3:item:1:IBehaviorListener:0:',null,null,
function() {return Wicket.$$(this)}.bind(this));return !wcall;

The problem is, the onClick() method does not seem to be getting called
(does not stop in eclipse debugger at the breakpoint, and observed behavior
is as if it is not being called).  So my question is, what am I doing wrong? 
I expected the onClick() method to be called.  Is it possible for a
javascript function to fail in such a way that the rest of the script would
not be called?  I put an alert() at the end of the saveAllForms() function
to be sure it was getting that far and it was. [I'm using 1.3 beta4, BTW]


-- 
View this message in context: 
http://www.nabble.com/Help-understaning-AjaxCallDecorator-problem-tf4760426.html#a13614038
Sent from the Wicket - User mailing list archive at Nabble.com.


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



enclosure and repeater

2007-10-29 Thread skatz

Is there a way to get an enclosure to work with a repeater.  Perhaps I am
missing something, but I can't get:

...
ul class=someclass
wicket:enclosure child=item
   li wicket:id=repeater  /li
/wicket:enclosure
/ul

to work.  What I get is an exception telling me there is no component
matching item.

-- 
View this message in context: 
http://www.nabble.com/enclosure-and-repeater-tf4713620.html#a13473822
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: enclosure and repeater

2007-10-29 Thread skatz

Thats odd, when I posted, the anchor tag inside the list item tag does not
show up. 

li wicket:id=repeatersomething wicket:id=item/something/li



skatz wrote:
 
 Is there a way to get an enclosure to work with a repeater.  Perhaps I am
 missing something, but I can't get:
 
 ...
 ul class=someclass
 wicket:enclosure child=item
li wicket:id=repeater #  /li
 /wicket:enclosure
 /ul
 
 to work.  What I get is an exception telling me there is no component
 matching item.
 
 

-- 
View this message in context: 
http://www.nabble.com/enclosure-and-repeater-tf4713620.html#a13473829
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Repeaters' use of WebMarkupContainer question

2007-10-27 Thread skatz

Hi,

Could someone give me some insight into the use of WebMarkupContainers with
repeaters.  In particular, I was wondering how come there does not need to
be markup that has the id of the interposed WebMarkupContainer?  (Also, a
pointer to the code, if it exists, where repeaters do special handing of
their direct children.)

Here is a code snippet from the examples:

...

RepeatingView repeating = new RepeatingView(repeating);
add(repeating);

int index = 0;
while (contacts.hasNext())
{
WebMarkupContainer item = new
WebMarkupContainer(repeating.newChildId());
repeating.add(item);
Contact contact = (Contact)contacts.next();

item.add(new ActionPanel(actions, new
DetachableContactModel(contact)));
item.add(new Label(contactid,
String.valueOf(contact.getId(;
item.add(new Label(firstname, contact.getFirstName()));
item.add(new Label(lastname, contact.getLastName()));
item.add(new Label(homephone, contact.getHomePhone()));
item.add(new Label(cellphone, contact.getCellPhone()));
...

How come the markup parser doesn't get upset that there is no component with
the wicket:id=repeating.newChildId()?



-- 
View this message in context: 
http://www.nabble.com/Repeaters%27-use-of-WebMarkupContainer-question-tf4704749.html#a13448018
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Pointer to example use of non-deprecated Fragment contructor

2007-10-27 Thread skatz

Hi,

The examples seem to use the deprecated constructor for Fragment.  Is there
an example/explanation of the non-deprecated ones?
-- 
View this message in context: 
http://www.nabble.com/Pointer-to-example-use-of-non-deprecated--Fragment-contructor-tf4704754.html#a13448026
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Help with Modal Dialog/Firefox problem

2007-10-10 Thread skatz

Can anyone give me some pointers on debugging a problem with the JavaScript
that gets appended and sent to the browser when you call ModalDialog#close?
I'm getting TypeError exceptions.


-- 
View this message in context: 
http://www.nabble.com/Help-with-Modal-Dialog-Firefox-problem-tf4602285.html#a13140654
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: ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

2007-10-05 Thread skatz

More information.  It works as expected in IE7.  The problem occurs with
Firefox 2.0.0.7

skatz wrote:
 
 I am trying to use the ModalWindow as a confirmation dialog and it works
 fine on one page but the same code on a different page produces the above
 error.
 
 Closing the ModalWindow with the X in the corner work fine.  The error
 occurs when the AjaxCallbackLink onClick handler calls
 ModalWindow.close();  On the page that isn't working the following code is
 called as the last thing in the page constructor.
 
 // The delete dialog
 ModalWindow deleteDialog = new ModalWindow(deleteDialog);
 mConfirmationPanel = new
 ConfirmationPanel(deleteDialog.getContentId(), new
 WUIResourceModel(CampaignManagerPage.class, deleteDialogQuestion), this,
 deleteDialog);
 deleteDialog.setContent(mConfirmationPanel);
 deleteDialog.setInitialWidth(260);
 deleteDialog.setInitialHeight(80);
 deleteDialog.setResizable(false);
 deleteDialog.setTitle(Delete Campaign(s) Confirmation);
 deleteDialog.setWindowClosedCallback(
 new ModalWindow.WindowClosedCallback() {
 private static final long serialVersionUID = 1L;
 public void onClose(AjaxRequestTarget pRequestTarget) {
  ...
 }
 }
 }
 }
 );
 add(deleteDialog);
 
 Any ideas?
 

-- 
View this message in context: 
http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13058356
Sent from the Wicket - User mailing list archive at Nabble.com.


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



ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

2007-10-04 Thread skatz

I am trying to use the ModalWindow as a confirmation dialog and it works fine
on one page but the same code on a different page produces the above error.

Closing the ModalWindow with the X in the corner work fine.  The error
occurs when the AjaxCallbackLink onClick handler calls ModalWindow.close(); 
On the page that isn't working the following code is called as the last
thing in the page constructor.

// The delete dialog
ModalWindow deleteDialog = new ModalWindow(deleteDialog);
mConfirmationPanel = new
ConfirmationPanel(deleteDialog.getContentId(), new
WUIResourceModel(CampaignManagerPage.class, deleteDialogQuestion), this,
deleteDialog);
deleteDialog.setContent(mConfirmationPanel);
deleteDialog.setInitialWidth(260);
deleteDialog.setInitialHeight(80);
deleteDialog.setResizable(false);
deleteDialog.setTitle(Delete Campaign(s) Confirmation);
deleteDialog.setWindowClosedCallback(
new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 1L;
public void onClose(AjaxRequestTarget pRequestTarget) {
 ...
}
}
}
}
);
add(deleteDialog);

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13053366
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: Wicket consulting/contracting/outsourcing

2007-09-20 Thread skatz

Boston, MA


Dan Syrstad-2 wrote:
 
 In what area of the world and what are you looking to do?
 -Dan
 
 On 9/18/07, skatz [EMAIL PROTECTED] wrote:


 Hi,

 Can anyone provide me with pointers to individuals or companies providing
 Wicket consulting/contracting or outsourced personnel?

 TIA,

 skatz
 --
 View this message in context:
 http://www.nabble.com/Wicket-consulting-contracting-outsourcing-tf4476525.html#a12764265
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-consulting-contracting-outsourcing-tf4476525.html#a12797023
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket consulting/contracting/outsourcing

2007-09-18 Thread skatz

Hi,

Can anyone provide me with pointers to individuals or companies providing
Wicket consulting/contracting or outsourced personnel? 

TIA,

skatz
-- 
View this message in context: 
http://www.nabble.com/Wicket-consulting-contracting-outsourcing-tf4476525.html#a12764265
Sent from the Wicket - User mailing list archive at Nabble.com.


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