View Full Version : A5W page "hot spot"?


Steve Wood
11-12-2004, 12:57 PM
Is it possible for an A5W page to load a different web component based on criteria; similar to a conditional object in A5 forms? I tried the following (which should be self-explanatory) but it will not parse on the browser. I'm trying to maintain the same UI, but reference a different table if the loginID="DEMO".

if(session.customer) = "demo" then
tmpl_Jobtracking = a5w_load_component("Jobtracking_demo")
tmpl_Jobtracking = a5w_load_component("Jobtracking")
end if

Lenny Forziati
11-12-2004, 01:12 PM
That should work. What happens when you execute this code?


11-12-2004, 01:51 PM
I think you have a syntax error on your first line. It should be
if session.customer = "demo" then
if(session.customer)="demo" then

Of course, the whole thing should be included in "%a5 .. %",
but I assume you're doing that already.

Steve Wood
11-13-2004, 07:15 AM
Thanks both. Have not had a chance to try it but this brings up an observation. So when I click the Insert Component button to add a web component to an A5W page, I am just adding a reference to that component, not actually embedding anything. The four Grid Component objects are placeholders - I could, for example, have a case() statement in my A5W page that caused one of many possible Grid Components to be presented to the user.