1. Can we use parameters to a page? like using post or get.
2. By using page parameter, can we load respective DCR in a java class? If param is 1, load DCR1. If it is 2, load DCR2. I would like to use that result in the XSLT component.
1. yes
2. you can't have that kind of conditional logic if you're using a DCR datum directly, but you can respond to the parameter in a Java External. Or, if your parameter name matches the datum name, then you can override the value set in the component via the query string.
Thanks RPoulin. Little bit confusion. Ok, I could explain Q2 with example.
Link : a.page?typeno = 1
By calling java external component by passing 'typeno' as parameter(or other possible way), can I grab respective DCR details?
In Java component, I could write code like :
If typeno = 1, get and return the details of DCR1
if typeno = 2, get and return the details of DCR2
From your answer, I am assuming it could be done. Is that true? If not, what is the alternative?
Yep. Using a Java External, you can either react to the "typeno" parameter and load a different DCR, or you could just print out that value in the resulting document and let your XSL pick DCR1 or DCR2 (if they're datums).
You might also be able to just create a datum with name "typeno", setting a default value in the component and letting the query string override it. I'm not sure if the query string can override the component XML, or if it only affects the ParameterHash in the Java layer, but it's worth a shot if your use case is that simple.