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;
>>      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 :-(
>> 
>> <David>
>> Can you give us the final step please?
>> </David>
>> 
>> Hope this helps you a little bit.
>> 
>> <ListStatisticsController.java>
>> 
>> 
>> 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 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/prabier%40me.com
>>> 
>>> This email sent to prab...@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:
>> http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
>> 
>> This email sent to programming...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Reply via email to