Re: TreeNode Listener issues

2009-01-19 Thread Litty Preeth
Hi manish,

May be you can explain a bit more about your issue. You hav just posted some
code and did not tell what you want and what you get.

Also if you think this is GWT EXT related issue post in their forum, you ll
get more responses.

- Litty Preeth

On Mon, Jan 19, 2009 at 8:46 PM, Manish Kumar wrote:

>
> 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" 
> To: 
> 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" 
> > To: 
> > 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("xxx :");
> >>
> >>
> >>RequestBuilder builder = new
> >> RequestBuilder(RequestBuilder.GET,
> >> URL.encode(tempUrl));
> >>
> >>
> >>builder.setCallback(new RequestCallback()
> >>
> >>{
> >>
> >>public void onError( Request request, Throwable exception )
> >>
> >> {
> >>
> >> 

Re: TreeNode Listener issues

2009-01-19 Thread Manish Kumar

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" 
To: 
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" 
> To: 
> 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("xxx :");
>>
>>
>>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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Fw: TreeNode Listener issues

2009-01-16 Thread Manish Kumar

any idea on this. please help me out.

Thanx
- Original Message - 
From: "Manish Kumar" 
To: 
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("xxx :");
>
>
>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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



TreeNode Listener issues

2009-01-15 Thread Manish Kumar


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("xxx :");


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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---