How to generate a dynamic URL using in Oracle Commerce(ATG)

前端 未结 3 401
一生所求
一生所求 2021-02-04 21:33

I\'m trying to display list of products in a jsp using ProductLookup droplet as shown below. I\'m also trying to give a hyperlink to navigate to product details page of the indi

3条回答
  •  不思量自难忘°
    2021-02-04 22:11

    To pass parameters to another page you simply use the tag as per the code fragment below (nested within your ProductLookup droplet):

    This is the old-school ATG approach:

     
         Product Name: 
    Product description: <%-- this will pass the itemId parameter and value--%>

    The preferred approach is to use jstl EL variables which makes your jsp's cleaner and easier to read, as well as allowing more flexibility when referring to the values:

    <%-- name the "element" and convert to a map  --%>
    
    
         Product Name: ${ product.displayName }
    Product description: ${ product.description }

    I have used recursive="false" in the above example because you are only referencing to direct properties of a product. If you wanted to refer to properties of properties then you could do something like this (the code below is not tested but should give you the general idea):

    
    
    

    UPDATE:

    As I continue to be amazed how few people understand how to do even the most basic thing such as passing parameter, I have included other DSP tags which can be used in conjunction with the

    You can pass parameters for included JSP fragments which use the

    
    
        
                                                            
提交回复
热议问题