Re: REST routes in JavaMonitor

2010-10-08 Thread Simon
i've just started using these for auto-configuring production servers.
it's cracking stuff - thanks!

is there any javadoc, or a list somewhere of all the functions
available ? if not, where do they live in the code (i.e what class
handles them ?). stupid question, i know, but i'm new to rest and i
can't find them anywhere!

i'm still having to mangle the SiteConfig.xml with sed to set things
like the adaptor URL, javamonitor password etc. are their functions
for this kind of stuff ?

thanks, simon

On 29 September 2010 11:55, Pascal Robert  wrote:
> Good morning!
>
> Yesterday, I committed REST routes inside JavaMonitor, this is the stuff that 
> was demonstrated at WOWODC 2010. With those routes + the direct actions Anjo 
> added last year, you can control almost everything remotely (make sure 
> JavaMonitor is not open to the world!). The code was added to the trunk of 
> Wonder (the Wonder53 build) so if you want to play with it, make sure you get 
> it from this build.
>
> Below is a couple of call examples. Please note that if JavaMonitor requires 
> a password, you need to append ?passwd=X at the end of the URLs.
>
> 
>
> Fetching the details of all applications :
>
> curl -X GET 
> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
>
> Adding a new application :
>
> curl -X POST -d "{id: 'AjaxExample',type: 'MApplication', name: 
> 'AjaxExample',unixOutputPath: '/opt/Local/Library/WebObjects/Logs', unixPath: 
> '/opt/Local/Library/WebObjects/Applications/AjaxExample.woa/AjaxExample'}" 
> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
>
> Adding a new instance :
>
> curl -X GET 
> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
>
> Delete an application :
>
> curl -X DELETE 
> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
>
> Delete an instance :
>
> curl -X GET 
> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
>
> Adding a new host :
>
> curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: 
> 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" 
> http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json
>
>
> --
> Pascal Robert
> prob...@macti.ca
>
> AIM/iChat : MacTICanada
> LinkedIn : http://www.linkedin.com/in/macti
> Twitter : pascal_robert
>
>  ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
>
> This email sent to si...@potwells.co.uk
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: REST routes in JavaMonitor

2010-10-08 Thread Pascal Robert

Le 2010-10-08 à 11:52, Simon a écrit :

> i've just started using these for auto-configuring production servers.
> it's cracking stuff - thanks!

Good to know that people are using it!

> is there any javadoc, or a list somewhere of all the functions
> available ?

I added a couple of examples in the wiki :


http://wiki.objectstyle.org/confluence/display/WO/Project+Wonder+additions+to+wotaskd+and+JavaMonitor

> if not, where do they live in the code (i.e what class
> handles them ?). stupid question, i know, but i'm new to rest and i
> can't find them anywhere!

The routes are in the JavaMonitor source, in the com.webobjects.monitor.rest 
package.

> i'm still having to mangle the SiteConfig.xml with sed to set things
> like the adaptor URL, javamonitor password etc. are their functions
> for this kind of stuff ?

The routes only have support to add hosts and do everything related to 
applications, basic setup of wotaskd is not supported right now, but it should 
be easy to add routes for that. Patches welcome :-)

> thanks, simon
> 
> On 29 September 2010 11:55, Pascal Robert  wrote:
>> Good morning!
>> 
>> Yesterday, I committed REST routes inside JavaMonitor, this is the stuff 
>> that was demonstrated at WOWODC 2010. With those routes + the direct actions 
>> Anjo added last year, you can control almost everything remotely (make sure 
>> JavaMonitor is not open to the world!). The code was added to the trunk of 
>> Wonder (the Wonder53 build) so if you want to play with it, make sure you 
>> get it from this build.
>> 
>> Below is a couple of call examples. Please note that if JavaMonitor requires 
>> a password, you need to append ?passwd=X at the end of the URLs.
>> 
>> 
>> 
>> Fetching the details of all applications :
>> 
>> curl -X GET 
>> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
>> 
>> Adding a new application :
>> 
>> curl -X POST -d "{id: 'AjaxExample',type: 'MApplication', name: 
>> 'AjaxExample',unixOutputPath: '/opt/Local/Library/WebObjects/Logs', 
>> unixPath: 
>> '/opt/Local/Library/WebObjects/Applications/AjaxExample.woa/AjaxExample'}" 
>> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
>> 
>> Adding a new instance :
>> 
>> curl -X GET 
>> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
>> 
>> Delete an application :
>> 
>> curl -X DELETE 
>> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
>> 
>> Delete an instance :
>> 
>> curl -X GET 
>> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
>> 
>> Adding a new host :
>> 
>> curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: 
>> 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" 
>> http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json
>> 
>> 
>> --
>> Pascal Robert
>> prob...@macti.ca
>> 
>> AIM/iChat : MacTICanada
>> LinkedIn : http://www.linkedin.com/in/macti
>> Twitter : pascal_robert
>> 
>>  ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
>> 
>> This email sent to si...@potwells.co.uk
>> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Current wod definition name?

2010-10-08 Thread Kieran Kelleher
Adding a debugging feature and I want to grab/log the name of the current wod 
label in the current stateless subcomponent context ... as highlighted in 
this pic:

<>


Cannot see any clues in here either when overriding _setParent .. anyone 
know where this tidbit of info is stashed?:

@Override
public void _setParent(WOComponent parent, NSMutableDictionary 
bindings, WOElement template) {
if (log.isDebugEnabled()) {
log.debug("\nparent: " + parent.name() 
+ "\nbindings: " + bindings 
+ "\ntemplate: " + template
+ "\ncontext: " + 
ERXWOContext.currentContext());
}

super._setParent(parent, bindings, template);
} ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Passing D2W Listing Component Datasource to another component

2010-10-08 Thread David Avendasora
Hi all,

I'm using the instructions here: 
http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control to add a 
function to my D2W listing page that will create and Excel file of the objects 
listed. It works great, but I'm not comfortable with how I'm getting the 
EODataSource from the existing page. Here's how I'm doing it now:

// "Export To Excel"
public WOActionResults exportToExcel(WOComponent sender) {
setSender(sender);
ListPageInterface lpi = (ListPageInterface) D2W.factory()
   
.pageForConfigurationNamed("ListExcelCCCommunicationIdentity",

  sender().session());
lpi.setDataSource((EODataSource) sender().parent()
 
.valueForBinding("dataSource"));
lpi.setNextPage(sender());
return (WOActionResults) lpi;
}

the call to: sender().parent().valueForBinding("dataSource") seems wrong since 
it depends upon the parent of the ERDControllerButton to have the datasource, 
which is not always true.

What would be the proper way to get the dataSource?

Dave  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Current wod definition name?

2010-10-08 Thread Chuck Hill
I think that is only known at parsing time, not at runtime.


On Oct 8, 2010, at 10:55 AM, Kieran Kelleher wrote:

> Adding a debugging feature and I want to grab/log the name of the current wod 
> label in the current stateless subcomponent context ... as highlighted in 
> this pic:
> 
>  _Users_kieran_Developer_SmartleadsUSA_slusa_36_workspace.jpg>
> 
> 
> Cannot see any clues in here either when overriding _setParent .. anyone 
> know where this tidbit of info is stashed?:
> 
>   @Override
>   public void _setParent(WOComponent parent, NSMutableDictionary 
> bindings, WOElement template) {
>   if (log.isDebugEnabled()) {
>   log.debug("\nparent: " + parent.name() 
>   + "\nbindings: " + bindings 
>   + "\ntemplate: " + template
>   + "\ncontext: " + 
> ERXWOContext.currentContext());
>   }
> 
>   super._setParent(parent, bindings, template);
>   } ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Current wod definition name?

2010-10-08 Thread Kieran Kelleher
Thanks Chuck - I had even checked your "Secret Life of Components" chapter in 
PWO for clues earlier.

Regards, Kieran

On Oct 8, 2010, at 2:01 PM, Chuck Hill wrote:

> I think that is only known at parsing time, not at runtime.
> 
> 
> On Oct 8, 2010, at 10:55 AM, Kieran Kelleher wrote:
> 
>> Adding a debugging feature and I want to grab/log the name of the current 
>> wod label in the current stateless subcomponent context ... as 
>> highlighted in this pic:
>> 
>> > _Users_kieran_Developer_SmartleadsUSA_slusa_36_workspace.jpg>
>> 
>> 
>> Cannot see any clues in here either when overriding _setParent .. anyone 
>> know where this tidbit of info is stashed?:
>> 
>>  @Override
>>  public void _setParent(WOComponent parent, NSMutableDictionary 
>> bindings, WOElement template) {
>>  if (log.isDebugEnabled()) {
>>  log.debug("\nparent: " + parent.name() 
>>  + "\nbindings: " + bindings 
>>  + "\ntemplate: " + template
>>  + "\ncontext: " + 
>> ERXWOContext.currentContext());
>>  }
>> 
>>  super._setParent(parent, bindings, template);
>>  } ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>> 
>> This email sent to ch...@global-village.net
> 
> -- 
> Chuck Hill Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Passing D2W Listing Component Datasource to another component

2010-10-08 Thread Ramsey Gurley
ERD2WUtilities.parentListPage(sender) should give you the next list  
page up for the sender even if the sender is nested.


Ramsey

On Oct 8, 2010, at 1:56 PM, David Avendasora wrote:


Hi all,

I'm using the instructions here: http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control 
 to add a function to my D2W listing page that will create and Excel  
file of the objects listed. It works great, but I'm not comfortable  
with how I'm getting the EODataSource from the existing page. Here's  
how I'm doing it now:


// "Export To Excel"
public WOActionResults exportToExcel(WOComponent sender) {
setSender(sender);
ListPageInterface lpi = (ListPageInterface) D2W.factory()
   .pageForConfigurationNamed 
("ListExcelCCCommunicationIdentity",
  sender 
().session());

lpi.setDataSource((EODataSource) sender().parent()
 .valueForBinding 
("dataSource"));

lpi.setNextPage(sender());
return (WOActionResults) lpi;
}

the call to: .valueForBinding("dataSource") seems wrong since it  
depends upon the parent of the ERDControllerButton to have the  
datasource, which is not always true.


What would be the proper way to get the dataSource?

Dave
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com

This email sent to ram...@xeotech.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Current wod definition name?

2010-10-08 Thread Chuck Hill
It would be worth looking at the WOOGNL parser to see if this could be added 
somehow.  It is debugging information that I have often wished for.

Chuck


On Oct 8, 2010, at 11:09 AM, Kieran Kelleher wrote:

> Thanks Chuck - I had even checked your "Secret Life of Components" chapter in 
> PWO for clues earlier.
> 
> Regards, Kieran
> 
> On Oct 8, 2010, at 2:01 PM, Chuck Hill wrote:
> 
>> I think that is only known at parsing time, not at runtime.
>> 
>> 
>> On Oct 8, 2010, at 10:55 AM, Kieran Kelleher wrote:
>> 
>>> Adding a debugging feature and I want to grab/log the name of the current 
>>> wod label in the current stateless subcomponent context ... as 
>>> highlighted in this pic:
>>> 
>>> >> _Users_kieran_Developer_SmartleadsUSA_slusa_36_workspace.jpg>
>>> 
>>> 
>>> Cannot see any clues in here either when overriding _setParent .. 
>>> anyone know where this tidbit of info is stashed?:
>>> 
>>> @Override
>>> public void _setParent(WOComponent parent, NSMutableDictionary 
>>> bindings, WOElement template) {
>>> if (log.isDebugEnabled()) {
>>> log.debug("\nparent: " + parent.name() 
>>> + "\nbindings: " + bindings 
>>> + "\ntemplate: " + template
>>> + "\ncontext: " + 
>>> ERXWOContext.currentContext());
>>> }
>>> 
>>> super._setParent(parent, bindings, template);
>>> } ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>> 
>>> This email sent to ch...@global-village.net
>> 
>> -- 
>> Chuck Hill Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Passing D2W Listing Component Datasource to another component

2010-10-08 Thread David Avendasora
Hi Ramsey!

Okay, so how do I get the EODataSource from the resulting ListPageInterface?

Dave

On Oct 8, 2010, at 2:12 PM, Ramsey Gurley wrote:

> ERD2WUtilities.parentListPage(sender) should give you the next list page up 
> for the sender even if the sender is nested.
> 
> Ramsey
> 
> On Oct 8, 2010, at 1:56 PM, David Avendasora wrote:
> 
>> Hi all,
>> 
>> I'm using the instructions here: 
>> http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control to add a 
>> function to my D2W listing page that will create and Excel file of the 
>> objects listed. It works great, but I'm not comfortable with how I'm getting 
>> the EODataSource from the existing page. Here's how I'm doing it now:
>> 
>> // "Export To Excel"
>> public WOActionResults exportToExcel(WOComponent sender) {
>> setSender(sender);
>> ListPageInterface lpi = (ListPageInterface) D2W.factory()
>>
>> .pageForConfigurationNamed("ListExcelCCCommunicationIdentity",
>>  
>>  sender().session());
>> lpi.setDataSource((EODataSource) sender().parent()
>>  
>> .valueForBinding("dataSource"));
>> lpi.setNextPage(sender());
>> return (WOActionResults) lpi;
>> }
>> 
>> the call to: .valueForBinding("dataSource") seems wrong since it depends 
>> upon the parent of the ERDControllerButton to have the datasource, which is 
>> not always true.
>> 
>> What would be the proper way to get the dataSource?
>> 
>> Dave 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com
>> 
>> This email sent to ram...@xeotech.com
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Passing D2W Listing Component Datasource to another component

2010-10-08 Thread David Avendasora
Nevermind. I was casting it to WOComponent. Casting it to ERD2WListPage is what 
I wanted. So I end up with:

lpi.setDataSource(((ERD2WListPage) 
ERD2WUtilities.parentListPage(sender)).dataSource());

Which works perfectly!

Dave

On Oct 8, 2010, at 2:59 PM, David Avendasora wrote:

> Hi Ramsey!
> 
> Okay, so how do I get the EODataSource from the resulting ListPageInterface?
> 
> Dave
> 
> On Oct 8, 2010, at 2:12 PM, Ramsey Gurley wrote:
> 
>> ERD2WUtilities.parentListPage(sender) should give you the next list page up 
>> for the sender even if the sender is nested.
>> 
>> Ramsey
>> 
>> On Oct 8, 2010, at 1:56 PM, David Avendasora wrote:
>> 
>>> Hi all,
>>> 
>>> I'm using the instructions here: 
>>> http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control to add a 
>>> function to my D2W listing page that will create and Excel file of the 
>>> objects listed. It works great, but I'm not comfortable with how I'm 
>>> getting the EODataSource from the existing page. Here's how I'm doing it 
>>> now:
>>> 
>>> // "Export To Excel"
>>> public WOActionResults exportToExcel(WOComponent sender) {
>>> setSender(sender);
>>> ListPageInterface lpi = (ListPageInterface) D2W.factory()
>>>
>>> .pageForConfigurationNamed("ListExcelCCCommunicationIdentity",
>>> 
>>>   sender().session());
>>> lpi.setDataSource((EODataSource) sender().parent()
>>>  
>>> .valueForBinding("dataSource"));
>>> lpi.setNextPage(sender());
>>> return (WOActionResults) lpi;
>>> }
>>> 
>>> the call to: .valueForBinding("dataSource") seems wrong since it depends 
>>> upon the parent of the ERDControllerButton to have the datasource, which is 
>>> not always true.
>>> 
>>> What would be the proper way to get the dataSource?
>>> 
>>> Dave 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com
>>> 
>>> This email sent to ram...@xeotech.com
>> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Passing D2W Listing Component Datasource to another component

2010-10-08 Thread Ramsey Gurley
NSKeyValueCodingAdditions.Utility.valueForKeyPath(lpi,  
"displayGroup.dataSource");


Or you could use ERD2WUtilities.enclosingPageOfClass(sender,  
ERDListPageInterface.class) so you can just call displayGroup()  
directly.


Ramsey

On Oct 8, 2010, at 2:59 PM, David Avendasora wrote:


Hi Ramsey!

Okay, so how do I get the EODataSource from the resulting  
ListPageInterface?


Dave

On Oct 8, 2010, at 2:12 PM, Ramsey Gurley wrote:

ERD2WUtilities.parentListPage(sender) should give you the next list  
page up for the sender even if the sender is nested.


Ramsey

On Oct 8, 2010, at 1:56 PM, David Avendasora wrote:


Hi all,

I'm using the instructions here: http://wiki.objectstyle.org/confluence/display/WO/D2W+Flow+Control 
 to add a function to my D2W listing page that will create and  
Excel file of the objects listed. It works great, but I'm not  
comfortable with how I'm getting the EODataSource from the  
existing page. Here's how I'm doing it now:


// "Export To Excel"
public WOActionResults exportToExcel(WOComponent sender) {
setSender(sender);
ListPageInterface lpi = (ListPageInterface) D2W.factory()
   .pageForConfigurationNamed 
("ListExcelCCCommunicationIdentity",
  sender 
().session());

lpi.setDataSource((EODataSource) sender().parent()
 .valueForBinding 
("dataSource"));

lpi.setNextPage(sender());
return (WOActionResults) lpi;
}

the call to: .valueForBinding("dataSource") seems wrong since it  
depends upon the parent of the ERDControllerButton to have the  
datasource, which is not always true.


What would be the proper way to get the dataSource?

Dave
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com

This email sent to ram...@xeotech.com






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Eclipse, WO, and JNI

2010-10-08 Thread Tim Worman
I'm looking to do some work on a WO project with JNI calls that was built in 
XCode and move it to Eclipse. I guess workflow advice is the most important 
thing - for mixing WO with JNI to call native c libraries. Since this whole 
subject is new to me in general I'm interested in advice on:

- Eclipse project structure
- where you put your c libraries so that your project can discover them
- workflow for generating c headers, is it inside eclipse too
- can it all just be built and run as a WO app

 Anyone? Bueller?

Tim Worman
UCLA GSE&IS



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: [OT] Restoring a FrontBase DB

2010-10-08 Thread Mark Ritchie
On 30/Sep/2010, at 1:26 PM, David Holt wrote:
> On 2010-09-30, at 1:23 PM, Daniel Beatty wrote:
>> Greetings Mark,
>> Looks like it might.   What procedure do I need to apply to this XCode 
>> project to make it behave.  It appears to an Old WO code.
> http://wiki.objectstyle.org/confluence/display/WOL/Migrating+from+XCode+to+WOLips

Yeah, what he said! ;-)
M.

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Eclipse, WO, and JNI

2010-10-08 Thread Timo Hoepfner
Hi Tim,

some random notes:

You can specify a native library location for jars in eclipse in the build path 
settings. 
For deployment either put them in /Library/Java/Extensions or explicitly 
specify the location (I don't have example code for that at hand). 
You can generate the headers with ant's javah task, but I remember running in 
some problem with that at some point, but I don't remember what it was... I 
ended up generating via CLI. 
You should really take a look at using JNA (https://jna.dev.java.net/), this 
can replace much of the boilerplate code and the generated headers! 
When you're interfacing with ObjC libraries, take a look at Rococoa 
(http://code.google.com/p/rococoa/). 
There's also some tool that auto-generates JNA/Rococoa code from C headers 
called JNAerator (http://code.google.com/p/jnaerator/). It had some problems 
when I looked at it, but this is quite a while ago.

HTH,

Timo




Am 08.10.2010 um 22:15 schrieb Tim Worman:

> I'm looking to do some work on a WO project with JNI calls that was built in 
> XCode and move it to Eclipse. I guess workflow advice is the most important 
> thing - for mixing WO with JNI to call native c libraries. Since this whole 
> subject is new to me in general I'm interested in advice on:
> 
> - Eclipse project structure
> - where you put your c libraries so that your project can discover them
> - workflow for generating c headers, is it inside eclipse too
> - can it all just be built and run as a WO app
> 
> Anyone? Bueller?
> 
> Tim Worman
> UCLA GSE&IS
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/th-dev%40onlinehome.de
> 
> This email sent to th-...@onlinehome.de

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com