on 02-13-2006 9:58 AM
Hi All,
I am fairly new to this BSP lark and was wondering if anyone could help me. I am wanting to call a BSP created using the MVC techniquies from another web link by passing it a parameter. For example if i had created the BSP without MVC i could just call the .htm page using the following syntax www.examplebsp.htm?gd_id=1234&gd_name=bob. But when using the MVC technique you call the .do controller but i dont seem to be able to pass values to it ( other than using a cookie i guess ).
Is there a way i can do this.
Having said all this, i have just had a thought!..maybe i could create a page with flow logic within the BSP to except the passed parameters and from within here call the controller. Is this a viable option or is there a better way
Thanks in advance
Regards
Mart
Ankur , is it not request->get_form_field ?
Mart - > you can read the value passed from the url in your DO_REQUEST method using request->get_form_field or you can also use a flowlogic page to collect the variables passed via url.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again for the help, does anyone know how to remove the ?gd_id=123 bit from the link once i have access the service.
i.e. so within the IE web address field i see www.examplebsp.htm rather than www.examplebsp.htm?gd_id=1234
regards
Mart
<i>I am wanting to call a BSP created using the MVC techniquies from another web link by passing it a parameter.</i>
since you are calling this bsp from another web page, you could use a form with POST method.
this would be something like below
<form method="POST"
action="<url for bsp page>">
<input type="text" name="gd_id" value="123" />
<input type="submit" name"s1" value="s1" />
</form>
Regards
Raja
Sorry for the long delay, I have now changed the form method to POST the now the SAP method 'request->get_form_field' no longer retrieves the values, but when I change it back to a 'GET' it does. Is there another method that should be used to retrieve POST values.
thanks in advance
Regards
Mart
Hi Mart,
In ur controller, try using method
request->get_header_field( name = 'gd_id'
value = var ).
Thanks & Regards,
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankur,
Thanks for your rely but unfortunately it did not seem to retrive the value. Althought i did have to chnage the syntax to
var = request->get_header_field( name = 'gd_id' ).
is this correct. Also do i need to create the variable gd_id anywhere, as you dont seem to be able to create any attributes within controller.
Regards
Mart
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.