On Thu, Jun 29, 2006 at 10:45:39PM -0700, Zhiming Liu wrote:
> Hi Todd,
> 
> Thanks for your email. Can you tell me a little more
> the component? Is there any contribution code that I
> can find on wiki website?

Do you know how to create callbacks? /Elements/ShowCustomFields
and /Elements/EditCustomField have callbacks that let
you set the name of the component for Show/Edit of a
given CF. So you create a callback that sets the name,
and then you create the component that handles
display/edit. I have a callback that you can use as an
example:

local/html/Callbacks/todd/Elements/EditCustomField/EditComponentName:

===
<%INIT>
return unless $CustomField;

my
$Comp = $CustomField->Name;
$Comp =~ s/\W/_/g;
$Comp = $m->callers(1)->dir_path . "/CustomFields/EditCF_$Comp";

$$Name = $m->comp_exists($Comp.$CustomField->id) ? $Comp.$CustomField->id 
       : $m->comp_exists($Comp)                  ? $Comp
       :                                           $$Name
       ;
</%INIT>
<%ARGS>
$Name
$CustomField => undef
$Object => undef<
/%ARGS>
===

> 
> I have posted another question about how to Show
> Tickets in the group only, not cross groups. Do you
> have any ideas about this? Thanks again, Zhiming.
> 
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to