Re: Passing values into an XSP logic sheet

2004-03-04 Thread beyaRecords - The home Urban music
Christopher,
that works fine now ;-)
many thanks

Andrew
On 4 Mar 2004, at 16:00, Christopher Painter-Wakefield wrote:

  
int artistID = Integer.parseInt();
Artist artist = Artist.getArtist(artistID);
String artist_name = artist.getArtistName();
  
  
artist_name
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Passing values into an XSP logic sheet

2004-03-04 Thread Christopher Painter-Wakefield




Andrew,

sorry I didn't reply to your previous mail - I got very busy yesterday.  I
looked at the files you sent, and I saw some things, but it looks like
you've moved on.

In your current posting, I think the problem is the order of execution.  In
your logicsheet, you are putting in code to look up the artist details in
an xsp:logic block directly inside the xsp:page block.  This puts all of
that code at the class level, so it is executed when the page object is
first instantiated.  The code that provides the artistID for lookup, on the
other hand, is inside the 'page' element, which means it is put in the
generate() method of the page class, which gets called to generate the
page.  By the time it is called, though, all of your artist detail
variables have already been set.

Here's a rewrite/simplification that may help:

1. XSP Page (snippet)


http://apache.org/xsp";
 xmlns:artistDetails="
http://www.beyarecords.com/artistDetails/1.0";
 xmlns:xlink="http://www.w3.org/1999/xlink";
 xmlns:util="http://apache.org/xsp/util/2.0";
 >
  
 
  int artistID =
Integer.parseInt();
 

 

artistID
 

...


2. XSP Logic Sheet

http://www.w3.org/1999/XSL/Transform";
   xmlns:xsp="http://apache.org/xsp";
   xmlns:util="http://apache.org/xsp/util/2.0";
   xmlns:artistDetails="http://www.beyarecords.com/artistDetails/1.0";
   version="1.0">


  



  test.Artist
  test.Base64



  



  
int artistID = Integer.parseInt();
Artist artist = Artist.getArtist(artistID);
String artist_name = artist.getArtistName();
  
  
artist_name
  


...

-Christopher




|-+>
| |   beyaNet  |
| |   Consultancy  |
| |   <[EMAIL PROTECTED]|
| |   .com>|
| ||
| |   03/04/2004 08:26 |
| |   AM   |
| |   Please respond to|
| |   users|
| ||
|-+>
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:                      
  |
  |   Subject:  Re: Passing values into an XSP logic sheet 
  |
  
>--|




Hi,
I am trying to pull a value in from my XSP page into an XSP Logicsheet.
At the moment no value is being pulled in. What am I doing incorrectly?

1. XSP Page (snippet)


http://apache.org/xsp";
 xmlns:artistDetails="
http://www.beyarecords.com/artistDetails/1.0"; --
LOGICSHEET REF:
 xmlns:xlink="http://www.w3.org/1999/xlink";
 xmlns:util="http://apache.org/xsp/util/2.0";
 >

 
   int artistID =
Integer.parseInt(); --VALUE PULLED IN FROM SITEMAP
 

 
 artistID --- VALUE HELD HERE
 

2. XSP Logic Sheet

http://www.w3.org/1999/XSL/Transform";
   xmlns:xsp="http://apache.org/xsp";
   xmlns:util="http://apache.org/xsp/util/2.0";
   xmlns:artistDetails="http://www.beyarecords.com/artistDetails/1.0"; --
LOGICSHEET REF:
   version="1.0">


   
  

  
test.Artist
test.Base64
  

  
 int artistID =
Integer.parseInt(); -- WANT VALUE PULLED INTO HERE
 Artist artist = Artist.getArtist(artistID);

 int id = artist.getID();
 String artist_name = artist.getArtistName();
 String info = artist.getArtistInfo();
 String basePhoto1 =
Base64.encodeBytes(artist.getArtistPhoto1());
 String basePhoto2 =
Base64.encodeBytes(artist.getArtistPhoto2());
  
  
   


many thanks in advance

On 3 Mar 2004, at 21:07, beyaNet Consultancy wrote:

> Christopher,
> thanks for your reply. I have implemented your solution but am getting
> an error. I have attached both my XSP page and the XS

Re: Passing values into an XSP logic sheet

2004-03-04 Thread beyaNet Consultancy
Hi,
I am trying to pull a value in from my XSP page into an XSP Logicsheet. At the moment no value is being pulled in. What am I doing incorrectly?

1. XSP Page (snippet)



xmlns:xsp="http://apache.org/xsp"
xmlns:artistDetails="http://www.beyarecords.com/artistDetails/1.0" -- LOGICSHEET REF:
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:util="http://apache.org/xsp/util/2.0"
>


int artistID = Integer.parseInt(); --VALUE PULLED IN FROM SITEMAP




 --- VALUE HELD HERE


2. XSP Logic Sheet


xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:artistDetails="http://www.beyarecords.com/artistDetails/1.0" -- LOGICSHEET REF:
version="1.0">















int artistID = Integer.parseInt(); -- WANT VALUE PULLED INTO HERE
Artist artist = Artist.getArtist(artistID);


int id = artist.getID();
String artist_name = artist.getArtistName();
String info = artist.getArtistInfo();	
String basePhoto1 = Base64.encodeBytes(artist.getArtistPhoto1());
String basePhoto2 = Base64.encodeBytes(artist.getArtistPhoto2());





many thanks in advance

On 3 Mar 2004, at 21:07, beyaNet Consultancy wrote:

Christopher,
thanks for your reply. I have implemented your solution but am getting an error. I have attached both my XSP page and the XSP Logic sheet. Please let me know what i am doing here...


many thanks in advance

Andrew


On 3 Mar 2004, at 16:02, Christopher Painter-Wakefield wrote:


int  myID = [code to get parameter value here];



myID



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Passing values into an XSP logic sheet

2004-03-03 Thread beyaNet Consultancy
Christopher,
thanks for your reply. I have implemented your solution but am getting 
an error. I have attached both my XSP page and the XSP Logic sheet. 
Please let me know what i am doing here...

many thanks in advance

Andrew



artist-details.xsp
Description: Binary data


artistDetails.xsl
Description: Binary data
On 3 Mar 2004, at 16:02, Christopher Painter-Wakefield wrote:


  int  myID = [code to get parameter value here];


  myID



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Passing values into an XSP logic sheet

2004-03-03 Thread Christopher Painter-Wakefield




You can have your logicsheet code read it directly from the sitemap
parameters, or for a more general solution pass it in through your
template.  I assume you are using ESQL?  Then you need something like the
following:

logicsheet:


  


  select * from blah where id =



  




XSP:


  int  myID = [code to get parameter value here];



  myID


.

HTH,
Christopher




|-+>
| |   <[EMAIL PROTECTED]|
| |   .com>|
| ||
| |   03/03/2004 10:45 |
| |   AM   |
| |   Please respond to|
| |   users|
| ||
|-+>
  
>--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:  
  |
  |   Subject:  Passing values into an XSP logic sheet 
  |
  
>--|




Hi,
I have created a custom logic sheet for which I have a hard coded value
which is used to pull data from a postgreSQL database. How can I pass a
value into a logicsheet? At the moment the flow is:

Generated HTML <-- stylesheet <-- XSP page <-- XSP Logicsheet. From the
sitemap I can read the parameter I need into the XSP page, but how can I
get it into the XSP Logicsheet?

many thanks in advance

Andrew




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Passing values into an XSP logic sheet

2004-03-03 Thread beyanet
Hi,
I have created a custom logic sheet for which I have a hard coded value which is used 
to pull data from a postgreSQL database. How can I pass a value into a logicsheet? At 
the moment the flow is:

Generated HTML <-- stylesheet <-- XSP page <-- XSP Logicsheet. From the sitemap I can 
read the parameter I need into the XSP page, but how can I get it into the XSP 
Logicsheet?

many thanks in advance

Andrew

-
Email provided by http://www.ntlhome.com/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]