Version: SmartClient Version: v9.1p_2014-08-07/PowerEdition Deployment (built 2014-08-07)
I'm attempting to create a DSRequest to pull some values from within a DMI called through an <operationBinding/> on another request.
DataSource:
Java:
When I attempt this, I get the following message:
Attempting to add the session to the template context (subRequest.addToTemplateContext("session",httpSession) gets me past the error message, but my query is built with $session.user_id being replaced with null.
I've tried introspecting the initial dsRequest.getTemplateContext(), hoping that "session" would be defined there, but it appears to be absent.
I really don't want to manually convert the entire session scope into a map manually and pass that in if it's already being/been done. So for now, I've worked around it by
just by adding the httpSession.getAttribute("user_id") directly to the template context.
But I'm a bit baffled why the $session isn't being added automagically.
I'm attempting to create a DSRequest to pull some values from within a DMI called through an <operationBinding/> on another request.
DataSource:
Code:
<operationBinding operationType="fetch" operationId="MYFUNCTION">
<tableClause>dbo.f_myFunction( $session.user_id ) as LOOKUPTABLE</tableClause>
</operationBinding>Code:
public DSResponse subFilter(DSRequest dsRequest, HttpSession httpSession) {
DSResponse dsResponse = dsRequest.execute();
DSRequest subRequest = new DSRequest("LOOKUPTABLE","fetch");
subRequest.setOperationId("MYFUNCTION");
// do some stuff
return dsResponse;
}Code:
Invalid pseudocolumn "$session".I've tried introspecting the initial dsRequest.getTemplateContext(), hoping that "session" would be defined there, but it appears to be absent.
I really don't want to manually convert the entire session scope into a map manually and pass that in if it's already being/been done. So for now, I've worked around it by
just by adding the httpSession.getAttribute("user_id") directly to the template context.
But I'm a bit baffled why the $session isn't being added automagically.