Re: Re: fetching on joined table

2011-04-13 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  ch...@global-village.net
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, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
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


Re: fetching on joined table

2011-04-13 Thread Joe Little
Others will say similarly, but as someone who once used views, etc, you'll want 
to avoid these and stored procedures and build out all of this logic in 
EOF/Modeler and let WebObjects do it's thing. If you are executing SQL for 
results lists, you are likely trying too hard to outthink WO

On Apr 12, 2011, at 11:46 PM, naneon.raym...@neuf.fr wrote:

 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  ch...@global-village.net
 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, naneon.raym...@neuf.fr 
 naneon.raym...@neuf.fr 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  

Re: fetching on joined table

2011-04-13 Thread Chuck Hill
You don't cast to EOEntites (correctly, EOEnterpriseObject, EOEntity is the 
model), you fetch them from the database.  You can't get them from a stored 
procedure.


Chuck


On Apr 12, 2011, at 11:46 PM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

 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  ch...@global-village.net
 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, naneon.raym...@neuf.fr 
 naneon.raym...@neuf.fr 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 

Re: fetching on joined table

2011-04-13 Thread Chuck Hill
You will notice that Joe works at a rather well known university too.  :-)  I'd 
listen to his advice or decide to not use WO.

Chuck

On Apr 13, 2011, at 8:00 AM, Joe Little wrote:

 Others will say similarly, but as someone who once used views, etc, you'll 
 want to avoid these and stored procedures and build out all of this logic in 
 EOF/Modeler and let WebObjects do it's thing. If you are executing SQL for 
 results lists, you are likely trying too hard to outthink WO
 
 On Apr 12, 2011, at 11:46 PM, naneon.raym...@neuf.fr wrote:
 
 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  ch...@global-village.net
 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, naneon.raym...@neuf.fr 
 naneon.raym...@neuf.fr 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

Re: fetching on joined table

2011-04-13 Thread John Huss
IF your data is read-only and you really, really want to use a custom SQL
statement, then it's ok to fetch raw rows and set the SQL using a hint:

String sqlQuery = ...


NSMutableDictionary hints = new NSMutableDictionary();

hints.setObjectForKey( sqlQuery, EODatabaseContext.
CustomQueryExpressionHintKey);

fetchSpec.setHints( hints );

fetchSpec.setRawRowKeyPaths( ... )


return editingContext.objectsWithFetchSpecification( fetchSpec );


If this is editable data then this is definitely NOT the way to do it.

John

On Wed, Apr 13, 2011 at 10:18 AM, Chuck Hill ch...@global-village.netwrote:

 You will notice that Joe works at a rather well known university too.  :-)
  I'd listen to his advice or decide to not use WO.

 Chuck

 On Apr 13, 2011, at 8:00 AM, Joe Little wrote:

 Others will say similarly, but as someone who once used views, etc, you'll
 want to avoid these and stored procedures and build out all of this logic in
 EOF/Modeler and let WebObjects do it's thing. If you are executing SQL for
 results lists, you are likely trying too hard to outthink WO


 ___
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: wotaskd fails with java.net.UnknownHostException

2011-04-13 Thread Gennady Kushnir
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
Thank you Chuck. This option did help to run wotaskd.
But now I can't use it with Monitor. If I set both of them to
localhost, then I can't access Web-interface from outside.
If I set WOHost to IP then it fails to parse SiteConfig.xml
It drives me crazy ((

2011/4/9 Chuck Hill ch...@global-village.net:
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.

 Chuck


 On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote:

 Hello list.
 I was asked to help setting up deployment on Linux system. It is not
 my first linux deployment, so I do know main steps and some possible
 errors. But this time it is something new for me.
 I can not even start wotaskd. When running from terminal it fails with

 [2011-4-9 10:46:41 MSD] main A fatal exception occurred:
 WOApplication: Cannot be initialized.
 [2011-4-9 10:46:41 MSD] main
 com.webobjects.foundation.NSForwardException
 [java.lang.reflect.InvocationTargetException] null:WOApplication:
 Cannot be initialized.
       at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:918)
       at Application.init(Application.java:112)
 .
 Caused by: java.lang.reflect.InvocationTargetException
 .
       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at 
 com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614)
       at 
 com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316)
       at 
 com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386)
       at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:802)
 .
 Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru:
 NET-DIST.school19.xeno.ru
       at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
       at 
 com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93)
       ... 23 more

 I have explored all WO configuration files I could remember , but I
 did not find aforementioned hostname there.
 Where did wotaskd get that hostname? Why does it need one? And is it
 possible to override in somewhere?

 Gennady Kushnir
 ___
 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/chill%40global-village.net

 This email sent to ch...@global-village.net

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


Re: wotaskd fails with java.net.UnknownHostException

2011-04-13 Thread Chuck Hill
Then instead of localhost, use the canonical name of the machine.  This needs 
to be the reverse lookup of the machine's IP address.  They must resolve 
correctly between each other.  Then use the same WOHost on your apps.

Chuck


On Apr 13, 2011, at 11:55 AM, Gennady Kushnir wrote:

 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
 Thank you Chuck. This option did help to run wotaskd.
 But now I can't use it with Monitor. If I set both of them to
 localhost, then I can't access Web-interface from outside.
 If I set WOHost to IP then it fails to parse SiteConfig.xml
 It drives me crazy ((
 
 2011/4/9 Chuck Hill ch...@global-village.net:
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
 
 Chuck
 
 
 On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote:
 
 Hello list.
 I was asked to help setting up deployment on Linux system. It is not
 my first linux deployment, so I do know main steps and some possible
 errors. But this time it is something new for me.
 I can not even start wotaskd. When running from terminal it fails with
 
 [2011-4-9 10:46:41 MSD] main A fatal exception occurred:
 WOApplication: Cannot be initialized.
 [2011-4-9 10:46:41 MSD] main
 com.webobjects.foundation.NSForwardException
 [java.lang.reflect.InvocationTargetException] null:WOApplication:
 Cannot be initialized.
   at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:918)
   at Application.init(Application.java:112)
 .
 Caused by: java.lang.reflect.InvocationTargetException
 .
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at 
 com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614)
   at 
 com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316)
   at 
 com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386)
   at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:802)
 .
 Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru:
 NET-DIST.school19.xeno.ru
   at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
   at 
 com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93)
   ... 23 more
 
 I have explored all WO configuration files I could remember , but I
 did not find aforementioned hostname there.
 Where did wotaskd get that hostname? Why does it need one? And is it
 possible to override in somewhere?
 
 Gennady Kushnir
 ___
 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/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 --
 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
 
 
 
 
 
 
 
 

-- 
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: Semi OT: Apache goes into frozen state [solved - I think]

2011-04-13 Thread Johnny Miller
It's been a few days without a crash so I think I've got it beat.

It was a bug in my code where I had a RandomAccessFile that I failed to close.  
What threw me off was that Apache failed and not the app.  Once I used lsof on 
the app instances I saw the growing list of open files.

Anyway thanks for all your help!

Johnny

On Apr 6, 2011, at 9:36 AM, Pascal Robert wrote:

 
 Le 2011-04-06 à 15:26, Chuck Hill a écrit :
 
 You are confusing number of Apache processes with file handles/sockets.  The 
 error message
 Too many open files in system:Some/path/on/system
 refers to the latter, the number of connections is the former.
 
 And using lsof on Some/path/on/system will tell which processes are holding 
 files on that directory. Example:
 
 # sudo lsof -P +D /private/tmp/
 
 Will find all files opened in /private/tmp
 
 
 Chuck
 
 
 On Apr 6, 2011, at 12:10 PM, Johnny Miller wrote:
 
 Mssr. Robert,
 
 Thank you for the suggestion.  If I run the command you suggested I get a 
 fluctuating count between 3 and 9.  While that is way below the threshold 
 you suggested I'm not sure I'm convinced that is the whole story.  
 Otherwise why would I be having a problem?
 
 Best,
 
 Johnny
 
 On Apr 6, 2011, at 8:54 AM, Pascal Robert wrote:
 
 
 Le 2011-04-06 à 14:38, Johnny Miller a écrit :
 
 Hi Johan,
 
 Yeah, I'm not doing anything unusual like creating a DB connection per 
 server.
 
 If I run from the CLI:
 
 sudo lsof | grep httpd | wc -l
 
 The count kind of bounces up and down between 500 - 1,500
 
 If I just look at the contents instead of the count I see a bunch of 
 redundant connections to access_log and the various modules (see below)
 
 To be honest I'm out of my element here, so I'm not sure if this is 
 unusual or not.  I've updated the apache's launch daemon plist to 
 increase the number of connections apache is allowed to 2048
 
 MaxClient and ServerLimit set to 2048??  Are you sure that you need that 
 much clients? I think I never set that value pass 384.
 
 How many httpd processes do you have? You can find out like this:
 
  # lsof -P | grep /usr/sbin/httpd | wc -l
 
 and I've gone a couple of days without a failure.  But I did do an 
 intentional restart last night.  Prior to altering the plist I was seeing 
 apache going into the unresponsive state about every 24 hours.
 
 When I called Apple they told me to run netstat -m and look at this 
 section:
 
 0 requests for memory denied
 0 requests for memory delayed
 
 If that goes over 0 you can increase the memory buffer per this article: 
 http://support.apple.com/kb/HT3512  But I've yet to see that number go 
 over zero.
 
 (this prints out several times)
 httpd 6511   _www  txt   REG   14,21996352   
 17733353 /usr/sbin/httpd
 httpd 6511   _www  txt   REG   14,2 393792   
 17733502 /usr/lib/libaprutil-1.0.2.7.dylib
 httpd 6511   _www  txt   REG   14,2 651248  
 15133 /usr/lib/libexpat.1.5.0.dylib
 httpd 6511   _www  txt   REG   14,24147008  
 15324 /usr/lib/libiconv.2.dylib
 httpd 6511   _www  txt   REG   14,2 578656   
 17733501 /usr/lib/libapr-1.0.2.7.dylib
 httpd 6511   _www  txt   REG   14,2  53888   
 17733291 /usr/libexec/apache2/mod_authn_file.so
 httpd 6511   _www  txt   REG   14,2  66500   
 17733295 /usr/libexec/apache2/mod_authz_host.so
 httpd 6511   _www  txt   REG   14,2 201360   
 17733299 /usr/libexec/apache2/mod_cache.so
 httpd 6511   _www  txt   REG   14,2  70660   
 17733308 /usr/libexec/apache2/mod_dumpio.so
 httpd 6511   _www  txt   REG   14,2 126528   
 17733321 /usr/libexec/apache2/mod_mem_cache.so
 httpd 6511   _www  txt   REG   14,2 117296   
 17733307 /usr/libexec/apache2/mod_disk_cache.so
 httpd 6511   _www  txt   REG   14,2 105944   
 17733311 /usr/libexec/apache2/mod_ext_filter.so
 httpd 6511   _www  txt   REG   14,2 245316   
 17733316 /usr/libexec/apache2/mod_include.so
 httpd 6511   _www  txt   REG   14,2  91784   
 17733312 /usr/libexec/apache2/mod_filter.so
 httpd 6511   _www  txt   REG   14,2 121380   
 17733305 /usr/libexec/apache2/mod_deflate.so
 httpd 6511   _www  txt   REG   14,2 126208   
 17733318 /usr/libexec/apache2/mod_log_config.so
 httpd 6511   _www  txt   REG   14,2  54200   
 17733320 /usr/libexec/apache2/mod_logio.so
 httpd 6511   _www  txt   REG   14,2  53956   
 17733309 /usr/libexec/apache2/mod_env.so
 httpd 6511   _www  txt   REG   14,2  71040   
 17733310 /usr/libexec/apache2/mod_expires.so
 httpd 6511   _www  txt   REG   14,2 100768   
 17733313 /usr/libexec/apache2/mod_headers.so
 httpd 6511   

AjaxExpansion expanded flag binding problem?

2011-04-13 Thread Mai Nguyen
Dear List,

I tried to solve the problem of using the AjaxExpansion per row inside a 
repetition and providing a unique expanded flag binding per row.
Since each row matches a particular product, the binding of expanded is set 
to the visible flag of each product in the array by using a setter/getter 
method.

If I use a public instance variable, such as a global isVisible flag, this 
would work like the AjaxExample, but the global instance variable is not 
suitable for each row in a repetition.

I do not understand why the binding to a setter/getter method would fail?

Thanks for any hints,

-mai

CurrentProductRepetition: WORepetition {
item = bundleProductItem;
list = currentMainBundleProducts;
index = logIndex;
} 
AgreementDetailsAjaxExpansion : AjaxExpansion {
id = ~AgreementDetailsAjaxExpansion + logIndex;
insertion = Effect.blind;
insertionDuration = 0.1;
string = Agreement Details;
expanded = isAgreementDetailsVisibleForBundleProductItem;   
}

In the java file, I have the following simple code:

public boolean isAgreementDetailsVisibleForBundleProductItem() {
return (bundleProductItemC.isAgreementDetailsVisible());
}

public void setIsAgreementDetailsVisibleForBundleProductItem(boolean aValue) {
bundleProductItemC.setIsAgreementDetailsVisible(aValue);
}


==
// Methods used in AjaxExpansion for bundle product
public boolean isAgreementDetailsVisibleC = false;

public boolean isAgreementDetailsVisible() {
return isAgreementDetailsVisibleC;
}

public void setIsAgreementDetailsVisible(boolean value) {
isAgreementDetailsVisibleC = value;
}

However, at runtime, I would get the following exception:

com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message 
'[CustomerSummary name:  CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = 
er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null ; 
0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog 
subcomponents: null ; }  takeValueForKey()]: attempt to assign value to 
unknown key: 'isAgreementDetailsVisibleForBundleProductItem'.
This WOComponent does not have an instance variable of the name 
isAgreementDetailsVisibleForBundleProductItem or 
_isAgreementDetailsVisibleForBundleProductItem, nor a method of the name 
setIsAgreementDetailsVisibleForBundleProductItem or 
_setIsAgreementDetailsVisibleForBundleProductItem' object 'CustomerSummary 
name: CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = 
er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null ; 
0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog 
subcomponents: null ; } ' key 'isAgreementDetailsVisibleForBundleProductItem'
at 
com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey(WOComponent.java:1781)
at 
com.webobjects.foundation.NSKeyValueCoding$Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:519)
at 
com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.setValueInObject(NSKeyValueCoding.java:899)
at 
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1354)
at 
com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1748)
at 
com.webobjects.foundation.NSKeyValueCoding$Utility.takeValueForKey(NSKeyValueCoding.java:469)
at 
com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeValueForKeyPath(NSValidation.java:679)
at 
com.webobjects.appserver.WOComponent.validateTakeValueForKeyPath(WOComponent.java:1424)
at 
com.webobjects.appserver._private.WOKeyValueAssociation.setValue(WOKeyValueAssociation.java:76)
at 
ognl.helperfunction.WOHelperFunctionKeyValueAssociation.setValue(WOHelperFunctionKeyValueAssociation.java:21)
at 
com.webobjects.appserver.WOComponent.setValueForBinding(WOComponent.java:910)
at er.ajax.AjaxExpansion.setExpanded(AjaxExpansion.java:138)
at er.ajax.AjaxExpansion.toggle(AjaxExpansion.java:146)
 ___
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: AjaxExpansion expanded flag binding problem?

2011-04-13 Thread Henrique Gomes
Long shot, try removing the 'is' from the binding:

expanded = agreementDetailsVisibleForBundleProductItem;

Also, make sure the code the app is using is the code you are looking at. Clean 
your project, look for other mistakes.
Good luck,

Henrique Gomes


On Apr 14, 2011, at 12:08 AM, Mai Nguyen wrote:

 Dear List,
 
 I tried to solve the problem of using the AjaxExpansion per row inside a 
 repetition and providing a unique expanded flag binding per row.
 Since each row matches a particular product, the binding of expanded is set 
 to the visible flag of each product in the array by using a setter/getter 
 method.
 
 If I use a public instance variable, such as a global isVisible flag, this 
 would work like the AjaxExample, but the global instance variable is not 
 suitable for each row in a repetition.
 
 I do not understand why the binding to a setter/getter method would fail?
 
 Thanks for any hints,
 
 -mai
 
 CurrentProductRepetition: WORepetition {
   item = bundleProductItem;
   list = currentMainBundleProducts;
   index = logIndex;
 } 
 AgreementDetailsAjaxExpansion : AjaxExpansion {
   id = ~AgreementDetailsAjaxExpansion + logIndex;
   insertion = Effect.blind;
   insertionDuration = 0.1;
   string = Agreement Details;
   expanded = isAgreementDetailsVisibleForBundleProductItem;   
 }
 
 In the java file, I have the following simple code:
 
 public boolean isAgreementDetailsVisibleForBundleProductItem() {
   return (bundleProductItemC.isAgreementDetailsVisible());
   }
 
 public void setIsAgreementDetailsVisibleForBundleProductItem(boolean aValue) {
   bundleProductItemC.setIsAgreementDetailsVisible(aValue);
   }
 
 
 ==
 // Methods used in AjaxExpansion for bundle product
 public boolean isAgreementDetailsVisibleC = false;
 
   public boolean isAgreementDetailsVisible() {
   return isAgreementDetailsVisibleC;
   }
 
   public void setIsAgreementDetailsVisible(boolean value) {
   isAgreementDetailsVisibleC = value;
   }
 
 However, at runtime, I would get the following exception:
 
 com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message 
 '[CustomerSummary name:  CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 
 = er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null ; 
 0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog 
 subcomponents: null ; }  takeValueForKey()]: attempt to assign value to 
 unknown key: 'isAgreementDetailsVisibleForBundleProductItem'.
 This WOComponent does not have an instance variable of the name 
 isAgreementDetailsVisibleForBundleProductItem or 
 _isAgreementDetailsVisibleForBundleProductItem, nor a method of the name 
 setIsAgreementDetailsVisibleForBundleProductItem or 
 _setIsAgreementDetailsVisibleForBundleProductItem' object 'CustomerSummary 
 name: CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = 
 er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null ; 
 0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog 
 subcomponents: null ; } ' key 
 'isAgreementDetailsVisibleForBundleProductItem'
   at 
 com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey(WOComponent.java:1781)
   at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:519)
   at 
 com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.setValueInObject(NSKeyValueCoding.java:899)
   at 
 com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1354)
   at 
 com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1748)
   at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.takeValueForKey(NSKeyValueCoding.java:469)
   at 
 com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeValueForKeyPath(NSValidation.java:679)
   at 
 com.webobjects.appserver.WOComponent.validateTakeValueForKeyPath(WOComponent.java:1424)
   at 
 com.webobjects.appserver._private.WOKeyValueAssociation.setValue(WOKeyValueAssociation.java:76)
   at 
 ognl.helperfunction.WOHelperFunctionKeyValueAssociation.setValue(WOHelperFunctionKeyValueAssociation.java:21)
   at 
 com.webobjects.appserver.WOComponent.setValueForBinding(WOComponent.java:910)
   at er.ajax.AjaxExpansion.setExpanded(AjaxExpansion.java:138)
   at er.ajax.AjaxExpansion.toggle(AjaxExpansion.java:146)
 ___
 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/lists%40farol.pt
 
 This email sent to li...@farol.pt

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  

Re: AjaxExpansion expanded flag binding problem?

2011-04-13 Thread Mai Nguyen
After more tweaking, I got it to work by binding it to a boolean variable 
instead (the setter/getter binding does not seem to work, so this may be a 
useful note for others in the future), and make this boolean unique to each row.

thanks,

mai
On Apr 13, 2011, at 5:04 PM, Henrique Gomes wrote:

 Long shot, try removing the 'is' from the binding:
 
 expanded = agreementDetailsVisibleForBundleProductItem;
 
 Also, make sure the code the app is using is the code you are looking at. 
 Clean your project, look for other mistakes.
 Good luck,
 
 Henrique Gomes
 
 
 On Apr 14, 2011, at 12:08 AM, Mai Nguyen wrote:
 
 Dear List,
 
 I tried to solve the problem of using the AjaxExpansion per row inside a 
 repetition and providing a unique expanded flag binding per row.
 Since each row matches a particular product, the binding of expanded is 
 set to the visible flag of each product in the array by using a 
 setter/getter method.
 
 If I use a public instance variable, such as a global isVisible flag, this 
 would work like the AjaxExample, but the global instance variable is not 
 suitable for each row in a repetition.
 
 I do not understand why the binding to a setter/getter method would fail?
 
 Thanks for any hints,
 
 -mai
 
 CurrentProductRepetition: WORepetition {
  item = bundleProductItem;
  list = currentMainBundleProducts;
  index = logIndex;
 } 
 AgreementDetailsAjaxExpansion : AjaxExpansion {
  id = ~AgreementDetailsAjaxExpansion + logIndex;
  insertion = Effect.blind;
  insertionDuration = 0.1;
  string = Agreement Details;
  expanded = isAgreementDetailsVisibleForBundleProductItem;   
 }
 
 In the java file, I have the following simple code:
 
 public boolean isAgreementDetailsVisibleForBundleProductItem() {
  return (bundleProductItemC.isAgreementDetailsVisible());
  }
 
 public void setIsAgreementDetailsVisibleForBundleProductItem(boolean aValue) 
 {
  bundleProductItemC.setIsAgreementDetailsVisible(aValue);
  }
 
 
 ==
 // Methods used in AjaxExpansion for bundle product
 public boolean isAgreementDetailsVisibleC = false;
 
  public boolean isAgreementDetailsVisible() {
  return isAgreementDetailsVisibleC;
  }
 
  public void setIsAgreementDetailsVisible(boolean value) {
  isAgreementDetailsVisibleC = value;
  }
 
 However, at runtime, I would get the following exception:
 
 com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message 
 '[CustomerSummary name:  CustomerSummary subcomponents: 
 {0.15.13.7.1.5.0.1.3 = er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion 
 subcomponents: null ; 0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: 
 er.ajax.AjaxModalDialog subcomponents: null ; }  takeValueForKey()]: 
 attempt to assign value to unknown key: 
 'isAgreementDetailsVisibleForBundleProductItem'.
 This WOComponent does not have an instance variable of the name 
 isAgreementDetailsVisibleForBundleProductItem or 
 _isAgreementDetailsVisibleForBundleProductItem, nor a method of the name 
 setIsAgreementDetailsVisibleForBundleProductItem or 
 _setIsAgreementDetailsVisibleForBundleProductItem' object 'CustomerSummary 
 name: CustomerSummary subcomponents: {0.15.13.7.1.5.0.1.3 = 
 er.ajax.AjaxExpansion name: er.ajax.AjaxExpansion subcomponents: null ; 
 0.15.13.7.1.7 = er.ajax.AjaxModalDialog name: er.ajax.AjaxModalDialog 
 subcomponents: null ; } ' key 
 'isAgreementDetailsVisibleForBundleProductItem'
  at 
 com.webobjects.appserver.WOComponent.handleTakeValueForUnboundKey(WOComponent.java:1781)
  at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.handleTakeValueForUnboundKey(NSKeyValueCoding.java:519)
  at 
 com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.setValueInObject(NSKeyValueCoding.java:899)
  at 
 com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1354)
  at 
 com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1748)
  at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.takeValueForKey(NSKeyValueCoding.java:469)
  at 
 com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeValueForKeyPath(NSValidation.java:679)
  at 
 com.webobjects.appserver.WOComponent.validateTakeValueForKeyPath(WOComponent.java:1424)
  at 
 com.webobjects.appserver._private.WOKeyValueAssociation.setValue(WOKeyValueAssociation.java:76)
  at 
 ognl.helperfunction.WOHelperFunctionKeyValueAssociation.setValue(WOHelperFunctionKeyValueAssociation.java:21)
  at 
 com.webobjects.appserver.WOComponent.setValueForBinding(WOComponent.java:910)
  at er.ajax.AjaxExpansion.setExpanded(AjaxExpansion.java:138)
  at er.ajax.AjaxExpansion.toggle(AjaxExpansion.java:146)
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update 

Re: wotaskd fails with java.net.UnknownHostException

2011-04-13 Thread Gennady Kushnir
If I set any host other than localhost a get an error parsing SiteConfig.xml
Do I have to reenter everything manually instead of using prepared SiteConfig?

2011/4/13 Chuck Hill ch...@global-village.net:
 Then instead of localhost, use the canonical name of the machine.  This needs 
 to be the reverse lookup of the machine's IP address.  They must resolve 
 correctly between each other.  Then use the same WOHost on your apps.

 Chuck


 On Apr 13, 2011, at 11:55 AM, Gennady Kushnir wrote:

 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
 Thank you Chuck. This option did help to run wotaskd.
 But now I can't use it with Monitor. If I set both of them to
 localhost, then I can't access Web-interface from outside.
 If I set WOHost to IP then it fails to parse SiteConfig.xml
 It drives me crazy ((

 2011/4/9 Chuck Hill ch...@global-village.net:
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.

 Chuck


 On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote:

 Hello list.
 I was asked to help setting up deployment on Linux system. It is not
 my first linux deployment, so I do know main steps and some possible
 errors. But this time it is something new for me.
 I can not even start wotaskd. When running from terminal it fails with

 [2011-4-9 10:46:41 MSD] main A fatal exception occurred:
 WOApplication: Cannot be initialized.
 [2011-4-9 10:46:41 MSD] main
 com.webobjects.foundation.NSForwardException
 [java.lang.reflect.InvocationTargetException] null:WOApplication:
 Cannot be initialized.
       at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:918)
       at Application.init(Application.java:112)
 .
 Caused by: java.lang.reflect.InvocationTargetException
 .
       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at 
 com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614)
       at 
 com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316)
       at 
 com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386)
       at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:802)
 .
 Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru:
 NET-DIST.school19.xeno.ru
       at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
       at 
 com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93)
       ... 23 more

 I have explored all WO configuration files I could remember , but I
 did not find aforementioned hostname there.
 Where did wotaskd get that hostname? Why does it need one? And is it
 possible to override in somewhere?

 Gennady Kushnir
 ___
 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/chill%40global-village.net

 This email sent to ch...@global-village.net

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









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


Re: wotaskd fails with java.net.UnknownHostException

2011-04-13 Thread Chuck Hill
What is the error message?


On Apr 13, 2011, at 10:04 PM, Gennady Kushnir wrote:

 If I set any host other than localhost a get an error parsing SiteConfig.xml
 Do I have to reenter everything manually instead of using prepared SiteConfig?
 
 2011/4/13 Chuck Hill ch...@global-village.net:
 Then instead of localhost, use the canonical name of the machine.  This 
 needs to be the reverse lookup of the machine's IP address.  They must 
 resolve correctly between each other.  Then use the same WOHost on your apps.
 
 Chuck
 
 
 On Apr 13, 2011, at 11:55 AM, Gennady Kushnir wrote:
 
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
 Thank you Chuck. This option did help to run wotaskd.
 But now I can't use it with Monitor. If I set both of them to
 localhost, then I can't access Web-interface from outside.
 If I set WOHost to IP then it fails to parse SiteConfig.xml
 It drives me crazy ((
 
 2011/4/9 Chuck Hill ch...@global-village.net:
 Adding -DWOHost=localhost (or the cannonical name of that machine) to the 
 launch args.
 
 Chuck
 
 
 On Apr 9, 2011, at 12:39 AM, Gennady Kushnir wrote:
 
 Hello list.
 I was asked to help setting up deployment on Linux system. It is not
 my first linux deployment, so I do know main steps and some possible
 errors. But this time it is something new for me.
 I can not even start wotaskd. When running from terminal it fails with
 
 [2011-4-9 10:46:41 MSD] main A fatal exception occurred:
 WOApplication: Cannot be initialized.
 [2011-4-9 10:46:41 MSD] main
 com.webobjects.foundation.NSForwardException
 [java.lang.reflect.InvocationTargetException] null:WOApplication:
 Cannot be initialized.
   at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:918)
   at Application.init(Application.java:112)
 .
 Caused by: java.lang.reflect.InvocationTargetException
 .
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at 
 com.webobjects.foundation._NSUtilities.instantiateObject(_NSUtilities.java:614)
   at 
 com.webobjects.appserver.WOApplication.adaptorWithName(WOApplication.java:1316)
   at 
 com.webobjects.appserver.WOApplication._initAdaptors(WOApplication.java:1386)
   at 
 com.webobjects.appserver.WOApplication.init(WOApplication.java:802)
 .
 Caused by: java.net.UnknownHostException: NET-DIST.school19.xeno.ru:
 NET-DIST.school19.xeno.ru
   at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
   at 
 com.webobjects.appserver._private.WOClassicAdaptor.init(WOClassicAdaptor.java:93)
   ... 23 more
 
 I have explored all WO configuration files I could remember , but I
 did not find aforementioned hostname there.
 Where did wotaskd get that hostname? Why does it need one? And is it
 possible to override in somewhere?
 
 Gennady Kushnir
 ___
 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/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 --
 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
 
 
 
 
 
 
 
 
 
 --
 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
 
 
 
 
 
 
 
 

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