Try this:
<jbo:SetWhereClauseParam index="0" value="${param.Test}" datasource="elem"/>
If that does not work, please attach the error message.
Fred
Main Topics
Browse All TopicsHi Experts ..
I'm trying to use bc4j to fill select box with data from databse, the following code is a jsp page with select control and button, what I want is to filter the view object (data source) by the value of the button when it pressed and then fill the select control, but it doesn't work!! am I doing something wrong??
the query is :
Select distinct Cube from AGRCEN where Meas = :0
<%@ taglib uri="http://java.sun.com/j
<%@ page contentType="text/html;cha
<%@ taglib uri="/webapp/DataTags.tld"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<title>Test Page</title>
</head>
<body>
<form>
<jbo:ApplicationModule id="AppModuleDataControl" definition="DataBindings.A
<jbo:DataSource appid="AppModuleDataContro
<jbo:SetWhereClauseParam index="0" value="<c:out value='${param.Test}'/>" datasource="elem"/>
<select name="id" size="8" >
<jbo:RowsetIterate datasource="elem">
<option>
<jbo:ShowValue datasource="elem" dataitem="Cube"/>
</option>
</jbo:RowsetIterate>
</select>
<input type="submit" value="NOBUILDINGS" name="Test"/>
<input type="text" value="<c:out value="${param.Test}"/>"/>
</form>
</body>
</html>
<jbo:ReleasePageResources/
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Ok DrAske,
Now we are getting somewhere, you hadn't mentioned before that you got no data, you just mentioned that it did not work, and that could for example mean that it returned all data instead of filtering on your parameter. Just trying to help you find out what is going wrong.
Just to confirm, do you get the right value in your test input field:
<input type="text" value="<c:out value="${param.Test}"/>"/>
If you get the right value there, then there is a problem with the jbo tag that it does not evaluate the expression language, if you do not get the right value there, then there is a problem that the page is not evaluating the expression language.
Have a look in the DataTags.tld file. You will see a definition of the SetWhereClauseParam tag. Could you copy and paste that whole definition here? I haven't been able to find a copy of the DataTags.tld file myself yet.
The tag should start something like this (an example from my own projects):
<tag>
<name>image</name>
<tagclass>org.apache.tagli
<bodycontent>JSP</bodycont
When you are at it, copy the top from that .tld file as well. E.g.
<tlibversion>1.0</tlibvers
<jspversion>1.1</jspversio
/Fred
you mean this?
<?xml version = "1.0" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/
<taglib xmlns = "http://java.sun.com/j2ee/
<tlibversion>5.0</tlibvers
<jspversion>1.1</jspversio
<shortname>jbo</shortname>
<uri>/webapp/DataTags.tld<
<info>The Business Components DataTag library</info>
<!-- name="META-INF/taglib.tld"
Sorry for being late!!!
<tag>
<name>SetWhereClauseParam<
<tagclass>oracle.jbo.html.
<bodycontent>Empty</bodyco
<info>Set bind variable value on the where clause of a RowSet.</info>
<!-- page="Business Components Data Access" -->
<!-- icon="/oracle/jbo/dt/ui/wi
<!-- editor="oracle.jbo.dt.ui.w
<attribute>
<name>index</name>
<required>true</required>
<rtexprvalue>true</rtexprv
</attribute>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprv
</attribute>
<attribute>
<name>datasource</name>
<required>false</required>
<rtexprvalue>true</rtexprv
</attribute>
</tag>
It would be interesting to know what value that is actually passed in through the parameter. Is it possible to change the select statement so that it says something like
"Select :0"
That should just return whatever value is passed in as the parameter. You can use that to see what value is passed in. Is it a null value that is passed in, is it an empty string, or is it actually the string "${param.Test}" that is passed in?
Business Accounts
Answer for Membership
by: DrAskePosted on 2007-03-12 at 04:00:52ID: 18700929
BTW it works If I replace the value attribute : eter("Test ")%>' datasource="elem"/>
<jbo:SetWhereClauseParam index="0" value="<c:out value='${param.Test}'/>" datasource="elem"/>
by this:
<jbo:SetWhereClauseParam index="0" value='<%=request.getParam
but I want to use EL (expression language)!!!