Article View: bionet.software.srs
Article #154Re: Registering queries within a session from a layout script
From: "benedict arnold (JIC)"
Date: Tue, 15 Jul 2003 13:57
Date: Tue, 15 Jul 2003 13:57
39 lines
4705 bytes
4705 bytes
Hi James, you're not trying to do the impossible, but the work around will probably mean hacking the standard release page code ;-) As far as I recall, even though you are using $CurrSession, queries from within a layout script aren't registered in the session object (the reason being that some fools (ie me amongst others) use large numbers of queries in layouts) unless queryName is specified. What you might want to do in your layout script is print out the session info where you'll be able to see what the last query done was ... the queryName attribute will give the query a name, however, SRS in it's infinite wisdom rarely uses this to track which query it is on, it uses the queryN attribute of the $UPQ object that refers to query for that results set. I think what you need to do is find out what the queryN is for the query you've just done, something like $query=$s.queryList[$s.queryList.len:[]] will give you the query object, then you can access the queryN attribute using $qn=$query.queryN or you can get it using $qn=$s.queryList[$s.queryList.len:[]].queryN you'll then have to modify all instances where javascript calls like: "javascript:subgif(document.forms[0], '@wwwPageName~@qResult@queryFrom~@viewWith@queryNumber~@22')" occur so that the reflect the query number you want to use. I suspect you may have to do the query you want to use in the page somewhere in the page generation code rather than in the layout, as most of the javascript calls wil have been formed before the layout script is called, so you'll probably have to edit the resultpage.i file and in the context attribute section of the $Page object do the query you want to do and the redo the $qRes=$SpGetQueryResult call. This will set the queryN to the correct value for the query you do in the layout script. At that point you don't need to redo the query with a query string just use : $set=$s.query:[queryName:XXXXX] where XXXXX is the query name you used in the context section. You may be lucky and get $entries reset to the set you want if you use a loader in the contexts chunk of the page. hope that makes sense and you're brave enough to play with the guts of pages :-) all the best Ben ---
Technical Details
Message-ID:
<E4D0A20B9E9ED4118E3C00508BEED1710572B459@jimserv2.jic.bbsrc.ac.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.netShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa6ec,b8ea28cfb80d177a
X-Google-Attributes: gidfa6ec,public
X-Google-ArrivalTime: 2003-07-15 06:57:31 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!hgmp.mrc.ac.uk!net.bio.net
From: benedict.arnold@bbsrc.ac.uk ("benedict arnold (JIC)")
Newsgroups: bionet.software.srs
Subject: Re: Registering queries within a session from a layout script
Date: 15 Jul 2003 14:57:30 +0100
Organization: BIOSCI/MRC Human Genome Mapping Project Resource Centre
Lines: 40
Sender: mod-srs@hgmp.mrc.ac.uk
Approved: BIOSCI Approval Key <biosci-approval-key@net.bio.net>
Message-ID: <E4D0A20B9E9ED4118E3C00508BEED1710572B459@jimserv2.jic.bbsrc.ac.uk>
NNTP-Posting-Host: mercury.hgmp.mrc.ac.uk
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
X-Trace: niobium.hgmp.mrc.ac.uk 1058277450 5220 193.62.192.80 (15 Jul 2003 13:57:30 GMT)
X-Complaints-To: news@net.bio.net
NNTP-Posting-Date: Tue, 15 Jul 2003 13:57:30 +0000 (UTC)
X-Original-To: bionet-software-srs@net.bio.net
X-Original-To: bio-srs@net.bio.net
X-Received: from localhost (localhost [127.0.0.1])
by mercury.hgmp.mrc.ac.uk (Postfix) with ESMTP id 9BDB77D370
for <bio-srs@net.bio.net>; Tue, 15 Jul 2003 10:10:42 +0100 (BST)
X-Received: from mhub2.bbsrc.ac.uk (mhub2.bbsrc.ac.uk [149.155.202.2])
by mercury.hgmp.mrc.ac.uk (Postfix) with ESMTP id 9CDC37D36B
for <bio-srs@net.bio.net>; Tue, 15 Jul 2003 10:10:40 +0100 (BST)
X-Received: from exrout.cc.bbsrc.ac.uk ([149.155.100.88])
by mhub2.bbsrc.ac.uk with esmtp (Exim 3.36 #3)
id 19cLo4-0001cb-04; Tue, 15 Jul 2003 10:09:08 +0100
X-Received: from jimserv2.jic.bbsrc.ac.uk ([149.155.120.98]) by exrout.cc.bbsrc.ac.uk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
id 3TXRV3ZP; Tue, 15 Jul 2003 10:09:07 +0100
X-Received: by jimserv2.jic.bbsrc.ac.uk with Internet Mail Service (5.5.2653.19)
id <LRF2320S>; Tue, 15 Jul 2003 10:09:07 +0100
X-To: "'j.abbott@imperial.NOSPAM.ac.uk'" <j.abbott@imperial.NOSPAM.ac.uk>
X-Cc: "'bio-srs@net.bio.net'" <bio-srs@net.bio.net>
X-ECS-MailScanner-BBSRC: Found to be clean
X-Auth: PGPMoose V1.1 PGP bionet.software.srs
iQCVAwUAPxQISaCIqsWvyF5FAQFJ6gP/fHKiI6OwVjncUNiX0na9Ppkl8AM7VE8r
mCl1tzyBh9mjsuyZLA1ZF/1tbpNbn/W7eTnPqix5KWdXMcPL50N05lE5TKHyFNH1
1oj0vQp2T5kDW+9IA4540CbO9x1J22DhpiB8K4YoDjrDIV97fpo+m92g672YYn0Q
mn6+zOPxU74=
=PpDi