Re: D2W app and Excel and PDF generation example (also msg for David Holt)

2011-08-05 Thread Philippe Rabier
Thanks David, that was the missing rule. Everything works.

Philippe

On 5 août 2011, at 19:21, David Holt wrote:

> Hi guys,
> 
> SimpleBlog also has an example of this stuff including ERModernLook 
> compatible CSS for the ERDControllerButton. I think that ERDActionBar might 
> be more appropriate for this because it provides a button at the page level, 
> but there is certainly nothing stopping you from creating your action in your 
> table's rows.
> 
> Here is the answer to your specific question about the button appearing all 
> over the place:
> 
> 50 : *true* => controllerButtonComponentName = "ERXEmptyComponent" 
> [com.webobjects.directtoweb.Assignment]
> 60 : pageConfiguration = 'ListMyBlogEntry' => controllerButtonComponentName = 
> "ERDControllerButton" [com.webobjects.directtoweb.Assignment]
> 
> David
> 
> 
> On 2011-08-05, at 1:38 AM, Philippe Rabier wrote:
> 
>> Hi Johan,
>> 
>> (David, Q for you at then end)
>> 
>> I have the same issue: I want to generate export list into an excel file but 
>> I didn't completely succeed because it took too much time to get it work 
>> (question of priority).
>> 
>> But I'm not far. So if you are using ModernLook, I found  informations: 
>> search in the list a msg sent by Markus Ruggiero in march (or look for 
>> ERDControllerButton)
>> 
>> What you have to do, is create a controller (see the java class in 
>> attachment, small code that exports statistics, only not every list).
>> 
>> I created 2 rules like this one (for each entity and I give you a real code 
>> because it's coherent with java class so it's less confusing) :
>> {
>>   author = 100;
>>   class = "com.webobjects.directtoweb.Rule";
>>   lhs = {
>>   class = "com.webobjects.eocontrol.EOAndQualifier";
>>   qualifiers = (
>>   {
>>   class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>>   key = "entity.name";
>>   selectorName = isEqualTo;
>>   value = NODailyStatistic;
>>   },
>>   {
>>   class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>>   key = task;
>>   selectorName = isEqualTo;
>>   value = list;
>>   }
>>   );
>>   };
>>   rhs = {
>>   class = "er.directtoweb.ERDDelayedObjectCreationAssignment";
>>   keyPath = pageController;
>>   value = "fr.sophiacom.app.ListStatisticsController";
>>   };
>> }-
>> A rule for the file content like this:
>> {
>>   author = 100;
>>   class = "com.webobjects.directtoweb.Rule";
>>   lhs = {
>>   class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>>   key = pageConfiguration;
>>   selectorName = isEqualTo;
>>   value = ListExcelNODailyStatistic;
>>   };
>>   rhs = {
>>   class = "com.webobjects.directtoweb.Assignment";
>>   keyPath = displayPropertyKeys;
>>   value = (
>>   "application.name",
>>   day,
>>   nbSingleNotification,
>>   nbMassiveNotification,
>>   nbNotification,
>>   nbAppReleaseCreated,
>>   nbAppReleaseRemoved
>>   );
>>   };
>> }
>> -
>> and one rule to make the controller button working:
>> {
>>   author = 100;
>>   class = "com.webobjects.directtoweb.Rule";
>>   lhs = {
>>   class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>>   key = propertyKey;
>>   selectorName = isEqualTo;
>>   value = controllerAction;
>>   };
>>   rhs = {
>>   class = "com.webobjects.directtoweb.Assignment";
>>   keyPath = componentName;
>>   value = ERDControllerButton;
>>   };
>> }
>> 
>> But after that, I didn't see any button in the UI :-( 
>> 
>> I found the solution in the wiki, I guess: you have to modify the css (I 
>> suppose you have your own css).
>> By default:
>> .ERDControllerButton {
>>  display: none;
>> }
>> 
>> and put something like that (I'm not good at all at css)
>> 
>> /*  Beginning ERDControllerButton */
>> 
>> .ERXJSFlyOver span {
>>  left: 45px;
>> }
>> 
>> .ERXJSFlyOver li {
>>  display: block;
>> }
>> 
>> .ERDControllerButton {
>>  display: block !important;
>> }
>> 
>> .ERDControllerButtonLinkList {
>>  display: inline;
>>  margin: 0px;
>>  padding: 0px; /* 0px */
>> }
>> 
>> .ERDControllerButtonLinkList li {
>>  display: inline;
>>  margin: 10px;
>>  padding: 0px;
>>  font-family: Arial, Geneva, sans-serif;
>>  font-size: 9px;
>> }
>> 
>> .ERDControllerButtonLinkList li a {
>>  padding: 0px 5px;
>> }
>> 
>> /* uistyle = "flyOver" */
>> 
>> .ERDControllerButtonFlyOverList {
>>  background-color: #414B5E;
>>  color: #C2C6CF;
>>  border: 1px solid #333;
>>  width: 150px;
>>  padding: 0px;
>> }
>> 
>> .ERDControllerButtonFlyOverList a {
>>  color: #CCC;
>> }
>> 
>> .ERDControllerButtonFlyOverList a:hover {
>>  color: #FFF;
>>

Re: D2W app and Excel and PDF generation example (also msg for David Holt)

2011-08-05 Thread David Holt
Hi guys,

SimpleBlog also has an example of this stuff including ERModernLook compatible 
CSS for the ERDControllerButton. I think that ERDActionBar might be more 
appropriate for this because it provides a button at the page level, but there 
is certainly nothing stopping you from creating your action in your table's 
rows.

Here is the answer to your specific question about the button appearing all 
over the place:

50 : *true* => controllerButtonComponentName = "ERXEmptyComponent" 
[com.webobjects.directtoweb.Assignment]
60 : pageConfiguration = 'ListMyBlogEntry' => controllerButtonComponentName = 
"ERDControllerButton" [com.webobjects.directtoweb.Assignment]

David


On 2011-08-05, at 1:38 AM, Philippe Rabier wrote:

> Hi Johan,
> 
> (David, Q for you at then end)
> 
> I have the same issue: I want to generate export list into an excel file but 
> I didn't completely succeed because it took too much time to get it work 
> (question of priority).
> 
> But I'm not far. So if you are using ModernLook, I found  informations: 
> search in the list a msg sent by Markus Ruggiero in march (or look for 
> ERDControllerButton)
> 
> What you have to do, is create a controller (see the java class in 
> attachment, small code that exports statistics, only not every list).
> 
> I created 2 rules like this one (for each entity and I give you a real code 
> because it's coherent with java class so it's less confusing) :
> {
>author = 100;
>class = "com.webobjects.directtoweb.Rule";
>lhs = {
>class = "com.webobjects.eocontrol.EOAndQualifier";
>qualifiers = (
>{
>class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>key = "entity.name";
>selectorName = isEqualTo;
>value = NODailyStatistic;
>},
>{
>class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>key = task;
>selectorName = isEqualTo;
>value = list;
>}
>);
>};
>rhs = {
>class = "er.directtoweb.ERDDelayedObjectCreationAssignment";
>keyPath = pageController;
>value = "fr.sophiacom.app.ListStatisticsController";
>};
> }-
> A rule for the file content like this:
> {
>author = 100;
>class = "com.webobjects.directtoweb.Rule";
>lhs = {
>class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>key = pageConfiguration;
>selectorName = isEqualTo;
>value = ListExcelNODailyStatistic;
>};
>rhs = {
>class = "com.webobjects.directtoweb.Assignment";
>keyPath = displayPropertyKeys;
>value = (
>"application.name",
>day,
>nbSingleNotification,
>nbMassiveNotification,
>nbNotification,
>nbAppReleaseCreated,
>nbAppReleaseRemoved
>);
>};
> }
> -
> and one rule to make the controller button working:
> {
>author = 100;
>class = "com.webobjects.directtoweb.Rule";
>lhs = {
>class = "com.webobjects.eocontrol.EOKeyValueQualifier";
>key = propertyKey;
>selectorName = isEqualTo;
>value = controllerAction;
>};
>rhs = {
>class = "com.webobjects.directtoweb.Assignment";
>keyPath = componentName;
>value = ERDControllerButton;
>};
> }
> 
> But after that, I didn't see any button in the UI :-( 
> 
> I found the solution in the wiki, I guess: you have to modify the css (I 
> suppose you have your own css).
> By default:
> .ERDControllerButton {
>   display: none;
> }
> 
> and put something like that (I'm not good at all at css)
> 
> /*  Beginning ERDControllerButton */
> 
> .ERXJSFlyOver span {
>   left: 45px;
> }
> 
> .ERXJSFlyOver li {
>   display: block;
> }
> 
> .ERDControllerButton {
>   display: block !important;
> }
> 
> .ERDControllerButtonLinkList {
>   display: inline;
>   margin: 0px;
>   padding: 0px; /* 0px */
> }
> 
> .ERDControllerButtonLinkList li {
>   display: inline;
>   margin: 10px;
>   padding: 0px;
>   font-family: Arial, Geneva, sans-serif;
>   font-size: 9px;
> }
> 
> .ERDControllerButtonLinkList li a {
>   padding: 0px 5px;
> }
> 
> /* uistyle = "flyOver" */
> 
> .ERDControllerButtonFlyOverList {
>   background-color: #414B5E;
>   color: #C2C6CF;
>   border: 1px solid #333;
>   width: 150px;
>   padding: 0px;
> }
> 
> .ERDControllerButtonFlyOverList a {
>   color: #CCC;
> }
> 
> .ERDControllerButtonFlyOverList a:hover {
>   color: #FFF;
>   text-decoration: underline;
> }
> /*  End ERDControllerButton */
> 
> And I was able to see the button (a popup actually) and it WORKS. Very happy. 
> But the button/popup appears on "every" screen (query, edit, …). So I 

Re: D2W app and Excel and PDF generation example (also msg for David Holt)

2011-08-05 Thread Philippe Rabier
Hi Johan,

(David, Q for you at then end)

I have the same issue: I want to generate export list into an excel file but I 
didn't completely succeed because it took too much time to get it work 
(question of priority).

But I'm not far. So if you are using ModernLook, I found  informations: search 
in the list a msg sent by Markus Ruggiero in march (or look for 
ERDControllerButton)

What you have to do, is create a controller (see the java class in attachment, 
small code that exports statistics, only not every list).

I created 2 rules like this one (for each entity and I give you a real code 
because it's coherent with java class so it's less confusing) :
{
author = 100;
class = "com.webobjects.directtoweb.Rule";
lhs = {
class = "com.webobjects.eocontrol.EOAndQualifier";
qualifiers = (
{
class = "com.webobjects.eocontrol.EOKeyValueQualifier";
key = "entity.name";
selectorName = isEqualTo;
value = NODailyStatistic;
},
{
class = "com.webobjects.eocontrol.EOKeyValueQualifier";
key = task;
selectorName = isEqualTo;
value = list;
}
);
};
rhs = {
class = "er.directtoweb.ERDDelayedObjectCreationAssignment";
keyPath = pageController;
value = "fr.sophiacom.app.ListStatisticsController";
};
}-
A rule for the file content like this:
{
author = 100;
class = "com.webobjects.directtoweb.Rule";
lhs = {
class = "com.webobjects.eocontrol.EOKeyValueQualifier";
key = pageConfiguration;
selectorName = isEqualTo;
value = ListExcelNODailyStatistic;
};
rhs = {
class = "com.webobjects.directtoweb.Assignment";
keyPath = displayPropertyKeys;
value = (
"application.name",
day,
nbSingleNotification,
nbMassiveNotification,
nbNotification,
nbAppReleaseCreated,
nbAppReleaseRemoved
);
};
}
-
and one rule to make the controller button working:
{
author = 100;
class = "com.webobjects.directtoweb.Rule";
lhs = {
class = "com.webobjects.eocontrol.EOKeyValueQualifier";
key = propertyKey;
selectorName = isEqualTo;
value = controllerAction;
};
rhs = {
class = "com.webobjects.directtoweb.Assignment";
keyPath = componentName;
value = ERDControllerButton;
};
}

But after that, I didn't see any button in the UI :-( 

I found the solution in the wiki, I guess: you have to modify the css (I 
suppose you have your own css).
By default:
.ERDControllerButton {
display: none;
}

and put something like that (I'm not good at all at css)

/*  Beginning ERDControllerButton */

.ERXJSFlyOver span {
left: 45px;
}

.ERXJSFlyOver li {
display: block;
}

.ERDControllerButton {
display: block !important;
}

.ERDControllerButtonLinkList {
display: inline;
margin: 0px;
padding: 0px; /* 0px */
}

.ERDControllerButtonLinkList li {
display: inline;
margin: 10px;
padding: 0px;
font-family: Arial, Geneva, sans-serif;
font-size: 9px;
}

.ERDControllerButtonLinkList li a {
padding: 0px 5px;
}

/* uistyle = "flyOver" */

.ERDControllerButtonFlyOverList {
background-color: #414B5E;
color: #C2C6CF;
border: 1px solid #333;
width: 150px;
padding: 0px;
}

.ERDControllerButtonFlyOverList a {
color: #CCC;
}

.ERDControllerButtonFlyOverList a:hover {
color: #FFF;
text-decoration: underline;
}
/*  End ERDControllerButton */

And I was able to see the button (a popup actually) and it WORKS. Very happy. 
But the button/popup appears on "every" screen (query, edit, …). So I stop my 
research at this time, because, again, it's not my top priority.

During the WOWODC, I discussed with David (Holt) after his session and he gave 
me a solution but I wrote on a sheet of paper I lost it :-(


Can you give us the final step please?


Hope this helps you a little bit.



ListStatisticsController.java
Description: Binary data



Philippe
---
SOPHIACOM
http://twitter.com/prabier

On 4 août 2011, at 11:06, Johan Henselmans wrote:

> I want to add PDF and Excel generation to some pages in a D2W application. 
> 
> I saw some talk about adding Excel or PDF on the mailinglist, but most of it 
> was way over my head, mostly because there seem to be 3 or more ways to 
> achieve the same thing. 
> 
> I looked if I could find some example in the Wonder Examples and the wiki, 
> but did not find it.
> 
> Is there any concise example that someone ca

Re: D2W app and Excel and PDF generation example

2011-08-04 Thread Q
You should be able to create a custom page wrapper and use a rule to set the 
"enabled" binding on ERPDFWrapper to turn any valid XHTML page into a PDF.

On 04/08/2011, at 7:33 PM, Johan Henselmans wrote:

> 
> Op 4 aug. 2011, om 11:22 heeft Paul Hoadley het volgende geschreven:
> 
>> On 04/08/2011, at 6:36 PM, Johan Henselmans wrote:
>> 
>>> Is there any concise example that someone can share?
>> 
>> There's a short screencast of Quinton's that shows you how to get 
>> ERPDFGeneration off the ground using the ERPDFWrapper component.
>> 
>> http://idisk.mac.com/qdolan-Public/webobjects/PDFIn60Seconds.mov
>> 
> 
> Thanks, I have seen that one, but it does not explain how to get a D2W 
> ListPage or InspectPage to be downloaded as a PDF document, it is in the 
> 'regular' WOComponent way. 
> 
> But thanks anyway.
> 
>> See also the component's Javadocs:
>> 
>> http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/pdf/ERPDFWrapper.html
>> 
>> 1.  The component content must be valid XHTML.
>> 2.  ERPDFWrapper should be the outermost component on the page, and the 
>> closing tag should not have any trailing content, even whitespace.
>> 3.  The default rendering engine (FlyingSaucer + iText) understands some 
>> print-specific CSS, such as page sizes, the 'page-break-inside' property.
>> 
>> 
>> -- 
>> Paul.
>> 
>> http://logicsquad.net/
>> 
>> 
> 
> Johan Henselmans
> jo...@netsense.nl
> 
> 
> 
> ___
> 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/qdolan%40gmail.com
> 
> This email sent to qdo...@gmail.com



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

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


Re: D2W app and Excel and PDF generation example

2011-08-04 Thread Paul Hoadley
On 04/08/2011, at 7:03 PM, Johan Henselmans wrote:

>> http://idisk.mac.com/qdolan-Public/webobjects/PDFIn60Seconds.mov
> 
> Thanks, I have seen that one, but it does not explain how to get a D2W 
> ListPage or InspectPage to be downloaded as a PDF document, it is in the 
> 'regular' WOComponent way. 

Ah, sorry Johan.  I misunderstood your requirements.


-- 
Paul.

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

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


Re: D2W app and Excel and PDF generation example

2011-08-04 Thread Johan Henselmans

Op 4 aug. 2011, om 11:22 heeft Paul Hoadley het volgende geschreven:

> On 04/08/2011, at 6:36 PM, Johan Henselmans wrote:
> 
>> Is there any concise example that someone can share?
> 
> There's a short screencast of Quinton's that shows you how to get 
> ERPDFGeneration off the ground using the ERPDFWrapper component.
> 
> http://idisk.mac.com/qdolan-Public/webobjects/PDFIn60Seconds.mov
> 

Thanks, I have seen that one, but it does not explain how to get a D2W ListPage 
or InspectPage to be downloaded as a PDF document, it is in the 'regular' 
WOComponent way. 

But thanks anyway.

> See also the component's Javadocs:
> 
> http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/pdf/ERPDFWrapper.html
> 
> 1.  The component content must be valid XHTML.
> 2.  ERPDFWrapper should be the outermost component on the page, and the 
> closing tag should not have any trailing content, even whitespace.
> 3.  The default rendering engine (FlyingSaucer + iText) understands some 
> print-specific CSS, such as page sizes, the 'page-break-inside' property.
> 
> 
> -- 
> Paul.
> 
> http://logicsquad.net/
> 
> 

Johan Henselmans
jo...@netsense.nl



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

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


Re: D2W app and Excel and PDF generation example

2011-08-04 Thread Paul Hoadley
On 04/08/2011, at 6:36 PM, Johan Henselmans wrote:

> Is there any concise example that someone can share?

There's a short screencast of Quinton's that shows you how to get 
ERPDFGeneration off the ground using the ERPDFWrapper component.

http://idisk.mac.com/qdolan-Public/webobjects/PDFIn60Seconds.mov

See also the component's Javadocs:

http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/pdf/ERPDFWrapper.html

1.  The component content must be valid XHTML.
2.  ERPDFWrapper should be the outermost component on the page, and the closing 
tag should not have any trailing content, even whitespace.
3.  The default rendering engine (FlyingSaucer + iText) understands some 
print-specific CSS, such as page sizes, the 'page-break-inside' property.


-- 
Paul.

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

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


D2W app and Excel and PDF generation example

2011-08-04 Thread Johan Henselmans
I want to add PDF and Excel generation to some pages in a D2W application. 

I saw some talk about adding Excel or PDF on the mailinglist, but most of it 
was way over my head, mostly because there seem to be 3 or more ways to achieve 
the same thing. 

I looked if I could find some example in the Wonder Examples and the wiki, but 
did not find it.

Is there any concise example that someone can share?

(I'd also like to add this feature to ERD2W/CoolComponents, that one could have 
something like task=list ErPDFDownloadButton=true, if that does not exist 
already)


Johan Henselmans
jo...@netsense.nl



 ___
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