Re: Setting: er.extensions.ERXDatabaseContextDelegate.tolerantEntityPattern Property

2021-09-13 Thread Johann Werner via Webobjects-dev
Hi Kwasi,

your value of that property is wrong. The description of it says it should be a 
regular expression. So for your example the property should be:

er.extensions.ERXDatabaseContextDelegate.tolerantEntityPattern=^ER(Database)?Attachment$

jw


> Am 14.09.2021 um 01:11 schrieb Kwasi O-Ahoofe via Webobjects-dev 
> :
> 
> Hello:
> Please, help
> 
> I’m trying to override this EXCEPTION:
> 
> My reference:
> [  << class ERXDatabaseContextDelegate  [code]>>
>/*
>public boolean databaseContextFailedToFetchObject(EODatabaseContext 
> context, Object object, EOGlobalID gid)
>*/
>
>   This is Kelly Hawks' fix for the missing to one relationship. 
>   Delegate on EODatabaseContext that gets called when a to-one fault 
> cannot find its data in
>   the database. The object that is returned is a cleared fault.
>   We raise here to restore the functionality that existed prior to 
> WebObjects 4.5.
>   Whenever a fault fails for a globalID (i.e. the object is NOT found in 
> the database), we raise
>   an {@link com.webobjects.eoaccess.EOObjectNotAvailableException 
> EOObjectNotAvailableException}. 
>   If you have entities you don't really care about, you can set the 
> system property
>   
> er.extensions.ERXDatabaseContextDelegate.tolerantEntityPattern 
> to a regular expression
>   that will be tested against the GID entity name. If it matches, then 
> only an error will be logged
>   but no exception will be thrown.
>  
> ]
> 
> 
> IllegalStateException: The object with globalID 
> _EOIntegralKeyGlobalID[ERAttachment (java.lang.Integer)3716] could not be 
> found in the database. This could be result of a referential integrity 
> problem with the database. An empty fault could not be created because the 
> object's class could not be determined (e.g. the GID is temporary or it is 
> for an abstract entity).
> 
> .
> .
> .
> 
>   at 
> com.webobjects.eoaccess.EODatabaseContext._fetchSingleObject(EODatabaseContext.java:3426)
>  ... skipped 2 stack elements
>   at 
> com.webobjects.eoaccess.EOAccessDeferredFaultHandler.createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:49)
> 
> 
> 
> 
> Is this the correct entry for above property in the Properties resource file?:
> 
> er.extensions.ERXDatabaseContextDelegate.tolerantEntityPattern=("ERAttachment",
>  "ERDatabaseAttachment”)
> 
> It is NOT working ..
> 
> Thanks
> 
> Kwasi

 ___
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: How often do you bounce your apps?

2020-08-08 Thread Johann Werner via Webobjects-dev
Hi Aaron,

as you mentioned WODynamicElements and documentation about them is very sparse 
as well being a special beast, let me say some words about them:

WOComponent components being the easiest to grasp (and probably most used) 
represent a WO tag within your HTML templates i.e. every time a page is 
generated for the client its template will be parsed, for every WO tag an 
instance of the WOComponent will be created, bindings will be synchronized, the 
output generated, and finally—as you stated when that page drops out of the 
backtrack cache—gc’ed. This will happen every time that page is called. If you 
never requested that page or if it is not present in the backtrack cache 
anymore, no instance (read memory) will be present. But that means if you do 
request that page WO has first to create a lot of objects which has on the one 
hand a performance penalty and on the other hand can lead to memory peaks as 
for every request a full instance tree has to be generated. This is especially 
important if you are running a high traffic site.

On the contrary WODynamicElements are special components which are meant to 
optimize that use case. Instead of WO creating an instance for every occurence 
during output generation, dynamic elements are used as a sort of output 
factory. So first time WO encounters a dynamic element it will be created once 
(some simplification applied of course ;-) and used for every page where it 
appears in the template. This instance is then cached, waiting to be reused. By 
this you will have way less instances (did I say way less?) resulting in less 
memory consumption and less performance overhead as you don’t need to create 
lots of Java objects.

So from this perspective your application will have a slightly higher minimum 
memory consumption as you will keep one instance per dynamic element around but 
have less memory peaks as well serving your pages faster.

One implication of this is that you must not—read you will get into real big 
trouble—use internal state / instance variables within a dynamic component. 
That kind of component has to be thread safe because WO will reuse the same 
object again and again for every component using it. Different users requesting 
pages with that component in it means concurrent usage of the dynamic 
component. So if you use instance variables: BOOOM, probably even without you 
noticing anything but producing wrong output. If you used them for access 
checks, that is a dangerous game… To circumvent that you already mentioned 
WOAssociations, those will get/set values you need within your current RR-loop 
and prevent a mix-match.

TLDR: use WODynamicElements to optimize your application but know what you are 
doing ;-) besides that those kind of components give you many more features you 
cannot achieve with normal components. But that is another story.

And back to the original question: I do not bounce apps either, had even an 
application that ran without problems > 2 years in one go.

Johann


> Am 08.08.2020 um 04:27 schrieb Aaron Rosenzweig via Webobjects-dev 
> :
> 
> Thanks everyone,
> 
> It seems like a pretty even split between those who cycle daily and those who 
> don’t. 
> 
> Perhaps it depends on the app and what minor leaks it might have tend to skew 
> people to cycling daily… or maybe they are old farts, like me, who still 
> remember the Objective-C days. It was a bit easier to leak then. 
> 
> I debugged something this week that was new to me, in this realm, so I 
> thought I’d share. 
> 
> 1. WODynamicElement
> 
> It appears that WODynamicElements, or anything that “is a,” don’t fall out of 
> memory. Looks like an instance is created for every WOComponent class it is 
> used in and never goes away for the life of the app. As users visit pages in 
> a large app it creates a lot of WODynamicElements. These are things like 
> WOString and WOConditional. We had our own child of WOConditional that did 
> some processing based on user access permissions. Internally it was saving 
> state including making its own sandboxed EOEditingContext. Because of this, 
> that EC had legs and filled up quite a bit of memory in the app. I rewrote 
> this WODynamicElement to not have any instance variables with the only 
> exception being WOAssociations. 
> 
> WOComponents do fall out of memory when they fall out of the backtrack cache, 
> WODynamicElements do not. Their are strange beasts who don’t have a 
> “parent()” and don’t have a “context()” — It’s as if WO decides to cache them 
> in memory for future use if they’ve ever been used on a page. Kind of like 
> when you do “Integer.valueOf(10)” Java gives you the same instance of ten 
> whereas “new Integer(10)” makes a new place in memory for another ten. 
> Because ten is always ten, you might argue it’s better to use valueOf and get 
> the same object to possibly save time. Others would argue to not do that so 
> you can reclaim more. Perhaps a sucky analogy but it helped me 

Re: Postgress double connections

2020-04-25 Thread Johann Werner via Webobjects-dev
Hi Michael,

as far as I remember that is the adapter creating an additional connection to 
retrieve the list of available data types that (often?) is not closed due to a 
bug. You can alter your connection string by adding the param 
useBundledJdbcInfo:

dbConnectURLGLOBAL=jdbc:postgresql://your-db-server:5432/your-db-name?useBundledJdbcInfo=true

By this it uses a local copy of the info and skips the retrieval from DB. As 
the set of available DB data types is quite constant that should be fully 
sufficient for 99% of use cases.

jw


> Am 25.04.2020 um 16:39 schrieb Michael Kondratov via Webobjects-dev 
> :
> 
> Hi!
> 
>   One of my webobjects applications creates two connections to Postgress 
> database after start up instead of one. Any ideas why it may be happening?
> 
> 
> 
> Michael


 ___
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: Null / @NotNull Annotations

2019-12-11 Thread Johann Werner via Webobjects-dev
Hi Michael,

you could create your own EOGenerator templates to include that annotation. The 
templates can be found within WOLips sources 
https://github.com/wocommunity/wolips/tree/master/wolips/core/plugins/org.objectstyle.wolips.eogenerator.core/templates
 
.
 Put modified copies into your project and configure your eogen file to use 
your custom templates.

jw


> Am 11.12.2019 um 12:32 schrieb Michael Kondratov via Webobjects-dev 
> :
> 
> Hello!
>   Has anyone been able to add / use @NotNull annotations in EOGenerated 
> classes? Whats the best way to do it?
> 
> 
> Michael


 ___
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: Load Balancing and Caching

2019-04-20 Thread Johann Werner
Hi Jérémy,

you could achieve that by Wonder means with ERJGroupsSynchronizer that has a 
postRemoteNotification method. If you receive that notification you would then 
clear your Map objects.

jw


> Am 18.04.2019 um 08:35 schrieb Jérémy DE ROYER :
> 
> Hi all,
> 
> After the presentation of Dennis, I was digging the use of load balancing and 
> was wondering how (or is) the cache inside the Application class (that 
> extends WOApplication) synchronized.
> 
> Indeed we use Map(s) (more exactly ConcurrentHashMap) to cache some stuffs 
> inside the app and reduce the needs of fetch or DeXMLization on objects that 
> are (quite) never updated.
> 
> As soon as they are updated, we send a reset to the Map and the next time a 
> session ask the map, it does a fetch or DeXMLization before caching it.
> 
> That works quite well and we reduce drastically the use of cpu (both app and 
> database).
> 
> But… if we use load balancing, we will have as many Application instances as 
> WebObjects instances so :
> 
> a) does the wonder of WebObjects has a beautyfull method to synchronize 
> Map(s) ?
> 
> b) how can we propagate the reset to all the Application
> 
> Thank’s for any lighting on this point.
> 
> Jérémy
> 
> P.S. :
> * please don’t tell me it only works with NSDictionary ;-)


 ___
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 apache Commons Lang

2019-03-27 Thread Johann Werner
Hi Samuel,

as it is a direct dependency of json-lib-2.4-jdk15.jar used by ERRest it would 
probably be the best to add it to ERRest instead of Wonder-wide ERJars. Usage 
of commons-lang3 instead of the old commons-lang should be encouraged.

jw


> Am 27.03.2019 um 00:02 schrieb Samuel Pelletier :
> 
> Hi,
> 
> The current Wonder ERRest fail to produce json data with a 
> NoClassDefFoundError: 
> org/apache/commons/lang/exception/NestableRuntimeException referenced by 
> JsonConfig, an old json library.
> 
> I suspect this problem is limited to ant users like me.
> 
> This class was part of common-lang.jar which was replaced in ERJar by 
> common-lang3.jar. Common-lang changed the package to allows both major 
> version to work together.
> 
> I re-added the commons-lang-2.6.jar into my ERJar to make ERRest works again 
> successfully. Is there any downside to push this into the official Wonder ? 
> The jar could also be added into ERRest directly.
> 
> Samuel


 ___
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: ERProfiling and Java 8

2019-03-01 Thread Johann Werner
Hi Paul,

has been some time I used ERProfiling to hunt down bottlenecks. I just fired up 
one project with it and it seems to work well. Only the activated heat map 
seems to break some layout and marker elements show up that I can’t remember of 
having seen in the past.

But this is with Java 8 + Ant + Eclipse 2018-12 so no Maven.

jw


> Am 02.03.2019 um 02:44 schrieb Paul Hoadley :
> 
> On 1 Mar 2019, at 3:31 pm, Paul Hoadley  > wrote:
> 
>> Before I go digging too deeply, can anyone confirm that they're using 
>> ERProfiler with Java 8 + Maven + Eclipse 2018-12, or any similar combo?
> 
> Anyone still using ERProfiling? Johann? Anyone?
> 
> 
> -- 
> Paul Hoadley
> https://logicsquad.net/ 
> https://www.linkedin.com/company/logic-squad/ 
> 

 ___
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: WebObjects and prototype.js

2019-01-20 Thread Johann Werner



> Am 19.01.2019 um 20:46 schrieb Michael Schmiedgen :
> 
> Hi Mark,
> 
>> if upgrading will conflict with Wonder and WebObjects. Has anyone used
>> prototype.js 1.7.3 along side with Wonder and WebObjects? Thank you and
> 
> We are using 1.7.3 for years with no known problems.

Where is a pull request? :-)

> 
> Michael

 ___
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: WebObjects and prototype.js

2019-01-18 Thread Johann Werner
Hi Mark,

the current Wonder uses version 1.7.2 of prototypejs. I am not sure but I think 
updating to 1.7.3 revealed some problems with parts of Wonder javascript code 
but this has been long ago so I can’t remember what these problems were. You 
could first try if 1.7.2 already resolves your issue and if it doesn't just 
replace the prototype file in the Ajax framework with 1.7.3 to check if it is 
usable.

If you are doing the latter be aware that if you are using the Wonder sources 
that the minified javascript file is used so after replacing prototype you have 
to manually create the minified version. To do that go into the Ajax framework 
and run the script in Support/compress.sh.

jw


> Am 18.01.2019 um 17:26 schrieb Mark Nguyen :
> 
> Hello everyone! 
> 
> We're currently using prototype.js version 1.7.1 along side with Wonder and 
> WebObjects and everything is working just fine. However, we're using a script 
> provided by a 3rd party company that imbeds an iframe on our website. We've 
> done various tests and it seems that prototype.js version 1.7.1 is 
> conflicting with the code in the 3rd party script. Upgrading prototype.js to 
> version 1.7.3 seems to resolve the issue, but we're unsure if upgrading will 
> conflict with Wonder and WebObjects. Has anyone used prototype.js 1.7.3 along 
> side with Wonder and WebObjects? Thank you and have a great day!
> 
> Regards,
> 
> Mark
> 
> 
> ___
> 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/johann.werner%40posteo.de
> 
> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: To-one relationship with propagating primary key

2019-01-13 Thread Johann Werner


> Am 13.01.2019 um 18:37 schrieb Ricardo Parada :
> 
> When I create A will it have a B set in the to-one?

I think so. It is a lng time ago I used key propagation though.

> 
> Ricardo
> 
>> On Jan 13, 2019, at 12:35 PM, Johann Werner  wrote:
>> 
>> Hi Ricardo,
>> 
>> don’t fight the system ;-)
>> 
>> When you have your to-one relationship A -> B with key propagation just 
>> create an instance of A and you automatically have a B in place when you 
>> check the relationship A.toB(). You just have to (re)use the present B 
>> instead of creating and connecting your own B.
>> 
>> jw
>> 
>> 
>>> Am 13.01.2019 um 13:07 schrieb Ricardo Parada :
>>> 
>>> Hi Johann,
>>> 
>>> My workaround is to model the relationship as a to-many propagating the 
>>> primary key.   It’s less elegant but at least it works. 
>>> 
>>> Thanks 
>>> Ricardo
>>> 
>>>> On Jan 13, 2019, at 7:02 AM, Johann Werner  wrote:
>>>> 
>>>> Hi Ricardo,
>>>> 
>>>> when using pk propagation I vaguely remember that EOF is automatically 
>>>> creating an instance of the dependent entity. Thus when you create a 
>>>> second object B and set the relationship to A the auto created object is 
>>>> left without connection.
>>>> 
>>>> jw
>>>> 
>>>>> Am 13.01.2019 um 12:44 schrieb Ricardo Parada :
>>>>> 
>>>>> Hi all,
>>>>> 
>>>>> I have an entity A with a to-one relationship to entity B. 
>>>>> 
>>>>> The relationship is setup in eomodeler to propagate it’s primary key from 
>>>>> A to B. 
>>>>> 
>>>>> I then create A and B, insert into editing context and set the to-one 
>>>>> relationship in A to point to B. When I save changes EOF is trying to 
>>>>> insert TWO instances of B. The second instance of B has NULL in all its 
>>>>> properties:
>>>>> 
>>>>> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (?, ?)" 
>>>>> withBindings: 1:20462(customerID), 2:"test"(name)>
>>>>> 
>>>>> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (NULL, NULL)
>>>>> 
>>>>> 
>>>>> Is this a know bug? I am using a very old version of Wonder. 
>>>>> 
>>>>> The relationship is also set up to own the destination and Cascade on 
>>>>> Delete. 
>>>>> 
>>>>> Thanks in advance for any help. 
>>>>> 
>>>>> Ricardo
>>>>> ___
>>>>> 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/johann.werner%40posteo.de
>>>>> 
>>>>> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: To-one relationship with propagating primary key

2019-01-13 Thread Johann Werner
Hi Ricardo,

don’t fight the system ;-)

When you have your to-one relationship A -> B with key propagation just create 
an instance of A and you automatically have a B in place when you check the 
relationship A.toB(). You just have to (re)use the present B instead of 
creating and connecting your own B.

jw


> Am 13.01.2019 um 13:07 schrieb Ricardo Parada :
> 
> Hi Johann,
> 
> My workaround is to model the relationship as a to-many propagating the 
> primary key.   It’s less elegant but at least it works. 
> 
> Thanks 
> Ricardo
> 
>> On Jan 13, 2019, at 7:02 AM, Johann Werner  wrote:
>> 
>> Hi Ricardo,
>> 
>> when using pk propagation I vaguely remember that EOF is automatically 
>> creating an instance of the dependent entity. Thus when you create a second 
>> object B and set the relationship to A the auto created object is left 
>> without connection.
>> 
>> jw
>> 
>>> Am 13.01.2019 um 12:44 schrieb Ricardo Parada :
>>> 
>>> Hi all,
>>> 
>>> I have an entity A with a to-one relationship to entity B. 
>>> 
>>> The relationship is setup in eomodeler to propagate it’s primary key from A 
>>> to B. 
>>> 
>>> I then create A and B, insert into editing context and set the to-one 
>>> relationship in A to point to B. When I save changes EOF is trying to 
>>> insert TWO instances of B. The second instance of B has NULL in all its 
>>> properties:
>>> 
>>> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (?, ?)" withBindings: 
>>> 1:20462(customerID), 2:"test"(name)>
>>> 
>>> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (NULL, NULL)
>>> 
>>> 
>>> Is this a know bug? I am using a very old version of Wonder. 
>>> 
>>> The relationship is also set up to own the destination and Cascade on 
>>> Delete. 
>>> 
>>> Thanks in advance for any help. 
>>> 
>>> Ricardo
>>> ___
>>> 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/johann.werner%40posteo.de
>>> 
>>> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: To-one relationship with propagating primary key

2019-01-13 Thread Johann Werner
Hi Ricardo,

when using pk propagation I vaguely remember that EOF is automatically creating 
an instance of the dependent entity. Thus when you create a second object B and 
set the relationship to A the auto created object is left without connection.

jw

> Am 13.01.2019 um 12:44 schrieb Ricardo Parada :
> 
> Hi all,
> 
> I have an entity A with a to-one relationship to entity B. 
> 
> The relationship is setup in eomodeler to propagate it’s primary key from A 
> to B. 
> 
> I then create A and B, insert into editing context and set the to-one 
> relationship in A to point to B. When I save changes EOF is trying to insert 
> TWO instances of B. The second instance of B has NULL in all its properties:
> 
> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (?, ?)" withBindings: 
> 1:20462(customerID), 2:"test"(name)>
> 
> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (NULL, NULL)
> 
> 
> Is this a know bug? I am using a very old version of Wonder. 
> 
> The relationship is also set up to own the destination and Cascade on Delete. 
> 
> Thanks in advance for any help. 
> 
> Ricardo
> ___
> 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/johann.werner%40posteo.de
> 
> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: EOEnterpriseObjectClazz with interface

2018-11-20 Thread Johann Werner
Hi Mark,

I think you have to tell us what exactly you want to achieve? Do you have an 
example?

With the EOEnterpriseObjectClazz you have a static instance within your class 
but this instance is… an instance so you could put an „implements interface“ on 
it. Or if you just want to know if class A has a static clazz object you could 
create some empty interface (IHasClazzObject) as marker.

jw


> Am 19.11.2018 um 22:12 schrieb Morris, Mark :
> 
> Hallo Johann,
>  
> Thanks for the info. I do see how I could create a default implementation of 
> the “static” method I’m expecting in our local EO superclass’s util inner 
> class, and from then on know that it will be legal to call it from any of our 
> subclasses. So that could work in this case.
>  
> In general though I still don’t see how, or if it’s even possible, to do what 
> I was originally trying with the interface. For instance methods, I can just 
> test “myClass instanceof myInterface” and know whether that class implements 
> the methods. In ObjC, I could do the same with a protocol, but with instance 
> and class methods. It seems like the description of the clazz paradigm is 
> saying it makes that possible, but I’m just not understanding how that works.
>  
> Thanks again. Tschüß!
> Mark
>  
> From: Johann Werner 
> Date: Monday, November 19, 2018 at 1:37 AM
> To: "Morris, Mark" 
> Cc: "Webobjects-dev@lists.apple.com" 
> Subject: Re: EOEnterpriseObjectClazz with interface
>  
> Hi Mark,
>  
> have a look at BugTracker and its dependent framework BTBusinessLogic. That 
> should you give some ideas. There are some more apps/frameworks in Wonder 
> using that pattern, just have a look at the type hierarchy of the 
> EOEnterpriseObjectClazz class (in Eclipse right click on the class name and 
> select „Open Type Hierarchy“ from the context menu).
>  
> jw
>  
>  
> Am 19.11.2018 um 06:31 schrieb Morris, Mark  <mailto:mark.mor...@experian.com>>:
>  
> Hi all,
>  
> I ran into a simple case where a good old ObjC protocol would have worked 
> fine, but Java provides only frustration. 
>  
> I wanted to require that a class that decides to implement a particular 
> interface should as part of that interface implement a certain static method. 
> No go in Java.
>  
> The implementing classes will always be subclasses of ERXGenericRecord, and a 
> little searching uncovered the promising EOEnterpriseObjectsClazz approach. 
> Right at the top it says:
>  
> In Java, static methods are similar to class methods in Objective-C, but one 
> cannot use static methods in interfaces and static methods cannot be 
> overridden by a subclass. Using the clazz pattern removes those limitations.
>  
> However, I didn’t see any examples of this use, and spent a little time but 
> couldn’t figure it out. Are there any examples out there?
>  
> Thanks!
> Mark

 ___
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: EOEnterpriseObjectClazz with interface

2018-11-18 Thread Johann Werner
Hi Mark,

have a look at BugTracker and its dependent framework BTBusinessLogic. That 
should you give some ideas. There are some more apps/frameworks in Wonder using 
that pattern, just have a look at the type hierarchy of the 
EOEnterpriseObjectClazz class (in Eclipse right click on the class name and 
select „Open Type Hierarchy“ from the context menu).

jw


> Am 19.11.2018 um 06:31 schrieb Morris, Mark :
> 
> Hi all,
>  
> I ran into a simple case where a good old ObjC protocol would have worked 
> fine, but Java provides only frustration. 
>  
> I wanted to require that a class that decides to implement a particular 
> interface should as part of that interface implement a certain static method. 
> No go in Java.
>  
> The implementing classes will always be subclasses of ERXGenericRecord, and a 
> little searching uncovered the promising EOEnterpriseObjectsClazz approach. 
> Right at the top it says:
>  
> In Java, static methods are similar to class methods in Objective-C, but one 
> cannot use static methods in interfaces and static methods cannot be 
> overridden by a subclass. Using the clazz pattern removes those limitations.
>  
> However, I didn’t see any examples of this use, and spent a little time but 
> couldn’t figure it out. Are there any examples out there?
>  
> Thanks!
> Mark


 ___
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: Java compatibility

2018-10-01 Thread Johann Werner
The compatibilities are listed in the github Wiki: 
https://github.com/wocommunity/wonder/wiki

For Java 6 you would have to use Wonder 6 as Wonder 7 uses a lot of libs that 
are not compatible with Java 6 anymore.

jw


> Am 01.10.2018 um 05:59 schrieb ocs@ocs :
> 
> Hi there,
> 
> is is possible that WOnder 7 is not compatible with Java 6? Whatever I try, I 
> can't find any description on the Web; what I am getting though is an error
> 
> ===
> Exception in thread "main" java.lang.UnsupportedClassVersionError: 
> er/extensions/appserver/ERXApplication : Unsupported major.minor version 52.0
> ===
> 
> on a client's server, where there is
> 
> ===
> 53 # java -version
> java version "1.6.0_65"
> Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-10M4609)
> Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
> 54 # 
> ===
> 
> On all my machines, where happen to be Javas 8-10, the application runs all 
> right.
> 
> Thanks for any insight,
> OC


 ___
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: Bug in NSArray et. al. ?

2018-05-14 Thread Johann Werner
Hi Markus,

aligning isEmpty to mimic count in KVC context is a logic step but I would 
advise against it as changing that behavior could silently break code of many 
projects.

A far better implementation could have been to route all KVC calls to the 
NSArray object itself and introduce something like @items if you want the KVC 
to evaluate on every contained item. At least that would be more expressive.

jm2c

jw


> Am 14.05.2018 um 10:54 schrieb Markus Ruggiero :
> 
> NSArray implements java.util.List
> This interface specifies the method boolean isEmpty() and NSArray correclty 
> implements it.
> 
> Unfortunately key-value-coding does not know about this. When using isEmpty 
> in a binding (eg. WOConditional) the key "isEmpty" is not trapped but passed 
> on to all the objects. 
> 
> isEmpty should be trapped in NSArray.java in the same way count() is handled.
> 
> What do you think? 
> 
> ---markus---

 ___
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: New JS stuff in Wonder 7 ?

2018-02-27 Thread Johann Werner
Hi Ken,

did you look at the release notes?

https://github.com/wocommunity/wonder/releases 


That should give you a rough overview of most changes.
Afterwards you can have a look at the migrations page if you need some 
assistance to bring your project to Wonder 7:

https://github.com/wocommunity/wonder/wiki/Migration-Guide-Wonder-6-to-7 


jw


> Am 27.02.2018 um 16:31 schrieb Ken Anderson :
> 
> All,
> 
> Looking through the files in WOnder 7 I see things like wondaculous-min js 
> and wonder (ha) what new stuff there is.  Is there a write-up anywhere?  
> Examples?
> 
> Thanks,
> Ken


 ___
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: EOGenerator problem

2018-02-11 Thread Johann Werner
Hi Jeff,

the (very) old EO templates used to use log4j for logging but this was replaced 
by slf4j in the current ones some time ago. Perhaps you have a lib problem 
there? Passing a null value to e.g. the debug method of slf4j should be no 
problem as it converts that to the string „null“ before constructing the 
logging message.

What version of Wonder do you use? ERJars includes the slf4j library. What is 
the stack trace of your NPE?

If you want to use the old templates instead and you followed the instructions 
on the wocommunity wiki, did you download the templates where the link is 
pointing to? If the answer is yes then you probably downloaded the (same) new 
templates instead of the old ones you wanted. You would have to switch to 
another branch like eclipse_3_8 first or go back in git history.

jw


> Am 30.01.2018 um 04:35 schrieb Jeff Schmitz :
> 
> Hello List,
>I recently updated to Eclipse Oxygen and somewhere in the process my 
> EOGenerator behavior has been changed.  Specifically, where it used to 
> generate “set” functions like this:
> 
> public void setMiscState1(Boolean value) {
> if (_Entry.LOG.isDebugEnabled()) {
>   _Entry.LOG.debug( "updating miscState1 from " + miscState1() + " to " + 
> value);
> }
> takeStoredValueForKey(value, _Entry.MISC_STATE1_KEY);
>   }
> 
> It’s now generating them like below, which causes a null pointer exception 
> when miscState1() happens to return null.
> 
>   public void setMiscState1(Boolean value) {
> log.debug( "updating miscState1 from {} to {}", miscState1(), value);
> takeStoredValueForKey(value, _Entry.MISC_STATE1_KEY);
>   }
> 
> Any idea how I can get back my old EOGenerator functionality?  I have tried 
> following the instructions here:  
> https://wiki.wocommunity.org/display/WOL/EOGenerator and I specified the 
> wondierEntity files in my EOGenerator preferences as suggested.
> 
> 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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Small issue when building Wonder7 javadoc -> ${wonder-version.version} not properly used

2017-11-30 Thread Johann Werner
Hi Markus,

seems that ant has problems either finding or opening and parsing the pom.xml 
file. I am no ant expert but after searching a while I see that the used Ant 
Task to parse Maven files is not maintained since 2014. Since Ant 1.7 there is 
a Task called XmlProperty that can be used as replacement. Please try to change 
in build-doc.xml the lines 13-14:




to




Does that fix the problem for you?

jw


> Am 28.11.2017 um 16:54 schrieb Markus Ruggiero <mailingli...@kataputt.com>:
> 
> Johann,
> that's exactly what I have done. Repeated the procedure right now. Here is 
> the result, Really weird.
> 
> ruggiero@gugus_$ ant -version
> Apache Ant(TM) version 1.9.2 compiled on July 8 2013
> ruggiero@gugus_$ ls
> Applications/ BUILD.txt Examples/ README.mkd
> Tools/build.properties@ components.html   d2wlist.html  dist/
> Archives/ Build/Frameworks/   Tests/
> Utilities/build.xml components.txtd2wlist.txt   
> pom.xml
> ruggiero@gugus_$ ant -projecthelp
> Buildfile: /Developer/SourceDistributions/WonderSource/build.xml
> 
> Main targets:
> 
> Other targets:
> 
>  all
>  applications
>  applications.install
>  archives.examples
>  archives.examples.install
>  archives.frameworks
>  archives.frameworks.install
>  build
>  clean
>  deployment.tools
>  dist
>  docs
>  docs-clean
>  examples
>  examples.install
>  frameworks
>  frameworks.install
>  plugins
>  tests
>  tests.run
>  usage
> Default target: usage
> ruggiero@gugus_$ grep -i version pom.xml
> 
> 4.0.0
> 7.1-SNAPSHOT
> 5.4.3
> 2.2.1
> 2.3.1
> [... SNIP...]
>   2.2.1
> 1.1.1
> false
> ruggiero@gugus_$ ant docs
> Buildfile: /Developer/SourceDistributions/WonderSource/build.xml
> 
> docs:
> 
> prepare:
> 
> build:
> 
> api:
>  [copy] Copying 2 files to 
> /Developer/SourceDistributions/WonderSource/dist/wonder
>   [javadoc] Generating Javadoc
>   [javadoc] Javadoc execution
> 
> [... SNIP...]
> 
> 
>   [javadoc] writing for key: er.directtoweb.excel
>   [javadoc] writing for key: er.directtoweb.pages
>   [javadoc] writing for key: er.directtoweb.pages.templates
>   [javadoc] writing for key: er.directtoweb.printerfriendly
>   [javadoc] writing for key: er.directtoweb.xml
>   [javadoc] writing for key: er.modern.directtoweb.components
>   [javadoc] writing for key: er.modern.look.pages
>   [javadoc] writing for key: er.mootools.directtoweb.components
>   [javadoc] writing for key: er.neutral
>   [javadoc] 32 warnings
>  [echo] d2wkeys javadoc page generation finished
> 
> BUILD SUCCESSFUL
> Total time: 1 minute 21 seconds
> ruggiero@gugus_$ 
> 
> 
> 
> 
> 
> 
>> On 28 Nov 2017, at 15:36, Johann Werner <johann.wer...@posteo.de> wrote:
>> 
>> Hi Markus,
>> 
>> how do you build the docs? Looking at the ant files this is how it is 
>> supposed to be done:
>> 
>> $ cd […]/Wonder
>> $ ant docs
>> 
>> The target „docs“ is defined within the build.xml in the root directory of 
>> Wonder. From there it points to the file Build/build/build-doc.xml and its 
>> target „api“.
>> 
>> The important bits of that build-doc.xml are the two lines (13 and 14):
>> 
>> 
>> 
>> 
>> The file pom.xml in the root directory of Wonder is read (actually a maven 
>> build file) and its value for version is copied into the ant variable 
>> „project.version“. In pom.xml you can find something like:
>> 
>> 7.1-SNAPSHOT
>> 
>> So the value should be populated automatically. Just tested it manually on 
>> my local machine and the correct version string showed up. Could it be that 
>> you are running the ant command from a different directory than Wonder’s 
>> root? That could result in ant not finding the referenced pom.xml file.
>> 
>> jw
>> 
>> 
>>> Am 28.11.2017 um 10:54 schrieb Markus Ruggiero <mailingli...@kataputt.com>:
>>> 
>>> Nobody? I clearly must miss something here and could use a bit of 
>>> handhelding.
>>> 
>>> 
>>>> On 24 Nov 2017, at 12:56, Markus Ruggiero <mailingli...@kataputt.com> 
>>>> wrote:
>>>> 
>>>> Building Wonder 7 with ant from terminal works perfectly. However building 
>>>> the docs seems not to properly translate ${wonder-version.version} into a 
>>>> nice version string but puts it literally into the html files.
>>>

Re: Small issue when building Wonder7 javadoc -> ${wonder-version.version} not properly used

2017-11-28 Thread Johann Werner
Hi Markus,

how do you build the docs? Looking at the ant files this is how it is supposed 
to be done:

$ cd […]/Wonder
$ ant docs

The target „docs“ is defined within the build.xml in the root directory of 
Wonder. From there it points to the file Build/build/build-doc.xml and its 
target „api“.

The important bits of that build-doc.xml are the two lines (13 and 14):




The file pom.xml in the root directory of Wonder is read (actually a maven 
build file) and its value for version is copied into the ant variable 
„project.version“. In pom.xml you can find something like:

7.1-SNAPSHOT

So the value should be populated automatically. Just tested it manually on my 
local machine and the correct version string showed up. Could it be that you 
are running the ant command from a different directory than Wonder’s root? That 
could result in ant not finding the referenced pom.xml file.

jw


> Am 28.11.2017 um 10:54 schrieb Markus Ruggiero :
> 
> Nobody? I clearly must miss something here and could use a bit of handhelding.
> 
> 
>> On 24 Nov 2017, at 12:56, Markus Ruggiero  wrote:
>> 
>> Building Wonder 7 with ant from terminal works perfectly. However building 
>> the docs seems not to properly translate ${wonder-version.version} into a 
>> nice version string but puts it literally into the html files.
>> 
>> Must be a small thing, but it's a bit annoying. Any idea where to look so I 
>> can fix this? The build process looks a bit convoluted (at least to me) and 
>> I am not (yet?) the real ant and maven guru.
>> 
>> Thanks
>> ---markus---
>> ___
>> 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/mailinglists%40kataputt.com
>> 
>> This email sent to mailingli...@kataputt.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: Google maps

2017-11-07 Thread Johann Werner
Hi Stavros,

have a look at CCGoogleMap. You will find it in framework ERCoolComponents.

jw


> Am 07.11.2017 um 16:23 schrieb Stavros Panidis :
> 
> Hi list,
> 
> I worked with AjaxGMap so far but after installing Wonder 7 I see that is 
> missing.
> 
> Is there another solution to work with Google maps? Any examples?
> 
> Many thanks in advance
> 
> Stavros Panidis

 ___
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


Wonder 7 is out!

2017-11-04 Thread Johann Werner
Hi everyone,

for a long time the next big Wonder iteration has been worked on and probably 
used or tested by many of us already. Today the waiting is over and Wonder 7.0 
has got its official status.

That release focuses on removal of deprecated elements, clean up of lot of 
things. But most important change is the move to Java 8. So be sure you meet 
this requirement during upgrade!

Head to https://github.com/wocommunity/wonder/releases/tag/wonder-7.0 to get 
the changelog to see a rough overview of all changes that await you. If you are 
thinking of migrating from Wonder 6 to 7 be sure to look into github wiki at 
https://github.com/wocommunity/wonder/wiki/Migration-Guide-Wonder-6-to-7 what 
you might adapt, exchange, or replace in your code and templates.

Thanks to all committers giving back what we all get out of Wonder: ideas, time 
savers, and solutions. Special thanks to Paul, Henrique, and Maik for their 
time and help getting this release out to all of us.

jw
 ___
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: Development on 1.8 vs Target system 1.7

2017-10-27 Thread Johann Werner
Hi André,

if you are using Wonder7 the prerequisite is Java 8. So if you are bound to an 
older Java version you would have to go with Wonder6.

jw


> Am 27.10.2017 um 17:56 schrieb André Rothe :
> 
> Hi,
> 
> I have a development environment, which runs on Java 1.8. But my target 
> environment runs on Java 1.7. Now I try to deploy my application but it fails 
> with:
> 
> java.lang.UnsupportedClassVersionError: com/webobjects/foundation/NSArray : 
> Unsupported major.minor version 52.0
> 
> It seems, that the frameworks, which are bundled with my application are 
> compiled with 1.8. I have tried some settings:
> 
> 1. On the project build.xml set source/target to 1.7 on the wocompile task
> 2. on Eclipse Ant Runtime preferences I have set the properties 
> ant.build.javac.source and ant.build.javac.target to 1.7
> 3. I have recreated the WonderSource with the same properties on the 
> commandline
> 
> Nothing will work, always I get the same error. What I can do?
> 
> Thanks a lot
> André
> ___
> 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/johann.werner%40posteo.de
> 
> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: ERXFileUtilities rendering file name's type extension unusable

2017-07-24 Thread Johann Werner
If the two dots are meant to prevent switching to a parent directory you could 
change the regex to something like

fileName.replaceAll("(/|^)\\.\\.(/|$)", "$1$2“);

So this would only match two dots if they entirely describe a directory name 
and would match e.g.

/var/../etc/foo
/abc/..
../foo

but not if it is included within a name.

jw


> Am 24.07.2017 um 10:44 schrieb Fabian Peters :
> 
> Hi Ralf,
> 
>> I think the separator search has to match the platform running the app (and 
>> you may better use then a File object), or be much stricter and search 
>> always for all separators. For example suppose you are running on a Unix and 
>> get the following path:
>> 
>> \/etc/passwd
>> 
>> Now your file name is /etc/passwd.
> 
> True, you certainly cannot use the output of this method to get a "secure" 
> filename. I think the intent of this method is just to get the client side 
> file name, which is why I'm surprised about the "tiny security check". I'd 
> vote for removing it…
> 
> cheers, Fabian
> 
>> Ralf
>> 
>> Am 21. Juli 2017 um 20:30:01, Fabian Peters (lists.fab...@e-lumo.com) 
>> schrieb:
>> 
>>> Hi all, 
>>> 
>>> This is a bit of a quiz question. The method pasted below replaces any two 
>>> dots ("..") in a file name with a single underscore ("_"). If the user 
>>> uploads a file named "Test..doc", it ends up as "Test_doc". Which is less 
>>> than ideal because often one wants to get some idea about the file type by 
>>> looking at the extension.  
>>> 
>>> Apparently Mike's (it's his code) intent was security-related. Can anyone 
>>> come up with a potential vulnerability beyond the case of a file named 
>>> ".."? (Which could theoretically lead to a file being written to the parent 
>>> directory of the destination, though I haven't been able to actually do 
>>> this.) 
>>> 
>>> cheers, Fabian 
>>> 
>>> /** 
>>> * Returns the file name portion of a browser submitted path. 
>>> *  
>>> * @param path the full path from the browser 
>>> * @return the file name portion 
>>> */ 
>>> public static String fileNameFromBrowserSubmittedPath(String path) { 
>>> String fileName = path; 
>>> if (path != null) { 
>>> // Windows 
>>> int separatorIndex = path.lastIndexOf("\\"); 
>>> // Unix 
>>> if (separatorIndex == -1) { 
>>> separatorIndex = path.lastIndexOf("/"); 
>>> } 
>>> // MacOS 9 
>>> if (separatorIndex == -1) { 
>>> separatorIndex = path.lastIndexOf(":"); 
>>> } 
>>> if (separatorIndex != -1) { 
>>> fileName = path.substring(separatorIndex + 1); 
>>> } 
>>> // ... A tiny security check here ... Just in case. 
>>> fileName = fileName.replaceAll("\\.\\.", "_"); 
>>> } 
>>> return fileName; 
>>> } 
>>> 
>>> ___ 
>>> 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/rasc%40gmx.de 
>>> 
>>> This email sent to r...@gmx.de 
>> -- 
>> Ralf Schuchardt
>> Sent with Airmail


 ___
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: uploading with ERAttachment ???

2017-06-14 Thread Johann Werner
Hi Ted,

you can easily serve the HTML file back to the client by creating a ERXResponse 
object and setting the content to the content of the file. The problem comes 
with the referenced images as your /clientFiles/attachments/e/f/e/4 directory 
is (probably) not within your webserver’s htdocs but only reachable by the 
application server. That means that the references to the images cannot be 
resolved by the webserver. If you look at WOImage you can see how WO is solving 
this by using a special request handler that returns the requested resource 
from the app.

You could parse the HTML file and try to replace every pseudo local URL with 
one that will deliver the specific resource via the resource manager of a 
direct action.

jw


> Am 12.06.2017 um 18:11 schrieb Theodore Petrosky :
> 
> I am uploading .zip files with ERAttachment. Everything is working fine. But 
> now I need to do more.
> 
> I figured out how to unzip the archive so I end up with:
> 
> /clientFiles/attachments/e/f/e/4.zip   the uploaded zip and
> /clientFiles/attachments/e/f/e/4 as a directory. Inside this directory I have 
> a couple of files.
> 
> index.html
> pict1.png
> pict2.png
> logo.png
> 
> Ok, so obviously this is a web page that lives at: 
> /clientFiles/attachments/e/f/e/4. If I navigate to the folder and double 
> click the index.html, I will get the page.
> 
> I need to process the attachment.filesystemPath() to get to the index.html. I 
> thought I could just parse the filesystempath() and read the file. That was 
> easy, but didn’t give me what I wanted.
> 
> What do I need to do to present the index.html as a webpage!
> 
> 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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Ant Build error

2017-06-06 Thread Johann Werner
Never saw this error before. What is on line 83 in your build.xml? Do you use a 
custom / old one or do you have the most recent from the Wonder templates?

jw


> Am 02.06.2017 um 16:49 schrieb ece :
> 
> Hello all
> 
> macOS:
> When I tried to build application from within eclipse I get the following 
> error message:(Context Menü on build.xml -> run as Ant task)
> Any idea what this could be?
> Message and relevant build.xml section s. below.
> 
> We have a Windows machine on a customers site having the same problem.
> 
> We have other machines (macOS Sierra) where everything works, all the machine 
> are slightly different making comparing very difficult.
> Any idea where to look?
> 
> 
> Eclipse Version: Neon.3 Release (4.6.3)
> WOLips: 46
> 
> 
> BUILD FAILED
> /Development/WOnder/Workspace/kastl-ws/immodata/build.xml:83: Use a resource 
> collection to copy directories.
> 
> 
> Here is the relevant section from the build.xml file
> 
>frameworksBaseURL="/WebObjects/${build.app.name}.woa/Frameworks" 
> destDir="${dest.dir}" customInfoPListContent="${customInfoPListContent}" 
> principalClass="${principalClass}" webXML="${webXML}" 
> webXML_CustomContent="${webXML_CustomContent}" 
> servletAdaptor="com.webobjects.jspservlet.WOServletAdaptor">
>   
>name="woproject/classes.include.patternset" />
>name="woproject/classes.exclude.patternset" />
>name="**/client/**/*.*"/>
>   
> 
>   
>name="woproject/wsresources.include.patternset" />
>name="woproject/wsresources.exclude.patternset" />
>   
> 
>   
>name="woproject/resources.include.patternset" />
>name="woproject/resources.exclude.patternset" />
>name="**/client/**/*.*"/>
>   
> 
>embed="${embed.ProjectLocal}" eclipse="true" />
>eclipse="true" />
>eclipse="true" />
>eclipse="true" />
>eclipse="true" />
>eclipse="true" />
> 
>   
>   
>   
>   
> 
> 

 ___
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: DirectActions only (local and private network)

2017-06-01 Thread Johann Werner
You can check for request().remoteHostAddress() in your direct action and 
return a 403 code if it does not match 127.0.0.1 or a given set of IP adresses.


> Am 01.06.2017 um 11:03 schrieb ece :
> 
> We have a publicly reachable app with some direct actions that are needed for 
> maintenance tasks. These direct actions are triggered by cron jobs using 
> curl. We want to make sure that such direct actions cannot be used from 
> outside of our local network. At the moment anybody who knows the URL could 
> trigger such an action from anywhere in the world.
> 
>> On 1 Jun 2017, at 10:12, Paul Hoadley  wrote:
>> 
>> On 1 Jun 2017, at 5:28 pm, ece  wrote:
>> 
>>> I want some DirectActions (not all) run from the local machine or at least 
>>> the private network only.
>>> Someone knows a way to realize this?
>> 
>> Can you give us some more information? How are you currently set up? And 
>> tell us more about what you want to achieve.
>> 
>> 
>> -- 
>> Paul Hoadley
>> http://logicsquad.net/
>> https://www.linkedin.com/company/logic-squad/
>> 
>> 

 ___
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: java 8 date

2017-05-27 Thread Johann Werner


> Am 27.05.2017 um 10:01 schrieb Paul Hoadley :
> 
>> On 27 May 2017, at 4:21 pm, Theodore Petrosky  wrote:
>> 
>> If I select JavaLocalDate as the prototype then when I bring in a edit page 
>> with this propertyKey it shows only as a String in a ERD2WDisplayString 
>> component. I tried to create a rule to use the ERDEditDatePopup component, 
>> but then there is an error; java.time.LocalDate cannot be cast to 
>> com.webobjects.foundation.NSTimestamp.
>> 
>> Am I missing something? There appear to be many advantages to use the Java 
>> Local Date instead of NSTimestamp but maybe it is just too new.
> 
> Everything in D2W and Wonder’s D2W extensions will pre-date Java 8, so you’re 
> basically on your own. Off the top of my head, I don’t know the solution. If 
> there is one it likely involves pointing something at the appropriate 
> formatter, though even then you might be out of luck because Java 8 date 
> formatters don’t extend java.text.Format.

You will have to use ERXDateTimeFormatter and its subclasses for that.

jw 

> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/
> https://www.linkedin.com/company/logic-squad/
> 
> 
> 
> ___
> 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/johann.werner%40posteo.de
> 
> This email sent to johann.wer...@posteo.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERJasperReports.Framework needs to be Updated

2017-05-09 Thread Johann Werner
The complete source code (with some exceptions) can be found at 
https://github.com/wocommunity/wonder/


> Am 09.05.2017 um 09:04 schrieb Kwasi O-Ahoofe :
> 
> Where can I find the source for ERJasperReports.Framework  to update to 
> latest version [ver. 6.3.1] of JasperReports? The current framework is based 
> on ver 4.7.0 and can’t handle the latest version 6.3.1 generated report 
> templates.
> 
> Thanks


 ___
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: Compiling ERExtensions in Sierra no worky

2017-05-08 Thread Johann Werner

> Am 08.05.2017 um 14:30 schrieb Calven Eggert <cal...@mac.com>:
> 
> Hmmm, do you mean ERExtensions? I don’t have ERXExtensions in my build path.

yes

> 
> 
>> On May 8, 2017, at 8:24 AM, Johann Werner <johann.wer...@posteo.de> wrote:
>> 
>> The reported constructor method signature
>> 
>> (String, String, String, String, int, boolean, boolean)
>> 
>> does only exist in Wonder’s variant of WOCookie and not in the original 
>> WOCookie class. Thus you probably have some sort of class ordering problem 
>> in your project. Check if ERXExtensions comes before JavaWebObjects.
>> 
>> jw
>> 
>> 
>>> Am 08.05.2017 um 14:15 schrieb Calven Eggert <cal...@mac.com>:
>>> 
>>> 
>>> I changed the woolies.properties to new point to the woolies.543.properties 
>>> and now it works.  Thanks for that hint.  I suppose with the changes we 
>>> discussed earlier in getting this setup it messed this up. 
>>> 
>>> However, I’m still having problems with one of my apps where I try to run 
>>> it from eclipse and I get this error (which I thought was going to be 
>>> corrected once that compile was working but no):
>>> 
>>> java.lang.NoSuchMethodError: 
>>> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>>> com.webobjects.foundation.NSForwardException [java.lang.NoSuchMethodError] 
>>> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V:java.lang.NoSuchMethodError:
>>>  
>>> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>>> at 
>>> com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:39)
>>> at 
>>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
>>> at 
>>> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>>> at 
>>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>>> at 
>>> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
>>> at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:370)
>>> at 
>>> com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445)
>>> at 
>>> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>>> at 
>>> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2092)
>>> at 
>>> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2057)
>>> at COREApplication.dispatchRequest(COREApplication.java:461)
>>> at 
>>> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>>> at 
>>> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.lang.NoSuchMethodError: 
>>> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>>> at 
>>> er.extensions.appserver.ERXApplication.addBalancerRouteCookie(ERXApplication.java:2853)
>>> at 
>>> er.extensions.appserver.ERXApplication.addBalancerRouteCookieByNotification(ERXApplication.java:2836)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:498)
>>> at 
>>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>>> ... 12 more
>>> 
>>> 
>>> It works if I run the app from the terminal.  What am I missing here?
>>> 
>>> 
>>> 
>>>> On May 8, 2017, at 7:52 AM, Theodore Petrosky <tedp...@yahoo.com> wrote:
>>>> 
>>>> I think you are going to find that your Apple WebObjects files are hurt. 
>>>> Of course you will not be able to use the apple WebObjects.mpkg will not 
>>>> install WO. You will need to use the WOInstal

Re: Compiling ERExtensions in Sierra no worky

2017-05-08 Thread Johann Werner
The reported constructor method signature

(String, String, String, String, int, boolean, boolean)

does only exist in Wonder’s variant of WOCookie and not in the original 
WOCookie class. Thus you probably have some sort of class ordering problem in 
your project. Check if ERXExtensions comes before JavaWebObjects.

jw


> Am 08.05.2017 um 14:15 schrieb Calven Eggert :
> 
> 
> I changed the woolies.properties to new point to the woolies.543.properties 
> and now it works.  Thanks for that hint.  I suppose with the changes we 
> discussed earlier in getting this setup it messed this up. 
> 
> However, I’m still having problems with one of my apps where I try to run it 
> from eclipse and I get this error (which I thought was going to be corrected 
> once that compile was working but no):
> 
> java.lang.NoSuchMethodError: 
> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
> com.webobjects.foundation.NSForwardException [java.lang.NoSuchMethodError] 
> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V:java.lang.NoSuchMethodError:
>  
> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>   at 
> com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:39)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
>   at 
> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>   at 
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>   at 
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
>   at 
> com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:370)
>   at 
> com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445)
>   at 
> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>   at 
> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2092)
>   at 
> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2057)
>   at COREApplication.dispatchRequest(COREApplication.java:461)
>   at 
> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>   at 
> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NoSuchMethodError: 
> com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>   at 
> er.extensions.appserver.ERXApplication.addBalancerRouteCookie(ERXApplication.java:2853)
>   at 
> er.extensions.appserver.ERXApplication.addBalancerRouteCookieByNotification(ERXApplication.java:2836)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
>   ... 12 more
> 
> 
> It works if I run the app from the terminal.  What am I missing here?
> 
> 
> 
>> On May 8, 2017, at 7:52 AM, Theodore Petrosky  wrote:
>> 
>> I think you are going to find that your Apple WebObjects files are hurt. Of 
>> course you will not be able to use the apple WebObjects.mpkg will not 
>> install WO. You will need to use the WOInstaller.jar.
>> 
>> What do you have in your wobuild.properties (~/Library), and what about 
>> ~/Library/Application\ Support/WOLips/wolips.properties
>> 
>> I spun my wheels for hours to get this to work again in Sierra.
>> 
>> 
>>> On May 8, 2017, at 7:41 AM, Calven Eggert  wrote:
>>> 
>>> I get the same error for this source.
>>> 
>>> 
 On May 7, 2017, at 5:57 PM, Theodore Petrosky  wrote:
 
 So, you are trying to build ERExtensions only? What do you get when you do 
 an ‘ant frameworks’ at the top level of your repo?
 
 
> On May 7, 2017, at 4:23 PM, Calven Eggert  wrote:
> 
> I’ve been installing my dev environment on a new Mac in Sierra however, 
> I’m having problems with one of my applications.  When I build the Wonder 
> code I get an error with ERExtensions. See below.  I’ve downloaded the 
> file org.apache.commons.lang3 cause of the error message but I still get 
> the error.  I’m not sure where this new file should go but something 
> tells me this setup doesn’t feel quite right.  Anyone else 

Re: Is Wonder's javadoc down?

2017-05-02 Thread Johann Werner
Hi Maik,

finally I had a look at the Javadoc problem and I could identify the cause of 
the problem. In one of those package.html file theres was some Javascript code 
hidden—in this case as simple as javascript:void(0)—which made the Javadoc task 
to stop execution and thus did prevent creation of the missing html files we 
were searching for.

Besides some other little fixes I removed that Javascript and voila I am 
getting all files I had expected. I just pushed a commit on master, please 
check if it is correctly building the Javadoc files on the Jenkins server.

jw


> Am 06.04.2017 um 10:26 schrieb Musall, Maik <m...@selbstdenker.ag>:
> 
> Hey guys,
> 
> seems like no one is able to help. But now I tried generating the javadocs on 
> the console, and when I do "ant docs", I also end up with a directory 
> dist/wonder/Documentation/api that only contains com and er subdirectories, 
> but no index.html and stuff.
> 
> (I also had encoding errors to overcome because ant would see utf-8 sources 
> as ascii, fix is in https://github.com/maiksd/wonder/tree/docs-fixes.)
> 
> Now, if someone can help resolving this to a point that javadocs can be build 
> on the console from the current wonder repo, I might be able to take it from 
> there.
> 
> Maik
> 
> 
>> Am 28.03.2017 um 20:24 schrieb Musall, Maik <m...@selbstdenker.ag>:
>> 
>> Hi Johann,
>> 
>> here's the config.xml from the Wonder7 job. It's basically the same as on 
>> the old Jenkins. (I hope this attachment makes it through the mailing list 
>> server.)
>> 
>> Maik
>> 
> 
>> 
>> 
>> 
>>> Am 28.03.2017 um 15:07 schrieb Johann Werner <j...@oyosys.de>:
>>> 
>>> Hi Maik,
>>> 
>>> can you tell us what Jenkins config you did? Perhaps screenshots of the job 
>>> configuration page? You should not need any special plugins to create the 
>>> Javadocs, just the existing Wonder build.xml, ant and the correct job setup 
>>> ;-)
>>> 
>>> jw
>>> 
>>> 
>>>> Am 22.03.2017 um 01:16 schrieb Maik Musall <m...@selbstdenker.ag>:
>>>> 
>>>> Hi Paul,
>>>> 
>>>> I mainly copied the old config over, but the previous jenkins version was 
>>>> very old, and this one is now current. I don’t know if that could 
>>>> influence things. I tend to think it doesn’t. But perhaps I’m missing some 
>>>> plugin or something.
>>>> 
>>>> Maik
>>>> 
>>>>> Am 22.03.2017 um 00:50 schrieb Paul Hoadley <pa...@logicsquad.net>:
>>>>> 
>>>>> Hi Maik,
>>>>> 
>>>>> On 22 Mar 2017, at 01:40, Musall, Maik <m...@selbstdenker.ag> wrote:
>>>>> 
>>>>>> In regard to the javadoc, I mostly get the same result in jenkins as I 
>>>>>> get with a local cmdline build. I was hoping someone with better ant 
>>>>>> skills can take a look.
>>>>> 
>>>>> I’ve never tried to build the Javadocs from source, but it must be 
>>>>> doable. Maik, were you able to copy over the configuration from the old 
>>>>> Jenkins instance, or have you had to set this up from scratch? Pascal, do 
>>>>> you have a few minutes to take a look at some stage?
>>>>> 
>>>>> 
>>>>> --
>>>>> Paul Hoadley
>>>>> http://logicsquad.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:
>> https://lists.apple.com/mailman/options/webobjects-dev/maik%40selbstdenker.ag
>> 
>> This email sent to m...@selbstdenker.ag
 ___
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: Is Wonder's javadoc down?

2017-03-28 Thread Johann Werner
Hi Maik,

can you tell us what Jenkins config you did? Perhaps screenshots of the job 
configuration page? You should not need any special plugins to create the 
Javadocs, just the existing Wonder build.xml, ant and the correct job setup ;-)

jw


> Am 22.03.2017 um 01:16 schrieb Maik Musall :
> 
> Hi Paul,
> 
> I mainly copied the old config over, but the previous jenkins version was 
> very old, and this one is now current. I don’t know if that could influence 
> things. I tend to think it doesn’t. But perhaps I’m missing some plugin or 
> something.
> 
> Maik
> 
>> Am 22.03.2017 um 00:50 schrieb Paul Hoadley :
>> 
>> Hi Maik,
>> 
>> On 22 Mar 2017, at 01:40, Musall, Maik  wrote:
>> 
>>> In regard to the javadoc, I mostly get the same result in jenkins as I get 
>>> with a local cmdline build. I was hoping someone with better ant skills can 
>>> take a look.
>> 
>> I’ve never tried to build the Javadocs from source, but it must be doable. 
>> Maik, were you able to copy over the configuration from the old Jenkins 
>> instance, or have you had to set this up from scratch? Pascal, do you have a 
>> few minutes to take a look at some stage?
>> 
>> 
>> --
>> Paul Hoadley
>> http://logicsquad.net/
>> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: ERXWOConditional - where does it get installed?

2017-03-21 Thread Johann Werner
The essence is that a

1) WOComponent is created for every occurrence within a specific page template 
for each session

2) stateless WOComponent is created once for any number of occurrences within 
any page template, additional instances are created if a stateless component is 
currently used by a thread and requested by another one

3) WODynamicElement is created for every occurrence within a specific page 
template


That means that if you have one page where the template uses your component / 
element three times and you are serving 5 users you end up with

1) 3 × 5 = 15

2) 1 ≤ n ≤ 5

3) 3

instances of your component / element. For 1) and 2) you can be sure that 
during a RR-phase you won’t share an instance with multiple threads (unless you 
do some weird things like passing a component instance into a background thread 
or stuff like that). However in case 3) those instances are shared with any 
thread that requests them which can happen at any time during the RR-loop where 
WO does not mind for initialization or cleanup of local values (that is one 
point in making those components fast).

jw


> Am 21.03.2017 um 23:18 schrieb Ricardo Parada <rpar...@mac.com>:
> 
> Was that in a session-less app instance perhaps? I have not tested that 
> scenario.
> 
> In my test I do not see dynamic elements being shared across sessions, so I'm 
> not seeing exactly how is it that concurrency plays a role in the session app 
> scenario where the dynamic elements are not shared with the ones from other 
> sessions processing a request at the same time.
> 
> But again, there may be something else, a property or something that affects 
> this sharing that I may be missing.
> 
> Anyways, the consensus is that it is a bad idea, so I'll follow advise and 
> implement it as a WOComponent subclass instead.
> 
> Thank you all.
> 
> On Mar 21, 2017, at 5:34 PM, Chuck Hill <ch...@gevityinc.com> wrote:
> 
>> I’ve run into code that did this in the past.  It is very, very much not fun 
>> to debug.  You could stash the values in a ThreadLocal or in the 
>> context.userInfo().  But don’t ever add state to a WODynamicElement subclass.
>> 
>> Chuck
>> 
>> From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf 
>> of Johann Werner <j...@oyosys.com>
>> Date: Tuesday, March 21, 2017 at 2:19 PM
>> To: Ricardo Parada <rpar...@mac.com>
>> Cc: WebObjectsDev <webobjects-dev@lists.apple.com>
>> Subject: Re: ERXWOConditional - where does it get installed?
>> 
>> Hi Ricardo,
>> 
>> you are ignoring one very important aspect of dynamic components: they must 
>> be thread-safe!
>> 
>> As soon as you are holding local values you will head to a serious mess. In 
>> your „manual“ tests of course you probably won’t ever encounter concurrency 
>> problems as long as you are not doing sort of automated parallel tests where 
>> multiple request are processed concurrently. Just think about why WO uses 
>> constructs like WOAssociations in dynamic components which introduce an 
>> additional layer of complexity to exchange / access request dependent 
>> values. Surely not for the fun of it ;-)
>> 
>> Of course concurrency problems only show up infrequently and are often not 
>> reproducible. So depending on the number and activity of your app users you 
>> could have been just luckily to not run into any problems or—most likely—did 
>> not notice when you actually hit one of those situations.
>> 
>> jw
>> 
>> 
>> PS: If you have access to the recordings of WOWODC 2012 there is actually a 
>> talk on dynamic elements.
>> 
>> 
>> Am 21.03.2017 um 21:11 schrieb Ricardo Parada <rpar...@mac.com>:
>> Hi all,
>> I’m just reporting back on my findings on whether saving state between 
>> appendToResponse and a subsequent takeValuesFromRequest in a dynamic 
>> component is bad or not.
>> I read Chuck’s Practical WebObjects, p. 193 where it talks about Dynamic 
>> Elements.  As he pointed out there, dynamic elements are shared among all 
>> instances of a WOComponent subclass.  My MPVWOConditional is implemented as 
>> a dynamic element because it extends ERXWOConditional which then extends 
>> WODynamicGroup which then extends WODynamicElement.
>> To test this I created a Hello app with a single page, Main.wo.  I have 
>> three MPVWOConditionals in there.  An instance is created for each 
>> occurrence of my MPVWOConditional in Main.  A total of three to be exact.
>> I then have a link on Main that calls an action returning a new instance of 
>> the page Main:
>> public WOActionResults newPage() {
>>  

Re: ERXWOConditional - where does it get installed?

2017-03-21 Thread Johann Werner
Hi Ricardo,

you are ignoring one very important aspect of dynamic components: they must be 
thread-safe!

As soon as you are holding local values you will head to a serious mess. In 
your „manual“ tests of course you probably won’t ever encounter concurrency 
problems as long as you are not doing sort of automated parallel tests where 
multiple request are processed concurrently. Just think about why WO uses 
constructs like WOAssociations in dynamic components which introduce an 
additional layer of complexity to exchange / access request dependent values. 
Surely not for the fun of it ;-)

Of course concurrency problems only show up infrequently and are often not 
reproducible. So depending on the number and activity of your app users you 
could have been just luckily to not run into any problems or—most likely—did 
not notice when you actually hit one of those situations.

jw


PS: If you have access to the recordings of WOWODC 2012 there is actually a 
talk on dynamic elements.


> Am 21.03.2017 um 21:11 schrieb Ricardo Parada :
> 
> Hi all,
> 
> I’m just reporting back on my findings on whether saving state between 
> appendToResponse and a subsequent takeValuesFromRequest in a dynamic 
> component is bad or not.
> 
> I read Chuck’s Practical WebObjects, p. 193 where it talks about Dynamic 
> Elements.  As he pointed out there, dynamic elements are shared among all 
> instances of a WOComponent subclass.  My MPVWOConditional is implemented as a 
> dynamic element because it extends ERXWOConditional which then extends 
> WODynamicGroup which then extends WODynamicElement.
> 
> To test this I created a Hello app with a single page, Main.wo.  I have three 
> MPVWOConditionals in there.  An instance is created for each occurrence of my 
> MPVWOConditional in Main.  A total of three to be exact.
> 
> I then have a link on Main that calls an action returning a new instance of 
> the page Main:
> 
> public WOActionResults newPage() {
> return pageWithName(Main.class);
> }
> 
> Every time this newPage() action gets called I can confirm that the 
> constructor in Main gets called, which indicates that a new page is being 
> created every single time this action gets called.
> 
> However, the constructor of the MPVWOConditional is not getting called three 
> times as when the first/second time the page was created.  On the other hand, 
> the appendToResponse() of the MPVWOConditional keeps getting called three 
> times, once for every instance of MPVWOConditional in Main.  The hashCode() 
> of each of these three MPVWOConditional coincides with the ones that were 
> previously created.
> 
> To summarize, when new instances of the page are created, the 
> MPVWOConditionals are being reused on new instances of the page.
> 
> Fortunately, the dynamic components are not shared among page instances from 
> different sessions.  Which makes sense.  The sharing only applies among 
> instances within the same session.
> 
> I can see how some might object to storing this state in the dynamic 
> component.  It has worked like this all this time.  It’s the way it works.
> 
> However, I think it is okay to save this piece of state between an 
> appendToResponse and a subsequent takeValuesFromRequest because the 
> takeValuesFromRequest is being done on the same page that generated the 
> appendToResponse.
> 
> Furthermore, if a new page is created and the components are shared, their 
> appendToResponse will get called and this piece of state will be re-computed 
> and saved awaiting a subsequent takeValuesFromRequest.
> 
> Now, let’s assume that instead of submitting a form, a regular action is 
> called on the page.  Let’s suppose this action retrieves the previous page 
> from some sort of cache and returns that page.  Then that page’s 
> appendToResponse will get called and so will the appendToResponse of the  
> dynamic components being shared, which would recompute the condition and save 
> it awaiting a possible subsequent takeValuesFromRequest or invokeAction.  
> Again, this behavior just makes the appendToResponse consistent with the 
> invokeAction/takeValuesFromRequest phases.
> 
> Having this behavior has corrected problems for me.  It is yet to be 
> determined whether this will create a problem.  If I find out later that this 
> creates a problem I’ll be happy to report back to the group.
> 
> But so far, on my tests, it looks like it is okay.
> 
> Thanks for all the comments and feedback.
> 
> Ricardo
> 
> 
> 
>> On Mar 14, 2017, at 10:46 AM, Samuel Pelletier  wrote:
>> 
>> Ricardo,
>> 
>> This patch seem dangerous to first. I do not thing it is safe to have state 
>> in WODynamicElement. I think they can be reused by the framework.
>> 
>> The correct way is to make sure the condition does not change during RR loop 
>> cycle, same apply to WORepetition list for example.
>> 
>> Regards,
>> 
>> Samuel
>> 
>>> Le 14 mars 2017 à 09:53, Ricardo Parada  a 

Re: jenkins.wocommunity.org has moved

2017-03-03 Thread Johann Werner
Cool :-)

Thanks Maik!


> Am 03.03.2017 um 12:05 schrieb Musall, Maik :
> 
> All right, Jenkins is at a new location. I checked with WOLips 4.4 and 4.6 
> updating from Eclipse and it seems to work fine. Please contact me directly 
> if you see anything wrong.
> 
> Site is https only, by the way (http redirects).
> 
> Maik



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: EO awake ??

2016-09-12 Thread Johann Werner
Hi Ted,

the detail is in the word „owned“. For that there is an extra checkbox on the 
relationship panel in EOModeler. If you check that, the „owned“ Entity at the 
end of the relationship is automatically created by EOF and assigned to the 
owning Entity.

jw



> Am 12.09.2016 um 17:31 schrieb Theodore Petrosky <tedp...@yahoo.com>:
> 
> Chuck, could you expound a little here? I refer to “An owned, mandatory, 
> to-one will get created automatically by EOF”
> 
> Maybe I am not modeling this correctly. I am creating a person entity and a 
> security entity. then I create a relationship of person to-one security where 
> security can not be null. (optional is not selected)
> 
> In my D2W app, if I create a new person, the security entity relation is not 
> automatically created. I thought I had to create this in the EO’s init, or 
> awakeFromInsertion methods.
> 
> Am I supposed to do something more to the model to make this “automatic”?
> 
> Ted
> 
> 
> 
>> On Sep 6, 2016, at 2:14 PM, Chuck Hill <ch...@gevityinc.com> wrote:
>> 
>> Did you do the check for null after the call to super?
>> 
>> An owned, mandatory, to-one will get created automatically by EOF.  I am 
>> pretty sure that is what is happening and then you are creating and 
>> assigning a second one.
>> 
>> Chuck
>> 
>> 
>> From: <webobjects-dev-bounces+chill=gevityinc....@lists.apple.com> on behalf 
>> of Theodore Petrosky <tedp...@yahoo.com>
>> Date: Tuesday, September 6, 2016 at 10:08 AM
>> To: Johann Werner <j...@oyosys.com>
>> Cc: WebObjects-Dev <webobjects-dev@lists.apple.com>
>> Subject: Re: EO awake ??
>> 
>> I tried the first suggestion of wrapping the createSecurity in a check to 
>> see if it is null and I got the same result.
>> 
>> then I moved the createSecurity method call into the init method and I get 
>> the same issue. I could probably trick it by making the security entity not 
>> mandatory. but as the createSecurity is in the init call, the person will 
>> always get a security.
>> 
>> Ted
>> 
>> 
>> On Sep 6, 2016, at 12:44 PM, Johann Werner <j...@oyosys.de> wrote:
>> Hi Ted,
>> why not just check if there is already a value in your awakeFromInsertion?
>> public void awakeFromInsertion(EOEditingContext editingContext) {
>> super.awakeFromInsertion(editingContext);
>> if (security() == null) {
>>  setSecurity(Security.createSecurity(editingContext, true, true, 
>> true, true, true));
>> }
>> }
>> But probably you should be using the init(EOEditingContext editingContext) 
>> method instead, which is highly advisable.
>> jw
>> Am 06.09.2016 um 18:27 schrieb Theodore Petrosky <tedp...@yahoo.com>:
>> I have a to one relation Person to one Security. I keep all my security 
>> booleans in entity Security.
>> I am overriding awakeFromInsertion so that when I create a new person, it is 
>> assigned a security entity.
>> I have a problem in migrations. I have a postupgrade method that creates a 
>> person. in this method I have:
>>Person.createPerson(editingContext, new NSTimestamp(), "Theodore", 
>> true, "Petrosky", “pw", “user", Security.createSecurity(editingContext, 
>> true, true, true, true, true));
>> the security is mandatory as it should be. However on first run (to run the 
>> migrations), I end up with two security entities. Obviously, when a person 
>> is created and inserted the awake is fired and I get this orphan.
>> How can I eliminate this extra security entity? I was hoping that I could 
>> just not add a security entity in the createPerson line, but then my app 
>> complains that security is mandatory.
>> Person.createPerson(editingContext, new NSTimestamp(), "Theodore", true, 
>> "Petrosky", “pw", “user”, null);
>> In the past I would have just used ERXJDBCUtilities.executeUpdate and added 
>> the admin user with manual sql. I thought I would be clever and use the 
>> postupgrade method.
>> 
>> 
>> ___
>> 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/chill%40gevityinc.com
>> 
>> This email sent to ch...@gevityinc.com




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: EO awake ??

2016-09-06 Thread Johann Werner
Hi Ted,

why not just check if there is already a value in your awakeFromInsertion?

public void awakeFromInsertion(EOEditingContext editingContext) {
super.awakeFromInsertion(editingContext);
if (security() == null) {
setSecurity(Security.createSecurity(editingContext, true, true, 
true, true, true));
}
}

But probably you should be using the init(EOEditingContext editingContext) 
method instead, which is highly advisable.

jw


> Am 06.09.2016 um 18:27 schrieb Theodore Petrosky :
> 
> I have a to one relation Person to one Security. I keep all my security 
> booleans in entity Security.
> 
> I am overriding awakeFromInsertion so that when I create a new person, it is 
> assigned a security entity.
> 
> I have a problem in migrations. I have a postupgrade method that creates a 
> person. in this method I have:
> 
>   Person.createPerson(editingContext, new NSTimestamp(), 
> "Theodore", true, "Petrosky", “pw", “user", 
> Security.createSecurity(editingContext, true, true, true, true, true));
> 
> the security is mandatory as it should be. However on first run (to run the 
> migrations), I end up with two security entities. Obviously, when a person is 
> created and inserted the awake is fired and I get this orphan.
> 
> How can I eliminate this extra security entity? I was hoping that I could 
> just not add a security entity in the createPerson line, but then my app 
> complains that security is mandatory.
> 
> Person.createPerson(editingContext, new NSTimestamp(), "Theodore", true, 
> "Petrosky", “pw", “user”, null);
> 
> In the past I would have just used ERXJDBCUtilities.executeUpdate and added 
> the admin user with manual sql. I thought I would be clever and use the 
> postupgrade method.




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: UUID question

2016-06-30 Thread Johann Werner

> Am 30.06.2016 um 13:06 schrieb Musall Maik :
> 
> By the way, there is a bad NPE in the new UUID code that prevents object 
> insertion completely for tables that don't use a prototype for primary key. 
> Could please anyone merge the fix quickly?

Done :-)

> 
> https://github.com/wocommunity/wonder/pull/779



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Wonder 6.1.5

2016-06-21 Thread Johann Werner
Hi list,

short note that the WOCommunity Jenkins server just gave birth to the new 
Wonder 6.1.5 version which can be inspected at 
https://github.com/wocommunity/wonder/releases where you will find changelogs 
and artifacts. Big thanks to Paul and Henrique for their help in preparing the 
release and of course to all those who contributed to it. Keep pull requests 
coming! :-)

If you are still on Wonder 6 and are using AjaxProxy — which is used indirectly 
by e.g. AjaxFlexibleFileUpload — you are encouraged to update to the current 
version which brings a fix for a serious security issue. See 
https://github.com/wocommunity/wonder/issues/768 for details.

jw


PS: we still have some open pull requests on Github waiting for review. Please 
feel free to check and comment on those. This helps us all in improving code / 
features and getting them merged faster. We don’t have specific review people 
(even if it sometimes seems so ;-), you all are welcome to participate and help 
with your expertise!


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: SLF4J primer?

2016-04-21 Thread Johann Werner
Hi Paul,

I think the wiki page 
https://wiki.wocommunity.org/display/documentation/Wonder+Logging explains it 
pretty well. If there are any questions left feel free to ask / modify the wiki.

jw


> Am 21.04.2016 um 07:28 schrieb Paul Hoadley :
> 
> Hey Johann,
> 
> Can you tell me how Wonder 7’s SLF4J support works? In particular, I’ve 
> noticed that I can just drop org.slf4j.Loggers into my own classes, and as 
> far as I can tell the legacy Log4J setup entries in Properties (including the 
> appender and log level declarations) just work. That is, even though I’m 
> using an SLF4J Logger, the output is indistinguishable from Log4J. Is Wonder 
> doing something for me behind the scenes to ensure they inter-operate like 
> this out of the box?
> 
> 
> --
> Paul Hoadley
> http://logicsquad.net/




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Issues with ERXArrayUtilities.arrayMinusArray() and arrayMinusObject()

2016-04-16 Thread Johann Werner
Hi Paul,

> Am 16.04.2016 um 00:55 schrieb Paul Hoadley <pa...@logicsquad.net>:
> 
> Hi Johann,
> 
> On 15 Apr 2016, at 11:53 pm, Johann Werner <j...@oyosys.de> wrote:
> 
>> do you have an example where ERXEOControlUtilities.validateUniquenessOf() 
>> does not work because of ERXArrayUtilities.arrayMinusObject()? What is the 
>> exact error?
> 
> This is in the middle of a WOUnit test, so the error is that 
> validateUniquenessOf() throws a “UniquenessViolationNewObject” because count 
> == 1 at line 2417. This test passes with Wonder 6, fails with Wonder 7.
> 
>> I doubt that object is not removed from the array, the only reason that 
>> comes to my mind would be that the editing context of object and that of the 
>> array are different so that equals() would return false but 
>> ERXEOControlUtilities.validateUniquenessOf() uses the same editing context 
>> for both params. Perhaps some other part is the cause of your problem?
> 
> I think I have narrowed it down: the behaviour of the old and new methods are 
> different with respect to duplicate objects in the supplied array. 
> Specifically, if the object to be removed is present more than once in the 
> array, the old method removes all references to it, the new method removes a 
> single reference to it. Here’s a demonstration:

that is annoying. I created a pull request to overcome this problem 
(https://github.com/wocommunity/wonder/pull/734). The goal was to try to stick 
to official Java API and cut down WO specific functions (dreaming of replacing 
WO specific classes with plain Java implementations ;-). Please have a look at 
it and check if that suits you.

jw


> 
> public class ArrayTest {
>   public static class Foo {
>   }
> 
>   @Test
>   public void arrayTest() {
>   Foo a = new Foo();
>   NSMutableArray array = new NSMutableArray();
>   array.add(a);
>   System.out.println("ArrayTest.arrayTest: array = " + array);
>   array.add(a);
>   System.out.println("ArrayTest.arrayTest: array = " + array);
>   NSArray result = ERXArrayUtilities.arrayMinusObject(array, 
> a);
>   System.out.println("ArrayTest.arrayTest: result = " + result);
>   return;
>   }
> }
> 
> The old method gives this output:
> 
> ArrayTest.arrayTest: array = 
> (net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca)
> ArrayTest.arrayTest: array = 
> (net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca, 
> net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca)
> ArrayTest.arrayTest: result = ()
> 
> and the new method gives this output:
> 
> ArrayTest.arrayTest: array = 
> (net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca)
> ArrayTest.arrayTest: array = 
> (net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca, 
> net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca)
> ArrayTest.arrayTest: result = 
> (net.logicsquad.feedback.tests.ArrayTest$Foo@1a93a7ca)
> 
> Again, I know we agreed that Wonder 7 need not maintain backwards 
> compatibility (and I still support this), I wonder whether this particular 
> behavioural change was intended, and whether we should think about reverting 
> it. I haven’t tested ERXEOControlUtilities.validateUniquenessOf(), in 
> particular, outside WOUnit, and I don’t know why the fetch at 2405 would 
> bring in two copies of the same object, but it does in this test, and the old 
> behaviour of arrayMinusObject() accounted for that.
> 
> What do you think?
> 
> And while we’re here:
> 
>>> 1. With the new method signature for arrayMinusArray(), WOUnit’s 
>>> MockEditingContext can’t even find that method:
>>> 
>>> java.lang.NoSuchMethodError: 
>>> er.extensions.foundation.ERXArrayUtilities.arrayMinusArray(Lcom/webobjects/foundation/NSArray;Lcom/webobjects/foundation/NSArray;)Lcom/webobjects/foundation/NSArray;
>>> at 
>>> com.wounit.rules.MockEditingContext.saveChanges(MockEditingContext.java:310)
>>> 
>>> 
>>> It’s not immediately clear to me why this would be the case, as obviously 
>>> NSArray implements Collection, and the new signature is:
>>> 
>>> public static  NSArray arrayMinusArray(Collection array, 
>>> Collection minus)
> 
> Any thoughts on this one? It’s a bit of a show-stopper for WOUnit at the 
> moment.
> 
> 
> --
> Paul Hoadley
> http://logicsquad.net/
> 
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Issues with ERXArrayUtilities.arrayMinusArray() and arrayMinusObject()

2016-04-15 Thread Johann Werner
Hi Paul,

do you have an example where ERXEOControlUtilities.validateUniquenessOf() does 
not work because of ERXArrayUtilities.arrayMinusObject()? What is the exact 
error?

I did a quick test in my code and could not see wrong outcome. Looking at the 
code change before that commit:

public static  NSArray arrayMinusObject(NSArray main, Object object) {
NSMutableArray mutable = new NSMutableArray(main);
mutable.removeObject(object);
return mutable.immutableClone();
}

and after:

public static  NSArray arrayMinusObject(Collection array, T object) {
if (object == null) {
return new NSArray(array);
}
NSMutableArray result = new NSMutableArray<>(array);
result.remove(object);
return result.immutableClone();
}

I doubt that object is not removed from the array, the only reason that comes 
to my mind would be that the editing context of object and that of the array 
are different so that equals() would return false but 
ERXEOControlUtilities.validateUniquenessOf() uses the same editing context for 
both params. Perhaps some other part is the cause of your problem?

jw


> Am 15.04.2016 um 14:24 schrieb Paul Hoadley :
> 
> Hi Johann,
> 
> In 1d56e6d6, you changed the API for these methods—I assume "use interfaces 
> as params where possible” from the log comment was your rationale here, and 
> that seems pretty reasonable. Here are a couple of caveats for my comments to 
> follow:
> 
> * We agreed that Wonder 7 need not maintain backwards compatibility—I was 
> (and continue to be) a big proponent of this.
> * WOUnit is advertised as being built on Wonder 5, which, again, is perfectly 
> fine.
> 
> However, in the course of upgrading our Jenkins build server to Java 8, and 
> bringing in the latest Wonder 7 frameworks from master, I hit two issues:
> 
> 1. With the new method signature for arrayMinusArray(), WOUnit’s 
> MockEditingContext can’t even find that method:
> 
> java.lang.NoSuchMethodError: 
> er.extensions.foundation.ERXArrayUtilities.arrayMinusArray(Lcom/webobjects/foundation/NSArray;Lcom/webobjects/foundation/NSArray;)Lcom/webobjects/foundation/NSArray;
>   at 
> com.wounit.rules.MockEditingContext.saveChanges(MockEditingContext.java:310)
> 
> 
> It’s not immediately clear to me why this would be the case, as obviously 
> NSArray implements Collection, and the new signature is:
> 
> public static  NSArray arrayMinusArray(Collection array, 
> Collection minus)
> 
> 2. Of greater concern is that the new arrayMinusObject() method seems to 
> cause ERXEOControlUtilities.validateUniquenessOf() to throw a uniqueness 
> violation exception when it shouldn’t—as far as I can tell, 
> arrayMinusObject() _isn’t removing the object from the array_.
> 
> Rolling back the changes to these two methods made in 1d56e6d6 fixes both of 
> these problems. I guess I’m just after your commentary: is it obvious to you 
> why MockEditingContext can’t even find that method, and, even if I have to 
> live with that one, would you agree that the second change seems to have 
> broken ERXEOControlUtilities.validateUniquenessOf()? Let me know what you 
> think.
> 
> 
> --
> Paul Hoadley
> http://logicsquad.net/
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: UUID data type

2016-03-22 Thread Johann Werner
Hi Samuel,

what about using the UUID class [1]?

jw


[1] https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html


> Am 22.03.2016 um 15:03 schrieb Samuel Pelletier :
> 
> Hi,
> 
> I'm working on adding uuid support as primary key with a prototype and ERRest 
> support. Actually, my implementation uses a 16 bytes NSData as the adaptor 
> value type. Before going too far in this, I would like to validate my 
> choices...
> 
> I see 2 options:
> 
> 1- A 16 bytes NSData
> 
>   Pro: It seems the most efficient and adapted data type.
>   Cons: Hard to read and type in SQL queries. GlobalIds are cryptic.
> 
> 2- A 32 char hex string (or a 36 one if pretty printed with the dashes).
> 
>   Pro: Easier to read, especially with the dashes.
>   Cons: Uses more spaces, maybe less fast. Seems a bit awkward to deal 
> with hex strings.
> 
> 
> For the ERRest part, I managed to format the uuid in a primary key by 
> detecting if it is a 16 bytes NSData in the formatted hex representation. I 
> also found a way to get objects using the hex representation.
> 
> Any though on this ? Something I missed ?
> 
> Finally, is a presentation on using uuid for primary key in next WOWODC would 
> be a good topic ?
> 
> Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: very old app (no wonder) crashes with _EOGlobalModelLock:java.lang.NoSuchFieldError

2016-02-10 Thread Johann Werner
Hi Markus,

perhaps a mix of different WO versions? That old app using WO 5.3, 5.2, … and 
installed on the OS X machine 5.4? The field _EOGlobalModelLock comes from the 
WO jars or should be as it is not found apparently.

jw


> Am 10.02.2016 um 16:24 schrieb Markus Ruggiero :
> 
> A customer of mine has a very old WebObjects app running on an old Sun 
> Solaris box. The app was built on WindowsXP with Project Builder. No Wonder 
> anywhere to be seen.
> 
> We are trying to get this app (the xyz.woa) up and running on a MacMini OS X 
> 10.9.5. We have both Java 1.6 and Java 8 available. We succeeded to start the 
> app via Monitor. The default Main shows but the app fails with the following 
> exception when the code tries to execute this line:
> 
> loggedUser = (ZpdUser)EOUtilities.objectMatchinKeyAncValue(ec, "ZpdUser", 
> "sUserId", userId);
> 
> 
> Exception logging in User: com.webobjects.foundation.NSForwardException 
> [java.lang.NoSuchFieldError] _EOGlobalModelLock:java.lang.NoSuchFieldError: 
> _EOGlobalModelLock
> com.webobjects.foundation.NSForwardException [java.lang.NoSuchFieldError] 
> _EOGlobalModelLock:java.lang.NoSuchFieldError: _EOGlobalModelLock
>   at 
> com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:39)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
>   at 
> com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>   at 
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>   at 
> com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:562)
>   at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.requestStore(EOObjectStoreCoordinator.java:223)
>   at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.objectStoreForFetchSpecification(EOObjectStoreCoordinator.java:287)
>   at 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:476)
>   at 
> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
>   at 
> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:)
>   at 
> com.webobjects.eoaccess.EOUtilities.objectsMatchingValues(EOUtilities.java:216)
>   at 
> com.webobjects.eoaccess.EOUtilities.objectsMatchingKeyAndValue(EOUtilities.java:190)
>   at 
> com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue(EOUtilities.java:320)
>   at LoginUser.login(LoginUser.java:51)
>   at DirectAction._doLogin(DirectAction.java:42)
>   at DirectAction.zpdGuestLoginAction(DirectAction.java:31)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at 
> com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
>   at 
> com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
>   at 
> com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
>   at 
> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
>   at 
> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
>   at 
> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
>   at java.lang.Thread.run(Thread.java:695)
> Caused by: java.lang.NoSuchFieldError: _EOGlobalModelLock
>   at ZpdDB$UnbrokenEOModel.entityNamed(ZpdDB.java:41)
>   at 
> com.webobjects.eoaccess.EOModelGroup.entityNamed(EOModelGroup.java:493)
>   at 
> com.webobjects.eoaccess.EODatabaseContext._cooperatingObjectStoreNeeded(EODatabaseContext.java:1169)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
> 
> The very same code running against the same database works from Solaris. I 
> have currently no easy access to the source (somewhere on a XP Machine). Any 
> idea what could be wrong? For a test the customer has copied the xyz.woa 
> directory to a different Sun workstation (where Apple WebObjects runtime has 
> been installed) and tried it there with the very same exception. So it looks 
> as if we miss something in the environment setup. Question is: What?

Re: Wonder 7: NoClassDefFoundError: com/webobjects/jdbcadaptor/FrontbasePlugIn

2016-01-06 Thread Johann Werner
Hi Samuel,

seems that the principalClass value for the FrontBasePlugIn was wrong. A fix 
has been committed to master.

jw


> Am 07.01.2016 um 01:14 schrieb Samuel Pelletier :
> 
> Hi,
> 
> I moved to the master branch of Wonder and upgraded to Java 1.8. When I try 
> my app, they stop at startup with this error with a very helpful error 
> message:
> 
> janv. 06 18:41:46 ENTChronos[2325] WARN  NSLog  - A fatal exception occurred: 
> java.lang.NoClassDefFoundError: com/webobjects/jdbcadaptor/FrontbasePlugIn 
> (wrong name: com/webobjects/jdbcadaptor/FrontBasePlugIn)
> [2016-1-6 18:41:46 EST]  com.webobjects.foundation.NSForwardException 
> [java.lang.NoClassDefFoundError] com/webobjects/jdbcadaptor/FrontbasePlugIn 
> (wrong name: 
> com/webobjects/jdbcadaptor/FrontBasePlugIn):java.lang.NoClassDefFoundError: 
> com/webobjects/jdbcadaptor/FrontbasePlugIn (wrong name: 
> com/webobjects/jdbcadaptor/FrontBasePlugIn)
>   at 
> com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:43)
>   at 
> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
>   at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
>   at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:155)
>   at 
> com.webobjects.eoaccess.EOModelGroup.defaultGroup(EOModelGroup.java:328)
>   at 
> er.extensions.migration.ERXMigrator.migrateToLatest(ERXMigrator.java:169)
>   at 
> er.extensions.appserver.ERXApplication.finishInitialization(ERXApplication.java:1315)
> 
> Does anybody understand with this means ?
> 
> Going back to Wonder 6, my app start and works with Java 1.8
> 
> Regards,
> 
> Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Help with a Wonder_7 change to NSArray

2016-01-03 Thread Johann Werner
Hi Gavin,

> Am 03.01.2016 um 23:54 schrieb Gavin Eadie :
> 
> I’ve been away from my WebObjects project for nearly a year and returned to 
> it to move it from SourceForge to GitHub.  In the process I upped to the 
> latest Wonder, Eclipse and Java 8.  I got surprising few places that I needed 
> to make adjustments, but one caught me out.
> 
> What was:
>NSArray   result = new NSArray("", "“);

that still works for me.

> needed changed to:
>NSArray   result = new NSArray(new String[] {"", 
> ""});

Your code seems to use the NSArray class from WO instead of the one from 
Wonder, which adds the varargs constructor. You should check your classpath if 
ERExtensions has higher priority than the original WO frameworks.

jw


> It looks like this change is:
> 
> Commit:   b8e231930a823690d44f6a49cddf2e41eb6ab242 [b8e2319]
> Author:   qdolan 
> Date: May 27, 2009 at 2:25:21 AM EDT
> 
> .. but, if this happened over five years ago, why haven’t I fallen over it 
> before now?
> 
> PS: Happy New Year to the list ..




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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 response header and encoding

2015-12-23 Thread Johann Werner
Hi Matteo,

I created a pull request for that. You could give it a try and report back if 
it suits you:

https://github.com/wocommunity/wonder/pull/718

jw


> Am 22.12.2015 um 19:05 schrieb Altera WO Team :
> 
> Hello list,
> 
> i'm accessing a WOnder application that exposes some stuff via ERRest.
> The requesting application is also a WOnder application and to make the 
> requests it uses the apache httpclient that is shipped in ERJars.
> 
> I'm requesting data in json format which by specs should be UTF-8 and ERRest 
> encodes everything in UTF-8 but doesn't mention the encoding in the headers:
>   access-control-allow-origin: *
>   content-length: 3
>   Connection: close
>   Content-Type: application/json
> 
> httpclient not seeing any encoding specified in the response assumes the 
> default encoding for http content which is ISO-8859-1 and messes up all my 
> strings...
> 
> Apparently the ability to override the encoding has been introduced in 
> httpclient v 4.4 but in ERJars there is v 4.3.1. I always prefer to use the 
> "official" wonder but I have no easy way out... Either way I'll have to use 
> my wonder version.
> 
> Spring MVC sends responses like this:
>   access-control-allow-origin: *
>   content-length: 3
>   Connection: close
>   Content-Type: application/json; charset=utf-8
> 
> Do you think that bringing this to ERRest would harm anybody? Is it a good 
> idea? Is it stupid?
> 
> 
> Thanks,
> 
> 
> 
> Matteo
> 
> 
> 
> ___
> 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/jw%40oyosys.com
> 
> This email sent to j...@oyosys.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: Vector graphics in Flying Saucer / ERPDFWrapper

2015-11-30 Thread Johann Werner
Hi Ricardo,

you should create a branch off from the official master branch and make your 
changes on that one. How to do that depends on the way you interact with git 
(e.g. git command line, Tower, SourceTree, …).

Then you can create your pull request against the master branch. If the flying 
saucer jars are compatible with Java 5 it will be possible to cherry pick your 
changes into wonder_6 afterwards otherwise it will be Wonder 7 only. Do not use 
the wonder_7 branch as it points to an old state of master. I think that branch 
should go away soon to not confuse users. Master is the current Wonder 7.

For more info you can check the corresponding wiki page: 
https://github.com/wocommunity/wonder/wiki/Creating-and-submitting-an-acceptable-patch

jw


> Am 30.11.2015 um 19:40 schrieb Ricardo Parada :
> 
> Hi all,
> 
> I was trying to create a pull request to remove core-rederer-20101006.jar 
> from ERPDFGeneration and add flying-saucer-core-9.0.8.jar and 
> flying-saucer-pdf-9.0.8.jar.
> 
> However the fork I have of wonder on my github account is really old and I’m 
> confused how to go about doing this.  I’m not even sure what branch to put it 
> on.  My fork of wonder only has master, integration, and Wonder_5_0_0_Legacy. 
>  I was expecting to see master, wonder_5, wonder_6 and wonder_7.
> 
> Is there any documentation on how to go about submitting a pull request for 
> wonder?
> 
> Thanks
> Ricardo
> 
> 
> 
>> On Nov 18, 2015, at 4:28 PM, Ricardo Parada  wrote:
>> 
>> Thank you Timo and Samuel for your responses.
>> 
>> The easiest for me was to just update the flying saucer library to 9.0.8 as 
>> Timo suggested. I can now use the .pdf logo with vector graphics. The logo 
>> now looks beautiful on the Retina display.
>> 
>> 
>> 
>> On Nov 17, 2015, at 3:33 PM, Timo Hoepfner  wrote:
>> 
>>> Hi Ricardo,
>>> 
>>> not at my work machine currently, but I came across a similar problem 
>>> recently. In my case I tried to use a PDF as background image and got the 
>>> same error. Updating flying saucer to a more recent version solved the 
>>> issue for me. The jars I’m currently using are flying-saucer-core-9.0.8.jar 
>>> and flying-saucer-pdf-9.0.8.jar. I think they replace the 
>>> core-renderer-20101006.jar in ERPDFGeneration. The commit you’re after is 
>>> probably this one:
>>> 
>>> https://github.com/flyingsaucerproject/flyingsaucer/commit/26bf700857252ac04ecadd98dc0f8a2209e3c7f8
>>> 
>>> HTH,
>>> 
>>> Timo
>>> 
>>> 
 Am 17.11.2015 um 18:01 schrieb Ricardo Parada :
 
 Hi all,
 
 We use ERPDFWrapper to generate PDF from a WOComponent.  It comes out 
 beautiful.
 
 One of our components includes a logo using the  html tag and the 
 logo is usually a .gif or .jpg.  However, I would like to use vector 
 graphics.  We took a .eps file and converted it to .pdf in Photoshop.  The 
 resulting image scales beautifully to any size.  When I try to use the 
 .pdf I get java.lang.ClassCastException: org.xhtmlrenderer.pdf.PDFAsImage 
 cannot be cast to org.xhtmlrenderer.pdf.ITextFSImage.
 
 Has anybody been able to use vector graphics in ERPDFWrapper?
 
 Thanks
 
 The stack trace is below:
 
 java.lang.ClassCastException: org.xhtmlrenderer.pdf.PDFAsImage cannot be 
 cast to org.xhtmlrenderer.pdf.ITextFSImage
 at 
 org.xhtmlrenderer.pdf.ITextUserAgent.getImageResource(ITextUserAgent.java:97)
 at 
 org.xhtmlrenderer.pdf.ITextReplacedElementFactory.createReplacedElement(ITextReplacedElementFactory.java:57)
 at 
 er.pdf.builder.ERPDFReplacedElementFactory.createReplacedElement(ERPDFReplacedElementFactory.java:50)
 at 
 org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1439)
 at 
 org.xhtmlrenderer.render.BlockBox.calcMinMaxWidthInlineChildren(BlockBox.java:1584)
 at 
 org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1481)
 at 
 org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.recalcColumn(TableBox.java:1240)
 at 
 org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.fullRecalc(TableBox.java:1214)
 at 
 org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.calcMinMaxWidth(TableBox.java:1509)
 at 
 org.xhtmlrenderer.newtable.TableBox.calcMinMaxWidth(TableBox.java:158)
 at 
 org.xhtmlrenderer.newtable.TableBox.layout(TableBox.java:221)
 at 
 org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild0(BlockBoxing.java:321)
 at 
 org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild(BlockBoxing.java:299)
 at 
 org.xhtmlrenderer.layout.BlockBoxing.layoutContent(BlockBoxing.java:90)
 at 

Re: Wrong url generation for frameworks

2015-11-26 Thread Johann Werner
Hi Frank,

you probably have an outdated build.xml file in your project. Within the ant 
target build.woapp the woapplication task takes an attribute 
„frameworksBaseURL“ that is either not set or set incorrectly in your setup. 
From one of my build.xml I have:


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: WOLips 4.4 Installation Question - how do you do it?

2015-09-29 Thread Johann Werner
Hi Barry,

that page in the wiki should hold all needed info:

https://wiki.wocommunity.org/display/WOL/Install+WOLips+with+Eclipse+Update+Manager?src=search

jw


> Am 29.09.2015 um 19:50 schrieb Barry Starrfield :
> 
> A basic question - how do I install the 4.4 version of WOLips in Eclipse 
> Mars?  This is the first time in a decade that i’m working with WO, and the 
> current documentation on the site seems a bit out of date.  Can anyone 
> provide instructions?
> 
> Thanks,
> Barry




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Preferred way for fetching with given SQL select statement?

2015-09-24 Thread Johann Werner
Hi Markus,

I did not clearly understand what you are exactly trying to achieve. If you 
just need to run the vendor specific SQL to get a list of primary keys that you 
can then use to fetch the EOs you want you could do something like


EOEditingContext ec = ERXEC.newEditingContext();
EOEntity entity = ERXEOAccessUtilities.entityNamed(MyEntity.ENTITY_NAME);
EODatabaseContext context = 
EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec);
EOSQLExpressionFactory factory = 
context.database().adaptor().expressionFactory();
EOSQLExpression expression = factory.expressionForString("SELECT …");
NSArray rawRows = 
ERXEOAccessUtilities.rawRowsForSQLExpression(ec, entity.model().name(), 
expression);
NSArray idList = rawRows.valueForKey("id“);
NSArray result = MyEntity.fetchMyEntities(ec, ERXQ.in("id", idList), 
null);


Otherwise if you need more than that and need to fetch EOs but have to use your 
own SQL instead of the generated one by EOF you probably can do this by using 
the hints dictionary of a fetch specification. Something like


EOEditingContext ec = ERXEC.newEditingContext();
ERXFetchSpecification fs = new 
ERXFetchSpecification<>(MyEntity.ENTITY_NAME);
NSDictionary hints = new NSDictionary<>("SELECT …" , 
EODatabaseContext.CustomQueryExpressionHintKey);
fs.setHints(hints);
NSArray result = fs.fetchObjects(ec);


Though I never used that sort of logic but you could experiment with that. All 
code above is written by peeking at the API documentation with extremely wild 
guesses included—so no guarantees that it is correct or complete. Use at your 
own risk ;-)

jw


> Am 24.09.2015 um 16:22 schrieb Markus Ruggiero :
> 
> Folks,
> 
> What is the preferred way to fetch EOs when you have a db vendor specific 
> "select id from ... where ." statement?
> 
> I need to interface with a legacy system where I have to incorporate the 
> functionality of an external java tool into a Wonder app. This external tool 
> executes raw SQL select statements which it reads from a file. All the 
> statements are in the form given above and return a list of primary key 
> values (single column fortunately). The tool then iterates through that list 
> and does whatever it has to do (issuing tons of more raw sql). My problem is 
> that these select statements are rather complex and there are many of them. 
> It is just not feasible to replace those with proper EOQualifiers. In 
> addition these statements are parameterized with ? so they can be precompiled 
> and then used with different query values. However everything can be done 
> with standard EOs as soon as I have those corresponding to the returned list 
> of ids.
> 
> Thanks a lot
> ---markus—




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Building a qualifier with ERXKey.between(startDate, endDate)

2015-06-24 Thread Johann Werner

 Am 24.06.2015 um 20:28 schrieb Ruggentaler, JR jr.ruggenta...@experian.com:
 
 Yes and no. We use EOGenerate (gap pattern) and ERXKey in our apps to take 
 advantage of the nice Wonder features and eclipse code completion. The 
 ERXKey.between() method calls ERXQ.between() which builds and returns a 
 ERXAndQualifier.
 
 Both ERXKey.between() and ERXQ.between() are declared to return a 
 EOQualifier. The API would be consistent if ERXKey.between() and or 
 ERXQ.between() returned a ERXAndQualifier or a ERXBetweenQualifier.

That could be a change / improvement in Wonder 7…

 
 JR
 
 
 From: Theodore Petrosky tedp...@yahoo.com
 Date: Wednesday, June 24, 2015 at 12:22 PM
 To: JR Ruggentaler jr.ruggenta...@experian.com
 Cc: WebObjects-Dev webobjects-dev@lists.apple.com
 Subject: Re: Building a qualifier with ERXKey.between(startDate, endDate)
 
 Does ERXBetweenQualifier help?
 
 
 
 On Jun 24, 2015, at 10:53 AM, Ruggentaler, JR jr.ruggenta...@experian.com 
 wrote:
 
 Why does the ERXKey.between() method return a EOQualifier and most of the 
 other ERXKey methods return a chain-able ERXsomethingQualifier?
 
 I am trying to do something like:
 
 EOQualifier qual = Foo.START_DATE.between(startDate, endDate)
 .and(Bar.DATE_DELETED.isNull());
 
 instead of:
 
 EOQualifier qual = Foo.START_DATE.greaterThanOrEqualTo(startDate)
 
 .and(Foo.START_DATE.lessThanOrEqualTo(endDate))
 .and(Bar.DATE_DELETED.isNull());
 
 Is there another method like ERXKey.between() that return a chain-able 
 ERXQualifier?
 
 JR
 ___
 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/tedpet5%40yahoo.com
 
 This email sent to tedp...@yahoo.com
 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Components binding with custom object

2015-05-29 Thread Johann Werner
What is your HTML? You need to wire up your binding with the actual method/ivar 
of your component A:

…
wo:B userAccount=$account /
…

and in A.java:

public MyAccountClass account = …;




 Am 29.05.2015 um 13:25 schrieb HOUNKPONOU Ronald 
 ronald.hounkpo...@gmail.com:
 
 I forgot the image.
 
 2015-05-29 12:23 GMT+01:00 HOUNKPONOU Ronald ronald.hounkpo...@gmail.com:
 Hi everyone,
 
 Iam facing a problem with subcomponent binding.
 
 I have 2 componets A  B. B is to be include in A.
 
 But B need some information (eg. Authenticated user object). So i have create 
 a binding as show in the attached picture and add its gette 7 setter in 
 B.java.
 
 (I dont know how to specify Value Set to be my Objet Type. so i try with 
 undefined  ressources)
 
 But the object is not passed to B.
 
 I got a NullPointerException when trying to access the passed vairable in 
 B.java
 
 Thanks for your help.
 
 Selection_005.png




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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 job stale on jenkins.wocommunity.org?

2015-05-28 Thread Johann Werner
Hi Paul,

the Wonder build used to be triggered every half hour. But that has been 
switched off. Unfortunately the current setup on the Jenkins server does not 
allow to trigger a build if there has been new commits found. Perhaps David can 
help out? I think the Jenkins job uses his WOJenkins.

jw


 Am 28.05.2015 um 13:00 schrieb Paul Hoadley pa...@logicsquad.net:
 
 Hello,
 
 Why is the latest build of the Wonder job 28 days old?
 
 https://jenkins.wocommunity.org/job/Wonder/
 
 Last commit to master was 5 days ago. Has something fallen over?
 
 
 --
 Paul Hoadley
 http://logicsquad.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:
 https://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: App Security Problems

2015-05-28 Thread Johann Werner
Hi Vineetha,

a form will always send the input values either in the URL for GET requests or 
as body request for POST. By that you will always be able to see your data in 
Firebug, that’s how form submission works in the end.

To prevent others to intercept your credentials the way to go is to use HTTPS 
either for your entire site or at least for the login page. Using javascript on 
the client side to encrypt the form fields prior to sending would prevent an 
easy inspection but I doubt it will add anything to securing the data as the 
javascript logic would be readable by an attacker too.

jw


 Am 28.05.2015 um 13:41 schrieb Vineetha N vinee...@evergent.com:
 
 Hi
 
 Please find the enclosed document and help me to overcome this problems
 
 Thanks  Regards,
 Vineetha N
 Security_issues.doc




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Java 8 optionals

2015-05-25 Thread Johann Werner
Hi Mark,

NSKeyValueCoding.DefaultImplementation is a static class which renders it quite 
difficult to modify or replace some functionality. One way to do so would be to 
reimplement the class with your modifications and put that prior to the 
original class on your build path so that it is loaded before the original one. 
This procedure is used at some places in Wonder code already.

Another, less drastic, way would be to create a subclass of Optional. That 
ERXOptional could then implement NSKeyValueCoding to fire up a key path on its 
internal value (or null) instead of itself. That would fix valueForKey(Path) on 
chains where ERXOptional objects are included. Of course this doesn’t work 
where you have no control on what optional class is used/returned.

jw


 Am 23.05.2015 um 23:24 schrieb Mark Wardle m...@wardle.org:
 
 Dear all,
 
 I’ve migrated to java 8 in development and deployment and am now dabbling 
 with new “features”.
 
 Optionals seem a potentially good way of documenting nullability although the 
 syntax is currently rather cumbersome it seems likely that in future 
 versions, the syntax will improve.
 
 However, key value coding fails when an object is encapsulated by an 
 Optional. Intuitively, these should be unwrapped during KVC so that “normal” 
 behaviour continues - i.e. as KVC gracefully handles null pointers in 
 arbitrary key paths it should gracefully handle optionals containing either a 
 value or null.
 
 How would the handling of KVC be patched for future java versions? Is this 
 something fixable now? Does all KVC work via 
 NSKeyValueCoding.DefaultImplementation or are there multiple implementations? 
 I used to have a java decompiler working but haven’t set this up since 
 upgrading eclipse so it has been difficult to fathom the internals.
 
 Mark
 
 --
 Dr. Mark Wardle
 Consultant Neurologist, University Hospital Wales, Cardiff, UK
 Deputy Sub-Dean for Assessments and Honorary Lecturer, Cardiff University
 Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
 Telephone: 02920745274 (secretary) or facsimile: 02920744166




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Open D2W pull requests seeking help

2015-05-19 Thread Johann Werner
Hi all,

we currently have a couple of open pull requests for Wonder regarding D2W 
topics. In the course of getting pull requests merged or closed without endless 
waiting we need D2W skilled people who could take a look at those pull requests 
and leave some comments about usefulness/corrections/whatever.

Here are the specific pull requests:

https://github.com/wocommunity/wonder/pull/496
https://github.com/wocommunity/wonder/pull/500
https://github.com/wocommunity/wonder/pull/629

Further there are some open issues that could take a look (did you know that 
submitting a pull request is rally easy? ;):

https://github.com/wocommunity/wonder/issues/89
https://github.com/wocommunity/wonder/issues/93
https://github.com/wocommunity/wonder/issues/97


Thanks helping the community!

jw


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Wonder 6.1.3 is out

2015-04-24 Thread Johann Werner
Hi list,

in time for WOWODC Wonder 6.1.3 has been released. Point your browser to the 
release page on github https://github.com/wocommunity/wonder/releases to get 
everything you need: a changelog (thanks Paul) and all artifacts you would get 
from the wocommunity jenkins server.

Thanks for all those who contributed!

See you in Hamburg.


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: joda LocalDateTime

2015-01-09 Thread Johann Werner
Hi Jeff,

I can remember that there was a fix for FrontBase prototypes some time ago. A 
search within the commit messages reveals a commit from Samuel dating back to 
21.11.2013 where the prototype was changed from TIMESTAMP to TIMESTAMP WITH 
TIME ZONE. What type are your table columns in FrontBase? Could it be that they 
are still expecting a TIMESTAMP without timezone and thus stumbling across your 
value? So a fix would probably be a migration that changes your „old“ joda 
columns to the new value type.

You can read the conversation about that change at github to get a little more 
detail: https://github.com/wocommunity/wonder/pull/512

HTH
jw


 Am 09.01.2015 um 04:02 schrieb Jeffrey Schmitz j...@netbrackets.com:
 
 A little more digging on this...
 
 Down in com.webobjects.jdbcadaptor._FrontBasePlugin class, if I comment out 
 line 1825 in the formatValueForAttribute function (as shown below) , I am 
 able to save the Timestamp value in the database, so it looks like Frontbase 
 doesn't like the way this function is formatting he timezone part of a 
 Timestamp value.
 
   case FrontBaseTypes.FB_TimestampTZ: {
   StringBuffer time = new 
 StringBuffer(TIMESTAMP ');
   Date d = 
 (Date)eoattribute.adaptorValueByConvertingAttributeValue(obj);
   SimpleDateFormat formatter = 
 TIMESTAMP_FORMATTER.get();
   formatter.format(d, time, new 
 FieldPosition(0));
 //
 time.append(getTimeZone(formatter.getTimeZone()));
   time.append('\'');
   return time.toString();
   }
 
 Jeff
 On Jan 8, 2015, at 2:44 PM, Jeffrey Schmitz j...@netbrackets.com wrote:
 
 Samuel, Ramsey,
 
 Hi All,
  I’m using Frontbase, and an EOObject with a field defined with the 
 Prototype jodaLocalDateTime has stopped working. Since I recently updated my 
 Wonder frameworks I suspect that has something to do with it.
 
  Looking at the SLQ produced for an INSERT on a machine still running the 
 older Wonder frameworks, and that still works, the format of the time field 
 is specified as:  TIMESTAMP '2015-01-08 13:00:00.000’
 
 Looking at the SQL produced using the new Wonder Frameworks, the same field 
 in the INSERT is specified as: TIMESTAMP '2015-01-08 00:54:42.847+00:00’
 
 I’m using the java datatype of org.joda.time.LocalDateTime
 
 Could your last change described in this email chain have affected this, as 
 I don't think I rolled it in until now?
 
 Here's the full INSERT commands being generated...
 
 Works with older Wonder frameowrks:
 INSERT INTO t_event(c_display, c_title, c_game, id, c_tv, 
 poolID, c_all_day, c_date_time, c_description, c_location, 
 c_group) VALUES ('true', 'test joda time', NULL, 173, NULL, 199, 
 'false', TIMESTAMP '2015-01-08 13:00:00.000', 'abcde', 'bed', NULL) 
 withBindings: 
 
 Does not work new Wonder frameworks:
 INSERT INTO 't_event'('c_display', 'c_tv', 'c_date_time', 'entryID', 
 'c_location', 'c_game', 'c_all_day', 'poolID', 'c_title', 'id', 
 'c_description', 'c_group') VALUES ('false', NULL, TIMESTAMP '2015-01-08 
 00:54:42.847+00:00', 102, 'TBA', 0, 'false', 101, 'NCAA BBall Round 
 1 Game', 101, NULL, 0) withBindings: :
 
 Full Exception:
 
 INFO  er.transaction.adaptor.Exceptions  - Database Exception occured: 
 com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression 
 failed: com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression: 
 INSERT INTO t_event(c_display, c_tv, c_date_time, entryID, 
 c_location, c_game, c_all_day, poolID, c_title, id, 
 c_description, c_group) VALUES ('false', NULL, TIMESTAMP '2015-01-08 
 20:36:31.878+00:00', 102, 'TBA', 0, 'false', 101, 'NCAA BBall Round 
 1 Game', 101, NULL, 0) withBindings: :
   Next exception:SQL State:0 -- error code: 231 -- msg: Semantic error 
 231. INSERT value doesn't match column: c_date_time.
   Next exception:SQL State:0 -- error code: 485 -- msg: Semantic error 
 485. Near: INSERT INTO 
 \t_event\(\c_display\,\c_tv\,\c_date_time\,\entryID\,\c_location\,\c_game\,\c_all_day\,\poolID\,\c_title\,\id\,\c_description\,\c_group\)
  VALUES('false',NULL,TIMESTAMP '2015-01-08 
 20:36:31.878+00:00',102,'TBA',0,'false',101,'NCAA BBall Round 1 
 Game',101,NULL,0);.
   Next exception:SQL State:0 -- error code: 485 -- msg: Semantic error 
 485. Near: 0.
   Next exception:SQL State:4 -- error code: 363 -- msg: Exception 
 condition 363. Transaction rollback.
 
 
 On Nov 21, 2013, at 3:58 PM, Samuel Pelletier sam...@samkar.com wrote:
 
 Ramsey,
 
 My tests with different databases (mySql, PostgreSql and FrontBase) are now 
 all OK. I inserted and read back data with the 4 types with different time 
 zone on my machine successfully. I needed to make sure the data 

Re: Qualifier clause with concatenated fields

2014-12-04 Thread Johann Werner
derived attributes (see page 39 of 
https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf)

jw


 Am 04.12.2014 um 11:22 schrieb Raymond NANEON rnan...@me.com:
 
 Hi List,
 
 I would like to know if it is possible in EO qualifier to do something like 
 that ERXKey_A.concat.ERXKey_B.eq(AB), which is in SQL WHERE A||B=AB ?
 
 Is there exists a way in WO to do this without create a new object, fetch in 
 memory and then do a filter and so one ... ?
 
 Thanks for help
 Envoyé depuis iCloud




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: potential cross site scripting issue

2014-12-03 Thread Johann Werner
Hi René,

 Am 03.12.2014 um 16:39 schrieb René Bock b...@salient.de:
 
 Hi,
 
 during penetration test of his WebObjects servlet installation, one of our 
 customers found a potential XSS issue:
 
 Deployment environment: tomcat application server + apache mod-proxy
 
 Consider the following request:
 
   
 http://custormer.serv.er/ServletContainerName/WebObjects/AppName.woa/wa/default
  (1)
 
 If a malicious client changes AppName to something else, the following 
 request
 
   
 http://custormer.serv.er/ServletContainerName/WebObjects/SomethingElse.woa/wa/default
(2)
 
 generates a similar response than request (1), except that in all webobjects 
 urls  AppName  is replaced by SomethingElse
 
 
 
 Now, if you are a bit mot malicious, you would replace AppName by
 
   
 x%22%3E%3Cbody%3E%3Cimg%20src=%22x%22%20onerror=%22alert%28%27Cross-Site%20Scripting%27%29%22%3E
 
 
 et voilà, a wonderful alert panel appears (at least in FireFox)
 
 
 To fix this issue, I checked that the application name provided in  the 
 request uri matches the real application name:
 
 Application.java:
 
   @Override
   public WOResponse dispatchRequest(WORequest aRequest) {
 
   String uri = aRequest.uri();
   String expectedApplicationPartInUri = 
 applicationBaseURL()+/+name()+((nameSuffix()!=null)?nameSuffix():)+.woa;
 
   if(uri == null || !uri.contains(expectedApplicationPartInUri)) {
   log.error(failed to dispatch request: uri [+uri+] 
 does not match application name [+expectedApplicationPartInUri+]);
   WOResponse r404 = new WOResponse();
   r404.setStatus(404);
   r404.setContent(The requested resource was not found 
 on this server.);
   return r404;

You could write the previous 4 lines as:

return new ERXResponse(The requested resource was not found on this server.“, 
ERXHttpStatusCodes.NOT_FOUND);

   }
 
   return super.dispatchRequest(aRequest);
   }
 
 
 Are there any suggestions to improve the code above?  Shouldn't we fix this 
 issue in core (aka erextensions)?

Adding that to ERXExtensions would not do any harm, though I probably would 
cache the expectedApplicationPartInUri to not recalculate its value for every 
request. If that logic is only needed for servlet deployment you should 
probably place your improvement into ERXServletApplication which you should use 
as parent class for your Application class.

jw


 
 
 Regards,
 
   René
 
 
 
 P.S.: for the requests above, only a classical deployment (apache + 
 mod_webobjects) would have said:
 
   The requested application was not found on this server.
 
 
 
 
 
 --
 salient doremus
 
 salient GmbH
 Kontorhaus -  Lindleystraße 12
 60314 Frankfurt Main
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: limiting a textfield to numbers

2014-11-11 Thread Johann Werner
Hi Ted,

if your „problem“ is related to a specific textfield then you can add a 
numberformat binding to that WOTextField. This should give you a validation 
exception if your user entered a non-number value.

jw


 Am 08.11.2014 um 06:04 schrieb Theodore Petrosky tedp...@yahoo.com:
 
 I’ve never written a validator before. Is this okay:
 
   public String validateJobNumber(String value) throws 
 ValidationException {
 
   value = value.trim();
 
   boolean isNumber = true;
   endOfLoop:
   for (int i = 0; i  value.length(); i++) {
 
   if (Character.isDigit(value.charAt(i))) {
   isNumber = true;
   } else {
   isNumber = false;
   break endOfLoop;
   }
   }
 
   if (!isNumber) {
   throw new ValidationException(There can be only 
 numbers in the Job Number field! (value was  + value +));
   }
   return value;
   }
 
 It works, but is there some error that I am making that will bite me later?
 
 Ted
 
 On Nov 7, 2014, at 8:04 PM, Ramsey Gurley rgur...@smarthealth.com wrote:
 
 If you always only want to allow number characters, then implement a 
 validateKey() method for that key on your EO. This is easier.
 
 public String validateJobNumber(String value)
 
 Alternately, you can provide a custom component that does the validation at 
 the component level. For example, you have a bunch of old jobs that already 
 have strings outside your defined range and you cannot validate at the EO. 
 This prevents new jobs from being entered with job numbers like “00-103A” or 
 something, but also won’t throw errors on old jobs unless the user tries to 
 edit them using the component.
 
 
 On Nov 7, 2014, at 5:51 PM, Theodore Petrosky tedp...@yahoo.com wrote:
 
 How would you limit the characters typed into a WOTextField in a D2W app?
 
 I need a text field for a Job Number. It’s not really a number per se. 
 Although I want to limit the characters typed to the number keys. So 
 basically ascii 48 to 57 inclusive.
 
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Component caching?

2014-11-07 Thread Johann Werner
Hi Mark,

do you cache the binding values within your component? When using stateless 
components you need to clean any local variables yourself within the reset 
method.

jw


 Am 07.11.2014 um 10:33 schrieb Mark Wardle m...@wardle.org:
 
 Hi.  I’m generating a PDF report :
 
   WOComponent page = 
 ERXApplication.application().pageWithName(componentName(), privateContext());
   page.takeValueForKey(obj, object);
   page.takeValueForKey(report, report);
   WOResponse response = page.generateResponse();
   report.setInterimHtml(response.contentString());
 
 This looks up a named WOComponent and generates the response, storing the 
 HTML and allowing users to fine-tune the HTML in a web-based HTML editor. 
 This has worked perfectly previously.
 
 Now I have added a custom “display boolean” component which is used within 
 the report WOComponent. This is a stateless component but it displays the 
 same value again and again when in production. In development, the component 
 works properly.
 
 It is like the content of the component is being cached inappropriately. I 
 thought component caching was related to caching the contents of the WOD 
 file, not the bindings. 
 
 Does anyone have any thoughts? Debugging this on a production machine quite 
 tricky so if anyone can thing of something obvious, I’ll try that first!
 
 Thanks,
 
 Mark



 ___
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: slow response of pdf

2014-11-02 Thread Johann Werner
Hi Frank,

you really shouldn’t deliver your PDF file that way because by this you will 
load the file completely into memory. Currently your PDF file is only 10MB but 
can you be sure that it will have that size all the time? What if your PDF file 
will be 100MB and 10 users concurrently click your download button? Your 
application will suddenly take 1GB of RAM only for sending the files which 
could get your application crashing.

You can give WOResponse an input stream so it will be streamed directly to the 
client taking only a fraction of the memory footprint and be faster:

public WOActionResults fichePrint() {
File file = new File(/tmp/test.pdf“);
long fileSize = file.length();
WOResponse response = new WOResponse();
response.setHeader(application/pdf, Content-Type);
response.setHeader(Long.toString(fileSize), content-length);
response.setHeader(inline;  filename=test.pdf, Content-Disposition);
response.setContentStream(new FileInputStream(file), 32768, fileSize);
return response;
}

Even better you achieve the same result with less code and are safer regarding 
errors like not closing streams in certain situations.

jw


Am 01.11.2014 um 16:26 schrieb Frank Stock frank.st...@telenet.be:

 Hi All,
 
  I have moved my application from MacOS server 10.6 to 10.9.5.
  I have done a complete new installation. The application works fine but when 
 I create a pdf it takes about 25 seconds to see it in the browser.
 The pdf is about 10MB. When I do a direct connect I can see the pdf without 
 delay.
 
 I have created a new Wonder Application with only the following code:
 
 public WOActionResults fichePrint() {
   String filename = /tmp/test.pdf;  // test.pdf is a 10MB file
   ByteArrayOutputStream outputStream=null;
   try {
   outputStream = new ByteArrayOutputStream();
   InputStream inputStream = new 
 FileInputStream(filename);
   
 
   int data;
   while( (data = inputStream.read()) = 0 ) {
   outputStream.write(data);
   }
   inputStream.close();
   } catch (FileNotFoundException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   }
   
   // It takes 8 seconds to load the file
   System.out.println(Read);
   
   WOResponse response=new WOResponse();
   response.setHeader(application/pdf, Content-Type);
   response.setHeader(Integer.toString(outputStream.size()), 
 content-length);
   response.setHeader(inline;  filename=test.pdf, 
 Content-Disposition);
   response.setContent(new NSData(outputStream.toByteArray()));
   
   
   
   
   
   
   return response;
   }
 
 Has this something to do with Apache? Where can I find more information to 
 solve this?
 
 Thanks in advance,
 Frank Stock
 Belgium




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: mod_proxy as mod_WebObjects alternative [Was: Re: Yosemite]

2014-10-26 Thread Johann Werner
Without wotaskd you will have to start your instances with all necessary 
program arguments yourself, i.e. on OS X you have to write some launchd 
scripts. Does that solve your problem?

jw


Am 26.10.2014 um 17:13 schrieb Tom Woteki d...@woteki.com:

 All:
 
 Contrary to Chuck’s remark, I was not able to unload wotaskd and still have 
 the successful configuration I posted elsewhere in this thread continue to 
 work. Whereas I have dispensed with mod_webobjects I still require  both the 
 WOMonitor and wotaskd daemons running.
 
 Tom
 
 
 
 On Aug 12, 2014, at 11:04 PM, Chuck Hill ch...@global-village.net wrote:
 
 You don’t need wotaskd (at the cost of instant reconfiguration) and you are 
 not dependant on having mod_webobjects compiled for the Apache version and 
 platform that you are using.
 
 Chuck
 
 
 
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Best way to use raw SQL

2014-10-23 Thread Johann Werner
Hi Thomas,

look at ERXJDBCUtilities and ERXEOAccessUtilities for plenty of methods like:

ERXJDBCUtilities.executeUpdate(EOAdaptorChannel channel, String sql)
ERXEOAccessUtilities.evaluateSQLWithEntity(EOEditingContext ec, EOEntity 
entity, String sql)

There should be something suiting your needs.

jw


Am 23.10.2014 um 10:56 schrieb Thomas LATTER latter...@gmail.com:

 Hi, what would be the best way to query in SQL these days in Project Wonder ?
 I would like to use SQL directly sometimes for complex queries including 
 calculations (averages, medians..). Some of the previous solutions are 
 deprecated. Thanks in advance



 ___
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: Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread Johann Werner
Hi Christoph,

as Ralf said use a path relative to the css file“ so you should try:

body {
   background: url(../gfx/background.jpg) repeat;
}

jw


Am 02.10.2014 um 10:58 schrieb Christoph Wick c...@i4innovation.de:

 Hi Ralf, hi list,
 
 thanks for your answer.
 
 Of course, I'm using wonder.
 
 But it doesn't work the way you suggest.
 
 If I replace
 
 body {
background: 
 url(/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg) 
 repeat;
 }
 
 with 
 
 body {
background: url(gfx/background.jpg) repeat;
 }
 
 the background image is not displayed. CSS's urls need absolute URLs.
 
 The stylesheet itself is a static resource and is linked with
 
 wo:ERXStyleSheet filename=css/ourappstylesheet.css rel=stylesheet 
 media=screen/wo:ERXStyleSheet
 
 C.U.CW
 -- 
 The three great virtues of a programmer are Laziness, Impatience and Hubris. 
 (Randal Schwartz)
 
 On 02.10.2014, at 10:36, Ralf Schuchardt r...@gmx.de wrote:
 
 When you are using Wonder, you can simply use a path relative to the css 
 file in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and 
 it should work in development and deployment.
 
 Ralf
 
 
 Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn 
 c...@i4innovation.de:
 
 Hi List,
 
 I have a question because a colleague of mine wants to test Linux as 
 development platform.
 
 Background:
 ---
 I the css file of OurApp.woa we refer to background images like e.g.
 
 #a-div {
  background: 
 url(/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg);
 }
 
 To make this working during development on the Mac, I put a softlink from
 
 /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa -- 
 /Libary/WebServer/Documents/WebObjects/OurApp.woa
 
 This works on the Mac, since the WO-build-in development server somehow 
 scans /Library/WebServer/Documents/ (the default document root for Apache 
 on Mac) during startup and delivers the resources to the browser.
 
 Problem:
 
 Since there is no /Library/WebServer/Documents/ on Linux (default is 
 /var/www/html - at least on Ubuntu), this doesn't work on Linux
 
 Since my colleague doesn't want to create a folder 
 /Library/WebServer/Documents/ (let's call this decision sort of religious 
 but nevertheless :-) I was looking for the place where that 
 /Library/WebServer/Documents/  information came from.
 
 The only place I found, was 
 /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
  Inside this plist there is an entry 'DocumentRoot = 
 /Library/WebServer/Documents;'
 
 Now, my colleague could modify the plist entry and everything works fine, 
 but ...
 
 Question:
 -
 Is there any other way to tell the WebObjects development environment to 
 look for the document root than patching the WebServerConfig.plist inside 
 the JavaWebObjects.framework folder?
 
 Side notes:
 ---
 I tried to override the documentRoot() method of my Application class to 
 return the correct path, but it's never called during startup. At least 
 while in  development mode.
 
 I also tried to set the property application.documentRoot - same effect. 
 Doesn't work.
 
 Thanks for your help, C.U.CW
 -- 
 What are the three enemies of a programmer? Sunlight, oxygen, and the 
 appalling roar of the birds.
 
 ___
 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/rasc%40gmx.de
 
 This email sent to r...@gmx.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:
 https://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Wonder 6.1.2 is out

2014-08-01 Thread Johann Werner
Hi list,

it has been some time since the last release but finally Wonder 6.1.2 is 
officially out. Point your browser to the release page on github 
https://github.com/wocommunity/wonder/releases to get everything you need: a 
changelog (thanks Paul) and all artifacts you would get from the wocommunity 
jenkins server.

Thanks for all those who contributed!


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: New Wonder release?

2014-07-27 Thread Johann Werner
Hi Paul,

I can have a look at it in the next couple of days. Most work is to look 
through all commits since 6.1.1 and write down the changelog.

jw


Am 28.07.2014 um 03:09 schrieb Paul Hoadley pa...@logicsquad.net:

 Hello,
 
 Wonder 6.1.1 was released on 10 February.  I'd be keen to see a 6.1.2—there 
 are some fixes I've been waiting to pick up.  Johann, do you have the 
 time/energy to do this?  Is there anything I can do to help?
 
 
 -- 
 Paul Hoadley
 http://logicsquad.net/
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: ERXDisplaygroup setSelectedObject problem

2014-03-04 Thread Johann Werner
Hi Frank,

the jar files on jenkins were not up to date with the tip of master where a bug 
with ERXDisplayGroup has been fixed. I just triggered a new build on the 
jenkins server so you should be able to get updated jars in a couple of 
minutes. Alternatively the 6.1.1 release from the github release page [1] is 
good too.

jw
 

[1] https://github.com/wocommunity/wonder/releases



Am 04.03.2014 um 12:28 schrieb Frank Stock frank.st...@telenet.be:

 Hi,
 
 I did an update to the latest wonder-frameworks (jar-files from jenkins).
 
 bestlijnINDPG.setSelectedObject(aLeveringLijn) is doing nothing!
 
 What I have already tried:
 
 - On my development machine, added the ERExtensions source - works ok
 - Took the old ERExtensions framework - works ok
 
 How can I solve this?
 
 Frank Stock
 Belgium
 
 
 
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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 Application project--still available?

2014-02-21 Thread Johann Werner
Hi Scott,

welcome back. You need to use the WOLips37Community edition or just use the 
shortcut http://wocommunity.org/wolips/3.7/current as update site. Then you 
should see the ERRest Application template.

jw


Am 21.02.2014 um 18:52 schrieb Scott M. Neal s...@automationgarden.com:

 
 Hello everyone,
 
   I'm coming back to WO after a many, many years absence, and am trying 
 to play around with
 
 http://wiki.wocommunity.org/display/WEB/Your+First+Rest+Project
 
   I cannot get Eclipse (Version: 3.8.2 Build id: M20130131-0800) with the 
 latest WOLips just reloaded this morning 
 (http://wocommunity.org:8080/job/WOLips37Stable/lastSuccessfulBuild/artifact/temp/dist/)
  to reveal the ERRest Application template:
 
 WOLipsTemplates.png
 
   I've looked at this thread:
 
 http://lists.apple.com/archives/webobjects-dev/2012/Jan/msg00011.html
 
 and have tried resetting the perspective, etc, but still no go
 
   I also found this thread:
 
 http://lists.apple.com/archives/webobjects-dev/2013/Mar/msg00306.html
 
 but http://jenkins.wocommunity.org/job/WOLips37Stable/39/artifact/temp/dist/ 
 is no longer available (as was implied in the thread).
 
   Is ERRest Application no longer available?  Should I just use Wonder 
 Application in the sample project instead?
 
   Thank you,
 
   Scott
 
 
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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 6.1.1 is out

2014-02-20 Thread Johann Werner
Hi Raymond,

the file browser in JavaMonitor still works. When the listing is displayed the 
first time the directory to show is undefined though and thus shows no files. 
If you enter e.g. a '/' in Jump to: and click submit you get the correct 
listing of your root directory.

It could choose automatically the root directory at start though.

jw


Am 20.02.2014 um 11:57 schrieb Raymond NANEON rnan...@me.com:

 Hi Johann,
 
 I have a little thing to add about this new Wonder, specially in wonder 
 JavaMonitor.
 It's possible to browser directly on server HDD to select app path like old 
 JavaMonitor?
 If not, can You add it in the next version of Wonder JavaMonitor?
 i.e : 
 Wonder JavaMonitor
 new.png
 Old WO JavaMonitor
 old.png
 
 Thanks for your help
 
 Envoyé depuis iCloud
 
 Le 10 févr. 2014 à 16:24, Johann Werner j...@oyosys.com a écrit :
 
 Hi list,
 
 it has been a long time but finally Wonder 6.1.1 is officially out. Point 
 your browser to the release page on github 
 https://github.com/wocommunity/wonder/releases to get everything you need: a 
 changelog and all artifacts you would get from the wocommunity jenkins 
 server.
 
 Beginning with this version of the frameworks Wonder applications will log 
 out that version number on startup. This is amongst others to make it easier 
 for getting help from the mailing list as to provide more information on 
 your WO setup. The version number reported on the Wonder Javadoc 
 documentation will reflect that version number too so you can be sure 
 looking at the documentation matching your version.
 
 Thanks for all those who contributed!
 
 
 For those using their own jenkins servers:
 Building the documentation put the Javadocs into a directory 
 dist/wonder-6.0/Documentation. That path changed to 
 dist/wonder/Documentation without the -6.0 part. You should check the 
 settings of the Javadoc publisher plugin if that path is still matched or 
 update it accordingly.
 ___
 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/rnaneon%40me.com
 
 This email sent to rnan...@me.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 JavaMonitor file browser

2014-02-20 Thread Johann Werner

Am 20.02.2014 um 14:03 schrieb David Avendasora webobje...@avendasora.com:

 
 On Feb 20, 2014, at 6:48 AM, Johann Werner j...@oyosys.com wrote:
 
 Hi Raymond,
 
 the file browser in JavaMonitor still works. When the listing is displayed 
 the first time the directory to show is undefined though and thus shows no 
 files. If you enter e.g. a '/' in Jump to: and click submit you get the 
 correct listing of your root directory.
 
 It could choose automatically the root directory at start though.
 
 Better would be the Application Root, no?

Sure, but what is the application root? This could / will be different on OS X, 
Linux, Windows, or your own in-house deployment structure. Perhaps adding a 
setting on the preference page would be the best way to go?

 Anything would be better than saying “Current directory:” and “Back (Up one 
 directory level)” when you are NOT even in a directory. It is completely 
 misleading. Better to just have the “Jump to:” field and hide the table until 
 really, truly *is* a current directory to show the contents of.

That I was just to push ;-)

 I’ll take a look at it.

There’s plenty room to improve yet.

 Chuck, stop screaming. How badly could I mess it up??
 
 Dave
 
 —
 WebObjects - so easy that even Dave Avendasora can do it!™
 —
 David Avendasora
 Senior Software Abuser
 Nekesto, Inc.
 
 
 
 
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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 6.1.1 is out

2014-02-20 Thread Johann Werner
Hi Raymond,

that code was not altered since 2008 it seems. The default directory that is 
fetched is /Library/WebObjects that probably doesn’t exist on your machine and 
thus the empty list you get. That behavior will be changed soon on master 
branch to either use / or a user defined default.

jw


Am 20.02.2014 um 14:24 schrieb Raymond NANEON rnan...@me.com:

 Hi Johann,
 
 thanks but why didn't add '/' in your code by default to show server files 
 automatically? There was a constraint?
 Envoyé depuis iCloud
 
 Le 20 févr. 2014 à 12:48, Johann Werner j...@oyosys.com a écrit :
 
 Hi Raymond,
 
 the file browser in JavaMonitor still works. When the listing is displayed 
 the first time the directory to show is undefined though and thus shows no 
 files. If you enter e.g. a '/' in Jump to: and click submit you get the 
 correct listing of your root directory.
 
 It could choose automatically the root directory at start though.
 
 jw
 
 
 Am 20.02.2014 um 11:57 schrieb Raymond NANEON rnan...@me.com:
 
 Hi Johann,
 I have a little thing to add about this new Wonder, specially in wonder 
 JavaMonitor.
 It's possible to browser directly on server HDD to select app path like old 
 JavaMonitor?
 If not, can You add it in the next version of Wonder JavaMonitor?
 i.e :
 Wonder JavaMonitor
 new.png
 Old WO JavaMonitor
 old.png
 Thanks for your help
 Envoyé depuis iCloud
 Le 10 févr. 2014 à 16:24, Johann Werner j...@oyosys.com a écrit :
 Hi list,
 it has been a long time but finally Wonder 6.1.1 is officially out. Point 
 your browser to the release page on github 
 https://github.com/wocommunity/wonder/releases to get everything you need: 
 a changelog and all artifacts you would get from the wocommunity jenkins 
 server.
 Beginning with this version of the frameworks Wonder applications will log 
 out that version number on startup. This is amongst others to make it 
 easier for getting help from the mailing list as to provide more 
 information on your WO setup. The version number reported on the Wonder 
 Javadoc documentation will reflect that version number too so you can be 
 sure looking at the documentation matching your version.
 Thanks for all those who contributed!
 For those using their own jenkins servers:
 Building the documentation put the Javadocs into a directory 
 dist/wonder-6.0/Documentation. That path changed to 
 dist/wonder/Documentation without the -6.0 part. You should check the 
 settings of the Javadoc publisher plugin if that path is still matched or 
 update it accordingly.
 ___
 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/rnaneon%40me.com
  
 This email sent to rnan...@me.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: b in server exception strings

2014-02-18 Thread Johann Werner

Am 04.02.2014 um 15:04 schrieb John Pollard j...@pollardweb.com:

 Hi List,
 
 For deny delete rules, exception messages contain embedded html formatting, 
 for example:
 
 Cannot delete this bOrganisation/b. You should first delete items in its 
 bBlah Blahs Related Objects/b
 
 As I present these in a Java Client window, rather than a browser, they look 
 odd. Is there a quick work-around to not have the html formatting in error 
 messages.

Override it in your own Localizable.strings by setting the key that gets 
localized to something without html tags?

 
 Many thanks,
 John




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Wonder 6.1.1 is out

2014-02-10 Thread Johann Werner
Hi list,

it has been a long time but finally Wonder 6.1.1 is officially out. Point your 
browser to the release page on github 
https://github.com/wocommunity/wonder/releases to get everything you need: a 
changelog and all artifacts you would get from the wocommunity jenkins server.

Beginning with this version of the frameworks Wonder applications will log out 
that version number on startup. This is amongst others to make it easier for 
getting help from the mailing list as to provide more information on your WO 
setup. The version number reported on the Wonder Javadoc documentation will 
reflect that version number too so you can be sure looking at the documentation 
matching your version.

Thanks for all those who contributed!


For those using their own jenkins servers:
Building the documentation put the Javadocs into a directory 
dist/wonder-6.0/Documentation. That path changed to 
dist/wonder/Documentation without the -6.0 part. You should check the 
settings of the Javadoc publisher plugin if that path is still matched or 
update it accordingly.


signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Weird PK generation failure

2014-02-07 Thread Johann Werner
Hi Maik,

as this table seems to be a join-table chances are high that on the 
relationships to that table in your EOModel you still have „Propagate primary 
key“ active if Entity Modeler did create that table.

jw


Am 07.02.2014 um 11:37 schrieb Musall Maik m...@selbstdenker.ag:

 Hi,
 
 I have a weird case where EOF fails to include the primary key with an 
 INSERT, but not every time. The model of the EO in question looks like this:
 
   PastedGraphic-1.png
 
 The linkKey column is actually new. I discovered that the primary key before 
 was (journeyElementRef,workflow) which lead to other problems I needed to 
 solve, and the database (PostgresQL) didn’t even know any primary key 
 (although there was a unique index). So I fixed that by introducing a new 
 independent primary key (changing the lock columns along with it), using the 
 following migration code (TableName substituted for readability):
 
   ERXMigrationTable table = database.existingTableNamed( 
 TableName.ENTITY_NAME );
   ERXMigrationColumn pcol = table.newIntegerColumn( linkKey, 
 ALLOWS_NULL );
   String[] sqls = new String[] {
   CREATE SEQUENCE jewfelink_seq,
   UPDATE TableName SET linkKey = nextval('jewfelink_seq'),
   DROP SEQUENCE jewfelink_seq,
   };
   for( String sql : sqls ) {
   NSLog.out.appendln( Executing SQL:  + sql );
   ERXJDBCUtilities.executeUpdate( database.adaptorChannel(), sql, 
 true );
   }
   pcol.setAllowsNull( NOT_NULL );
   table.setPrimaryKey( pcol );
 
 The generated migration code was:
 
   alter table TableName alter column linkKey set not null
   ALTER TABLE TableName ADD CONSTRAINT TableName_pk PRIMARY KEY (linkKey)
   CREATE SEQUENCE TableName_seq
   CREATE TEMP TABLE EOF_TMP_TABLE AS SELECT SETVAL('TableName_seq', 
 (SELECT MAX(linkKey) FROM TableName))
   DROP TABLE EOF_TMP_TABLE
   ALTER TABLE TableName ALTER COLUMN linkKey SET DEFAULT nextval( 
 'TableName_seq' )
 
 Looks correct to me. When I manually construct a new TableName EO in a test 
 routine, the following SQL is generated:
 
   SELECT NEXTVAL('PDCJourneyElementWorkflowElementLink_seq') AS KEY0 
 withBindings:
   INSERT INTO TableName(workflowElementRef, updateDate, linkKey, 
 workflow, journeyElementRef) VALUES (?::int4,
   NULL, ?::int4, ?::varchar(24), ?::int4) withBindings: 
 1:2(workflowElementRef), 2:173(linkKey),
   3:JE_BOOKING(workflow), 4:697860(journeyElementRef)
 
 so there’s the sequence SELECT to get a new primary key value, followed by 
 the actual INSERT. But in real usage in the application, this is all that 
 happens instead:
 
   INSERT INTO TableName(workflowElementRef, updateDate, workflow, 
 journeyElementRef) VALUES (?::int4, ?::timestamp,
   ?::varchar(24), ?::int4) withBindings: 1:7(workflowElementRef), 
 2:2014-02-07 10:39:51(updateDate), 3:JE_BOOKING(workflow),
   4:697860(journeyElementRef)
 
 which of course results in
 
   DEBUG NSLog - Commit failed on data source of type class 
 com.webobjects.eoaccess.EODatabaseContext
   java.lang.IllegalArgumentException: Attempt to insert null object into 
 an com.webobjects.foundation.NSMutableDictionary.
   at 
 com.webobjects.foundation.NSMutableDictionary.setObjectForKey(NSMutableDictionary.java:78)
   at 
 com.webobjects.eoaccess.EODatabaseContext.commitChanges(EODatabaseContext.java:6348)
   at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:386)
   at 
 com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
   at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1179)
   at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1102)
 
 because the primary key is missing, there wasn’t even the sequence SELECT 
 before the INSERT.
 
 How can this happen? I suspect it has something to do with the primary key 
 having been another column in the past that didn’t have a sequence associated 
 with it. But from the model, it looks correct to me. Is there some 
 information stored ore cached somewhere else about this?
 
 Maik
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: WOLips for Eclipse 4.3.1

2014-02-05 Thread Johann Werner

Am 04.02.2014 um 16:37 schrieb Frank Cobia frank_co...@me.com:

 I will give this a try and see if that fixes things for me. I am not sure 
 what sashWeights does, but I am not sure that is the problem. I have tried 
 doing similar things to this in the past and it would work for a while and 
 then go back to throwing the NPEs.
 
 Here are the two things I did in the source to fix things. 
 
 1) There are a lot of source files with garbled comments. I am not sure what 
 happened there, but the comments seem to have been added years ago. I think 
 the files got corrupted somehow. The java compiler complains about the 
 characters not being UTF-8. Since they are not code and I don't know how to 
 recover the un-garbbled comments, I just deleted them.

Can those comments be resurrected from the repository history? Unfortunately 
besides those comments WOLips has no documentation (or is there?)

 2) There is a kind of race condition. When you open the editor, while 
 preparing the editor, it makes a call that makes a call, that makes a call, 
 etc. Eventually that gets to a line that call core eclipse code. The core 
 eclipse code then tries to access the editor. The problem is that the editor 
 is still in the process of opening. There is probably a more elegant way to 
 fix this, since the problem is that it is trying to access a variable that 
 has not been set yet. The data that will be set already exists in a temporary 
 variable, so one possible fix could be to set the variable sooner, but I am 
 not sure if that would cause larger problems. However, the line that was 
 causing the problem, appeared, based on the comment, to fix an obscure seldom 
 encountered problem. So I commented that line out and I have not had any 
 problems.
 
 Even if deleting that file fixes the current problem, if you go to Jenkins, 
 you will see that the source no longer compiles. So, the plugin still needs 
 to be fixed.
 
 Frank
 
 
 On Feb 4, 2014, at 10:20 AM, Hugi Thordarson h...@karlmenn.is wrote:
 
 This worked like a charm, thanks guys! :)
 
 Cheers,
 - hugi
 
 
 
 On 4.2.2014, at 14:56, Jean-François Veillette 
 jean_francois_veille...@yahoo.ca wrote:
 
 I do what Lars recommended and it work!
 
 I did a compare of the file before/after and the only diff is the number of 
 that properties:
 org.objectstyle.wolips.componenteditor.sashWeights=805,194
 so you can simply remove that properties and it will work again.
 
 From what I looked at, the fix from Frank Cobia was commenting out the line 
 culprit.  I did not looked enough to conclude if it was a real fix, or a 
 mere workaround for now.
 
 jfv
 
 De : Lars Sonchocky-Helldorf lars.sonchocky-helld...@hamburg.de
 Objet : Workaround for annoying NPE bug when opening WOComponent Editor
 Date : 22 octobre 2013 06:49:28 HAE
 À : webobjects-dev@lists.apple.com List List 
 webobjects-dev@lists.apple.com
 
 Hi List,
 
 I don't know if you're also affected by this, but all my coworkers 
 experience from time to time those annoying cascades of NPEs when opening 
 a WOComponent in the WOComponent Editor on Eclipse Kepler (4.3) and 
 WOLips 4.3 which, once they're happening, never go away by themselves.
 
 Now my coworker Tommy has found a workaround for this:
 
 - shutdown Eclipse
 - delete 
 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.objectstyle.wolips.wodclipse.core.prefs
  from your workspace
 - restart Eclipse
 
 - everything should work fine now. When the problem recurs just delete 
 this file again.
 
 
 I hope this was helpful to some of you.
 
 cheers,
 
   Lars
 
 
 Le 2014-02-04 à 09:05, Hugi Thordarson h...@karlmenn.is a écrit :
 
 I’m getting an error on 4.3 where if I open a component (the component 
 editor), it just shows up empty and then proceeds to throw bazillion 
 nullpointerexceptions at me.
 
 I seem to recall having seen this before, but can’t for the life of me 
 remember what I did to fix it. Light any bulbs for anyone?
 
 Cheers,
 - hugi
 
 
 
 On 3.2.2014, at 13:55, Ken Anderson kenli...@anderhome.com wrote:
 
 3.x does the same thing...
 
 On Feb 3, 2014, at 8:47 AM, Frank Cobia frank_co...@me.com wrote:
 
 Unfortunately I got side tracked this weekend, so I did not get a 
 chance to clean up the code. 
 
 However, I have not seen the issue you are describing in EOModeler. 
 There are times when the properties panel does not populate, but you 
 just have to click on something else and then click back. So it is just 
 an annoyance and not a problem.
 
 Frank
 
 
 On Jan 31, 2014, at 12:22 PM, Lon Varscsak lon.varsc...@gmail.com 
 wrote:
 
 There was some wonkiness in the EOModeler tool too.  I vaguely 
 remember you'd go to edit a field (like class name) and it would clear 
 all the contents...so it was sort of impossible to work with.  Did 
 that ever get resolved?
 
 
 On Fri, Jan 31, 2014 at 7:44 AM, Pascal Robert prob...@macti.ca 
 wrote:
 And Eclipse 4.x full support is one of the recurrent requests in the 
 surveys!
 
 De: 

Re: Including Fonts into PDF using ERPDFGeneration

2014-01-30 Thread Johann Werner
Hi Christoph,

that’s how I create a PDF using ERPDFGeneration with custom fonts:

PDFTemplate pdfPage = pageWithName(PDFTemplate.class);
NSMutableDictionary config = new NSMutableDictionary();
config.takeValueForKey(new NSArrayString(Fonts/MyFont.ttf“, 
Fonts/MyOtherFont.ttf), fonts);
NSData pdf = 
ERPDFUtilities.htmlAsPdf(pdfPage.generateResponse().contentString(), 
CharEncoding.UTF_8, null, config);

In this example the fonts are located in a directory „Fonts“ within „Resources“.

jw


Am 30.01.2014 um 13:13 schrieb Christoph Wick wi...@me.com:

 Hi List,
 
 I try to include fonts into a PDF document using ERPDFGeneration. The 
 documentation of ERPFDWrapper tells me that there is a binding called 
 fonts. The binding is described as (optional) array of font filenames to 
 include for PDF generation.
 
 OK so far. But whatever I set the fonts bindings to, I get an 
 ClassCastException that a String cannot be casted to NSArrayString. 
 Stacktrace below.
 
 I've looked into the code and I found line 120 in FlyingSaucerImpl.java:
 
   NSArrayString fonts = (NSArrayString) 
 configuration.objectForKey(fonts); 
 
 So, what's the correct syntax of the bindings value string to be converted 
 into an NSArray of Strings? I've tried ['Font 1', 'Font2'] as well as {'Font 
 1', 'Font2'}, but that all doesn't work.
 
 Thx,
 C.U.CW
 
 
 Stacktrace:
 
 Error:java.lang.ClassCastException: java.lang.String cannot be cast 
 to com.webobjects.foundation.NSArray
 Reason:   java.lang.String cannot be cast to 
 com.webobjects.foundation.NSArray
 Stack trace:  
 File  Line#   Method  Package
 FlyingSaucerImpl.java 120 fontsFromConfiguration  er.pdf.builder
 FlyingSaucerImpl.java 91  setSource   er.pdf.builder
 ERPDFUtilities.java   132 htmlAsPdf   er.pdf
 ERPDFWrapper.java 89  responseAsPdf   er.pdf
 ERPDFWrapper.java 66  appendToResponseer.pdf
 WOComponent.java  1122appendToResponsecom.webobjects.appserver
 ERXComponent.java 195 appendToResponseer.extensions.components
 WOSession.java1385appendToResponsecom.webobjects.appserver
 WOApplication.java1794appendToResponsecom.webobjects.appserver
 ERXApplication.java   2005appendToResponseer.extensions.appserver
 ERXComponentRequestHandler.java   190 _dispatchWithPreparedPage   
 er.extensions.appserver
 ERXComponentRequestHandler.java   235 _dispatchWithPreparedSession
 er.extensions.appserver
 ERXComponentRequestHandler.java   268 
 _dispatchWithPreparedApplicationer.extensions.appserver
 ERXComponentRequestHandler.java   302 _handleRequest  
 er.extensions.appserver
 ERXComponentRequestHandler.java   378 handleRequest   
 er.extensions.appserver
 WOApplication.java1687dispatchRequest com.webobjects.appserver
 ERXApplication.java   2109dispatchRequestImmediately  
 er.extensions.appserver
 ERXApplication.java   2074dispatchRequest er.extensions.appserver
 WOWorkerThread.java   144 runOnce com.webobjects.appserver._private
 WOWorkerThread.java   226 run com.webobjects.appserver._private
 Thread.java   722 run java.lang
 
 
 -- 
 Christoph Wick - Diplom Informatiker, Managing Director
 i4innovation GmbH, Professor-Neu-Allee 39, 53225 Bonn, Germany
 
 T +49 2 28 28 62 97 93
 M +49 1 51 22 65 78 90
 F +49 2 28 28 62 97 99
 M c...@i4innovation.de
 W www.i4innovation.de
 Skype: christoph_wick
 
 Geschäftsführer: Thomas Heep, Christoph Wick
 Sitz der Gesellschaft: Bonn | Amtsgericht Bonn HRB 18548 | USt-IdNr.: 
 DE276502600
 
 
 ___
 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/jw%40oyosys.com
 
 This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: JMS in webobjects

2014-01-20 Thread Johann Werner
Hi Butchi,

in Wonder there is the ERChangeNotificationJMS framework using JMS to 
synchronize instances. I would recommend using the ERJGroupsSynchronizer 
framework though that uses JGroups (http://www.jgroups.org). It performs better 
at higher loads and is more widely used in the community I think.

jw


Am 20.01.2014 um 10:12 schrieb Butchi Reddy Velagala v.butchire...@gmail.com:

 Dear members,
  
   Is  webobjects support JMS (Java Messaging Service). If yes, please 
 share sample application with me. Or else guide me to develop a sample. 
 
 Thanks in advance,
 With regards,
 Butchi Reddy Velagala.




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Wonder(ful) logging

2014-01-14 Thread Johann Werner
Hi all,

some time back there was a discussion on github [1] and during last WOWODC 
about how logging could and should be done in Wonder and dependent 
applications/frameworks. So for those interested there is now a new wiki page 
[2] about that topic.

For those not interested: nothing will substantially change in the medium-term 
so you can safely ignore the mentioned wiki page in that case.

For comments, suggestions and the like hit the reply button ;-)

jw


[1] https://github.com/wocommunity/wonder/issues/304
[2] http://wiki.wocommunity.org/display/documentation/Wonder+Logging
 ___
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: WO 5.3 vs WO 5.4 Schema Synchronization in Wonder

2014-01-14 Thread Johann Werner
Am 14.01.2014 um 15:37 schrieb David Avendasora webobje...@avendasora.com:

 I see that the various Wonder JDBC plugins still use the older, deprecated 
 EOSynchronization API instead of the new EOSchemaSyncronization stuff in 
 WO5.4.
 
 I know we used to maintain WOnder compatibility with WO 5.3, but now that 
 that has been left behind, is there anything stopping us from moving to the 
 new(er) architecture? (I mean other than the huge risk of messing with the 
 PlugIns…)

Replacing the deprecated EOSynchronization would be a good thing. The H2 plugin 
is already converted btw.

Now it would be cool to have unit tests for the plugins… :-O

jw

 
 Dave
 
 —
 WebObjects - so easy that even Dave Avendasora can do it!™
 —
 David Avendasora
 Senior Software Abuser
 Nekesto, Inc.



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: processRecentChanges makes me sad

2013-12-04 Thread Johann Werner
Hi Hugi,

a simple – though perhaps not as elegant as you want – solution would be to 
create your own EO superclass and override init() (from ERXGenericRecord) where 
you put your logic:

@Override
protected voit init(EOEditingContext ec) {
super.init(ec);
if (this instanceof TimeStamped) {
setCreationDate(new NSTimestamp());
…
}
}

You can configure EOGenerator to use your class instead of EOGenericRecord so 
this would be a do it once and forget ;-)

HTH
jw


Am 04.12.2013 um 10:18 schrieb Hugi Thordarson h...@karlmenn.is:

 Hi all.
 
 I’ve been attempting to automate the setting of some common attributes in my 
 EOs, like creationDate, createdByUser etc. etc. Usually one might populate 
 attributes like that in awakeFromInsertion, but that's boilerplate I’d rather 
 not add to my EO classes. So instead, I’ve taken a different route. Simple 
 example:
 
 I have an interface TimeStamped, objects that I want stamped with the 
 creation date implement this interface. My application then listens for 
 EOEditingContext.ObjectsChangedInEditingContextNotification and when it’s 
 received, I iterate through inserted objects, check if they implement 
 TimeStamped and update their creation dates.
 
 This works fine, apart from a little kink: The 
 EOEditingContext.ObjectsChangedInEditingContextNotification is not broadcast 
 until WO calls processRecentChanges on the EditingContext—and that happens at 
 the *end* of the r/r-loop. This means that if I create an object, assign it 
 to a page and return it, WO will happily render the page, and THEN stamp the 
 values on the EO (which are thus not shown until the user next refreshes the 
 page).
 
 I’m aware I can expedite the broadcasting of the notification by manually 
 invoking processRecentChanges before returning the page—but that kind of 
 ruins the whole “get this functionality out of my face” aspect of the 
 mechanism.
 
 Anyone have any happy litle ideas on how to tackle the problem?
 
 Cheers,
 - hugi
 
 // Hugi Þórðarson
 // Góður kóði
 // 895-6688 / 561-0896




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: How to increase Session Time interval?

2013-10-31 Thread Johann Werner
Hi Butchi,

you could set the timeout interval directly on the session object like in your 
login method [1]. This enables you to decide per session how long that time 
interval should be based on user rights or other circumstances. Or if you want 
to change it generally you could change the default session timeout on the 
application object [2].


[1] 
http://wocommunity.org/documents/javadoc/WebObjects/5.4.2/com/webobjects/appserver/WOSession.html#setTimeOut(double)
[2] 
http://wocommunity.org/documents/javadoc/WebObjects/5.4.2/com/webobjects/appserver/WOApplication.html#setSessionTimeOut(java.lang.Number)

jw


Am 31.10.2013 um 11:25 schrieb Butchi Reddy Velagala v.butchire...@gmail.com:

 Hi All, 
 
 We are using ERXSession for session management. Default Session time 
 interval is 1 hour. I would like to increase the time interval. Please let me 
 know, how to do it?
 
 * We tried with adding a property ( WOSessionTimeOut ) in properties file, 
 but it is not working. 
 
 Thanks in advance




signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: jgroups synchronizer still used?

2013-08-26 Thread Johann Werner
The code needs only some very simple changes to work with jgroups 3.0


Am 26.08.2013 um 03:20 schrieb Dov Rosenberg d...@cfl.rr.com:

 The last version we updated to was 2.11.0
 
 
 I guess it really isn't the latest anymore
 
 
 Dov Rosenberg
 407-310-8316
 d...@cfl.rr.com
 
 
 On Aug 25, 2013, at 9:16 PM, Ken Anderson kenli...@anderhome.com wrote:
 
 Dov,
 
 I'm not sure how you could be using the latest jgroups, since 
 ChannelException no longer exists.  Maybe you have the latest 2.X?
 
 Ken
 
 
 On Aug 25, 2013, at 9:00 PM, Dov Rosenberg d...@cfl.rr.com wrote:
 
 We are using it but we upgraded the jgroups to the newest version. Had to 
 update the jgroups config but the synchronizer code still works fine
 
 Dov Rosenberg 
 407-310-8316
 
 On Aug 25, 2013, at 8:23 PM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 I'm using it.  I don't have any statistics to back this up but it 
 definitely resolved our issue of keeping the data between instances in 
 sync.
 
 On Aug 25, 2013, at 12:12 PM, Ken Anderson kenli...@anderhome.com wrote:
 
 All,
 
 In digging deeper into my synchronizer woes, I see that the version of 
 jgroups is 4 years old.  Is anyone still using this stuff?
 
 Ken
 ___
 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/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.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/dov%40cfl.rr.com
 
 This email sent to d...@cfl.rr.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/jw%40oyosys.de
 
 This email sent to j...@oyosys.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: java docs?

2013-08-22 Thread Johann Werner
It's a bug in the latest version of Jenkins.


Am 22.08.2013 um 21:33 schrieb Theodore Petrosky tedp...@yahoo.com:

 I clicked the link in Ken's Wonderbar. are we down?
 
 http://jenkins.wocommunity.org/job/WonderIntegration/lastBuild/javadoc/?
 
 Status Code: 404
 
 Exception: 
 Stacktrace:
 (none)
 
 
 Generated by Winstone Servlet Engine v0.9.10 at Thu Aug 22 15:43:44 EDT 2013



 ___
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: [Ajax] - Returning a file after ajaxlongresponse

2013-08-05 Thread Johann Werner
You could return an ERXRedirect pointing to a DirectAction or WOComponent that 
initiates your download.


Am 05.08.2013 um 09:44 schrieb Dev WO webobje...@anazys.com:

 Hello,
 
 I'm having some trouble trying to return a file after an ajaxlongresponse.
 
 I'm currently have my callable task used through ajaxlongresponse 
 (CCAjaxLongResponsePage), I'm generating a woresponse (which is actually a 
 file) then hand back this woresponse to the controller component (which is my 
 regular page where I also initiate the longresponse from.
 I'd like the file to be downloaded without user interaction at the end of the 
 task, but so far I'm just able to get the response into my controller (so if 
 I make another link on the page to download it works, but I don't want this 
 extra step).
 
 Any help would be great as I'm running out of ideas on this one:)
 
 Thanks,
 
 Xavier



 ___
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: WOWODC working groups and open labs -

2013-06-17 Thread Johann Werner

Am 15.06.2013 um 21:18 schrieb Pascal Robert prob...@macti.ca:

 For the working groups:
 
  - Documentation
  - WOCommunity Web site and « marketing »
  - Mobile with WO
  - jQuery framework
  - Cayenne and Wonder 

- Wonder / WOLips code organization (github, releases, …)
- Roadmap for unit tests in Wonder, requirements for code submission

 
 
 Are others interested in working on specific topics or helping others during 
 working groups or open labs??
 
 I figure there are common topics of mutual interest, so if you’re looking 
 for help — or if you’re looking to offer help on specific topics — then 
 let’s discuss before we meet next week because there’s much to be learned 
 from each other over just a few short days!
 
 Here’s my list:
 
 I can help with
  D2W
  Anything iOS / mobile
  Startup stuff
 
 I need help with
  JSONP and cross origin forms
  ERRest Clients and remote services
  ERSync (if it’s still available)
 
 I’m excited to see everyone at WOWODC so, what’s your list? Let’s organize!
 


 ___
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: Sending 304 reponses

2013-06-06 Thread Johann Werner
Hi Tarun,

the entry point for requests is ERXApplication.createRequest(…) that you could 
override in you application class. There you can access header values and 
decide to end the request without further computation by returning null. 
Another place would be ERXApplication.dispatchRequest(…) where you have already 
a WORequest object to work with and where you could return an arbitrary 
WOResponse object to be sent back to the client. The next location would be the 
WORequestHandler.handleRequest(…) but to override that you would need to create 
a subclass of the specific request handler and register that one so WO uses it 
instead of the original handler.
All depends on how you are able to determine if the requested resource has not 
been modified / how much of the RR-loop has to be covered.

jw


Am 31.03.2013 um 18:16 schrieb Tarun Reddy t...@cornell.edu:

 So I've managed to add Last-modified headers to my applications responses, 
 but what is the best way to check for If-Modified-Since and do the 
 appropriate thing?
 
 I'm using postAppendToResponse for Last-modifed. Is there something similar 
 that I can use to intercept the request early before the page gets built?
 
 Thank you,
 Tarun



 ___
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: patch for wonders NSArray implementation

2013-06-06 Thread Johann Werner
Hi Oliver,

you are right that the behavior is a little different in Wonder. I looked into 
that method that had been changed to the current form in April 2009:

NSArray._findObjectInArray(…) is a private method so it cannot be called 
outside of NSArray which makes it easier to assess the implications of the 
different behaviors (code snippet at end of mail for illustration purposes). If 
that method is called with the param identical = true – like from 
NSArray.indexOfIdenticalObject(…) – the result is not affected by the different 
coding, thus everything is fine.
If that method is called with identical = false – like from 
NSArray.indexOfObject(…) – the result can differ. Let's make an example:

Integer one = new Integer(1),
Integer otherOne = new Integer(1);
NSArrayInteger array = new NSArrayInteger(new Integer[] { one, otherOne } );
int index = array.indexOfObject(otherOne);

With the original implementation of NSArray we would get an index of 1 as it 
will first check all objects on reference equality in the first run and then on 
value equality in a second run. With the Wonder version we will get an index of 
0 as that implementation checks every item on reference and on value equality 
before checking the next one. If you really wanted the exact index you would 
have to call

int index = array.indexOfIdenticalObject(otherOne);

To sum up, that code change in NSArray is an optimization compared to the 
original. Especially with big arrays that method will probably take much less 
time to return. You have to choose between indexOfObject and 
indexOfIdenticalObject in your code depending on if it is really important to 
you to get the identical object, though for the cases I can think of you should 
be fine getting the index of an object that could be either identical or equal. 
If not please elaborate :)

jw



Current Wonder code:

private final int _findObjectInArray(int index, int length, Object object, 
boolean identical) {
if (count()  0) {
Object[] objects = objectsNoCopy();
int maxIndex = (index + length) - 1;
for (int i = index; i = maxIndex; i++) {
if (objects[i] == object) {
return i;
} 
if (!identical  object.equals(objects[i])) {
return i;
}
}
}
return NotFound;
}


Original code:

private final int _findObjectInArray(int index, int length, Object object, 
boolean identical) {
if (count()  0) {
Object[] objects = objectsNoCopy();
int maxIndex = (index + length) - 1;
for (int i = index; i = maxIndex; i++) {
if (objects[i] == object) {
return i;
} 
}
if (!identical) {
for (int i = index; i = maxIndex; i++) {
if (object.equals(objects[i])) {
return i;
}
}
}
}
return NotFound;
}



Am 18.02.2013 um 15:43 schrieb Oliver Egger oliver.eg...@gmail.com:

 Hi all
 
 During upgrading the wonder frameworks to the 6.0 versions we noticed a 
 changed behaviour
 in NSArray.
 
 In the NSArray_findObjectInArray function, if identical is set to false, the 
 orginial version does not
 return an earlier equal object (as the wonder version does) but the first 
 object matching the same object.
 
 Please consider to include the attached patch, if you need further 
 information do not hesitate to contact
 me.
 
 Best regards
 Oliver
 
 
 @@ -510,10 +510,12 @@ public class NSArrayE implements Cloneable, 
 Serializable, NSCoding, NSKeyValue
 
if (objects[i] == object) {
 
return i;
 
} 
 
 -  if (!identical  object.equals(objects[i])) {
 
 +  }
 
 +  if(!identical)
 
 +  for (int i = index; i = maxIndex; i++) {
 
 +  if (object.equals(objects[i])) {
 
return i;
 
}
 
 -
 
}
 
  
}
 
 
 -- 
 -- 
 oliver egger


 ___
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: malformed bundle version number in deployment with Java 1.6

2013-06-06 Thread Johann Werner
Hi David,

I vaguely remember that that warning does not necessarily mean the Java version 
number of your jars is wrong but the cfBundleVersion of the framework is not 
parseable (I think its in the Info.plist file of the framework).

jw


Am 06.06.2013 um 21:04 schrieb David Holt programming...@mac.com:

 Hi all,
 
 Just when I thought I'd seen everything deployment could throw at me….
 
 I had an app giving me malformed version number errors for the App and Model 
 framework. I discovered that there are some jars in Wonder that are version 
 50 so I thought I'd switch java versions on the server rather than try and 
 fight Wonder.
 
 I switched the server Java version to Java 1.6
 
 I rebuilt the App and Model framework in eclipse with compiler settings set 
 to 1.6. There are no errors on my development box when I run in eclipse.
 
 Now when I try to deploy the app with fully embedded frameworks I can start 
 it on the command line (it still complains about malformed version numbers).
 
 I don't know why the app won't start in JavaMonitor and produces no log
 
 I have deleted the app and model framework and rebuilt everything.
 
 Have I missed something?
 
 thanks,
 David


 ___
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: Size of fetched array

2013-05-27 Thread Johann Werner
Hi Thomas,

you would use a fetch spec for that where you can set a limit.

EOFetchSpecification fs = …
fs.setFetchLimit(10);
NSArrayMaintenanceJob doubleJobs = ec.objectsWithFetchSpecification(fs);


jw


Am 27.05.2013 um 11:59 schrieb Thomas Grass (01SoftwareSolutions) 
off...@01softwaresolutions.eu:

 Hello WO-Coders,
 
 I fetch objects with special bindings like the following example:
 
 [...]
 NSMutableDictionaryString, Object bindings = new 
 NSMutableDictionaryString, Object();
   if(selectedJob.description()!=null) 
 bindings.setObjectForKey(selectedJob.description(), description);
   if(selectedJob.validSystem()!=null) 
 bindings.setObjectForKey(selectedJob.validSystem(), validSystem);
   if(selectedJob.component()!=null) 
 bindings.setObjectForKey(selectedJob.component(), component);
   if(selectedJob.subComponent()!=null) 
 bindings.setObjectForKey(selectedJob.subComponent(), subComponent);
   NSArrayMaintenanceJob doubleJobs = 
 MaintenanceJob.fetchForDoubleCheck(session.defaultEditingContext(), bindings);
 […]
 
 Is there a way to tell the fetch-Method the max number of objects to be 
 fetched? For example: 10 Objects?
 
 Thomas
 


 ___
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: checking device or platform

2013-05-22 Thread Johann Werner
Instead of mySession().browser() you should preferably use browser() that 
ERXComponent provides. That's a little bit shorter and works also for 
sessionless pages.

jw


Am 22.05.2013 um 12:35 schrieb Raymond NANEON rnan...@me.com:

 Hi List,
 
 I want to check the device or platform on which my app running, to activate 
 or not some options. Does it exist a component which does it well?
 
 I try WOConditional and test this example : 
 
 in Html
 
   webobject name = platform
 webobject name = navmobileOption/webobject
   /webobject
 
 in woD
 
 platform : WOConditional {
 condition = platform;
 }
 
 in Java :
 
 public boolean platform() {
 return mySession().browser().isIPad()
 || mySession().browser().isIPhone()
 || mySession().browser().isUnknownPlatform();
 }
 
 This example don't activate mobileOption when I run my app on my iPhone.
 
 Thanks for help
 Envoyé depuis iCloud



 ___
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: checking device or platform

2013-05-22 Thread Johann Werner

Am 22.05.2013 um 14:05 schrieb Raymond NANEON rnan...@me.com:

 Hi Johann,
 
 Thanks for your advice but it doesn't resolve my issue.

Uhm, yeah, that happens when the phone rings while writing an email ;-)

So browser().isIPhone() returns false? You should check the values in 
ERXBrowserFactory.parsePlatform what your iPhone sends as user-agent string and 
why the browser object is initialized with a different platform. If there is a 
bug, patches for wonder are welcome :-)

jw


 Envoyé depuis iCloud
 
 Le 22 mai 2013 à 04:40, Johann Werner j...@oyosys.de a écrit :
 
 Instead of mySession().browser() you should preferably use browser() that 
 ERXComponent provides. That's a little bit shorter and works also for 
 sessionless pages.
 
 jw
 
 
 Am 22.05.2013 um 12:35 schrieb Raymond NANEON rnan...@me.com:
 
  Hi List,
  
  I want to check the device or platform on which my app running, to 
  activate or not some options. Does it exist a component which does it well?
  
  I try WOConditional and test this example : 
  
  in Html
  
  webobject name = platform
  webobject name = navmobileOption/webobject
  /webobject
  
  in woD
  
  platform : WOConditional {
  condition = platform;
  }
  
  in Java :
  
  public boolean platform() {
  return mySession().browser().isIPad()
  || mySession().browser().isIPhone()
  || mySession().browser().isUnknownPlatform();
  }
  
  This example don't activate mobileOption when I run my app on my iPhone.
  
  Thanks for help
  Envoyé depuis iCloud
 
 


 ___
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: joda model mysql adaptorValueType error

2013-05-15 Thread Johann Werner
Hi James,

do you have the ERAttributeExtension framework on your classpath? Does it come 
before JavaEOAccess?

jw


Am 14.05.2013 um 15:14 schrieb James Cicenia ja...@jimijon.com:

 Hello -
 
 This bug has been driving me a bit batty.
 
 1) Column created via a migration:  
 erAuthenticationRequestTable.newTimestampColumn(requestDate, false);
 2) Entity's code:
 
 public org.joda.time.DateTime requestDate() {
 return (org.joda.time.DateTime) 
 storedValueForKey(_ERAuthenticationRequest.REQUEST_DATE_KEY);
   }
 
   public void setRequestDate(org.joda.time.DateTime value) {
 if (_ERAuthenticationRequest.LOG.isDebugEnabled()) {
   _ERAuthenticationRequest.LOG.debug( updating requestDate from  + 
 requestDate() +  to  + value);
 }
 takeStoredValueForKey(value, _ERAuthenticationRequest.REQUEST_DATE_KEY);
   }
 
 
 3)  The error happens before requestDate() is even called.
 
 4)  In the model used the erprototypes jodaDateTime prototype.
 
 Now I have looked at my other project and I can't see what is different.
 
 
 Error:
 
 Caused by: java.lang.IllegalStateException: adaptorValueType: unable to load 
 class named 'DateTime' for attribute requestDate on entity 
 ERTwoFactorAuthenticationRequest
 
 Thanks 
 James



 ___
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: Apache adaptor for OS X 10.8

2013-03-26 Thread Johann Werner
Hi Pascal,

some months ago I did a 10.8 (with installed server tools) setup for WO. The 
problem is that Apple changed a lot in the directory structure of apache, e.g. 
the config files in /etc/apache2 are not used anymore by the apache that comes 
with the system. I can't remember exactly what I did but looking at the config 
files of the system now I have those places where WO related things are found:

file: /Library/Server/Web/Config/apache2/httpd.conf
added Include path to your webobjects apache conf to the end of the file

file: /Library/Server/Web/Config/apache2/httpd_server_app.conf
added Include path to your webobjects apache conf to the end of the file
within the IfModule alias_module directive there is ScriptAliasMatch 
^/cgi-bin/((?!(?i:webobjects)).*$) /Library/Server/Web/Data/CGI-Executables/$1

Probably the changes in the httpd.conf are unnecessary though. The web server 
resources of your WO applications have to be placed in 
/Library/Server/Web/Data/Sites/Default/WebObjects to be accessible to the 
world. There too the directory /Library/WebServer/Documents used in the past is 
not used anymore on OS X 10.8.

Hope that helps.

jw


Am 26.03.2013 um 19:45 schrieb Pascal Robert prob...@macti.ca:

 So it seems that the Apache adaptor (mod_WebObjects) is having a couple of 
 problems on 10.8. The problem is that the module is loading (httpd -M list 
 it), but all directives related to the adaptor (WebObjectsAlias, etc.) are 
 not loaded, even if the configuration file IS loaded. Does anyone have a 
 working adaptor for 10.8? 
 
 And no, going to Apache 2.4 is not an option, at least not for me. The place 
 I'm trying to install the adaptor needs to keep the Apache installation that 
 is coming with OS X.



 ___
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: Conditional around opening part of another component only?

2013-03-19 Thread Johann Werner
Hi John,

a good phrase someone wrote on this list long ago was: if something is 
complicated to do in WO you are doing it wrong

So to your problem: your hyperlinks are differing in one or more attributes so 
why not moving those attributes to your code and returning the appropriate 
value there instead of making complicated HTML spaghetti ;-)

ERXHyperlink href=$myConditionalHref
... bunch of html that applies to both the above conditions
/wo:ERXHyperlink


in code:

public String myConditionalHref() {
return condition ? value1 : value2;
}


Am 19.03.2013 um 12:35 schrieb John Pollard j...@pollardweb.com:

 Is there any way to conditionally determine the opening html for a component 
 only, not the whole thing?:
 
 wo:if condition=...
   wo:ERXHyperlink ...abc
 /wo:if
 wo:else
  wo:ERXHyperlink ...xyz
 /wo:else
  ... bunch of html that applies to both the above conditions
 /wo:ERXHyperlink
 
 Trying it, I can't, I am told that the  wo:ERXHyperlink ...abc at the top 
 is missing its closing tag, so presumably it has to be complete within the if 
 clause.
 
 My only solution seems to be to take the   ... bunch of html that applies to 
 both the above conditions and put it into a different component, but that is 
 a pain because that html invokes many methods from this component.
 
 It feels like it would be nice to turn chunks of html into local 
 html-only-components, that are part of the same WOComponent, but can be 
 referenced more than once.
 
 Thanks
 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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: AjaxUpdateLink and Downloading File

2013-02-23 Thread Johann Werner
Hi Raymond,

for file downloads you should use normal WOHyperlink and not the ajax kind.

jw


Am 21.02.2013 um 14:44 schrieb Raymond NANEON rnan...@me.com:

 Hi,
 
 I want to use AjaxUpdateLink to download an xml file
 Here is the java method
 
 public WOActionResults detailProjetXML(){
 
 NSData xmlData = EditionsDetailProjets.detailXmlProjets(bindings, sess);
 ERXResponse erxResp = new ERXResponse();
 if (xmlData != null) {
 erxResp.setHeader(maxage=1, Cache-Control);
 erxResp.setHeader(public, Pragma);
 erxResp.setHeader(fileName, Content-Title);
 erxResp.setHeader(CktlDataResponse.MIME_XML, Content-Type);
 erxResp.setHeader(String.valueOf(xmlData.length()), 
 Content-Length);
 erxResp.setHeader(attachement; filename=\ + fileName + \, 
 Content-Disposition);
 erxResp.setContent(xmlData);
 } else {
 erxResp.setContent();
 erxResp.setHeader(0, Content-Length);
 }
 return erxResp;
 }
 
 in wod :
 
 ReportingXml : AjaxUpdateLink {
 action = ctrl.detailProjetXML;
 name = xml - détaillé;
 onComplete = function() { menu.hideMenu(); };
 }
 When I click on reportingXml link, nothing happens. There are no file to 
 download.
 
 What I am doing wrong?
 
 Thanks for your help.
 
 Envoyé depuis iCloud



 ___
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: ERJGroupsSynchronizer Configuration Question

2013-02-23 Thread Johann Werner
Hi Johnny,

Am 22.02.2013 um 07:11 schrieb Johnny Miller jlmil...@kahalawai.com:

 Hi,
 
 I have two apps running on the same host.  Same model.  Same db.
 
 So I have this in both app's properties file:
 
 ## (Optional) the JGroups group name to use (defaults to 
 WOApplication.application.name)
 er.extensions.jgroupsSynchronizer.groupName=MyGroup
 
 My question is do I need to set these two properties to different 
 addresses/ports or is it ok if they communicate on the same one?

Short answer: no.

As both of your two apps are using the same EOModel they should talk to each 
other. Setting different addresses/ports would separate them making 
synchronization impossible.

jw

 
 ## (Optional) the multicast address to use (defaults to 230.0.0.1, and only 
 necessary if you are using multicast)
 #er.extensions.jgroupsSynchronizer.multicastAddress=230.0.0.1
 
 ## (Optional) the multicast port to use (defaults to 9753, and only necessary 
 if you are using multicast)
 #er.extensions.jgroupsSynchronizer.multicastPort=9753
 
 Thanks in advance,
 
 Johnny


 ___
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


  1   2   3   4   >