Re: Date - time picker

2017-10-13 Thread Stavros Panidis
Dear Mark

YES, it works fine!

Many thanks for all your efforts, have a nice week end

Stavros

 ___
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 upgrade 6 to 7

2017-10-13 Thread Chuck Hill
Hi Rachel,

The problem with that property seems to be that two different pieces of code 
are using it and one still has the old name.

The question you really need to answer is why the principal class getting 
initialized is affecting your DB connection:
https://github.com/wocommunity/wonder/blob/master/Frameworks/EOAdaptors/JavaERJDBCAdaptor/Sources/er/jdbcadaptor/PrincipalClass.java

All that is doing is setting the delegate:
https://github.com/wocommunity/wonder/blob/master/Frameworks/EOAdaptors/JavaERJDBCAdaptor/Sources/er/jdbcadaptor/ERAdaptorContextDelegate.java

I had a brief look at this and did not see anything that looked suspicious.

Chuck


From: Rachel Han 
Date: Thursday, October 12, 2017 at 8:45 PM
To: Chuck Hill 
Subject: Re: Wonder upgrade 6 to 7

Hi Chuck,

Thank you so much for your reply. :)

So I went to check why the build.properties file in JavaJDBCAdaptor framework 
get changed from the git history, then I find 
this:(https://github.com/wocommunity/wonder/commit/3b4161daefdc883e0ce7f69bb8dbeea5003b05f6#diff-443c66aa35046e768ef88a148b081593)

Here are the comments on the commit:



ressurect principalClass property

Temporarily ressurect the principalClass property as the build files bundled 
with WOLips are looking for that instead of project.principal.class and thus 
will produce problems when you run a project within Eclipse instead of running 
the ant build that uses the build.xml files from Wonder. We will remove that 
when WOLips has been updated…



Should I wait for the build.properties get changed back to previous version in 
the future? I will still go through the principle class and see what breaks the 
DB connection and will report back if anything interesting comes up.



Thank you again for your help and it is really appreciated.

Cheers,

Rachel

On 13 October 2017 at 06:03, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
Hi Rachel,

One clarification: the NSPrincipal class in a bundle (.framework usually), is 
loaded and initialized (static init done) when NSBundle loads the bundle at the 
start of application launch.  That class can then do any runtime configuration 
that the bundle needs.  Something in er.jdbcadaptor.PrincipalClass must be 
doing something that affects your database connections, check the code to see 
what.

This file is generated from the (from memory) woantbuild.properties file in the 
framework.   Or maybe wobuild.properties.

Chuck

From: Webobjects-dev 
mailto:gevityinc@lists.apple.com>>
 on behalf of Rachel Han 
mailto:rachel@vmlabs.id.au>>
Date: Wednesday, October 11, 2017 at 5:52 PM
To: "webobjects-dev@lists.apple.com" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Wonder upgrade 6 to 7

Hi All,

I am a webobjects developer for a few years now and we have a project which is 
about 10 years old, so it is kind of hibernation of legacy and sweetness of 
wonder. We were doing wonder upgrade from 6 to 7 and like to share our 
experience in the forum so it would be of any help if anyone having the same 
issue.


Firstly, of course download wonder7 from jenkins latest build, and copied all 
the frameworks over to Library/Frameworks. And then reopen eclipse oxygen 
(eclipse caches frameworks, so need to be reopened and then clean the project), 
after fixed all the compile error,

Then run the application gave me this exception:

Oct 12 09:21:27 xxx[51032] WARN  NSLog  - An exception occurred while trying to 
open a channel: N/A

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.Exceptions  - Database 
Exception occured: java.lang.IllegalStateException: _obtainOpenChannel -- 
er.extensions.eof.ERXDatabaseContext 
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database channel. 
 Check your connection dictionary, and ensure your database is correctly 
configured.

Oct 12 09:21:27 xxx[51032] INFO  er.extensions.eof.ERXDatabaseContextDelegate  
- xxx: {username = "xxx"; driver = "oracle.jdbc.driver.OracleDriver"; 
DataSourceJndiName = "xxx"; password = ""; URL = 
"jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Checking JDBC connection with information {username = "xxx"; driver = 
"oracle.jdbc.driver.OracleDriver"; DataSourceJndiName = "xxx"; password = 
""; URL = "jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to create JDBCAdaptor...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Successfully created adaptor class er.extensions.jdbc.ERXJDBCAdaptor

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to create plugin...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Created plugin class com.webobjects.jdbcadaptor.EROraclePlugIn

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.Con

Re: Object registered within another EditingContext

2017-10-13 Thread Chuck Hill
A correction: ec.lock() does not lock the object store.  The object store only 
gets locked when operations that may change EO state are performed - fetching 
and saving being the most common.

Chuck


From: Webobjects-dev 
 on behalf of René 
Bock 
Date: Friday, October 13, 2017 at 1:14 AM
To: Paul Hoadley 
Cc: WebObjects-Dev 
Subject: Re: Object registered within another EditingContext

Hi,

just creating a new EOEditingContext for the background task may lead to nasty 
deadlocks, as this EC refers to the default object store.  As an ec.lock()  
locks its object store, so locking the ec  in the background  task has a side 
effect to the ECs in the main (worker) thread.

You may consider to use ERXTask, which relies on a separate object store 
coordinator. (there is nice screencast about this topic in the WOCommunity 
space)

The downside will be, that you have more open database connections and an 
increased heap footprint.


Am 13.10.2017 um 00:42 schrieb Paul Hoadley 
mailto:pa...@logicsquad.net>>:

Hi André,

On 13 Oct 2017, at 04:53, André Rothe 
mailto:andre.ro...@phosco.info>> wrote:

Then I have created a thread with a new EditingContext to insert a lot of 
detail records, which have a reference to the first inserted record.

You need to take some additional care when working in a background thread.

1. Don’t pass an existing EOEditingContext into a background thread, create a 
new one—you’re doing this.

2. Don’t pass existing EOs into a background thread, pass in the object’s 
EOGlobalID, and then get the object in the thread using that ID.

* ERXEOControlUtilities.convertEOtoGID()
* ERXEOControlUtilities.convertGIDtoEO()

3. There are some classes in er.extensions.concurrency that you might find 
helpful, though I’ve never used them. If you just want to use regular Java 
concurrency features, remember to handle EC locking/unlocking yourself:

ec.lock();
try {
  // ...
} finally {
  ec.unlock();
}

(On the main thread, Wonder handles locking/unlocking for you.)


--
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/bock%40salient-doremus.de

This email sent to b...@salient-doremus.de

Mit freundlichen Grüßen

René Bock

--
Telefon: +49 69 650096 18

salient GmbH, Lindleystraße 12, 60314 Frankfurt
Telefon Zentrale: 069 / 65 00 96 - 0  |  
www.salient-doremus.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: Date - time picker

2017-10-13 Thread Mark Gowdy
Hi, 

I found that bootstrap (with jQuery) and the Ajax framework (prototype.js) 
would tend to clash a bit.

Try these 3 things in order:

1) Try putting this just before 
jQuery.noConflict();
And when you access jQuery in your page, don’t use the ‘$.someThing()’ 
notation, use the full ‘jQuery.someThing()’ instead.

2) The order in which you put the  is also 
significant (but this can be tricky to control because Ajax injects its own 
ones at runtime).

3) If things start randomly disappearing from the browser.
I found that the prototype.js has a hide(element) function that causes issues 
with Bootstrap v3.

My comment:  (in my /js/ajax_prototype_fix.js file)
 * Contains a minor update to help with an issue with Twitter Bootstrap v3, 
where certain elements (pop-ups, etc) would disappear after a roll-over.
 * See the 'hide(element)' function below.
 * To use, add 'noProtoJs' to your element's class (if you find they disappear 
for no obvious reason). 
 * E.g. Tab 1
 *
 * TODO: There is certainly a better way to fix this issue, but this works for 
now.

I replaced the hide function with:

  function hide(element) {
/*  MG - See intro text at top. This helps with Twitter BootStrap 3 */
if(!hasClassName(element, 'noProtoJs')){
element = $(element);
element.style.display = 'none';
}
return element;
  }

You can tell Wonder to load a different prototype.js using config:
# Replace the default Ajax:prototype.js with my own one (to fix a bootstrap 
issue)
er.extensions.ERXResponseRewriter.resource.Ajax.prototype.js=MGUtilities.mg/js/ajax_prototype_fix.js


Good luck.

Mark


> On 13 Oct 2017, at 15:43, Stavros Panidis  wrote:
> 
> Dear Theodore,
> 
> sure you are not. Sure it is my problem to explain due also to my pure 
> english.
> 
> 
> In my application I use bootstrap css framework for styling (getbootstrap.com 
> ) . This framework has also a nice date/time picker 
> component. This works fine inside my WOComponent but when I add a 
> AjaxUpdateContainer at the same component does not work anymore.
> 
> Then I tried the AjaxDate picker from Ajax examples. This works fine but it 
> is not conforms in style with other elements like text fields, check boxes 
> etc.
> 
> I hope that I explained a little bit.
> 
> Stavros
> 
>> On 13 Oct 2017, at 16:30, Stavros Panidis > > wrote:
>> 
>> Dear,
>> 
>> I try to implement Bootstrap date time picker style in a WOComponent. 
>> Javascript and css works fine except the case that in this component the is 
>> also a AjaxUpdateContainer (which I certainly need for other controls).
>> 
>> I tried also with AjaxDatePicker which works fine but I don’t know if it is 
>> possible to apply bootstrap styling on this.
>> 
>> Any suggestions?
>> 
>> Stavros
> 
> ___
> 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/mark%40gowdy.co.uk
> 
> This email sent to m...@gowdy.co.uk

_
Mark Gowdy
Gowdy Associates Ltd
M: +44 7808 400 941
Skype: markgowdy




 ___
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: Date - time picker

2017-10-13 Thread Stavros Panidis
Dear Theodore,

sure you are not. Sure it is my problem to explain due also to my pure english.


In my application I use bootstrap css framework for styling (getbootstrap.com 
) . This framework has also a nice date/time picker 
component. This works fine inside my WOComponent but when I add a 
AjaxUpdateContainer at the same component does not work anymore.

Then I tried the AjaxDate picker from Ajax examples. This works fine but it is 
not conforms in style with other elements like text fields, check boxes etc.

I hope that I explained a little bit.

Stavros

> On 13 Oct 2017, at 16:30, Stavros Panidis  wrote:
> 
> Dear,
> 
> I try to implement Bootstrap date time picker style in a WOComponent. 
> Javascript and css works fine except the case that in this component the is 
> also a AjaxUpdateContainer (which I certainly need for other controls).
> 
> I tried also with AjaxDatePicker which works fine but I don’t know if it is 
> possible to apply bootstrap styling on this.
> 
> Any suggestions?
> 
> Stavros

 ___
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: Date - time picker

2017-10-13 Thread Theodore Petrosky
I am sure that everyone here understands this and I am just ignorant, but what 
do you mean, “Bootstrap date time picker”?

Ted

> On Oct 13, 2017, at 9:30 AM, Stavros Panidis  
> wrote:
> 
> Dear,
> 
> I try to implement Bootstrap date time picker style in a WOComponent. 
> Javascript and css works fine except the case that in this component the is 
> also a AjaxUpdateContainer (which I certainly need for other controls).
> 
> I tried also with AjaxDatePicker which works fine but I don’t know if it is 
> possible to apply bootstrap styling on this.
> 
> Any suggestions?
> 
> Stavros
> ___
> 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

 ___
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


Date - time picker

2017-10-13 Thread Stavros Panidis
Dear,

I try to implement Bootstrap date time picker style in a WOComponent. 
Javascript and css works fine except the case that in this component the is 
also a AjaxUpdateContainer (which I certainly need for other controls).

I tried also with AjaxDatePicker which works fine but I don’t know if it is 
possible to apply bootstrap styling on this.

Any suggestions?

Stavros
 ___
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: Object registered within another EditingContext

2017-10-13 Thread Andre Rothe
That's a good point, the solution with localInstanceIn() works till I access 
the record within the defaultEC again. Then I have a deadlock.
I have created the first record an send the global Id to the thread:

final EOGlobalID globalId = defContext.globalIDForObject(myObject);

new Thread() {

 public void run() {
    EOObjectStoreCoordinator oc = new EOObjectStoreCoordinator();
                EOEditingContext ec = new EOEditingContext(oc);
                ec.lock();

    try {
               MyObject movedObject = ec.faultForGlobalID(globalId, ec);
   // do something

    } finally {
    ec.unlock();
    }
    }
}.start();


Seems to work. The screencast was very interesting.

Thank you
Andre

        
 



 Von:   René Bock  
 An:   Paul Hoadley  
 Kopie:   WebObjects-Dev  
 Gesendet:   13.10.2017 10:13 
 Betreff:   Re: Object registered within another EditingContext 


 Hi, 

 
just creating a new EOEditingContext for the background task may lead to nasty 
deadlocks, as this EC refers to the default object store.  As an ec.lock()  
locks its object store, so locking the ec  in the background  task has a side 
effect to  the ECs in the main (worker) thread. 

 
You may consider to use ERXTask, which relies on a separate object store 
coordinator. (there is nice screencast about this topic in the WOCommunity 
space)  
  
The downside will be, that you have more open database connections and an 
increased heap footprint. 

 

 
 
 
Am 13.10.2017 um 00:42 schrieb Paul Hoadley : 
 
 
 Hi André, 

 
On 13 Oct 2017, at 04:53, André Rothe  wrote: 

 
 
 
 
Then I have created a thread with a new EditingContext to insert a lot of 
detail records, which have a reference to the first inserted record. 

 
You need to take some additional care when working in a background thread. 

 
1. Don’t pass an existing EOEditingContext into a background thread, create a 
new one—you’re doing this. 

 
2. Don’t pass existing EOs into a background thread, pass in the object’s 
EOGlobalID, and then get the object in the thread using that ID. 

 
 
* ERXEOControlUtilities.convertEOtoGID() 
 
* ERXEOControlUtilities.convertGIDtoEO() 

 
3. There are some classes in er.extensions.concurrency that you might find 
helpful, though I’ve never used them. If you just want to use regular Java 
concurrency features, remember to handle EC locking/unlocking yourself: 

 
ec.lock(); 
try { 
  // ... 
} finally { 
  ec.unlock(); 
} 

 
(On the main thread, Wonder handles locking/unlocking for you.) 

 

 
 
 
 -- 
 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/bock%40salient-doremus.de
 
 This email sent to b...@salient-doremus.de
 
 
 
 
 Mit freundlichen Grüßen 
 
 René Bock
 
 -- 
 Telefon: +49 69 650096 18 
 
 salient GmbH, Lindleystraße 12, 60314 Frankfurt
 Telefon Zentrale: 069 / 65 00 96 - 0  |  www.salient-doremus.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/andre.rothe%40zks.uni-leipzig.de
 
 
This email sent to andre.ro...@zks.uni-leipzig.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: Object registered within another EditingContext

2017-10-13 Thread René Bock
Hi,

just creating a new EOEditingContext for the background task may lead to nasty 
deadlocks, as this EC refers to the default object store.  As an ec.lock()  
locks its object store, so locking the ec  in the background  task has a side 
effect to the ECs in the main (worker) thread.

You may consider to use ERXTask, which relies on a separate object store 
coordinator. (there is nice screencast about this topic in the WOCommunity 
space)

The downside will be, that you have more open database connections and an 
increased heap footprint.


Am 13.10.2017 um 00:42 schrieb Paul Hoadley 
mailto:pa...@logicsquad.net>>:

Hi André,

On 13 Oct 2017, at 04:53, André Rothe 
mailto:andre.ro...@phosco.info>> wrote:

Then I have created a thread with a new EditingContext to insert a lot of 
detail records, which have a reference to the first inserted record.

You need to take some additional care when working in a background thread.

1. Don’t pass an existing EOEditingContext into a background thread, create a 
new one—you’re doing this.

2. Don’t pass existing EOs into a background thread, pass in the object’s 
EOGlobalID, and then get the object in the thread using that ID.

* ERXEOControlUtilities.convertEOtoGID()
* ERXEOControlUtilities.convertGIDtoEO()

3. There are some classes in er.extensions.concurrency that you might find 
helpful, though I’ve never used them. If you just want to use regular Java 
concurrency features, remember to handle EC locking/unlocking yourself:

ec.lock();
try {
  // ...
} finally {
  ec.unlock();
}

(On the main thread, Wonder handles locking/unlocking for you.)


--
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/bock%40salient-doremus.de

This email sent to b...@salient-doremus.de

Mit freundlichen Grüßen

René Bock

--
Telefon: +49 69 650096 18

salient GmbH, Lindleystraße 12, 60314 Frankfurt
Telefon Zentrale: 069 / 65 00 96 - 0  |  
www.salient-doremus.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