Re: Re: fetching on joined table

2011-04-12 Thread naneon . raymond
Hi Chuck,

thanks for your reply. So I thought about stored procedures? But How I include 
in my code and can I cast resultset in EOEntities Objects?
I want to use data in my WOPopUpButton.

Thanks

Ray




Message du : 12/04/2011
De : "Chuck Hill " 
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 Hi Ray,

WebObjects is not going to generate SQL like that for you (maybe it is 
possible, but it would be very difficult).  I think  that you have two choices:


1. Use views
2. Think and fetch in terms of Objects not tables and rows and joins.  This is 
going to be VERY different than how you are approaching the data now.


It is possible that WebObjects is just not a good thing to use with your schema.




Chuck





On Apr 12, 2011, at 12:49 AM,   
wrote:

Hi chuck,

I go to give you more informations about data. I work in IT Universtity in 
France and we have huge database with lot of table. Here is an example of PDM 
(5 tables)


person 
>students->degree-->diploma-->academic 
year-->period_param->admin_resgistration
                               (fk_person)        (fk_student)      
(fk_academic_year)     (pk an_univ  prd_univ)    (fields an_univ_prd_univ)    
(fk_diploma, fk_person, fk_student, fk_academic_year)




and I have lof view (view_student_course on a period ...),
 Here is code of view vue_parcours_profil using to have student curse :


CREATE OR REPLACE FORCE VIEW "GEST_UV"."VUE_PROFIL_PARCOURS" ("ETU_ID", 
"DIPLOME_$C", "REORIENT_$F", "PRD_DEBUT", "PRD_FIN")
AS
  SELECT DISTINCT t3.e,
    t3.d,
    t3.reorient_$f,
    MIN(p_deb) over (partition BY t3.e, t3.d, t3.p_fin) debut,
    t3.p_fin fin
  FROM
    (SELECT DISTINCT t1.e,
      t1.d,
      t1.no,
      t1.p p_deb,
      NVL(MIN(t2.p) over (partition BY t1.e, t1.d, t1.no), MAX (t1.p) over 
(partition BY t1.e, t1.d)) p_fin,
      CASE
        WHEN t1.no = 1
        AND t2.r  IS NULL
        THEN t1.r
        ELSE DECODE(t2.r,NULL,'N',t2.r)
      END reorient_$f
      --DECODE(t2.r,null,'N',t2.r) reorient_$f
    FROM
      (SELECT DISTINCT etu_id e,
        diplome_$c d,
        an_univ
          prd_univ p,
        ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
          prd_univ NULLS LAST) no,
        DECODE(res_pedag_$c,'RE','O','DR','O','N') r
      FROM gerry.etu_inscr_adm eia1
      ) t1,
      (SELECT DISTINCT etu_id e,
        diplome_$c d,
        an_univ
          prd_univ p,
        ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
          prd_univ NULLS LAST) no,
        DECODE(res_pedag_$c,'RE','O','DR','O','N') r
      FROM gerry.etu_inscr_adm eia2
      ) t2
    WHERE t1.e = t2.e(+)
    AND t1.d   = t2.d(+)
    AND t1.no  < t2.no(+)
    AND t1.r  <> t2.r(+)
      --and t1.r = 'N'
    AND ((t1.no        = 1
    AND NVL(t1.r,'N') IN ('O','N'))
    OR (t1.no          > 1
    AND NVL(t1.r,'N')  = 'N'))
    ) t3;



So when I want all students curse in sql developer this my request :


SELECT vtp.etu_id as STUDENT_ID,
    vtp.diplome_$c as DIPLOMA_CODE,
    DECODE (vtp.diplome_$c,'ING',d.diplome
       ' ancien règlement',d.diplome) as DIPLOMA_NAME,
    vtp.prd_debut as PERIOD_BEGIN,
    vtp.prd_fin as PERIOD_END,
    gerry.fonc_trad_prd_lib(vtp.prd_debut,'anprd') as ACADEMIC_YEAR_BEGIN,
    gerry.fonc_trad_prd_lib(vtp.prd_fin,'anprd') ACADEMIC_YEAR_END,
    vtp.reorient_$f as ORIENTATION,
    (SELECT DIPL_SPEC_ABR
         ' '
         DIPL_OPT_ABR
         ' '
         NIVEAU_ADM
    FROM gerry.vue_eia_abr veia
    WHERE veia.etu_id  = vtp.etu_id
    AND veia.diplome_$c=vtp.diplome_$c
    AND veia.an_univ
        veia.prd_univ=vtp.prd_fin
    ) as DIPLOMA_SPECIFICITY,
    (SELECT diplome_num
    FROM gest_uv.etu_diplome
    WHERE etu_id   = vtp.etu_id
    AND diplome_$c = vtp.diplome_$c
    AND an_univ
        prd_univ BETWEEN vtp.prd_debut AND vtp.prd_fin
    ) as DIPLOMA_NUMBER,
    (SELECT SITUATION
    FROM gerry.etu_inscr_adm eia,
      gerry.ref_situation rs
    WHERE rs.situation_$c = eia.situation_$c
    AND eia.etu_id        = vtp.etu_id
    AND eia.diplome_$c    =vtp.diplome_$c
    AND eia.an_univ
        eia.prd_univ=vtp.prd_fin
    ) as STUDENT_SITUATION,
    NVL(
    (SELECT DECODE(situation_$c,'DEMI','O','N')
    FROM gerry.etu_inscr_adm
    WHERE etu_id    = vtp.etu_id
    AND diplome_$c  =vtp.diplome_$c
    AND situation_$c='DEMI'
    AND an_univ
        prd_univ=vtp.prd_fin
    ),'N') as IS_STUDENT_RESIGNED,
    NVL(
    (SELECT DECODE(situation_$c,'UTX','O','N')
    FROM gerry.etu_inscr_adm
    WHERE etu_id    = vtp.etu_id
    AND diplome_$c  =vtp.diplome_$c
    AND situation_$c='UTX'
    AND an_univ
        prd_univ=vtp.prd_fin
    ),'N') as IS_STUDENT_TRANSFERED
  FROM gest_uv.VUE_PROFIL_PARCOURS vtp,
    gerry.diplome d
  WHERE vtp.diplome_$c = d.diplome_$c

order by prd_debut, prd_fin;


So I must fetch 

Re: responseForComponentWithName() and session

2011-04-12 Thread Chuck Hill
You can also take a look at the source of GVC.SiteMaker if you want.  I will 
warn you that it is a little on the large side.

http://sourceforge.net/projects/gvcsitemaker/


Chuck


On Apr 12, 2011, at 8:24 PM, Paolo Sommaruga wrote:

> 
> Thanks Chuck,
> 
> I will look at 
> templateWithHTMLString I don't 
> know it
> 
> Paolo
> 
> Il giorno 13/apr/2011, alle ore 02:52, Chuck Hill  
> ha scritto:
> 
>> 
>> On Apr 12, 2011, at 2:25 PM, Paolo Sommaruga wrote:
>> 
>>> Hi,
>>> 
>>> I try to explain more. My web application is sort of cms. Basically the 
>>> idea is simple.
>> 
>> Maybe a little too simple for what you want now.  :-)
>> 
>> 
>>> The main page displays an eoObject that has an attribute "text".  The 
>>> administrator can edit such "text" attribute via a java client application. 
>>> He can insert anywhere in the "text" some special tag, like
>>> 
>>> [component  myCustomComponent]
>> 
>> Real WO syntax, inline bindings, and WOComponent's 
>> public static WOElement templateWithHTMLString(String frameworkName,
>>String referenceName,
>>String anHTMLString,
>>String aDeclarationString,
>>NSArray aLanguageArray,
>>WOAssociationFactory 
>> associationFactory,
>>WOMLNamespaceProvider 
>> namespaceProvider)
>> Might get you a lot closer to where you want to go.  I think that is what 
>> most WO CMS applications use.
>> 
>> 
>> 
>>> myCustomComponent is a component name, which lives in the web application, 
>>> taken by a custom component library. Such custom component implement simple 
>>> reusable behaviors for display only purpose, like products list, categories 
>>> list, etc.
>>> 
>>> In the web application the "text" attribute binds to a method that parses 
>>> the text. If the parse finds a special tag, it replaces such tag with the 
>>> html generated by the component specified in the special tag. For this I 
>>> use 
>>> 
>>> WOResponse response = 
>>> (WOApplication.application()).responseForComponentWithName(componentName,
>>>   null,
>>>   null,
>>>   null,
>>>   uriPrefix,
>>>   null);
>>>   
>>> buf.append(response.contentString());
>>> 
>>> Such engine works very well with the stateless component.
>> 
>> I confess to not being sure what that method is for.  But I don't think it 
>> is meant for what you are doing.
>> 
>> 
>>> The problem is when the generated programmatically component need to access 
>>> to some field in the session because the component generated with 
>>> responseForComponentWithName lives in a new session.
>> 
>> I will guess that if it used the same session, that your app would deadlock. 
>>  :-)
>> 
>> 
>>> I would like to extend the engine in order to use some simple stateful 
>>> component
>> 
>> Even if it does not deadlock, you are not going to be able to use stateful 
>> components and component actions using responseForComponentWithName.
>> That runs in an whole new Request-Response loop with a new WOContext.  WO 
>> won't know what to do with the result.  I think...
>> 
>> 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
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean.

-- 
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









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: responseForComponentWithName() and session

2011-04-12 Thread Paolo Sommaruga

Thanks Chuck,

I will look at 
templateWithHTMLString I don't 
know it

Paolo

Il giorno 13/apr/2011, alle ore 02:52, Chuck Hill  ha 
scritto:

> 
> On Apr 12, 2011, at 2:25 PM, Paolo Sommaruga wrote:
> 
>> Hi,
>> 
>> I try to explain more. My web application is sort of cms. Basically the idea 
>> is simple.
> 
> Maybe a little too simple for what you want now.  :-)
> 
> 
>> The main page displays an eoObject that has an attribute "text".  The 
>> administrator can edit such "text" attribute via a java client application. 
>> He can insert anywhere in the "text" some special tag, like
>> 
>>  [component  myCustomComponent]
> 
> Real WO syntax, inline bindings, and WOComponent's 
> public static WOElement templateWithHTMLString(String frameworkName,
>String referenceName,
>String anHTMLString,
>String aDeclarationString,
>NSArray aLanguageArray,
>WOAssociationFactory 
> associationFactory,
>WOMLNamespaceProvider 
> namespaceProvider)
> Might get you a lot closer to where you want to go.  I think that is what 
> most WO CMS applications use.
> 
> 
> 
>> myCustomComponent is a component name, which lives in the web application, 
>> taken by a custom component library. Such custom component implement simple 
>> reusable behaviors for display only purpose, like products list, categories 
>> list, etc.
>> 
>> In the web application the "text" attribute binds to a method that parses 
>> the text. If the parse finds a special tag, it replaces such tag with the 
>> html generated by the component specified in the special tag. For this I use 
>> 
>>  WOResponse response = 
>> (WOApplication.application()).responseForComponentWithName(componentName,
>>   null,
>>   null,
>>   null,
>>   uriPrefix,
>>   null);
>>   
>> buf.append(response.contentString());
>> 
>> Such engine works very well with the stateless component.
> 
> I confess to not being sure what that method is for.  But I don't think it is 
> meant for what you are doing.
> 
> 
>> The problem is when the generated programmatically component need to access 
>> to some field in the session because the component generated with 
>> responseForComponentWithName lives in a new session.
> 
> I will guess that if it used the same session, that your app would deadlock.  
> :-)
> 
> 
>> I would like to extend the engine in order to use some simple stateful 
>> component
> 
> Even if it does not deadlock, you are not going to be able to use stateful 
> components and component actions using responseForComponentWithName.
> That runs in an whole new Request-Response loop with a new WOContext.  WO 
> won't know what to do with the result.  I think...
> 
> 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
> 
> 
> 
> 
> 
> 
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

 ___
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: responseForComponentWithName() and session

2011-04-12 Thread Chuck Hill

On Apr 12, 2011, at 2:25 PM, Paolo Sommaruga wrote:

> Hi,
> 
> I try to explain more. My web application is sort of cms. Basically the idea 
> is simple.

Maybe a little too simple for what you want now.  :-)


> The main page displays an eoObject that has an attribute "text".  The 
> administrator can edit such "text" attribute via a java client application. 
> He can insert anywhere in the "text" some special tag, like
> 
>   [component  myCustomComponent]

Real WO syntax, inline bindings, and WOComponent's 
public static WOElement templateWithHTMLString(String frameworkName,
   String referenceName,
   String anHTMLString,
   String aDeclarationString,
   NSArray aLanguageArray,
   WOAssociationFactory 
associationFactory,
   WOMLNamespaceProvider 
namespaceProvider)
Might get you a lot closer to where you want to go.  I think that is what most 
WO CMS applications use.



> myCustomComponent is a component name, which lives in the web application, 
> taken by a custom component library. Such custom component implement simple 
> reusable behaviors for display only purpose, like products list, categories 
> list, etc.
> 
> In the web application the "text" attribute binds to a method that parses the 
> text. If the parse finds a special tag, it replaces such tag with the html 
> generated by the component specified in the special tag. For this I use 
> 
>   WOResponse response = 
> (WOApplication.application()).responseForComponentWithName(componentName,
>   null,
>   null,
>   null,
>   uriPrefix,
>   null);
>   
> buf.append(response.contentString());
> 
> Such engine works very well with the stateless component.

I confess to not being sure what that method is for.  But I don't think it is 
meant for what you are doing.


> The problem is when the generated programmatically component need to access 
> to some field in the session because the component generated with 
> responseForComponentWithName lives in a new session.

I will guess that if it used the same session, that your app would deadlock.  
:-)


> I would like to extend the engine in order to use some simple stateful 
> component

Even if it does not deadlock, you are not going to be able to use stateful 
components and component actions using responseForComponentWithName.
That runs in an whole new Request-Response loop with a new WOContext.  WO won't 
know what to do with the result.  I think...

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









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: fetching on joined table

2011-04-12 Thread Chuck Hill
Hi Ray,

WebObjects is not going to generate SQL like that for you (maybe it is 
possible, but it would be very difficult).  I think  that you have two choices:

1. Use views
2. Think and fetch in terms of Objects not tables and rows and joins.  This is 
going to be VERY different than how you are approaching the data now.

It is possible that WebObjects is just not a good thing to use with your schema.


Chuck



On Apr 12, 2011, at 12:49 AM,   
wrote:

> Hi chuck,
> 
> I go to give you more informations about data. I work in IT Universtity in 
> France and we have huge database with lot of table. Here is an example of PDM 
> (5 tables)
> 
> person 
> >students->degree-->diploma-->academic 
> year-->period_param->admin_resgistration
>(fk_person)(fk_student)  
> (fk_academic_year) (pk an_univ prd_univ)(fields an_univ_prd_univ)
> (fk_diploma, fk_person, fk_student, fk_academic_year)
> 
> 
> and I have lof view (view_student_course on a period ...),
>  Here is code of view vue_parcours_profil using to have student curse :
> 
> CREATE OR REPLACE FORCE VIEW "GEST_UV"."VUE_PROFIL_PARCOURS" ("ETU_ID", 
> "DIPLOME_$C", "REORIENT_$F", "PRD_DEBUT", "PRD_FIN")
> AS
>   SELECT DISTINCT t3.e,
> t3.d,
> t3.reorient_$f,
> MIN(p_deb) over (partition BY t3.e, t3.d, t3.p_fin) debut,
> t3.p_fin fin
>   FROM
> (SELECT DISTINCT t1.e,
>   t1.d,
>   t1.no,
>   t1.p p_deb,
>   NVL(MIN(t2.p) over (partition BY t1.e, t1.d, t1.no), MAX (t1.p) over 
> (partition BY t1.e, t1.d)) p_fin,
>   CASE
> WHEN t1.no = 1
> AND t2.r  IS NULL
> THEN t1.r
> ELSE DECODE(t2.r,NULL,'N',t2.r)
>   END reorient_$f
>   --DECODE(t2.r,null,'N',t2.r) reorient_$f
> FROM
>   (SELECT DISTINCT etu_id e,
> diplome_$c d,
> an_univ
>  prd_univ p,
> ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
>  prd_univ NULLS LAST) no,
> DECODE(res_pedag_$c,'RE','O','DR','O','N') r
>   FROM gerry.etu_inscr_adm eia1
>   ) t1,
>   (SELECT DISTINCT etu_id e,
> diplome_$c d,
> an_univ
>  prd_univ p,
> ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
>  prd_univ NULLS LAST) no,
> DECODE(res_pedag_$c,'RE','O','DR','O','N') r
>   FROM gerry.etu_inscr_adm eia2
>   ) t2
> WHERE t1.e = t2.e(+)
> AND t1.d   = t2.d(+)
> AND t1.no  < t2.no(+)
> AND t1.r  <> t2.r(+)
>   --and t1.r = 'N'
> AND ((t1.no= 1
> AND NVL(t1.r,'N') IN ('O','N'))
> OR (t1.no  > 1
> AND NVL(t1.r,'N')  = 'N'))
> ) t3;
> 
> So when I want all students curse in sql developer this my request :
> 
> SELECT vtp.etu_id as STUDENT_ID,
> vtp.diplome_$c as DIPLOMA_CODE,
> DECODE (vtp.diplome_$c,'ING',d.diplome
>  ' ancien règlement',d.diplome) as DIPLOMA_NAME,
> vtp.prd_debut as PERIOD_BEGIN,
> vtp.prd_fin as PERIOD_END,
> gerry.fonc_trad_prd_lib(vtp.prd_debut,'anprd') as ACADEMIC_YEAR_BEGIN,
> gerry.fonc_trad_prd_lib(vtp.prd_fin,'anprd') ACADEMIC_YEAR_END,
> vtp.reorient_$f as ORIENTATION,
> (SELECT DIPL_SPEC_ABR
>' '
>DIPL_OPT_ABR
>' '
>NIVEAU_ADM
> FROM gerry.vue_eia_abr veia
> WHERE veia.etu_id  = vtp.etu_id
> AND veia.diplome_$c=vtp.diplome_$c
> AND veia.an_univ
>veia.prd_univ=vtp.prd_fin
> ) as DIPLOMA_SPECIFICITY,
> (SELECT diplome_num
> FROM gest_uv.etu_diplome
> WHERE etu_id   = vtp.etu_id
> AND diplome_$c = vtp.diplome_$c
> AND an_univ
>prd_univ BETWEEN vtp.prd_debut AND vtp.prd_fin
> ) as DIPLOMA_NUMBER,
> (SELECT SITUATION
> FROM gerry.etu_inscr_adm eia,
>   gerry.ref_situation rs
> WHERE rs.situation_$c = eia.situation_$c
> AND eia.etu_id= vtp.etu_id
> AND eia.diplome_$c=vtp.diplome_$c
> AND eia.an_univ
>eia.prd_univ=vtp.prd_fin
> ) as STUDENT_SITUATION,
> NVL(
> (SELECT DECODE(situation_$c,'DEMI','O','N')
> FROM gerry.etu_inscr_adm
> WHERE etu_id= vtp.etu_id
> AND diplome_$c  =vtp.diplome_$c
> AND situation_$c='DEMI'
> AND an_univ
>prd_univ=vtp.prd_fin
> ),'N') as IS_STUDENT_RESIGNED,
> NVL(
> (SELECT DECODE(situation_$c,'UTX','O','N')
> FROM gerry.etu_inscr_adm
> WHERE etu_id= vtp.etu_id
> AND diplome_$c  =vtp.diplome_$c
> AND situation_$c='UTX'
> AND an_univ
>prd_univ=vtp.prd_fin
> ),'N') as IS_STUDENT_TRANSFERED
>   FROM gest_uv.VUE_PROFIL_PARCOURS vtp,
> gerry.diplome d
>   WHERE vtp.diplome_$c = d.diplome_$c
> order by prd_debut, prd_fin;
> 
> So I must fetch on view vue_profil_parcours, diploma to display all students 
> curse in a WOO table using batch. Here a little example and I have lof of 
> fecthing such as this to do in 

Re: responseForComponentWithName() and session

2011-04-12 Thread Paolo Sommaruga
Hi,

I try to explain more. My web application is sort of cms. Basically the idea is 
simple. The main page displays an eoObject that has an attribute "text".  The 
administrator can edit such "text" attribute via a java client application. He 
can insert anywhere in the "text" some special tag, like

[component  myCustomComponent]

myCustomComponent is a component name, which lives in the web application, 
taken by a custom component library. Such custom component implement simple 
reusable behaviors for display only purpose, like products list, categories 
list, etc.

In the web application the "text" attribute binds to a method that parses the 
text. If the parse finds a special tag, it replaces such tag with the html 
generated by the component specified in the special tag. For this I use 

WOResponse response = 
(WOApplication.application()).responseForComponentWithName(componentName,
  null,
  null,
  null,
  uriPrefix,
  null);
  
buf.append(response.contentString());

Such engine works very well with the stateless component. The problem is when 
the generated programmatically component need to access to some field in the 
session because the component generated with responseForComponentWithName lives 
in a new session.
I would like to extend the engine in order to use some simple stateful component

Paolo
 ___
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: 501 user for wo apps?

2011-04-12 Thread Jesse Tayler
Ok now the script runs - I don't know what's up. maybe a restarting the app, 
the file perms are the same as before. definitely running as appserver 
appserveradm

The script runs and even leaves a touch file in tmp I can seebut no results.

I run the script by hand from the output of the WO App and it runs fine.

the app output log doesn't report error or memory or anything now, just doesn't 
make my thumbnails...

I think I'm missing something due to be too tired!



On Apr 12, 2011, at 3:37 PM, Pascal Robert wrote:

> 
> Le 2011-04-12 à 15:26, Jesse Tayler a écrit :
> 
>> Sigh. It must be one of those days!
>> 
>> The memory now seems 'ok enough' but I'm back to the weird permission error?
>> 
>> call process [/home/appserver/bin/imagesize.sh 76 jpg]
>> callUnixProcess [/home/appserver/bin/imagesize.sh 76 jpg]
>> java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": 
>> java.io.IOException: error=13, Permission denied
> 
> Are you still running everything under the user with id 501 or did you create 
> a "real" user? 
> 
> For security reasons, you should change permissions to 750, and make sure the 
> script is owned by the same user as the script.
> 
> And make sure the user (appserver ?) have access to /home/appserver/bin/, if 
> the user can't traverse this path, even if the script have the good perms, it 
> won't be executed if it cannot traverse the whole path.
> 
>> 
>> Isn't that execution perms on the UNIX file?
>> 
>> I tried chmod 777 and I still get permission denied...
>> 
>> Do I need to open a shell like "csh /home/appserver/bin/imagesize.sh 76 jpg" 
>> ?
>> 
>> I'm not certain I've ever had this working or not and so maybe it is my 
>> command this time?
>> 
>> 
>> 
>> On Apr 12, 2011, at 2:13 PM, Pascal Robert wrote:
>> 
>>> 
>>> Le 2011-04-12 à 13:56, Jesse Tayler a écrit :
>>> 
 
 what should I set my memory to in Javamonitor then? something very low?
>>> 
>>> Well, it depends if you actually need to start your app with 128 MB of RAM 
>>> :-) Maybe you could start it with only the maximum setting (-Xmx256m) while 
>>> not setting the minimum so that your instances use 32 MB to start with.
>>> 
>>> But I strongly suggest that you monitor your RAM usage or else you might 
>>> have problems with both of your instances are reaching 256 MB. Adding a 
>>> swap space would help in those cases, but even there if your swap usage 
>>> goes over 50%.
>>> 
>>> And I suggest that you restart your apps every day, because at the OS 
>>> level, even if your apps get garbage collected, the RAM usage at the OS 
>>> level will not go down. For example, if your app is reaching near 256 MB of 
>>> RAM because of a "big" request, and 10 minutes later the GC does its job 
>>> and clear up 50 MB of heap space, your app will still use 256 MB at the OS 
>>> level.
>>> 
>>> The secret? Monitoring!
>>> 
 Or do you suggest something with the Java VM? I don't understand?
 
 On Apr 12, 2011, at 1:41 PM, Pascal Robert wrote:
 
> Java memory settings reminds me of the "good old" Mac OS 9 days where we 
> had to adjust manually how much RAM each app would use.
 
 ya, I know -- but I guess it makes server reliability easier...
 
 iPhone iOS just kills your app if it takes too much memory.
 
 
>>> 
>>> 
>> 
> 
> 

 ___
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: 501 user for wo apps?

2011-04-12 Thread Pascal Robert

Le 2011-04-12 à 15:26, Jesse Tayler a écrit :

> Sigh. It must be one of those days!
> 
> The memory now seems 'ok enough' but I'm back to the weird permission error?
> 
> call process [/home/appserver/bin/imagesize.sh 76 jpg]
> callUnixProcess [/home/appserver/bin/imagesize.sh 76 jpg]
> java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": 
> java.io.IOException: error=13, Permission denied

Are you still running everything under the user with id 501 or did you create a 
"real" user? 

For security reasons, you should change permissions to 750, and make sure the 
script is owned by the same user as the script.

And make sure the user (appserver ?) have access to /home/appserver/bin/, if 
the user can't traverse this path, even if the script have the good perms, it 
won't be executed if it cannot traverse the whole path.

> 
> Isn't that execution perms on the UNIX file?
> 
> I tried chmod 777 and I still get permission denied...
> 
> Do I need to open a shell like "csh /home/appserver/bin/imagesize.sh 76 jpg" ?
> 
> I'm not certain I've ever had this working or not and so maybe it is my 
> command this time?
> 
> 
> 
> On Apr 12, 2011, at 2:13 PM, Pascal Robert wrote:
> 
>> 
>> Le 2011-04-12 à 13:56, Jesse Tayler a écrit :
>> 
>>> 
>>> what should I set my memory to in Javamonitor then? something very low?
>> 
>> Well, it depends if you actually need to start your app with 128 MB of RAM 
>> :-) Maybe you could start it with only the maximum setting (-Xmx256m) while 
>> not setting the minimum so that your instances use 32 MB to start with.
>> 
>> But I strongly suggest that you monitor your RAM usage or else you might 
>> have problems with both of your instances are reaching 256 MB. Adding a swap 
>> space would help in those cases, but even there if your swap usage goes over 
>> 50%.
>> 
>> And I suggest that you restart your apps every day, because at the OS level, 
>> even if your apps get garbage collected, the RAM usage at the OS level will 
>> not go down. For example, if your app is reaching near 256 MB of RAM because 
>> of a "big" request, and 10 minutes later the GC does its job and clear up 50 
>> MB of heap space, your app will still use 256 MB at the OS level.
>> 
>> The secret? Monitoring!
>> 
>>> Or do you suggest something with the Java VM? I don't understand?
>>> 
>>> On Apr 12, 2011, at 1:41 PM, Pascal Robert wrote:
>>> 
 Java memory settings reminds me of the "good old" Mac OS 9 days where we 
 had to adjust manually how much RAM each app would use.
>>> 
>>> ya, I know -- but I guess it makes server reliability easier...
>>> 
>>> iPhone iOS just kills your app if it takes too much memory.
>>> 
>>> 
>> 
>> 
> 

 ___
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: 501 user for wo apps?

2011-04-12 Thread Jesse Tayler
Sigh. It must be one of those days!

The memory now seems 'ok enough' but I'm back to the weird permission error?

call process [/home/appserver/bin/imagesize.sh 76 jpg]
callUnixProcess [/home/appserver/bin/imagesize.sh 76 jpg]
java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": 
java.io.IOException: error=13, Permission denied


Isn't that execution perms on the UNIX file?

I tried chmod 777 and I still get permission denied...

Do I need to open a shell like "csh /home/appserver/bin/imagesize.sh 76 jpg" ?

I'm not certain I've ever had this working or not and so maybe it is my command 
this time?



On Apr 12, 2011, at 2:13 PM, Pascal Robert wrote:

> 
> Le 2011-04-12 à 13:56, Jesse Tayler a écrit :
> 
>> 
>> what should I set my memory to in Javamonitor then? something very low?
> 
> Well, it depends if you actually need to start your app with 128 MB of RAM 
> :-) Maybe you could start it with only the maximum setting (-Xmx256m) while 
> not setting the minimum so that your instances use 32 MB to start with.
> 
> But I strongly suggest that you monitor your RAM usage or else you might have 
> problems with both of your instances are reaching 256 MB. Adding a swap space 
> would help in those cases, but even there if your swap usage goes over 50%.
> 
> And I suggest that you restart your apps every day, because at the OS level, 
> even if your apps get garbage collected, the RAM usage at the OS level will 
> not go down. For example, if your app is reaching near 256 MB of RAM because 
> of a "big" request, and 10 minutes later the GC does its job and clear up 50 
> MB of heap space, your app will still use 256 MB at the OS level.
> 
> The secret? Monitoring!
> 
>> Or do you suggest something with the Java VM? I don't understand?
>> 
>> On Apr 12, 2011, at 1:41 PM, Pascal Robert wrote:
>> 
>>> Java memory settings reminds me of the "good old" Mac OS 9 days where we 
>>> had to adjust manually how much RAM each app would use.
>> 
>> ya, I know -- but I guess it makes server reliability easier...
>> 
>> iPhone iOS just kills your app if it takes too much memory.
>> 
>> 
> 
> 

 ___
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: 501 user for wo apps?

2011-04-12 Thread Pascal Robert

Le 2011-04-12 à 13:56, Jesse Tayler a écrit :

> 
> what should I set my memory to in Javamonitor then? something very low?

Well, it depends if you actually need to start your app with 128 MB of RAM :-) 
Maybe you could start it with only the maximum setting (-Xmx256m) while not 
setting the minimum so that your instances use 32 MB to start with.

But I strongly suggest that you monitor your RAM usage or else you might have 
problems with both of your instances are reaching 256 MB. Adding a swap space 
would help in those cases, but even there if your swap usage goes over 50%.

And I suggest that you restart your apps every day, because at the OS level, 
even if your apps get garbage collected, the RAM usage at the OS level will not 
go down. For example, if your app is reaching near 256 MB of RAM because of a 
"big" request, and 10 minutes later the GC does its job and clear up 50 MB of 
heap space, your app will still use 256 MB at the OS level.

The secret? Monitoring!

> Or do you suggest something with the Java VM? I don't understand?
> 
> On Apr 12, 2011, at 1:41 PM, Pascal Robert wrote:
> 
>> Java memory settings reminds me of the "good old" Mac OS 9 days where we had 
>> to adjust manually how much RAM each app would use.
> 
> ya, I know -- but I guess it makes server reliability easier...
> 
> iPhone iOS just kills your app if it takes too much memory.
> 
> 

 ___
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: 501 user for wo apps?

2011-04-12 Thread Jesse Tayler

what should I set my memory to in Javamonitor then? something very low?

Or do you suggest something with the Java VM? I don't understand?

On Apr 12, 2011, at 1:41 PM, Pascal Robert wrote:

> Java memory settings reminds me of the "good old" Mac OS 9 days where we had 
> to adjust manually how much RAM each app would use.

ya, I know -- but I guess it makes server reliability easier...

iPhone iOS just kills your app if it takes too much memory.


 ___
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: 501 user for wo apps?

2011-04-12 Thread Pascal Robert

Le 2011-04-12 à 13:26, Jesse Tayler a écrit :

> I always forget I have to reply-all to include the list!
> 
> On Apr 12, 2011, at 1:24 PM, Jesse Tayler wrote:
> 
>> wait a second here Pascal -- you were able to launch 9 instances on a micro?

Yes, but don't forget that I didn't change the memory params, so they were 
using 32 MB each.

>> I can launch - ...one... - the second instance is rather unceremoniously 
>> killed.
>> 
>> Sure enough, there's no swap and not a lot of memory -- how am I using so 
>> much more RAM than you?
>> 
>> Unless I'm mistaken -- this says I have a whopping 9K of free memory -- I 
>> feel like a wild man on a DEC PDP-8 - single user mode!

It's in MB :-) So you have 93 MB, that's why you can't start a instance at 128 
MB. 

In my tests (did it for one of my WOWODC talks), the basic system with httpd, 
JavaMonitor and wotaskd will eat up 187 MB of memory while not accepting any 
requests. Add your first instance which use at least 128 MB and you should have 
280 MB left if no requests are done. If your first instance is used and you 
have a database running on your instance, RAM goes down, etc. 

Java memory settings reminds me of the "good old" Mac OS 9 days where we had to 
adjust manually how much RAM each app would use.

>> 
>> 
>> 
>> ~]$ free
>>   total   used   free sharedbuffers cached
>> Mem:610196 600856   9340  0696   9924
>> -/+ buffers/cache: 590236  19960
>> Swap:0  0  0
>> 
>> 
>> 
>> 
>> On Apr 12, 2011, at 1:10 PM, Pascal Robert wrote:
>> 
>>> 
>>> Le 2011-04-11 à 16:03, Jesse Tayler a écrit :
>>> 
 Right, but now for some reason I'm running out of memory but I note 
 monitor has increased memory settings? Or is this because I'm trying to 
 use a "micro" instance of an amazon server?
>>> 
>>> I got a "micro" instance to play with last week, and I was able to start 9 
>>> instances of AjaxExample from Wonder. The server was only running httpd, 
>>> JavaMonitor, wotaskd and the instances. After 9 instances, wotaskd was 
>>> still trying to launch the other 21 other instances (I wanted to see how 
>>> the VM would react) over and over again.
>>> 
 the command line seems to run from the terminal, but I get this complaint 
 in the WO app log:
 
 
 
 callUnixProcess [/home/appserver/bin/imagesize.sh 64 jpg]
 java.io.IOException: Cannot run program 
 "/home/appserver/bin/imagesize.sh": java.io.IOException: error=12, Cannot 
 allocate memory
>>> 
>>> Look like that error is when the system is out of memory. Run the "free" 
>>> command to check how much memory is available:
>>> 
>>> [probert@wocommunity ~]$ free
>>>   total   used   free sharedbuffers cached
>>> Mem:   15749121564208  10704  0  22528 646312
>>> 
>>> I did notice that a "micro" instance don't have any swap space, which is 
>>> kind of bad. If you can live with a bit less of disk space, see :
>>> 
>>> http://siva2009.wordpress.com/2009/06/18/adding-linux-swap-file-how-to/
>>> 
>>> Maybe the other instances size have swap space by default, but I don't know.
>>> 
 
 
 
 here's monitor settings, includes proper memory no? unrelated?
 
 -Xms128m -Xmx256m -DWOAllowsConcurrentRequestHandling=true
 
 
 On Apr 11, 2011, at 2:59 PM, Pascal Robert wrote:
 
> 
> Le 2011-04-11 à 14:47, Jesse Tayler a écrit :
> 
>> 
>> I'm launching a UNIX script to generate image thumbnails and 
>> troubleshooting with a new server setup.
>> 
>> Unless I'm mistaken, the script is unable to launch due to permissions 
>> and WO seems to be running user 501 without a username.
>> 
>> Now I can't recall if that's how it used to be, should I be running uid 
>> 501 with no account/username?
> 
> Normally, the user who run wotaskd and Monitor (and your apps) is 
> "appserver". I guess that user is not on your new server, and that since 
> no other user have a ID of 501, it's running on the ID of the user coming 
> from the .tar.gz of wotaskd and Monitor.
> 
> So, you should create a "appserver" user and use 501 as the id for this 
> user (or create the user and do a "chown -R appserver" on the directory 
> where WO and your apps are).
> 
>> I don't want a security disaster, but I do need to launch some scripts 
>> that require a decent shell env.
>> 
>> Advice?
>> 
>> 
>> ___
>> 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/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 
> 
 
>>> 
>>> 
>> 
> 

 

Re: 501 user for wo apps?

2011-04-12 Thread Jesse Tayler
I always forget I have to reply-all to include the list!

On Apr 12, 2011, at 1:24 PM, Jesse Tayler wrote:

> wait a second here Pascal -- you were able to launch 9 instances on a micro?
> 
> I can launch - ...one... - the second instance is rather unceremoniously 
> killed.
> 
> Sure enough, there's no swap and not a lot of memory -- how am I using so 
> much more RAM than you?
> 
> Unless I'm mistaken -- this says I have a whopping 9K of free memory -- I 
> feel like a wild man on a DEC PDP-8 - single user mode!
> 
> 
> 
> 
> ~]$ free
>total   used   free sharedbuffers cached
> Mem:610196 600856   9340  0696   9924
> -/+ buffers/cache: 590236  19960
> Swap:0  0  0
> 
> 
> 
> 
> On Apr 12, 2011, at 1:10 PM, Pascal Robert wrote:
> 
>> 
>> Le 2011-04-11 à 16:03, Jesse Tayler a écrit :
>> 
>>> Right, but now for some reason I'm running out of memory but I note monitor 
>>> has increased memory settings? Or is this because I'm trying to use a 
>>> "micro" instance of an amazon server?
>> 
>> I got a "micro" instance to play with last week, and I was able to start 9 
>> instances of AjaxExample from Wonder. The server was only running httpd, 
>> JavaMonitor, wotaskd and the instances. After 9 instances, wotaskd was still 
>> trying to launch the other 21 other instances (I wanted to see how the VM 
>> would react) over and over again.
>> 
>>> the command line seems to run from the terminal, but I get this complaint 
>>> in the WO app log:
>>> 
>>> 
>>> 
>>> callUnixProcess [/home/appserver/bin/imagesize.sh 64 jpg]
>>> java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": 
>>> java.io.IOException: error=12, Cannot allocate memory
>> 
>> Look like that error is when the system is out of memory. Run the "free" 
>> command to check how much memory is available:
>> 
>> [probert@wocommunity ~]$ free
>>total   used   free sharedbuffers cached
>> Mem:   15749121564208  10704  0  22528 646312
>> 
>> I did notice that a "micro" instance don't have any swap space, which is 
>> kind of bad. If you can live with a bit less of disk space, see :
>> 
>> http://siva2009.wordpress.com/2009/06/18/adding-linux-swap-file-how-to/
>> 
>> Maybe the other instances size have swap space by default, but I don't know.
>> 
>>> 
>>> 
>>> 
>>> here's monitor settings, includes proper memory no? unrelated?
>>> 
>>> -Xms128m -Xmx256m -DWOAllowsConcurrentRequestHandling=true
>>> 
>>> 
>>> On Apr 11, 2011, at 2:59 PM, Pascal Robert wrote:
>>> 
 
 Le 2011-04-11 à 14:47, Jesse Tayler a écrit :
 
> 
> I'm launching a UNIX script to generate image thumbnails and 
> troubleshooting with a new server setup.
> 
> Unless I'm mistaken, the script is unable to launch due to permissions 
> and WO seems to be running user 501 without a username.
> 
> Now I can't recall if that's how it used to be, should I be running uid 
> 501 with no account/username?
 
 Normally, the user who run wotaskd and Monitor (and your apps) is 
 "appserver". I guess that user is not on your new server, and that since 
 no other user have a ID of 501, it's running on the ID of the user coming 
 from the .tar.gz of wotaskd and Monitor.
 
 So, you should create a "appserver" user and use 501 as the id for this 
 user (or create the user and do a "chown -R appserver" on the directory 
 where WO and your apps are).
 
> I don't want a security disaster, but I do need to launch some scripts 
> that require a decent shell env.
> 
> Advice?
> 
> 
> ___
> 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/probert%40macti.ca
> 
> This email sent to prob...@macti.ca
 
 
>>> 
>> 
>> 
> 

 ___
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: 501 user for wo apps?

2011-04-12 Thread Pascal Robert

Le 2011-04-11 à 16:03, Jesse Tayler a écrit :

> Right, but now for some reason I'm running out of memory but I note monitor 
> has increased memory settings? Or is this because I'm trying to use a "micro" 
> instance of an amazon server?

I got a "micro" instance to play with last week, and I was able to start 9 
instances of AjaxExample from Wonder. The server was only running httpd, 
JavaMonitor, wotaskd and the instances. After 9 instances, wotaskd was still 
trying to launch the other 21 other instances (I wanted to see how the VM would 
react) over and over again.

> the command line seems to run from the terminal, but I get this complaint in 
> the WO app log:
> 
> 
> 
> callUnixProcess [/home/appserver/bin/imagesize.sh 64 jpg]
> java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": 
> java.io.IOException: error=12, Cannot allocate memory

Look like that error is when the system is out of memory. Run the "free" 
command to check how much memory is available:

 [probert@wocommunity ~]$ free
 total   used   free sharedbuffers cached
Mem:   15749121564208  10704  0  22528 646312

I did notice that a "micro" instance don't have any swap space, which is kind 
of bad. If you can live with a bit less of disk space, see :

  http://siva2009.wordpress.com/2009/06/18/adding-linux-swap-file-how-to/

Maybe the other instances size have swap space by default, but I don't know.

> 
> 
> 
> here's monitor settings, includes proper memory no? unrelated?
> 
> -Xms128m -Xmx256m -DWOAllowsConcurrentRequestHandling=true
> 
> 
> On Apr 11, 2011, at 2:59 PM, Pascal Robert wrote:
> 
>> 
>> Le 2011-04-11 à 14:47, Jesse Tayler a écrit :
>> 
>>> 
>>> I'm launching a UNIX script to generate image thumbnails and 
>>> troubleshooting with a new server setup.
>>> 
>>> Unless I'm mistaken, the script is unable to launch due to permissions and 
>>> WO seems to be running user 501 without a username.
>>> 
>>> Now I can't recall if that's how it used to be, should I be running uid 501 
>>> with no account/username?
>> 
>> Normally, the user who run wotaskd and Monitor (and your apps) is 
>> "appserver". I guess that user is not on your new server, and that since no 
>> other user have a ID of 501, it's running on the ID of the user coming from 
>> the .tar.gz of wotaskd and Monitor.
>> 
>> So, you should create a "appserver" user and use 501 as the id for this user 
>> (or create the user and do a "chown -R appserver" on the directory where WO 
>> and your apps are).
>> 
>>> I don't want a security disaster, but I do need to launch some scripts that 
>>> require a decent shell env.
>>> 
>>> Advice?
>>> 
>>> 
>>> ___
>>> 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/probert%40macti.ca
>>> 
>>> This email sent to prob...@macti.ca
>> 
>> 
> 

 ___
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: static 'toolbar' question

2011-04-12 Thread Theodore Petrosky
this was (is) absolutely perfect.

--- On Tue, 4/12/11, Frédéric JECKER  wrote:

> From: Frédéric JECKER 
> Subject: Re: static 'toolbar' question
> To: "Theodore Petrosky" , webobjects-dev@lists.apple.com
> Date: Tuesday, April 12, 2011, 7:24 AM
> Hi
> 
> This can be easily done with the following css rules.
> 
> #toolbar
> {
>     position        : fixed;
>     top         
>    : 0; /* you can also use bottom:0; if you
> want to
> stick the toolbar at the bottom of your page */
>     width       
>    :100%;
> }
> 
> 
> -Message d'origine-
> De : Theodore Petrosky 
> Date : Tue, 12 Apr 2011 04:13:30 -0700 (PDT)
> À : 
> Objet : static 'toolbar' question
> 
> >I don't see any example of a toolbar (a static area at
> the top of the
> >screen where I would find common tools. and this area
> does not scroll
> >with the rest of the page).
> >
> >How are youse guys creating this effect? You know the
> row of common tools
> >at the top of a page that doesn't scroll with the rest
> of the content.
> >
> >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:
> >http://lists.apple.com/mailman/options/webobjects-dev/f.jecker%40symaris.c
> >om
> >
> >This email sent to f.jec...@symaris.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


Re: static 'toolbar' question

2011-04-12 Thread Frédéric JECKER
Hi

This can be easily done with the following css rules.

#toolbar
{
position: fixed;
top : 0; /* you can also use bottom:0; if you want to
stick the toolbar at the bottom of your page */
width   :100%;
}


-Message d'origine-
De : Theodore Petrosky 
Date : Tue, 12 Apr 2011 04:13:30 -0700 (PDT)
À : 
Objet : static 'toolbar' question

>I don't see any example of a toolbar (a static area at the top of the
>screen where I would find common tools. and this area does not scroll
>with the rest of the page).
>
>How are youse guys creating this effect? You know the row of common tools
>at the top of a page that doesn't scroll with the rest of the content.
>
>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:
>http://lists.apple.com/mailman/options/webobjects-dev/f.jecker%40symaris.c
>om
>
>This email sent to f.jec...@symaris.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


static 'toolbar' question

2011-04-12 Thread Theodore Petrosky
I don't see any example of a toolbar (a static area at the top of the screen 
where I would find common tools. and this area does not scroll with the rest of 
the page).

How are youse guys creating this effect? You know the row of common tools at 
the top of a page that doesn't scroll with the rest of the content.

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

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


Re: Re: fetching on joined table

2011-04-12 Thread naneon . raymond
Hi chuck,


I go to give you more informations about data. I work in IT Universtity in 
France and we have huge database with lot of table. Here is an example of PDM 
(5 tables)


person 
>students->degree-->diploma-->academic 
year-->period_param->admin_resgistration
   (fk_person)(fk_student)  
(fk_academic_year) (pk an_univ  prd_univ)(fields an_univ_prd_univ)
(fk_diploma, fk_person, fk_student, fk_academic_year)




and I have lof view (view_student_course on a period ...),
 Here is code of view vue_parcours_profil using to have student curse :



CREATE OR REPLACE FORCE VIEW "GEST_UV"."VUE_PROFIL_PARCOURS" ("ETU_ID", 
"DIPLOME_$C", "REORIENT_$F", "PRD_DEBUT", "PRD_FIN")
AS
  SELECT DISTINCT t3.e,
t3.d,
t3.reorient_$f,
MIN(p_deb) over (partition BY t3.e, t3.d, t3.p_fin) debut,
t3.p_fin fin
  FROM
(SELECT DISTINCT t1.e,
  t1.d,
  t1.no,
  t1.p p_deb,
  NVL(MIN(t2.p) over (partition BY t1.e, t1.d, t1.no), MAX (t1.p) over 
(partition BY t1.e, t1.d)) p_fin,
  CASE
WHEN t1.no = 1
AND t2.r  IS NULL
THEN t1.r
ELSE DECODE(t2.r,NULL,'N',t2.r)
  END reorient_$f
  --DECODE(t2.r,null,'N',t2.r) reorient_$f
FROM
  (SELECT DISTINCT etu_id e,
diplome_$c d,
an_univ
  prd_univ p,
ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
  prd_univ NULLS LAST) no,
DECODE(res_pedag_$c,'RE','O','DR','O','N') r
  FROM gerry.etu_inscr_adm eia1
  ) t1,
  (SELECT DISTINCT etu_id e,
diplome_$c d,
an_univ
  prd_univ p,
ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
  prd_univ NULLS LAST) no,
DECODE(res_pedag_$c,'RE','O','DR','O','N') r
  FROM gerry.etu_inscr_adm eia2
  ) t2
WHERE t1.e = t2.e(+)
AND t1.d   = t2.d(+)
AND t1.no  < t2.no(+)
AND t1.r  <> t2.r(+)
  --and t1.r = 'N'
AND ((t1.no= 1
AND NVL(t1.r,'N') IN ('O','N'))
OR (t1.no  > 1
AND NVL(t1.r,'N')  = 'N'))
) t3;


So when I want all students curse in sql developer this my request :



SELECT vtp.etu_id as STUDENT_ID,
vtp.diplome_$c as DIPLOMA_CODE,
DECODE (vtp.diplome_$c,'ING',d.diplome
   ' ancien règlement',d.diplome) as DIPLOMA_NAME,
vtp.prd_debut as PERIOD_BEGIN,
vtp.prd_fin as PERIOD_END,
gerry.fonc_trad_prd_lib(vtp.prd_debut,'anprd') as ACADEMIC_YEAR_BEGIN,
gerry.fonc_trad_prd_lib(vtp.prd_fin,'anprd') ACADEMIC_YEAR_END,
vtp.reorient_$f as ORIENTATION,
(SELECT DIPL_SPEC_ABR
 ' '
 DIPL_OPT_ABR
 ' '
 NIVEAU_ADM
FROM gerry.vue_eia_abr veia
WHERE veia.etu_id  = vtp.etu_id
AND veia.diplome_$c=vtp.diplome_$c
AND veia.an_univ
veia.prd_univ=vtp.prd_fin
) as DIPLOMA_SPECIFICITY,
(SELECT diplome_num
FROM gest_uv.etu_diplome
WHERE etu_id   = vtp.etu_id
AND diplome_$c = vtp.diplome_$c
AND an_univ
prd_univ BETWEEN vtp.prd_debut AND vtp.prd_fin
) as DIPLOMA_NUMBER,
(SELECT SITUATION
FROM gerry.etu_inscr_adm eia,
  gerry.ref_situation rs
WHERE rs.situation_$c = eia.situation_$c
AND eia.etu_id= vtp.etu_id
AND eia.diplome_$c=vtp.diplome_$c
AND eia.an_univ
eia.prd_univ=vtp.prd_fin
) as STUDENT_SITUATION,
NVL(
(SELECT DECODE(situation_$c,'DEMI','O','N')
FROM gerry.etu_inscr_adm
WHERE etu_id= vtp.etu_id
AND diplome_$c  =vtp.diplome_$c
AND situation_$c='DEMI'
AND an_univ
prd_univ=vtp.prd_fin
),'N') as IS_STUDENT_RESIGNED,
NVL(
(SELECT DECODE(situation_$c,'UTX','O','N')
FROM gerry.etu_inscr_adm
WHERE etu_id= vtp.etu_id
AND diplome_$c  =vtp.diplome_$c
AND situation_$c='UTX'
AND an_univ
prd_univ=vtp.prd_fin
),'N') as IS_STUDENT_TRANSFERED
  FROM gest_uv.VUE_PROFIL_PARCOURS vtp,
gerry.diplome d
  WHERE vtp.diplome_$c = d.diplome_$c
order by prd_debut, prd_fin;


So I must fetch on view vue_profil_parcours, diploma to display all students 
curse in a WOO table using batch. Here a little example and I have lof of 
fecthing such as this to do in my apps to display information about, sutdent, 
teacher so on...


I want a example code How to translate this sql request  or what the best 
practice in WebObjects in this situation? To fast forward in my apps, I create 
view every time when I want to display this kind of information. This allows me 
to browse my data in an accurate in WebObjects.


Thanks for your help


Ray,




Message du : 11/04/2011
De : "Chuck Hill " 
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 


On Apr 11, 2011, at 3:12 AM,  wrote:
Hi Chuck,

Tables A, B, C, D haven't relationship but same fileds name.

If they don't have modeled relationships, the