Hi EveryBody, Can anybody help me out to get rid of this issue. I know this is not the right forum to put up. However, I make a kind request to share the reason behind this.
Thanx & Regard, Manish ----- Original Message ----- From: "Manish Kumar" <[email protected]> To: <[email protected]> Sent: Friday, January 16, 2009 6:41 PM Subject: Fw: TreeNode Listener issues > > any idea on this. please help me out. > > Thanx > ----- Original Message ----- > From: "Manish Kumar" <[email protected]> > To: <[email protected]> > Sent: Friday, January 16, 2009 12:48 PM > Subject: TreeNode Listener issues > > >> >> >> Hi Everybody, >> >> Can I get any help on this : I am calling a listener in this fashion. I >> am >> not getting what i am doing wrong. I am using GWT 1.5.2 and GWText >> component. >> >> Please have a look at my code and help me out to find where i am wrong. >> Please excuse and let me know if anything is not concerned to this forum. >> >> import com.gwtext.client.widgets.tree.TreeNode; >> final TreeNode rootChild = new TreeNode( itemName ); >> >> if( itmType != null && itmType.equalsIgnoreCase("folder") ) >> >> { >> >> rootChild.setExpandable(true); >> >> >> rootChild.addListener(new TreeNodeListenerAdapter() { >> >> >> public void onClick(Node node, EventObject e) { >> >> try >> >> { >> >> RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, >> URL.encode(tempUrl)); >> >> >> builder.setCallback(new RequestCallback() >> >> { >> >> public void onError(Request request, Throwable exception) >> >> { >> >> MessageBox.alert( exception.getLocalizedMessage() ); >> >> } >> >> public void onResponseReceived(Request request, Response >> response) >> >> { >> >> if (200 == response.getStatusCode()) >> >> { >> >> MessageBox.alert( response.getText() ); >> >> buildTreeNode ( response.getText(), rootChild, root, >> tempUrl ); >> >> } >> >> else >> >> { >> >> MessageBox.alert(response.getStatusCode() +" : "+ >> response.getStatusText() +":"+ response.getText() ); >> >> } >> >> } >> >> }); >> >> builder.send(); >> >> } >> >> catch(RequestException ex) >> >> { >> >> System.out.println( "Exception occurred during sub tree node: "+ >> ex.getLocalizedMessage()); >> >> } >> >> } >> >> }); >> >> } >> >> else >> >> { >> >> rootChild.addListener(new TreeNodeListenerAdapter() >> >> { >> >> public void onDblClick( Node node, EventObject e ) { >> >> try >> >> { >> >> System.out.println("xxxxxxxxxxx :"); >> >> >> RequestBuilder builder = new >> RequestBuilder(RequestBuilder.GET, >> URL.encode(tempUrl)); >> >> >> builder.setCallback(new RequestCallback() >> >> { >> >> public void onError( Request request, Throwable exception ) >> >> { >> >> MessageBox.alert( exception.getLocalizedMessage() ); >> >> } >> >> >> public void onResponseReceived( Request request, Response >> response ) >> >> { >> >> if ( 200 == response.getStatusCode() ) >> >> { >> >> TabPanel tabPanel = new TabPanel(); >> >> tabPanel.setTabPosition(Position.BOTTOM); >> >> tabPanel.setResizeTabs(true); >> >> tabPanel.setMinTabWidth(115); >> >> tabPanel.setTabWidth(135); >> >> tabPanel.setActiveTab(0); >> >> >> Frame google = new Frame(itmPath); >> >> >> Panel filePanel = new Panel("Google"); >> >> filePanel.setLayout(new FitLayout()); >> >> filePanel.setIconCls("tab-icon"); >> >> filePanel.add(google); >> >> } >> >> else >> >> { >> >> MessageBox.alert( response.getStatusCode() +" : "+ >> response.getStatusText() +":"+ response.getText() ); >> >> } >> >> } >> >> }); >> >> builder.send(); >> >> } >> >> catch(RequestException ex) >> >> { >> >> System.out.println( "Exception occurred during sub tree node: "+ >> ex.getLocalizedMessage()); >> >> } >> >> } >> >> }); >> >> } >> >> >> Regards, >> Manish >> >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
