Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Ron X
hi!
so we have url:
.woa/wa/entities?batch=5

can i change "batch" to another word?



16 марта 2012 г. 15:16 пользователь Pascal Robert написал:

>
> Le 2012-03-16 à 08:08, Ron X a écrit :
>
> > but how can i connect this component with datasource?
>
> dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup
> that display group.
>
>public Organizations(WOContext context) {
>super(context);
>EODatabaseDataSource ds = new EODatabaseDataSource(ec,
> OrganizationProfile.ENTITY_NAME);
>dgOrganizations = new
> ERXBatchingDisplayGroup();
>dgOrganizations.setNumberOfObjectsPerBatch(10);
>dgOrganizations.setDataSource(ds);
>dgOrganizations.setSortOrderings(new
> NSArray(lastUpdateSort));
>   }
>
>@Override
>public void awake() {
>super.awake();
>isServiceFilter = false;
>dgOrganizations.fetch();
>queryArgs = new NSMutableDictionary();
>}
>
>public void setBatchIndex(int batchIndex) {
>dgOrganizations.setCurrentBatchIndex(batchIndex);
>queryArgs.takeValueForKey(batchIndex, "batch");
>}
>
> The "organizations" direct action:
>
>  public WOActionResults organizationsAction() {
>String strBatchIndex = this.request().stringFormValueForKey("batch");
>Integer batchIndex = new Integer(1);
>if (strBatchIndex != null) {
>  try {
>batchIndex = new Integer(strBatchIndex);
>  } catch (Exception e) {
>NSLog.out.appendln("Someone tried to access a batch index with this
> value : " + strBatchIndex);
>  }
>}
>Organizations nextPage =
> (Organizations)pageWithName(Organizations.class);
>nextPage.setBatchIndex(batchIndex.intValue());
>return nextPage;
>   }
>
> > 2012/3/13 Pascal Robert 
> > Use ERXDirectActionBatchNavigationBar
> >
> >  >actionName = "organizations"
> >containerCssClass = "paginator"
> >batchSize = "$dgOrganizations.batchCount"
> >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
> >showPageNumbers = true
> >numberOfObjects = "$dgOrganizations.allObjects.@count"
> > />
> >
> > Please note that it will use Direct Actions, so it won't work with REST
> routes. I'm planning to do a similar component for REST because I need it
> for wocommunity.org, but I won't work on this before end of this month.
> >
> > > sorry, maybe i explain bad.
> > >
> > > "so the workflow is so" - that is how it works NOW.
> > > but i want to fetching objects at every click of the page and do not
> changing the url (or have control of changing).
> > >
> > > 2012/3/13 Pascal Robert 
> > >EODatabaseDataSource dataSource = new
> EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
> > >er.extensions.batching.ERXBatchingDisplayGroup dg = new
> ERXBatchingDisplayGroup();
> > >dg.setNumberOfObjectsPerBatch(20);
> > >dg.setDataSource(dataSource);
> > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
> > >
> > > > hi everybody.
> > > > i have some legasy code.
> > > > in this code used ERXDisplayGroup:
> > > >
> > > > //code:
> > > > import com.webobjects.appserver.WOContext;
> > > > import com.webobjects.appserver.WODisplayGroup;
> > > > import com.webobjects.directtoweb.ERD2WUtilities;
> > > >
> > > > import er.directtoweb.pages.ERD2WListPage;
> > > > import er.extensions.batching.ERXBatchingDisplayGroup;
> > > > import er.extensions.batching.ERXFlickrBatchNavigation;
> > > >
> > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> > > > public BatchNavigationBar(WOContext context) {
> > > > super(context);
> > > > }
> > > >
> > > > private ERD2WListPage listPage() {
> > > > return (ERD2WListPage)
> ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> > > > }
> > > >
> > > > @Override
> > > > public WODisplayGroup displayGroup() {
> > > > return listPage().displayGroup();
> > > > }
> > > >
> > > > public void setCurrentBatchIndex(Integer batchIndex) {
> > > > displayGroup().setCurrentBatchIndex(batchIndex);
> > > > }
> > > > }
> > > > //end code
> > > >
> > > > so the workflow is so:
> > > >
> > > > 1. fetching ALL object of query in array.
> > > > 2. and than give me a portion (size if batch) when i am clicking
> next/prev pages in this component.
> > > > 3. but NO work with database per batch - it works with array
> > > > 4. when i click next/prev - it adds to the urls of pagination some
> like this - 1.2.3.1.5.6.7 etc :-) and this brakes my statistics with SEO
> links.
> > > >
> > > > so i want to avoid this. and i want to use ERXBatchingDisplayGroup
> instead of WODisplayGroup (ERXDisplayGroup).
> > > > Simple casting not works - falls with cast exception.
> > > > the problem in that listPage().displayGroup() - has type
> WODisplayGroup.
> > > >
> > > > how can i use in this code ERXBatchingDisplayGroup?
> > > >
> > > > ___

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Pascal Robert
In ERXDirectActionBatchNavigationBar.wod:

NextPageLink : WOHyperlink {
  directActionName = actionName;
  actionClass = actionClass;
  queryDictionary = additionalUrlParameters;
  ?batch = nextBatch;
}

So you will have to change your own fork of Wonder if you want to change the 
name of the parameter.

> hi!
> so we have url:
> .woa/wa/entities?batch=5
> 
> can i change "batch" to another word?
> 
> 
> 
> 16 марта 2012 г. 15:16 пользователь Pascal Robert  написал:
> 
> Le 2012-03-16 à 08:08, Ron X a écrit :
> 
> > but how can i connect this component with datasource?
> 
> dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup that 
> display group.
> 
>public Organizations(WOContext context) {
>super(context);
>EODatabaseDataSource ds = new EODatabaseDataSource(ec, 
> OrganizationProfile.ENTITY_NAME);
>dgOrganizations = new ERXBatchingDisplayGroup();
>dgOrganizations.setNumberOfObjectsPerBatch(10);
>dgOrganizations.setDataSource(ds);
>dgOrganizations.setSortOrderings(new 
> NSArray(lastUpdateSort));
>   }
> 
>@Override
>public void awake() {
>super.awake();
>isServiceFilter = false;
>dgOrganizations.fetch();
>queryArgs = new NSMutableDictionary();
>}
> 
>public void setBatchIndex(int batchIndex) {
>dgOrganizations.setCurrentBatchIndex(batchIndex);
>queryArgs.takeValueForKey(batchIndex, "batch");
>}
> 
> The "organizations" direct action:
> 
>  public WOActionResults organizationsAction() {
>String strBatchIndex = this.request().stringFormValueForKey("batch");
>Integer batchIndex = new Integer(1);
>if (strBatchIndex != null) {
>  try {
>batchIndex = new Integer(strBatchIndex);
>  } catch (Exception e) {
>NSLog.out.appendln("Someone tried to access a batch index with this 
> value : " + strBatchIndex);
>  }
>}
>Organizations nextPage = (Organizations)pageWithName(Organizations.class);
>nextPage.setBatchIndex(batchIndex.intValue());
>return nextPage;
>  }
> 
> > 2012/3/13 Pascal Robert 
> > Use ERXDirectActionBatchNavigationBar
> >
> >  >actionName = "organizations"
> >containerCssClass = "paginator"
> >batchSize = "$dgOrganizations.batchCount"
> >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
> >showPageNumbers = true
> >numberOfObjects = "$dgOrganizations.allObjects.@count"
> > />
> >
> > Please note that it will use Direct Actions, so it won't work with REST 
> > routes. I'm planning to do a similar component for REST because I need it 
> > for wocommunity.org, but I won't work on this before end of this month.
> >
> > > sorry, maybe i explain bad.
> > >
> > > "so the workflow is so" - that is how it works NOW.
> > > but i want to fetching objects at every click of the page and do not 
> > > changing the url (or have control of changing).
> > >
> > > 2012/3/13 Pascal Robert 
> > >EODatabaseDataSource dataSource = new 
> > > EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
> > >er.extensions.batching.ERXBatchingDisplayGroup dg = new 
> > > ERXBatchingDisplayGroup();
> > >dg.setNumberOfObjectsPerBatch(20);
> > >dg.setDataSource(dataSource);
> > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
> > >
> > > > hi everybody.
> > > > i have some legasy code.
> > > > in this code used ERXDisplayGroup:
> > > >
> > > > //code:
> > > > import com.webobjects.appserver.WOContext;
> > > > import com.webobjects.appserver.WODisplayGroup;
> > > > import com.webobjects.directtoweb.ERD2WUtilities;
> > > >
> > > > import er.directtoweb.pages.ERD2WListPage;
> > > > import er.extensions.batching.ERXBatchingDisplayGroup;
> > > > import er.extensions.batching.ERXFlickrBatchNavigation;
> > > >
> > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> > > > public BatchNavigationBar(WOContext context) {
> > > > super(context);
> > > > }
> > > >
> > > > private ERD2WListPage listPage() {
> > > > return (ERD2WListPage) 
> > > > ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> > > > }
> > > >
> > > > @Override
> > > > public WODisplayGroup displayGroup() {
> > > > return listPage().displayGroup();
> > > > }
> > > >
> > > > public void setCurrentBatchIndex(Integer batchIndex) {
> > > > displayGroup().setCurrentBatchIndex(batchIndex);
> > > > }
> > > > }
> > > > //end code
> > > >
> > > > so the workflow is so:
> > > >
> > > > 1. fetching ALL object of query in array.
> > > > 2. and than give me a portion (size if batch) when i am clicking 
> > > > next/prev pages in this component.
> > > > 3. but NO work with database per batch - it works with array
> > > > 4. when i click next/prev - it adds to the urls of pagination some like 
> > > > this - 1.2.3.1.5.6.7 etc :-) and this brakes my statistics with SEO 
> > > > links.
> > > >
> > > > s

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Ron X
but... i get this code from jar by Maven.
i can not modify ERXDirectActionBatchNavigationBar.wod:

19 марта 2012 г. 17:08 пользователь Pascal Robert написал:

> In ERXDirectActionBatchNavigationBar.wod:
>
> NextPageLink : WOHyperlink {
>  directActionName = actionName;
>  actionClass = actionClass;
>  queryDictionary = additionalUrlParameters;
>  ?batch = nextBatch;
> }
>
> So you will have to change your own fork of Wonder if you want to change
> the name of the parameter.
>
> > hi!
> > so we have url:
> > .woa/wa/entities?batch=5
> >
> > can i change "batch" to another word?
> >
> >
> >
> > 16 марта 2012 г. 15:16 пользователь Pascal Robert 
> написал:
> >
> > Le 2012-03-16 à 08:08, Ron X a écrit :
> >
> > > but how can i connect this component with datasource?
> >
> > dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup
> that display group.
> >
> >public Organizations(WOContext context) {
> >super(context);
> >EODatabaseDataSource ds = new EODatabaseDataSource(ec,
> OrganizationProfile.ENTITY_NAME);
> >dgOrganizations = new
> ERXBatchingDisplayGroup();
> >dgOrganizations.setNumberOfObjectsPerBatch(10);
> >dgOrganizations.setDataSource(ds);
> >dgOrganizations.setSortOrderings(new
> NSArray(lastUpdateSort));
> >   }
> >
> >@Override
> >public void awake() {
> >super.awake();
> >isServiceFilter = false;
> >dgOrganizations.fetch();
> >queryArgs = new NSMutableDictionary();
> >}
> >
> >public void setBatchIndex(int batchIndex) {
> >dgOrganizations.setCurrentBatchIndex(batchIndex);
> >queryArgs.takeValueForKey(batchIndex, "batch");
> >}
> >
> > The "organizations" direct action:
> >
> >  public WOActionResults organizationsAction() {
> >String strBatchIndex = this.request().stringFormValueForKey("batch");
> >Integer batchIndex = new Integer(1);
> >if (strBatchIndex != null) {
> >  try {
> >batchIndex = new Integer(strBatchIndex);
> >  } catch (Exception e) {
> >NSLog.out.appendln("Someone tried to access a batch index with
> this value : " + strBatchIndex);
> >  }
> >}
> >Organizations nextPage =
> (Organizations)pageWithName(Organizations.class);
> >nextPage.setBatchIndex(batchIndex.intValue());
> >return nextPage;
> >  }
> >
> > > 2012/3/13 Pascal Robert 
> > > Use ERXDirectActionBatchNavigationBar
> > >
> > >  > >actionName = "organizations"
> > >containerCssClass = "paginator"
> > >batchSize = "$dgOrganizations.batchCount"
> > >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
> > >showPageNumbers = true
> > >numberOfObjects = "$dgOrganizations.allObjects.@count"
> > > />
> > >
> > > Please note that it will use Direct Actions, so it won't work with
> REST routes. I'm planning to do a similar component for REST because I need
> it for wocommunity.org, but I won't work on this before end of this month.
> > >
> > > > sorry, maybe i explain bad.
> > > >
> > > > "so the workflow is so" - that is how it works NOW.
> > > > but i want to fetching objects at every click of the page and do not
> changing the url (or have control of changing).
> > > >
> > > > 2012/3/13 Pascal Robert 
> > > >EODatabaseDataSource dataSource = new
> EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
> > > >er.extensions.batching.ERXBatchingDisplayGroup dg = new
> ERXBatchingDisplayGroup();
> > > >dg.setNumberOfObjectsPerBatch(20);
> > > >dg.setDataSource(dataSource);
> > > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
> > > >
> > > > > hi everybody.
> > > > > i have some legasy code.
> > > > > in this code used ERXDisplayGroup:
> > > > >
> > > > > //code:
> > > > > import com.webobjects.appserver.WOContext;
> > > > > import com.webobjects.appserver.WODisplayGroup;
> > > > > import com.webobjects.directtoweb.ERD2WUtilities;
> > > > >
> > > > > import er.directtoweb.pages.ERD2WListPage;
> > > > > import er.extensions.batching.ERXBatchingDisplayGroup;
> > > > > import er.extensions.batching.ERXFlickrBatchNavigation;
> > > > >
> > > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> > > > > public BatchNavigationBar(WOContext context) {
> > > > > super(context);
> > > > > }
> > > > >
> > > > > private ERD2WListPage listPage() {
> > > > > return (ERD2WListPage)
> ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> > > > > }
> > > > >
> > > > > @Override
> > > > > public WODisplayGroup displayGroup() {
> > > > > return listPage().displayGroup();
> > > > > }
> > > > >
> > > > > public void setCurrentBatchIndex(Integer batchIndex) {
> > > > > displayGroup().setCurrentBatchIndex(batchIndex);
> > > > > }
> > > > > }
> > > > > //end code
> > > > >
> > > > > so the workflow is so:
> > > > >
> > > > > 1. fetching ALL object of query in array.
> > > 

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Pascal Robert
Maven or Ant, you will need to modify the code yourself and build Wonder, or 
you override the ERXDirectActionBatchNavigationBar toolbar in your own 
frameworks to change the HTML and the bindings.

> but... i get this code from jar by Maven.
> i can not modify ERXDirectActionBatchNavigationBar.wod:
> 
> 19 марта 2012 г. 17:08 пользователь Pascal Robert  написал:
> In ERXDirectActionBatchNavigationBar.wod:
> 
> NextPageLink : WOHyperlink {
>  directActionName = actionName;
>  actionClass = actionClass;
>  queryDictionary = additionalUrlParameters;
>  ?batch = nextBatch;
> }
> 
> So you will have to change your own fork of Wonder if you want to change the 
> name of the parameter.
> 
> > hi!
> > so we have url:
> > .woa/wa/entities?batch=5
> >
> > can i change "batch" to another word?
> >
> >
> >
> > 16 марта 2012 г. 15:16 пользователь Pascal Robert  
> > написал:
> >
> > Le 2012-03-16 à 08:08, Ron X a écrit :
> >
> > > but how can i connect this component with datasource?
> >
> > dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup 
> > that display group.
> >
> >public Organizations(WOContext context) {
> >super(context);
> >EODatabaseDataSource ds = new EODatabaseDataSource(ec, 
> > OrganizationProfile.ENTITY_NAME);
> >dgOrganizations = new ERXBatchingDisplayGroup();
> >dgOrganizations.setNumberOfObjectsPerBatch(10);
> >dgOrganizations.setDataSource(ds);
> >dgOrganizations.setSortOrderings(new 
> > NSArray(lastUpdateSort));
> >   }
> >
> >@Override
> >public void awake() {
> >super.awake();
> >isServiceFilter = false;
> >dgOrganizations.fetch();
> >queryArgs = new NSMutableDictionary();
> >}
> >
> >public void setBatchIndex(int batchIndex) {
> >dgOrganizations.setCurrentBatchIndex(batchIndex);
> >queryArgs.takeValueForKey(batchIndex, "batch");
> >}
> >
> > The "organizations" direct action:
> >
> >  public WOActionResults organizationsAction() {
> >String strBatchIndex = this.request().stringFormValueForKey("batch");
> >Integer batchIndex = new Integer(1);
> >if (strBatchIndex != null) {
> >  try {
> >batchIndex = new Integer(strBatchIndex);
> >  } catch (Exception e) {
> >NSLog.out.appendln("Someone tried to access a batch index with this 
> > value : " + strBatchIndex);
> >  }
> >}
> >Organizations nextPage = 
> > (Organizations)pageWithName(Organizations.class);
> >nextPage.setBatchIndex(batchIndex.intValue());
> >return nextPage;
> >  }
> >
> > > 2012/3/13 Pascal Robert 
> > > Use ERXDirectActionBatchNavigationBar
> > >
> > >  > >actionName = "organizations"
> > >containerCssClass = "paginator"
> > >batchSize = "$dgOrganizations.batchCount"
> > >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
> > >showPageNumbers = true
> > >numberOfObjects = "$dgOrganizations.allObjects.@count"
> > > />
> > >
> > > Please note that it will use Direct Actions, so it won't work with REST 
> > > routes. I'm planning to do a similar component for REST because I need it 
> > > for wocommunity.org, but I won't work on this before end of this month.
> > >
> > > > sorry, maybe i explain bad.
> > > >
> > > > "so the workflow is so" - that is how it works NOW.
> > > > but i want to fetching objects at every click of the page and do not 
> > > > changing the url (or have control of changing).
> > > >
> > > > 2012/3/13 Pascal Robert 
> > > >EODatabaseDataSource dataSource = new 
> > > > EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
> > > >er.extensions.batching.ERXBatchingDisplayGroup dg = new 
> > > > ERXBatchingDisplayGroup();
> > > >dg.setNumberOfObjectsPerBatch(20);
> > > >dg.setDataSource(dataSource);
> > > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
> > > >
> > > > > hi everybody.
> > > > > i have some legasy code.
> > > > > in this code used ERXDisplayGroup:
> > > > >
> > > > > //code:
> > > > > import com.webobjects.appserver.WOContext;
> > > > > import com.webobjects.appserver.WODisplayGroup;
> > > > > import com.webobjects.directtoweb.ERD2WUtilities;
> > > > >
> > > > > import er.directtoweb.pages.ERD2WListPage;
> > > > > import er.extensions.batching.ERXBatchingDisplayGroup;
> > > > > import er.extensions.batching.ERXFlickrBatchNavigation;
> > > > >
> > > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> > > > > public BatchNavigationBar(WOContext context) {
> > > > > super(context);
> > > > > }
> > > > >
> > > > > private ERD2WListPage listPage() {
> > > > > return (ERD2WListPage) 
> > > > > ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> > > > > }
> > > > >
> > > > > @Override
> > > > > public WODisplayGroup displayGroup() {
> > > > > return listPage().displayGroup();
> > > > > }
> > > > >
> > > > > public void set

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Ron X
hi again.

i noticed strange thing:
when i used /ra/ (REST) and used AjaxUpdateComponent
and used /wa/ with ERXDirectActionBatchNavigationBar
when i go to the rest-links - Session Expires - everytime.
how can i fix that?

19 марта 2012 г. 16:08 пользователь Ron X  написал:

> hi!
> so we have url:
> .woa/wa/entities?batch=5
>
> can i change "batch" to another word?
>
>
>
> 16 марта 2012 г. 15:16 пользователь Pascal Robert написал:
>
>
>> Le 2012-03-16 à 08:08, Ron X a écrit :
>>
>> > but how can i connect this component with datasource?
>>
>> dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup
>> that display group.
>>
>>public Organizations(WOContext context) {
>>super(context);
>>EODatabaseDataSource ds = new EODatabaseDataSource(ec,
>> OrganizationProfile.ENTITY_NAME);
>>dgOrganizations = new
>> ERXBatchingDisplayGroup();
>>dgOrganizations.setNumberOfObjectsPerBatch(10);
>>dgOrganizations.setDataSource(ds);
>>dgOrganizations.setSortOrderings(new
>> NSArray(lastUpdateSort));
>>   }
>>
>>@Override
>>public void awake() {
>>super.awake();
>>isServiceFilter = false;
>>dgOrganizations.fetch();
>>queryArgs = new NSMutableDictionary();
>>}
>>
>>public void setBatchIndex(int batchIndex) {
>>dgOrganizations.setCurrentBatchIndex(batchIndex);
>>queryArgs.takeValueForKey(batchIndex, "batch");
>>}
>>
>> The "organizations" direct action:
>>
>>  public WOActionResults organizationsAction() {
>>String strBatchIndex = this.request().stringFormValueForKey("batch");
>>Integer batchIndex = new Integer(1);
>>if (strBatchIndex != null) {
>>  try {
>>batchIndex = new Integer(strBatchIndex);
>>  } catch (Exception e) {
>>NSLog.out.appendln("Someone tried to access a batch index with
>> this value : " + strBatchIndex);
>>  }
>>}
>>Organizations nextPage =
>> (Organizations)pageWithName(Organizations.class);
>>nextPage.setBatchIndex(batchIndex.intValue());
>>return nextPage;
>>   }
>>
>> > 2012/3/13 Pascal Robert 
>> > Use ERXDirectActionBatchNavigationBar
>> >
>> > > >actionName = "organizations"
>> >containerCssClass = "paginator"
>> >batchSize = "$dgOrganizations.batchCount"
>> >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
>> >showPageNumbers = true
>> >numberOfObjects = "$dgOrganizations.allObjects.@count"
>> > />
>> >
>> > Please note that it will use Direct Actions, so it won't work with REST
>> routes. I'm planning to do a similar component for REST because I need it
>> for wocommunity.org, but I won't work on this before end of this month.
>> >
>> > > sorry, maybe i explain bad.
>> > >
>> > > "so the workflow is so" - that is how it works NOW.
>> > > but i want to fetching objects at every click of the page and do not
>> changing the url (or have control of changing).
>> > >
>> > > 2012/3/13 Pascal Robert 
>> > >EODatabaseDataSource dataSource = new
>> EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
>> > >er.extensions.batching.ERXBatchingDisplayGroup dg = new
>> ERXBatchingDisplayGroup();
>> > >dg.setNumberOfObjectsPerBatch(20);
>> > >dg.setDataSource(dataSource);
>> > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
>> > >
>> > > > hi everybody.
>> > > > i have some legasy code.
>> > > > in this code used ERXDisplayGroup:
>> > > >
>> > > > //code:
>> > > > import com.webobjects.appserver.WOContext;
>> > > > import com.webobjects.appserver.WODisplayGroup;
>> > > > import com.webobjects.directtoweb.ERD2WUtilities;
>> > > >
>> > > > import er.directtoweb.pages.ERD2WListPage;
>> > > > import er.extensions.batching.ERXBatchingDisplayGroup;
>> > > > import er.extensions.batching.ERXFlickrBatchNavigation;
>> > > >
>> > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
>> > > > public BatchNavigationBar(WOContext context) {
>> > > > super(context);
>> > > > }
>> > > >
>> > > > private ERD2WListPage listPage() {
>> > > > return (ERD2WListPage)
>> ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
>> > > > }
>> > > >
>> > > > @Override
>> > > > public WODisplayGroup displayGroup() {
>> > > > return listPage().displayGroup();
>> > > > }
>> > > >
>> > > > public void setCurrentBatchIndex(Integer batchIndex) {
>> > > > displayGroup().setCurrentBatchIndex(batchIndex);
>> > > > }
>> > > > }
>> > > > //end code
>> > > >
>> > > > so the workflow is so:
>> > > >
>> > > > 1. fetching ALL object of query in array.
>> > > > 2. and than give me a portion (size if batch) when i am clicking
>> next/prev pages in this component.
>> > > > 3. but NO work with database per batch - it works with array
>> > > > 4. when i click next/prev - it adds to the urls of pagination some
>> like this - 1.2.3.1.5.6.7 etc :-) and this brakes my statistics wi

Re: ERXDisplayGroup ---> ERXBatchingDisplayGroup

2012-03-19 Thread Pascal Robert
I don't think mixing direct actions and REST will work fine.

> hi again.
> 
> i noticed strange thing:
> when i used /ra/ (REST) and used AjaxUpdateComponent
> and used /wa/ with ERXDirectActionBatchNavigationBar
> when i go to the rest-links - Session Expires - everytime.
> how can i fix that?
> 
> 19 марта 2012 г. 16:08 пользователь Ron X  написал:
> hi!
> so we have url:
> .woa/wa/entities?batch=5
> 
> can i change "batch" to another word?
> 
> 
> 
> 16 марта 2012 г. 15:16 пользователь Pascal Robert  написал:
> 
> 
> Le 2012-03-16 à 08:08, Ron X a écrit :
> 
> > but how can i connect this component with datasource?
> 
> dgOrganizations is a ERXBatchingDisplayGroup, so you just need to setup that 
> display group.
> 
>public Organizations(WOContext context) {
>super(context);
>EODatabaseDataSource ds = new EODatabaseDataSource(ec, 
> OrganizationProfile.ENTITY_NAME);
>dgOrganizations = new ERXBatchingDisplayGroup();
>dgOrganizations.setNumberOfObjectsPerBatch(10);
>dgOrganizations.setDataSource(ds);
>dgOrganizations.setSortOrderings(new 
> NSArray(lastUpdateSort));
>   }
> 
>@Override
>public void awake() {
>super.awake();
>isServiceFilter = false;
>dgOrganizations.fetch();
>queryArgs = new NSMutableDictionary();
>}
> 
>public void setBatchIndex(int batchIndex) {
>dgOrganizations.setCurrentBatchIndex(batchIndex);
>queryArgs.takeValueForKey(batchIndex, "batch");
>}
> 
> The "organizations" direct action:
> 
>  public WOActionResults organizationsAction() {
>String strBatchIndex = this.request().stringFormValueForKey("batch");
>Integer batchIndex = new Integer(1);
>if (strBatchIndex != null) {
>  try {
>batchIndex = new Integer(strBatchIndex);
>  } catch (Exception e) {
>NSLog.out.appendln("Someone tried to access a batch index with this 
> value : " + strBatchIndex);
>  }
>}
>Organizations nextPage = (Organizations)pageWithName(Organizations.class);
>nextPage.setBatchIndex(batchIndex.intValue());
>return nextPage;
>  }
> 
> > 2012/3/13 Pascal Robert 
> > Use ERXDirectActionBatchNavigationBar
> >
> >  >actionName = "organizations"
> >containerCssClass = "paginator"
> >batchSize = "$dgOrganizations.batchCount"
> >currentBatchIndex = "$dgOrganizations.currentBatchIndex"
> >showPageNumbers = true
> >numberOfObjects = "$dgOrganizations.allObjects.@count"
> > />
> >
> > Please note that it will use Direct Actions, so it won't work with REST 
> > routes. I'm planning to do a similar component for REST because I need it 
> > for wocommunity.org, but I won't work on this before end of this month.
> >
> > > sorry, maybe i explain bad.
> > >
> > > "so the workflow is so" - that is how it works NOW.
> > > but i want to fetching objects at every click of the page and do not 
> > > changing the url (or have control of changing).
> > >
> > > 2012/3/13 Pascal Robert 
> > >EODatabaseDataSource dataSource = new 
> > > EODatabaseDataSource(editingContext(), Category.ENTITY_NAME);
> > >er.extensions.batching.ERXBatchingDisplayGroup dg = new 
> > > ERXBatchingDisplayGroup();
> > >dg.setNumberOfObjectsPerBatch(20);
> > >dg.setDataSource(dataSource);
> > >dg.setObjectArray(Category.fetchAllCategories(editingContext()));
> > >
> > > > hi everybody.
> > > > i have some legasy code.
> > > > in this code used ERXDisplayGroup:
> > > >
> > > > //code:
> > > > import com.webobjects.appserver.WOContext;
> > > > import com.webobjects.appserver.WODisplayGroup;
> > > > import com.webobjects.directtoweb.ERD2WUtilities;
> > > >
> > > > import er.directtoweb.pages.ERD2WListPage;
> > > > import er.extensions.batching.ERXBatchingDisplayGroup;
> > > > import er.extensions.batching.ERXFlickrBatchNavigation;
> > > >
> > > > public class BatchNavigationBar extends ERXFlickrBatchNavigation {
> > > > public BatchNavigationBar(WOContext context) {
> > > > super(context);
> > > > }
> > > >
> > > > private ERD2WListPage listPage() {
> > > > return (ERD2WListPage) 
> > > > ERD2WUtilities.enclosingPageOfClass(this, ERD2WListPage.class);
> > > > }
> > > >
> > > > @Override
> > > > public WODisplayGroup displayGroup() {
> > > > return listPage().displayGroup();
> > > > }
> > > >
> > > > public void setCurrentBatchIndex(Integer batchIndex) {
> > > > displayGroup().setCurrentBatchIndex(batchIndex);
> > > > }
> > > > }
> > > > //end code
> > > >
> > > > so the workflow is so:
> > > >
> > > > 1. fetching ALL object of query in array.
> > > > 2. and than give me a portion (size if batch) when i am clicking 
> > > > next/prev pages in this component.
> > > > 3. but NO work with database per batch - it works with array
> > > > 4. when i click next/prev - it adds to the urls of pagination some like 
> > > > this - 1.2.3.1.5.6.7 etc :-) and this brakes my st

Re: D2W & Rest question

2012-03-19 Thread Andries Brink


Sorry - previous mail bounced. I am member of list now!


On 19 Mar 2012, at 6:18 PM, Andries Brink wrote:

> 
> 
> Andries Brink,
> 
> You should ask in the mailing list (webobjectsp-...@lists.apple.com) because 
> I don't think many people will see your question here.
> 
> In reply to a comment by Andries Brink:
> Hi Pascal / WOnder community
> 
> I have no hair, but I am pulling it out non the less! I have known about 
> WOnder and WO for a while. My company is building a web app server (We want 
> to use Rest and Sencha JS libs for mobile devices) and I am trying to 
> persuade my developers to look at WO. However - I (granted I am the worst dev 
> on the planet) cannot get past a D2W screen with Home, Tab1 and Tab2. I have 
> no idea where to start - as the docs and videos from WOWODC does not show 
> very well where Eclipse one is to add NewPagegenerated from the d2wFactory.
> 
> I can really see the power in the tools, but am really worried given the 
> steep learning curve. Any ideas? 
> 
> Thanks
> 
> Andries 
> 
> 
Hi WOnder Community

Thanks Pascal -

We have a good EOModel (I think - reversed from SQL server - took me whole 
weekend to get jdbc:sqlserver to work! I know should have asked) and I would 
love to use D2W properly to test it. I also want to introduce the Rest services 
to proove to my team that this will be really quick.

Anyone want to help!

:-)

 

Andries Brink
Managing Director
 






>> 
>> 
>> 
>> 
> 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: D2W & Rest question

2012-03-19 Thread Pascal Robert
> Hi WOnder Community
> 
> Thanks Pascal -
> 
> We have a good EOModel (I think - reversed from SQL server - took me whole 
> weekend to get jdbc:sqlserver to work! I know should have asked) and I would 
> love to use D2W properly to test it. I also want to introduce the Rest 
> services to proove to my team that this will be really quick.
> 
> Anyone want to help!
> 
> :-)

For REST, the tutorial is the wiki is a good starting point. After that, you 
should listen to the recording that Mike Schrag did in 2010. For D2W, I can't 
answer because I don't customize it (I only have one D2W app that I simply 
dropped the model in it).

I know it's a bit far, but we will have a Project Bootcamp just before WOWODC 
2012, so it's from June 28 to June 30. Check wowodc.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Wonder's Rewrite URLs

2012-03-19 Thread Johnny Miller
Hi Pascal,

Do you need to do all three?  Or is specifying the pattern enough in the 
properties file enough?  I've always done it my own before and I'm trying the 
wonder way out this time.

Thank you,

Johnny Miller
Kahalawai Media Corp.
www.kahalawai.com



On Feb 28, 2012, at 4:00 PM, Pascal Robert wrote:

> In Apache:
> 
>  RewriteRule ^/(.*)$ /cgi-bin/WebObjects/YourApp.woa/ra$1 [PT,L] 
> 
> In the properties:
> 
>  
> er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/YourApp.woa/ra
>  er.extensions.ERXApplication.replaceApplicationPath.replace=/
> 
> In Application.java:
> 
>  public String _rewriteURL(String url) {
>String processedURL = url;
>if (url != null && _replaceApplicationPathPattern != null && 
> _replaceApplicationPathReplace != null) {
>  processedURL = processedURL.replaceFirst(_replaceApplicationPathPattern, 
> _replaceApplicationPathReplace);
>}
>return processedURL;
>  }
> 
>> I have a fresh Wonder install as of Feb something, so how do I do it?
>> 
>> On Tue, Feb 28, 2012 at 7:10 PM,  wrote:
>> You can hide the /ra, but you need a ERRest framework that is more recent 
>> than November, before that Wonder wasn't rewriting the URL correctly.
>> 
>>> I already do that to replace the application path, but this doesn't apply 
>>> to the /ra route, correct?
>>> 
>>> On Tue, Feb 28, 2012 at 6:33 PM, John Huss  wrote:
>>> Yes, set up mod_rewrite is apache and then there are also 2 properties in 
>>> Wonder you have to set.
>>> 
>>> 
>>> On Tuesday, February 28, 2012, Ted Archibald wrote:
>>> Is there anyway to make ERRest route all the urls without /ra?  Or does 
>>> this confuse WebObjects?
>>> 
>>> So instead of having a link like: mywebsite.com/ra/Entitiy/1.json it would 
>>> be mywebsite.com/Entitiy/1.json
>>> 
>>> I've been looking around and I couldn't find anything obvious.
>>> 
>>> --
>>> Virtualization & Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing 
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>> ___
>>> Wonder-disc mailing list
>>> wonder-d...@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>> 
> 
> 
> --
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing 
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> ___
> Wonder-disc mailing list
> wonder-d...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wonder-disc

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


ERRest and JSONP?

2012-03-19 Thread Jesse Tayler
Isn't jsonp easy to support via Errest?

Security problem?

What to do when we have a JavaScript that must run on external domains?

Seems that jsonp is what is used most and it seems like a js wrapper that 
should be easy to put in?

Sent from my iPad
 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: ERRest and JSONP?

2012-03-19 Thread Pascal Robert
Because nobody added support for it :-) The only thing ERRest supports right 
now is Same Policy Origin and window.name:

  
http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy

> Isn't jsonp easy to support via Errest?
> 
> Security problem?
> 
> What to do when we have a JavaScript that must run on external domains?
> 
> Seems that jsonp is what is used most and it seems like a js wrapper that 
> should be easy to put in?
> 
> Sent from my iPad
> ___
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: ERRest and JSONP?

2012-03-19 Thread Jesse Tayler
Yes, I was reading that earlier.

It seems some suggest jsonp has security issues, but what if a UI programmer 
really prefers jsonp?

Has anyone implemented it or has advice or how I should redirect the technique 
were using for the ui here?



Sent from my iPad

On Mar 19, 2012, at 3:41 PM, Pascal Robert  wrote:

> Because nobody added support for it :-) The only thing ERRest supports right 
> now is Same Policy Origin and window.name:
> 
>  
> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy
> 
>> Isn't jsonp easy to support via Errest?
>> 
>> Security problem?
>> 
>> What to do when we have a JavaScript that must run on external domains?
>> 
>> Seems that jsonp is what is used most and it seems like a js wrapper that 
>> should be easy to put in?
>> 
>> Sent from my iPad
>> ___
>> 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:
>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Postgresql and ERXSQLHelper

2012-03-19 Thread Michael Gargano
Just some follow up on this

It turns out this had to do with being headless.   As soon as initApp 
was added (or when I turned it into a full fledge WO app) the problem went 
away.  I'm not sure what additional work is being done in initApp, but this is 
clearly a bug when running headless.  I wish I knew where to look to fix it, 
but nothing that initApp does jumped out at me as something that was missing in 
initEOF.

-Mike


On Mar 16, 2012, at 6:35 PM, Michael Gargano wrote:

> Okay, I'm not sure how to explain this, but here it goes...
> 
> I have two apps, a standard wonder app and a headless wonder app that only 
> calls initEOF.
> Both of these apps use a common framework and both are set to use the 
> PostgreSQLPlugIn.  In one of the fetch specs in my framework an 
> ERXFalseQualifier is used.  In the regular wonder app this works fine and it 
> generates "0=1" as it should through ERXSQLHelper.  On the headless app, 
> however, this fails stating that the PostgreSQLPlugIn doesn't support 
> generation of ERXFalseQualifier.  While carefully stepping through this ball 
> of confusion I noticed that this is deferred to ERXSQLHelper in the regular 
> app, but in the headless app nothing ever goes through ERXSQLHelper, only the 
> postgres plugin code is ever called.
> 
> Can anyone offer any insights into what is going on here?  Why isn't 
> ERXSQLHelper being used?
> 
> Thanks.
> Much appreciated.
> 
> -Mike
> 
> 
> ___
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40escholar.com
> 
> This email sent to mgarg...@escholar.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: ERRest and JSONP?

2012-03-19 Thread Pascal Robert

Le 2012-03-19 à 15:55, Jesse Tayler a écrit :

> Yes, I was reading that earlier.
> 
> It seems some suggest jsonp has security issues, but what if a UI programmer 
> really prefers jsonp?

I don't know why someone would prefer JSONP than Same Origin Policy, who don't 
require anything on the client side (you only need something server-side to be 
able to answer the OPTIONS request).

> Has anyone implemented it or has advice or how I should redirect the 
> technique were using for the ui here?

I guess JSONP would have to implemented like the window.name support.

> 
> 
> Sent from my iPad
> 
> On Mar 19, 2012, at 3:41 PM, Pascal Robert  wrote:
> 
>> Because nobody added support for it :-) The only thing ERRest supports right 
>> now is Same Policy Origin and window.name:
>> 
>> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy
>> 
>>> Isn't jsonp easy to support via Errest?
>>> 
>>> Security problem?
>>> 
>>> What to do when we have a JavaScript that must run on external domains?
>>> 
>>> Seems that jsonp is what is used most and it seems like a js wrapper that 
>>> should be easy to put in?
>>> 
>>> Sent from my iPad
>>> ___
>>> 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:
>>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>> 
>>> This email sent to prob...@macti.ca
>> 


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERRest and JSONP?

2012-03-19 Thread Jesse Tayler

I can see that JSONP is basically just some padding that makes it resemble 
executable javascript, thus I presume stoking the heap with your properties.

I hear that the window.name trick has been deprecated on some newer browsers 
and no longer works?

I don't know about such things, but, I did read a bit here 
https://developer.mozilla.org/En/HTTP_Access_Control

also -- foursquare and google seem to use jsonp extensively - so, I'm not sure 
why that is.

can anyone point me to anywhere I might learn more about this?



On Mar 19, 2012, at 7:58 PM, Pascal Robert  wrote:

> 
> Le 2012-03-19 à 15:55, Jesse Tayler a écrit :
> 
>> Yes, I was reading that earlier.
>> 
>> It seems some suggest jsonp has security issues, but what if a UI programmer 
>> really prefers jsonp?
> 
> I don't know why someone would prefer JSONP than Same Origin Policy, who 
> don't require anything on the client side (you only need something 
> server-side to be able to answer the OPTIONS request).
> 
>> Has anyone implemented it or has advice or how I should redirect the 
>> technique were using for the ui here?
> 
> I guess JSONP would have to implemented like the window.name support.
> 
>> 
>> 
>> Sent from my iPad
>> 
>> On Mar 19, 2012, at 3:41 PM, Pascal Robert  wrote:
>> 
>>> Because nobody added support for it :-) The only thing ERRest supports 
>>> right now is Same Policy Origin and window.name:
>>> 
>>> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy
>>> 
 Isn't jsonp easy to support via Errest?
 
 Security problem?
 
 What to do when we have a JavaScript that must run on external domains?
 
 Seems that jsonp is what is used most and it seems like a js wrapper that 
 should be easy to put in?
 
 Sent from my iPad
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca
>>> 
> 


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERRest and JSONP?

2012-03-19 Thread Pascal Robert

Le 2012-03-19 à 20:10, Jesse Tayler a écrit :

> 
> I can see that JSONP is basically just some padding that makes it resemble 
> executable javascript, thus I presume stoking the heap with your properties.
> 
> I hear that the window.name trick has been deprecated on some newer browsers 
> and no longer works?
> 
> I don't know about such things, but, I did read a bit here 
> https://developer.mozilla.org/En/HTTP_Access_Control

That's the Same Origin Policy stuff, it's already in ERRest.

> also -- foursquare and google seem to use jsonp extensively - so, I'm not 
> sure why that is.

Probably because they want to support IE 6...

> can anyone point me to anywhere I might learn more about this?
> 
> 
> 
> On Mar 19, 2012, at 7:58 PM, Pascal Robert  wrote:
> 
>> 
>> Le 2012-03-19 à 15:55, Jesse Tayler a écrit :
>> 
>>> Yes, I was reading that earlier.
>>> 
>>> It seems some suggest jsonp has security issues, but what if a UI 
>>> programmer really prefers jsonp?
>> 
>> I don't know why someone would prefer JSONP than Same Origin Policy, who 
>> don't require anything on the client side (you only need something 
>> server-side to be able to answer the OPTIONS request).
>> 
>>> Has anyone implemented it or has advice or how I should redirect the 
>>> technique were using for the ui here?
>> 
>> I guess JSONP would have to implemented like the window.name support.
>> 
>>> 
>>> 
>>> Sent from my iPad
>>> 
>>> On Mar 19, 2012, at 3:41 PM, Pascal Robert  wrote:
>>> 
 Because nobody added support for it :-) The only thing ERRest supports 
 right now is Same Policy Origin and window.name:
 
 http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy
 
> Isn't jsonp easy to support via Errest?
> 
> Security problem?
> 
> What to do when we have a JavaScript that must run on external domains?
> 
> Seems that jsonp is what is used most and it seems like a js wrapper that 
> should be easy to put in?
> 
> Sent from my iPad
> ___
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca
 
>> 
> 


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERRest and JSONP?

2012-03-19 Thread Jesse Tayler
Sounds like I'll be implementing JSONP

Seems like there's two steps

1 implement a callback called 'callback' or make one based on a parameter sent 
from the client.
2 wrap the whole JSON in some seemingly standard looking javascript tags, such 
that it can execute as a script on the client.

so, this defined callback function gets called when data arrives at the client 
and poof! there's some properties to use right there in JSON.

seems like I could properly support JSONP by using an ERRest route .jsonp and 
look for a callback function name or return callback with the JSON and everyone 
should be happy, even if they do use some form of IE

suggestions?


On Mar 19, 2012, at 8:13 PM, Pascal Robert  wrote:

> 
> Le 2012-03-19 à 20:10, Jesse Tayler a écrit :
> 
>> 
>> I can see that JSONP is basically just some padding that makes it resemble 
>> executable javascript, thus I presume stoking the heap with your properties.
>> 
>> I hear that the window.name trick has been deprecated on some newer browsers 
>> and no longer works?
>> 
>> I don't know about such things, but, I did read a bit here 
>> https://developer.mozilla.org/En/HTTP_Access_Control
> 
> That's the Same Origin Policy stuff, it's already in ERRest.
> 
>> also -- foursquare and google seem to use jsonp extensively - so, I'm not 
>> sure why that is.
> 
> Probably because they want to support IE 6...
> 
>> can anyone point me to anywhere I might learn more about this?
>> 
>> 
>> 
>> On Mar 19, 2012, at 7:58 PM, Pascal Robert  wrote:
>> 
>>> 
>>> Le 2012-03-19 à 15:55, Jesse Tayler a écrit :
>>> 
 Yes, I was reading that earlier.
 
 It seems some suggest jsonp has security issues, but what if a UI 
 programmer really prefers jsonp?
>>> 
>>> I don't know why someone would prefer JSONP than Same Origin Policy, who 
>>> don't require anything on the client side (you only need something 
>>> server-side to be able to answer the OPTIONS request).
>>> 
 Has anyone implemented it or has advice or how I should redirect the 
 technique were using for the ui here?
>>> 
>>> I guess JSONP would have to implemented like the window.name support.
>>> 
 
 
 Sent from my iPad
 
 On Mar 19, 2012, at 3:41 PM, Pascal Robert  wrote:
 
> Because nobody added support for it :-) The only thing ERRest supports 
> right now is Same Policy Origin and window.name:
> 
> http://wiki.wocommunity.org/display/WONDER/ERRest+Framework#ERRestFramework-SameOriginpolicy
> 
>> Isn't jsonp easy to support via Errest?
>> 
>> Security problem?
>> 
>> What to do when we have a JavaScript that must run on external domains?
>> 
>> Seems that jsonp is what is used most and it seems like a js wrapper 
>> that should be easy to put in?
>> 
>> Sent from my iPad
>> ___
>> 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:
>> https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 
>>> 
>> 
> 


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: WOCommunity Apple Developer Account

2012-03-19 Thread Kevin Spake
Thorough, modestly priced and current educational information would be 
incredibly helpful. I don't know what self-paced computer instruction materials 
go for, but I'm thinking something in the  $200 to $500 American dollars range 
would be a every good thing.  P&L Systems seems to be the only option for WO 
training. Looking at their site, the fee for a 5 week class is £1695, which 
comes out to about $2655 in American dollars at today's exchange rate. Add in 
travel and lodging for anyone not living nearby (anyone outside the UK for 
sure), and WO training becomes a very serious commitment at best, and 
unreachable for most. I'm sure the training is fantastic and all.  WOWODC 
requires travel, lodging etc. as well.  

I have no idea if P&L Systems would be interested in diluting their in-house 
training opportunities by offering online coursework at a lower cost. How much 
does a WO programmer, expert enough to do the training, command in salary? 
Let's assume half the course fee goes to paying the salary of the instructor 
and other overhead. Would it make financial sense for P&L to offer the material 
at a much lower cost, if they could make it up in volume? Yeah, I know. Most of 
you probably just spat your Ovaltine all over your keyboards at the mention of 
"volume".  


On Mar 15, 2012, at 4:11 PM, Pascal Robert wrote:

> I think the man who could do that is Paul Lynch, one of the few that is still 
> giving the Apple course (and the one who is doing the Boot Camp this summer). 
> I can ask him about recording the Boot Camp and selling it.
> 
> As for certification, I don't think it's needed. Places that requires 
> certification are places that will ask for Java or Microsoft certified 
> people, not WebObjects (or Python or Rails).
> 
>> I'm in pro of a curriculum and certification, a certification will give more 
>> seriousness to the community and to ourselves as programmers and it will 
>> help new developers giving them an structured way to learn about the huge 
>> compound of knowledge that is webobjects as it could be divided on levels or 
>> areas.
>> I dont remember the way to say this in English, but there could be online 
>> courses every year to help us catch up with the new frameworks, so we could 
>> keep up to date with the wocommunity programming tendencies even after 
>> certification.
>> 
>> and Online bootcamps would be cool to for the people that cant travel to 
>> other countries to the wowodc.
>> 
>> Emmanuel~
>> 
>> 
>> 
>> On Thu, Mar 15, 2012 at 1:23 PM, Pascal Robert  wrote:
>> As for priorities before WOWODC:
>> 
>> - Registering the non-profit
>> 
>> - Reworking wocommunity.org to be one app (REST based) with a new look and 
>> the name change (WOCommunity instead of WebObjects Community). I already 
>> started redoing the code and navigation:
>> 
>> http://wocommunity.org/apps/WebObjects/WOCommunityRest.woa/ra/index.html
>> 
>> And I have two people working on two different looks (and logos).
>> 
>> - Finishing the tutorials that I started
>> 
>> http://wiki.wocommunity.org/display/WONDER/Getting+Started
>> 
>> - Have one set of instructions on how to install the tools so that newbies 
>> don't go away because of a bad experience with the installation
>> 
>> - Have a presentation ready for iOS developers to explain why WO is good for 
>> them
>> 
>> All of this so that we can try to have newbies at the Boot Camp just before 
>> WOWODC.
>> 
>>> I think this discussion is very timely. Just a week ago I sent an email to 
>>> Pascal seeking his help to try to come up with ideas to improve upon what 
>>> we already have in the WO community. An excerpt of my email went like this:
>>> 
>>> "My proposal is first based on setting up a non-profit educational 
>>> foundation. This foundation will then be able to receive tax-deductible 
>>> donations and contributions, etc. We should also actively pursue donations 
>>> from major corporations. We should then dedicate some time and talent to 
>>> write manuals and material for new developers. We should also consider 
>>> setting up a scholarship fund to encourage learning WO. We should also 
>>> encourage employers to hire "interns" as part of their training. An 
>>> affiliation with a college or university would be tremendously powerful. 
>>> And a certification would come handy at some point too. I have made initial 
>>> contacts with some individuals of which I think the first few elements of 
>>> this campaign would be doable. For example we don't need to set up our own 
>>> non-profit (too costly), but we can piggyback on someone else's. We have 
>>> also begun putting together a WO starter manual. This manual describes 
>>> every step of getting started from absolute scratch. I would like more 
>>> content to be added in the future by others in the community. We can easily 
>>> publish this book on the iBook store and the proceeds could go towards the 
>>> non-profit foundation. I also have someone in mind that could write the