Re: [Q] D2W sorting lists with property level custom component

2011-03-16 Thread Markus Ruggiero
On 14.03.2011, at 19:24, Markus Ruggiero wrote:

 More D2W problems here:
 
 I have a simple D2W list page with a couple of attributes. All the columns 
 have the sort icon and sorting works. One of the attributes is a very large 
 string. So I created a CollapsibleLargeString property level component. This 
 component is basically a WOCollapsibleComponentContent that shows the full 
 string in opened state and shows a truncated version of the string as the 
 collapsed label. When I use this component sorting does not work any more. 
 All the records can be sorted by clicking the sort icon above the columns but 
 the column for that large string does not sort with the rest of the list. 
 Thus the displayed values stay at their place and the rest of the table sorts 
 around them. Why? What does a custom component for display have to do with 
 the sort order? Why is the whole table sorted but this particular column 
 stays as it was? Sortkey is properly set. Replacing the custom component by 
 e.g. D2WDisplayString fixes the issue.
 

Weird, but the problem has gone somehow / fixed itself :-)
Love that kind of solution

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

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


Modelling boolean in D2W compliant way

2011-03-16 Thread Markus Ruggiero
I have a (Oracle) table where boolean attributes are defined as char(1) with 
possible values Y, N, or NULL (is equivalent to N). Due to 3rd party apps 
I cannot change the database to char(5) and use the standard modelling 
technique of toString() and valueOf() with Strings true and false in the 
DB. How can I model such an attribute  in a D2W compliant way? I have tried the 
following: rename the attribute in EOModel to publishedYN but leave the 
column name published and added published() and setPublished() to the 
business logic. This works and I can e.g. use ERD2WCustomeQueryBoolean in my 
query page configuration. However when I click query I get the following 
exception:

java.lang.IllegalStateException: sqlStringForKeyValueQualifier: attempt to 
generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (publish = 
(java.lang.Boolean)'false') failed because attribute identified by key 
'publish' was not reachable from from entity 'TechdocType'

Yes, there is no such attribute and thus the crash makes sense. How can I fix 
this? Any ideas? Unfortunately it is not possible to extend java.lang.Boolean

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

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

Re: Can't launch from JavaMonitor

2011-03-16 Thread John Baldwin

On Tuesday Mar 15  4:40 PM, at 4:40 PM, Chuck Hill wrote:

 
 On 2011-03-15, at 3:05 PM, John Baldwin wrote:
 
 Thanks.
 
 On the memory problem, it works sometimes when I put in adjusted memory 
 settings. So I think the problem is related to launching a java app in  the 
 server, which is overloaded at this point. I still have more success when 
 launching by hand. But I don't think it's a WO issue.
 
 It could be that the JVM can't allocate enough memory for the minimum heap 
 size.
 
 
 I don't think my Wonder install is that old. circa Jan. 31.
 
 As long as that is 2011 that should be plenty new enough.  :-)
 

Indeed, 2011. The dust bunnies aren't growing teeth yet.

 
 I did some research, and saw others had the not a subclass of WOComponent 
 issue before.  (Your suggestion from then to log the name of the class 
 showed it was org.apache.log4j.chainsaw.Main that was getting found.) The 
 suggestion I followed that worked for me was to put the Main class in the 
 same package as the Application class.
 
 It looks it up as Main so finding the right class is classpath order 
 dependant.
 
 Another suggestion was to rename the Main component to XYZMain (or 
 whatever). Perhaps a fully qualified class name might work also 
 (com.mypackage.components.Main).
 
 Yes.
 
 I also tried moving the ERJars jar down in the build order, but that caused 
 an error (Your main bundle is JavaFoundation...)
 
 Do you have anything in the Java/Extensions directory on that machine?
 

Well, um, yeah. I had a bunch of old junk in there. But I deleted it all and 
this particular behavior continued. I moved the ERJars down in the build order 
based on the suggestion that it was creating the conflict with the Main class. 
I've been able to move it back up, and all is well again.

 
 Chuck
 
 
 On Tuesday Mar 15  1:33 PM, at 1:33 PM, Chuck Hill wrote:
 
 
 On Mar 15, 2011, at 12:42 AM, John Baldwin wrote:
 
 I set up my application on a server, but when I try to launch it via 
 JavaMonitor, I get:
 
 /Local/Library/WebObjects/Applications/FAIdealDashboard.woa/FAIdealDashboard
 
 java.io.IOException: error=12, Cannot allocate memory
 
 This happens immediately, before any logging can occur. The application 
 runs fine in development.
 
 Initially, I was getting the same error when I tried to run the 
 application from the command line on the server. So I changed the launch 
 parameters in the UNIXClassPath.txt  to set memory parameters, and then I 
 could launch the application from the command line.
 
 But still the application won't launch through JavaMonitor. Are there 
 other steps I need to take to adjust the memory within WebObjects? (I've 
 tried removing the application and adding the application and an instance, 
 but to no avail.)
 
 Add the memory setting to the Additional Arguments section in JavaMonitor.  
 Is it possible that you are trying to allocate more memory than is 
 supported under CentOS?
 
 
 
 This is running on a CentOS system. The application is fully embedded.
 
 When I run from the command line, I can connect to the application, but it 
 throws an exception:
 
 Error: java.lang.IllegalArgumentException: Class 'Main' exists but is 
 not a subclass of WOComponent.
 
 Main is a subclass of ERXComponent. I doubt this is related, but just in 
 case.
 
 That should indicate that ERXExtensions is not getting loaded first.  It 
 should be if Application extends ERXApplication and the main() function 
 follows the Wonder pattern.  Or it could mean your version of Wonder is 
 old.  :-)
 
 
 Chuck
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 
 

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

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