Re: _rewriteURL not firing

2011-02-26 Thread Jeff Schmitz
I'm not using a custom context, and ERXWOContext is in my classpath, but I did 
recently upgrade to the latest Wonder build.

Jeff


On Feb 26, 2011, at 1:58 PM, Lachlan Deck wrote:

> On 27/02/2011, at 12:22 AM, Jeff Schmitz wrote:
> 
>> Hello,
>>  I'm not sure exactly when, but somewhere along the line the _rewriteURL 
>> method in my Application class stopped firing.  My Application class extends 
>> ERXApplication and the signature of the overriding method is:
>> 
>>  public String _rewriteURL(String url) 
> 
> This should be called by ERXWOContext[54]
> 
> Are you using a custom context class?
> Or did you upgrade to using Wonder 54... or are perhaps missing the above 
> class in your classpath?
> 
> 
> with regards,
> -
> 
> Lachlan Deck
> 
> 
> 

 ___
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: [D2W] Conditionally changing property level components

2011-02-26 Thread Mike Gee
Solution works well in practice too!!! 

I was using the files from the zip but will now use the (updated) framework. 
Now that the update and refresh are working I am moving on to figuring out how 
to prevent the user from editing the updated value once set.

Thanks again.

Mike


On 2011-02-26, at 3:41 PM, Ramsey Gurley wrote:

> 
> On Feb 26, 2011, at 3:25 PM, Mike Gee wrote:
> 
>> Thanks for the components, Ramsey! 
>> 
>> Is there an easy way to drop the AjaxNotificationCenter onto an 
>> ERMODWizardCreationPage without subclassing it (adding 
>> aboveDisplayPropertyKeys). Or would having AjaxNotificationCenter extend 
>> ERDCustomEditComponent be the better way to go and include in 
>> displayPropertyKeys? I am looking to have a selection from a popup 
>> (ERD2WEditToOneRelationship) set some text field values. Using the delegate 
>> pattern from your example I know my attributes are getting set but so far 
>> haven't been able to get the AjaxNotificationCenter on the page.
>> 
>> Thanks
>> 
>> Mike
> 
> Are you using the ones in the zip file or the ones in the AjaxLook framework? 
>  I would have thought that the following methods would have handled the 
> object and key bindings for a displayPropertyKeys repetitions... Perhaps that 
> solution works better in theory than practice... (^_^)
> 
>   /**
>* Since this component uses synchronization to update observers when 
> the
>* d2wContext changes, it cannot be non-synchronizing. However, if we 
> want
>* to be able to drop this component anywhere, it needs to be able to
>* accept any binding value. So this method simply returns value for key
>* from the dynamicBindings dictionary.
>*/
>   public Object handleQueryWithUnboundKey(String key) {
>   if(log.isDebugEnabled()) {
>   log.debug("Handling unbound key: " + key);
>   }
>   return dynamicBindings().objectForKey(key);
>   }
>   
>   /**
>* Since this component uses synchronization to update observers when 
> the
>* d2wContext changes, it cannot be non-synchronizing. However, if we 
> want
>* to be able to drop this component anywhere, it needs to be able to
>* accept any binding value. So this method simply adds value for key
>* to the dynamicBindings dictionary.
>*/
>   @SuppressWarnings("unchecked")
>   public void handleTakeValueForUnboundKey(Object value, String key) {
>   if(log.isDebugEnabled()) {
>   log.debug("Take value: " + value + " for unbound key: " 
> + key);
>   }
>   dynamicBindings().setObjectForKey(value, key);
>   }
> 
> Ramsey
> 



 ___
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: install with embedded frameworks

2011-02-26 Thread David LeBer
The WebServerResources.tar.gz archive should only contain the static web 
resources from the frameworks.

See:



On 2011-02-26, at 5:32 PM, John Baldwin wrote:

> I am building my application and embedding frameworks.
> 
> From what I see, all the frameworks are indeed embedded in the application.
> 
> But core frameworks also are embedded in the WebServerResources bundle.  
> Right now, in my project, the WebServerResources folder is empty.
> 
> I'm confused about the WebServerResources.tar.gz bundle, and what its purpose 
> is. 
> 
> My goal is to embed all the frameworks within the app and not have WO 
> installed on the server. I have deployed wotaskd and JavaMonitor as embedded 
> applications successfully.
> 
> Sorry if I'm missing the right wiki page. Trying to ramp back up quickly here.
> 
> John
> 
> ___
> 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/dleber_wodev%40codeferous.com
> 
> This email sent to dleber_wo...@codeferous.com
> 

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:http://www.linkedin.com/in/davidleber
twitter:http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




 ___
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: [D2W] Conditionally changing property level components

2011-02-26 Thread Ramsey Gurley

On Feb 26, 2011, at 3:25 PM, Mike Gee wrote:

> Thanks for the components, Ramsey! 
> 
> Is there an easy way to drop the AjaxNotificationCenter onto an 
> ERMODWizardCreationPage without subclassing it (adding 
> aboveDisplayPropertyKeys). Or would having AjaxNotificationCenter extend 
> ERDCustomEditComponent be the better way to go and include in 
> displayPropertyKeys? I am looking to have a selection from a popup 
> (ERD2WEditToOneRelationship) set some text field values. Using the delegate 
> pattern from your example I know my attributes are getting set but so far 
> haven't been able to get the AjaxNotificationCenter on the page.
> 
> Thanks
> 
> Mike

Are you using the ones in the zip file or the ones in the AjaxLook framework?  
I would have thought that the following methods would have handled the object 
and key bindings for a displayPropertyKeys repetitions... Perhaps that solution 
works better in theory than practice... (^_^)

/**
 * Since this component uses synchronization to update observers when 
the
 * d2wContext changes, it cannot be non-synchronizing. However, if we 
want
 * to be able to drop this component anywhere, it needs to be able to
 * accept any binding value. So this method simply returns value for key
 * from the dynamicBindings dictionary.
 */
public Object handleQueryWithUnboundKey(String key) {
if(log.isDebugEnabled()) {
log.debug("Handling unbound key: " + key);
}
return dynamicBindings().objectForKey(key);
}

/**
 * Since this component uses synchronization to update observers when 
the
 * d2wContext changes, it cannot be non-synchronizing. However, if we 
want
 * to be able to drop this component anywhere, it needs to be able to
 * accept any binding value. So this method simply adds value for key
 * to the dynamicBindings dictionary.
 */
@SuppressWarnings("unchecked")
public void handleTakeValueForUnboundKey(Object value, String key) {
if(log.isDebugEnabled()) {
log.debug("Take value: " + value + " for unbound key: " 
+ key);
}
dynamicBindings().setObjectForKey(value, key);
}

Ramsey



smime.p7s
Description: S/MIME cryptographic signature
 ___
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

install with embedded frameworks

2011-02-26 Thread John Baldwin
I am building my application and embedding frameworks.

From what I see, all the frameworks are indeed embedded in the application.

But core frameworks also are embedded in the WebServerResources bundle.  Right 
now, in my project, the WebServerResources folder is empty.

I'm confused about the WebServerResources.tar.gz bundle, and what its purpose 
is. 

My goal is to embed all the frameworks within the app and not have WO installed 
on the server. I have deployed wotaskd and JavaMonitor as embedded applications 
successfully.

Sorry if I'm missing the right wiki page. Trying to ramp back up quickly here.

John

 ___
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: [D2W] Conditionally changing property level components

2011-02-26 Thread Mike Gee
Thanks for the components, Ramsey! 

Is there an easy way to drop the AjaxNotificationCenter onto an 
ERMODWizardCreationPage without subclassing it (adding 
aboveDisplayPropertyKeys). Or would having AjaxNotificationCenter extend 
ERDCustomEditComponent be the better way to go and include in 
displayPropertyKeys? I am looking to have a selection from a popup 
(ERD2WEditToOneRelationship) set some text field values. Using the delegate 
pattern from your example I know my attributes are getting set but so far 
haven't been able to get the AjaxNotificationCenter on the page.

Thanks

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

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


Re: _rewriteURL not firing

2011-02-26 Thread Lachlan Deck
On 27/02/2011, at 12:22 AM, Jeff Schmitz wrote:

> Hello,
>   I'm not sure exactly when, but somewhere along the line the _rewriteURL 
> method in my Application class stopped firing.  My Application class extends 
> ERXApplication and the signature of the overriding method is:
> 
>   public String _rewriteURL(String url) 

This should be called by ERXWOContext[54]

Are you using a custom context class?
Or did you upgrade to using Wonder 54... or are perhaps missing the above class 
in your classpath?


with regards,
-

Lachlan Deck



 ___
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


A couple of issues I've faced

2011-02-26 Thread John Baldwin
I'm not sure if I'm doing things incorrectly, but thought I'd share my 
experience to see if others can guide me.

First, I reverse engineered from an existing database. It worked well, except 
the class name for the entities was com.webobjects.EOGenericRecord. That had me 
stumped for a bit, because it made sense if that meant "class to extend." Now 
that I know what the field is for in the Modeler.

And I've been struggling to get eogenerator to create my entity classes in the 
destination I want. I finally just created them in the "default" package and 
refactored them into my .eo package. At one point, it even 
created the Entity.java file in one package and the _Entity.java file in 
another package. So I'm not sure if I'm doing this right. But in the getting 
started video, the files were created in the default package and refactored.

Finally, I made a binding to a property in my Main component called "aCustomer" 
and then had the code auto-generated by command-clicking. Unfortunately, it 
created a method called setaCustomer (instead of setACustomer) which threw a 
takeValueForKey exception.

John

 ___
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


_rewriteURL not firing

2011-02-26 Thread Jeff Schmitz
Hello,
   I'm not sure exactly when, but somewhere along the line the _rewriteURL 
method in my Application class stopped firing.  My Application class extends 
ERXApplication and the signature of the overriding method is:

public String _rewriteURL(String url) 

but when I put a breakpoint in it, it never gets hit.  

I do have the rewrite properties in my project Properties file commented out:

#er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/netBrackets.woa
#er.extensions.ERXApplication.replaceApplicationPath.replace=/netBrackets

I tried uncommenting them too, but the rewrites still weren't happening.  Are 
there any other properties that need to be set?

I do have -WODirectConnectEnabled set to false for both development and 
deployment (actually it's set to NO for deployment).

Any ideas?  

Thanks,
Jeff
 ___
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: AMD and accessing the parent component

2011-02-26 Thread Stefan Klein

Am 26.02.11 04:29, schrieb Chuck Hill:

On Feb 24, 2011, at 9:12 AM, Theodore Petrosky wrote:


Thanks guys. now that it is working, I wanted to get an idea if this were the 
'best' way to accomplish my end.

I am presenting a table with things and I wanted to give some minor search 
capability. My user will bring in the AMD and search for a publication (String) 
or a Center (String). I am creating the EOQualifier in the AMD and passing it 
back to Main with:

theSearchQualifier = ERXQ.and(theSearchQualifier, 
Grid.PUBLICATION.contains(thePubToSearch()));

((Main)context().page()).setSearchQualifier(theSearchQualifier);
AjaxModalDialog.close(context());
return null;

I then fire the onClose action method of the AMD and update my AUC with the 
table.

Ok, it works. but Stefan makes a comment:


But the a better way, is to set the the "main" page via a
binding in your AMD content component.

I don't understand this method. I am very interested in learning more.

I am not sure how that would work.


Chuck


Just a short example:

An the page is an AMD Opener and a dialog component:

HTML




WOD

PDFPrintOverviewDialog: PDFPrintOverviewDialog {
*delegate* = printOverviewDelegate; // <-- wrapper for this
}

AmdPrintOpen : AjaxModalDialogOpener {
dialogId = "AMD_PrintJobSelect_ID";
linkTitle = "Print as PDF";
}

The dialog is an extra Component

HTML:


... content ..




WOD:

AMDPrintJobSelect: AjaxModalDialog {
title = "Druckversion aufbereiten";
showOpener = false;
id = "AMD_PrintJobSelect_ID";
transitions = false;
}

BtnPrint: AjaxSubmitButton {
action = delegate.pdfPrepare;
evalScripts = true;
value = "Drucken";
class = "schalter";
onClick = "Element.show('PJSSearchPageBusyIcon')";
updateContainerID = "LnkUpdateContainer";
onComplete = "Element.hide('PJSSearchPageBusyIcon')";
}

LnkUpdateContainer : AjaxUpdateContainer {
id = "LnkUpdateContainer";
onRefreshComplete = autoOpenPdfScript; // <-- javascript to open  
the result of delegate.pdfPrint()

}

The delegate is an Interface:

public interface PDFPrintOverviewDialogDelegate
{
public WOComponent pdfPrint();
public void pdfPrepare();
}

Using this construct, I am able to use one print dialog on different pages.
Each page knows how to generate the its pdf.

Stefan

--- On Wed, 2/23/11, Chuck Hill  wrote:



I think you probably want to bind the
onClose action.

Chuck



--- On Wed, 2/23/11, Stefan Klein  wrote:


From: Stefan Klein
Subject: Re: AMD and accessing the parent component
To: "Theodore Petrosky"
Date: Wednesday, February 23, 2011, 4:37 PM
((Main)context().page()).setThePubToSearch()

But the a better way, is to set the the "main" page via a
binding in
your AMD content component.

Stefan

Am 23.02.11 21:23, schrieb Theodore Petrosky:

I have a component "Main". Main has a setter:

public void setThePubToSearch(String thePubToSearch)

{

 this.thePubToSearch =

thePubToSearch;

}

I am displaying an AjaxModalDialog whose content is a

component.

I want to access the setter 'setThePubToSearch' in

Main before closing the AMD.

I know I have done this before I just can not remember

how.

I am just too tired.

Ted



___
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/stefan.klein%40buero-sde.de

This email sent to stefan.kl...@buero-sde.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/chill%40global-village.net

This email sent to ch...@global-village.net
 ___
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