From: <rg...@di...> - 2002-02-07 01:35:26
|
I'm not sure that I'm thinking along the same line of reasoning that you are but I'll share with you what I do at our company. Because of the statelessness of the web, you really can't pass from one form to the other the LDAP entry object. What you can do though is pass key information such as the DN or a unique identifying attribute. This means that you'll have to do a subsequent search each time but the overhead is minimal. (pardon the generic rather than perl code example) So how about this flow: [ if a unique identifier is passed ] -> do LDAP search for match, display attribute information and exit. [ if no {Login} value is passed ] -> print form asking for {Login} value to search for [ if {Login} value is passed ] -> do LDAP search for match [ if more than one match found ] -> build selection form use DN or some other unique identifying attribute as the value [ if only one match found ] -> display attribute information [ if no matchs found ] -> print form asking for a different {Login} value The forms mentioned above have the 'action' as this same code. There are several variations that we implement depending on objectclass, expected data retrieved and audience. Lastly, if this doesn't address your question, my apologies. Rusty On Feb 6, 7:12pm, Cox, Todd (NCI) wrote: > Subject: Saving references in a multi-part form for later use #2 > Hello all, > > I am still banging my head against the wall since my last post concerning > this message. I am trying to save an entry object in between forms and am > having a metal meltdown trying to figure out how to do it. The snippet of > code is: > > $input_name = param('Login Name'); > $r = LDAPsearch("cn=$input_name","o=matrix"); > > if(!param('Login Name')){ > print "Login Name field was left blank. Please go back and enter a > login name to search on.<br>"; > print submit(-name=>'go',-value=>'Start Page') if $current_page > 0; > $flag = 1; > }elsif($r->entries){ > print "Current page: $page_name<br>"; > print "<br>User(s) matching search request:<br>"; > > @array = $r->entries; > foreach my $entry (@array) > { > $user = $entry->dn; > push(@userList,$user); > } > print popup_menu(-name=> 'Login Name',-size=>1, -VALUES => [ > @userList ] ); > $flag=1; > print "<p>Please select a user to continue.<br>", > hidden(-name=>'page',-value=>$current_page,-override=>1), > submit(-name=>'go',-value=>'Previous Page'), > submit(-name=>'go',-value=>'Get Attributes'); > }else{ > print p("Attribute Information for: "), param('Login Name'); > # this is where I want to display the data for the user selected in > the popup_menu. > > > } > > Any thoughts would be appreciated. > > Todd Cox > National Cancer Institute > Rockville, MD > > > >-- End of excerpt from Cox, Todd (NCI) -- Russell Biggs (Rusty) Internet: r-...@ti... 6500 Chase Oaks Blvd, M/S 8412 Texas Instruments Plano Tx 75023 Phone: (972) 575-0826 Fax: (972) 575-4853 Home Page: http://dirtest3.itg.ti.com/~rgb Calendar: http://dirtest3.itg.ti.com/cgi-bin/synchronize.cgi?name=Russell+Biggs "I sense much NT in you... NT leads to bluescreen... Bluescreen leads to downtime... Downtime leads to suffering... NT is the path to the darkside..." ...Unknown UNIX Jedi |