CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Starting a Tree in a certain record

Print topic Send  topic

Author Message
Ricardo J. Méndez Castro
Posted: 02/28/2002, 11:36 PM

Hi,

I wish to change the Top Category for a tree view to a certain register.

For example, suppose that I have a table employee that has the fields
emp_id, emp_name and emp_boss. Creating a tree of that table with emp_id
as Category ID, emp_name as Category Name and emp_boss as the Parent
Category ID gives me the tree. However, I wish to make the currently logged
employee the top category, so that he can't see those branches of the tree
above him.

Is there any way to accomplish this?

Thanks in advance,




Ricardo J. Méndez Castro Sheer Talent Developments
------------------------------------------------------------------------
"The middle of every successful project looks like a disaster."
- Rosabeth Moss Cantor

Alexey Alexapolsky
Posted: 03/01/2002, 5:14 AM

here is the trick :

tree relies on emp_id parameter.
so when the tree sees no emp_id it diplays top category. so you must cheat
it and say
that emp_id actually is there. to do this you need to open modules/common
event
and modify GetParam function to detect what page is calling it , and if
there is
no such parameter, it nevertheless should return default emp_id



--
Alex
CodeCharge Developer


"Ricardo J. Méndez Castro" <rmendez@sheertalent.com> wrote in message
news:a5nb1c$gnh$1@news.codecharge.com...
> Hi,
>
> I wish to change the Top Category for a tree view to a certain register.
>
> For example, suppose that I have a table employee that has the fields
> emp_id, emp_name and emp_boss. Creating a tree of that table with
emp_id
> as Category ID, emp_name as Category Name and emp_boss as the Parent
> Category ID gives me the tree. However, I wish to make the currently
logged
> employee the top category, so that he can't see those branches of the tree
> above him.
>
> Is there any way to accomplish this?
>
> Thanks in advance,
>
>
>
>
> Ricardo J. Méndez Castro Sheer Talent Developments
> ------------------------------------------------------------------------
> "The middle of every successful project looks like a disaster."
> - Rosabeth Moss Cantor
>
>

Ricardo J. Méndez Castro
Posted: 03/01/2002, 8:38 AM

Alex,

Thanks for the tip. I apologize if this is a stupid question, but how do I
find out which page called a function? Is there a page_name variable in
CodeCharge (or PHP) or something similar?

And a second issue: this would help me start the category in the current
user (I tried something similar on the form code) but wouldn't help me block
out the categories _above_ the user, would it?

Thanks in advance,



Ricardo J. Méndez Castro Sheer Talent Developments
------------------------------------------------------------------------
"The middle of every successful project looks like a disaster."
- Rosabeth Moss Cantor


"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a5nuqj$kff$2@news.codecharge.com...
> here is the trick :
>
> tree relies on emp_id parameter.
> so when the tree sees no emp_id it diplays top category. so you must
cheat
> it and say
> that emp_id actually is there. to do this you need to open modules/common
> event
> and modify GetParam function to detect what page is calling it , and if
> there is
> no such parameter, it nevertheless should return default emp_id
>
>
>
> --
> Alex
> CodeCharge Developer
>
>
> "Ricardo J. Méndez Castro" <rmendez@sheertalent.com> wrote in message
>news:a5nb1c$gnh$1@news.codecharge.com...
> > Hi,
> >
> > I wish to change the Top Category for a tree view to a certain register.
> >
> > For example, suppose that I have a table employee that has the fields
> > emp_id, emp_name and emp_boss. Creating a tree of that table with
> emp_id
> > as Category ID, emp_name as Category Name and emp_boss as the Parent
> > Category ID gives me the tree. However, I wish to make the currently
> logged
> > employee the top category, so that he can't see those branches of the
tree
> > above him.
> >
> > Is there any way to accomplish this?
> >
> > Thanks in advance,
> >
> >
> >
> >
> > Ricardo J. Méndez Castro Sheer Talent Developments
> > ------------------------------------------------------------------------
> > "The middle of every successful project looks like a disaster."
> > - Rosabeth Moss Cantor
> >
> >
>
>

Ricardo J. Méndez Castro
Posted: 03/01/2002, 11:53 AM

Alex,

I already found out about the $PHP_SELF, just after asking here.

Don't worry about the making an employee the maximum visible category (both
as the starting one and as the only one visible): I modified the code on the
page that CodeCharge generated. It would be a nice feature, though, being
able to set it from CodeCharge.

Good luck,


Ricardo J. Méndez Castro Sheer Talent Developments
------------------------------------------------------------------------
"The middle of every successful project looks like a disaster."
- Rosabeth Moss Cantor


"Ricardo J. Méndez Castro" <rmendez@sheertalent.com> wrote in message
news:a5oapu$vba$1@news.codecharge.com...
> Alex,
>
> Thanks for the tip. I apologize if this is a stupid question, but how do I
> find out which page called a function? Is there a page_name variable in
> CodeCharge (or PHP) or something similar?
>
> And a second issue: this would help me start the category in the current
> user (I tried something similar on the form code) but wouldn't help me
block
> out the categories _above_ the user, would it?
>
> Thanks in advance,
>
>
>
> Ricardo J. Méndez Castro Sheer Talent Developments
> ------------------------------------------------------------------------
> "The middle of every successful project looks like a disaster."
> - Rosabeth Moss Cantor
>
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:a5nuqj$kff$2@news.codecharge.com...
> > here is the trick :
> >
> > tree relies on emp_id parameter.
> > so when the tree sees no emp_id it diplays top category. so you must
> cheat
> > it and say
> > that emp_id actually is there. to do this you need to open
modules/common
> > event
> > and modify GetParam function to detect what page is calling it , and if
> > there is
> > no such parameter, it nevertheless should return default emp_id
> >
> >
> >
> > --
> > Alex
> > CodeCharge Developer
> >
> >
> > "Ricardo J. Méndez Castro" <rmendez@sheertalent.com> wrote in message
> >news:a5nb1c$gnh$1@news.codecharge.com...
> > > Hi,
> > >
> > > I wish to change the Top Category for a tree view to a certain
register.
> > >
> > > For example, suppose that I have a table employee that has the fields
> > > emp_id, emp_name and emp_boss. Creating a tree of that table with
> > emp_id
> > > as Category ID, emp_name as Category Name and emp_boss as the Parent
> > > Category ID gives me the tree. However, I wish to make the currently
> > logged
> > > employee the top category, so that he can't see those branches of the
> tree
> > > above him.
> > >
> > > Is there any way to accomplish this?
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > >
> > > Ricardo J. Méndez Castro Sheer Talent Developments
> >
> ------------------------------------------------------------------------
> > > "The middle of every successful project looks like a disaster."
> > > - Rosabeth Moss Cantor
> > >
> > >
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.