How to display workitems values with Hyperlink in Oracle BPM workspace
Hi,
In Oracle BPM workspace , is there any way to display hyperlinks for work items i,e., I want to give a hyperlink to the values displayed in the default columns under the work items. So that if user clicks any hyperlink , a new information window will be displayed.
Thanks
Bharath.
Hi,
If you create a derived table and pull the objects i guess it should work. Other wise this error will throw up.
There are some ideas to resolve this here, but not sure it will work - Error trying to modify SQL in Data Provider
Arun
Similar Messages
-
How to display positive value with a trailing plus sign
I want to display positive value with a trailing plus sign and negative value with a trailing minus sign. How can I do it? Is there any character in custom format for this? I don't want to convert number to text and use case statement because I need two decimal places and thousands separator.
Okay, try this...
You will need to do a "UNION ALL" of three queries, one for positive values, one for zero values, and one for negative values.
In the "negative values" query, do the following:
1) Add a filter on the measure for values "less than 0"
(This will ensure all values are negative.)
2) In the Data Format tab, select "Custom" and type in #,##0.00-
(This will add the trailing negative sign.)
3) In the Edit Formula tab, add the absolute value function, ABS(insert measure here)
(This will take get rid of the default leading negative sign.)
For the "positive values" query, modify the above as follows:
1) Change the filter to "greater than 0"
2) In the Data format, change the custom format to #,##0.00+
Step 3 is not needed since all values are positive.
For the "zero values" query, just add a filter "equal to zero." -
How to store Multiple values with restriction in Oracle 9i
Hi,
I am using oracle 9i R2 and i would like to know that how can i store multiple values and restrict some of values into oracle table?
ex.
I need to create table or inserting into existing table like below:
ID will be Primary/Unique key and each ID has multiple dept but each ID to have only 1 “X” dept, only 1 “Y” dept and only 1 “Z” dept… but, can have multiple “W” dept
What will be the best option to create/store data like this?
Like Table level Constraint (Unique or Check), Triggers or pl/sql?
ID DEPT
1 X
1 Y
1 Z
1 W
2 X
2 Y
2 Z
2 W
2 W
2 WHi,
Other solution:
Function:
CREATE OR REPLACE FUNCTION my_unique_function(p_dep IN VARCHAR2) RETURN VARCHAR2
DETERMINISTIC AS
BEGIN
IF (p_dep = 'X' OR p_dep = 'Y' OR p_dep = 'Z') THEN
RETURN p_dep;
ELSE
RETURN NULL;
END IF;
END;
/Test:
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL> create table emp(id number, dept varchar2(30));
Table created
SQL>
Function created
SQL> CREATE unique index ix_emp on emp(my_unique_function(dept));
Index created
SQL> insert into emp(id,dept) values (1, 'X');
1 row inserted
SQL> insert into emp(id,dept) values (2, 'X');
insert into emp(id,dept) values (2, 'X')
ORA-00001: unique constraint (HR.IX_EMP) violated
SQL> insert into emp(id,dept) values (3, 'Y');
1 row inserted
SQL> insert into emp(id,dept) values (4, 'Y');
insert into emp(id,dept) values (4, 'Y')
ORA-00001: unique constraint (HR.IX_EMP) violated
SQL> insert into emp(id,dept) values (5, 'Z');
1 row inserted
SQL> insert into emp(id,dept) values (6, 'Z');
insert into emp(id,dept) values (6, 'Z')
ORA-00001: unique constraint (HR.IX_EMP) violated
SQL> insert into emp(id,dept) values (7, 'W');
1 row inserted
SQL> insert into emp(id,dept) values (8, 'W');
1 row inserted
SQL> Regards, -
How to display 7 values of single field in row wise.
hi,
how to display 7 values of single field in row wise.
thankx in advance.hi ,
do it like this :
1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
2 Ur first UI , which contains the first value as Row Head Data ,
3 Others as Row Data
u can do it with Matrix Data as well
if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
also there is a UI element "INVISIBLE ELEMENT" ,
1 u can use this UI element to provide space between ur other UI elements in the view
2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
u can give the space bw UIs as desired.
regards,
amit -
How to display filter values in analyzer
Hi expert,
I want to add filter into analyzer, above data table, I insert a few rows, and add text to hold filters, but after quit from design mode, inserted rows for filters dispear, and its spaces are taken by data table. could you please tell how to display filter values .
Many Thanks,It is looking like you are saving them as workbooks. It will be possible to maintain fliters if you save with the filters given by workbook properties, not by manual feeding.
let us know with clear expectation if you are not clear with it. -
How to display polygons both with line contour and filled interior?
How to display polygons both with line contour and filled interior?
Java3D 1.3, Java 1.4.1-rcHi,
I just started with Java3D last week.
I assume you mean drawing polygons with outlines (wireframe) in one color and polygon face filling with another color. If so, I've got the same question! (I usually think of "contour" to refers to plotting surface intensity of independent data like temperature or elevation, but I don't think you mean this.)
The only solution I've found so far is to make two shapes with the same geometry.
Here's an example - an outlined and filled cube. I made it using a generalize class DualShape which is two shapes with the same geometry, but one filled and one as a line.
It works, although I can't say I understand the setPolygonOffset(), knowing what value to set. Without the command, the depthbuffer can't consistently decide which should be in front between the fills and lines so it looks bad.
I certainly think it would be nicer to do both internally, like:
pa.setPolygonMode(pa.POLYGON_LINE || pa.POLYGON_FILL);
And then have setFillColor and setLineColor for each.
I don't know why they don't allow this - maybe OpenGL can't do it like this so Java3D follows.
If anyone has any better ideas I'd like to hear about it.
Tom Ruen
class DualCube extends DualShape // cube with outline and fill colors
public DualCube(float ax, float ay, float az, //cube lower corner
float bx, float by, float bz, //cube upper corner
float br, float bg, float bb, //border color
float fr, float fg, float fb) //fill color
setGeometry(new CubeGeometry(ax,ay,az,bx,by,bz),br,bg,bb,fr,fg,fb);
class DualShape extends BranchGroup //general shape with outline and fill colors
Appearance ap1,ap2;
PolygonAttributes pa1,pa2;
ColoringAttributes ca1,ca2;
Shape3D s1,s2;
public void setGeometry(Geometry geo, float br, float bg, float bb, float fr, float fg, float fb)
//filled shape:
addChild(s1=new Shape3D(geo, ap1=new Appearance()));
ap1.setPolygonAttributes(pa1=new PolygonAttributes()); pa1.setPolygonMode(pa1.POLYGON_FILL);
ap1.setColoringAttributes(ca1=new ColoringAttributes()); ca1.setColor(fr,fg,fb);
//lined (wire) shape:
addChild(s2=new Shape3D(geo, ap2=new Appearance()));
ap2.setPolygonAttributes(pa2=new PolygonAttributes()); pa2.setPolygonMode(pa2.POLYGON_LINE);
ap2.setColoringAttributes(ca2=new ColoringAttributes()); ca2.setColor(br,bg,bb);
pa2.setPolygonOffset(-1000); //Uncertain what "float" value to use!
class CubeGeometry extends IndexedQuadArray //cube geometry data
private static final int[] faces =
0,3,2,1,
0,1,5,4,
1,2,6,5,
2,3,7,6,
3,0,4,7,
4,5,6,7
private static float[] verts = new float[24];
public CubeGeometry(float ax, float ay, float az, //lower limit
float bx, float by, float bz) //upper limit
super(8, IndexedQuadArray.COORDINATES , 24);
int n;
n=0; verts[n]=ax; verts[n+1]=ay; verts[n+2]=az;
n=3; verts[n]=bx; verts[n+1]=ay; verts[n+2]=az;
n=6; verts[n]=bx; verts[n+1]=by; verts[n+2]=az;
n=9; verts[n]=ax; verts[n+1]=by; verts[n+2]=az;
n=12; verts[n]=ax; verts[n+1]=ay; verts[n+2]=bz;
n=15; verts[n]=bx; verts[n+1]=ay; verts[n+2]=bz;
n=18; verts[n]=bx; verts[n+1]=by; verts[n+2]=bz;
n=21; verts[n]=ax; verts[n+1]=by; verts[n+2]=bz;
setCoordinates(0, verts);
setCoordinateIndices(0, faces); -
How to replace key value with character
Hi Experts
Can any one tell me, how to replace key value with character, whether it is possible are not. My present report is displaying below format.
country--city-area-flatnocountry--City-Flatno
Customer--USACOst1111---UK--HD20--
C100--11---11--
C200--11---1--
For the above example format i am able to display. But now i want to replace 1 with character value for example. For C100
country is USA at presnt 1 but it should replace with USA.
You find required format below.
country--city-area-flatnocountry--City-Flatno
Customer--USACOst1111---UK--HD20--
C100--USACOst1111--
C200--UK--HD20--
thanks .
Regards,
Vishal.Hi Markus,
Thanks for reply,
Actually i dont have attribute for the customer, the data is maintained in ods, in the form, customer name one info-object and customer value one more info-object this value got text. This value stored in the ods as below
costomer number customer value
C100--USA
-C100CO
C100--11-
C200----
UK
C200----
20
Please let me know any clarification you need.
Thanks and Regards,
Vishal. -
How to display the value of a column in a chart at the top of each column
How to display the value of each column in a chart at the top of each column?
Like this?
Done using chart Inspector.
For details, see Chapter 7, Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
Regards,
Barry -
How to display negative values in a screen field of a screen
Hi All,
Please let me know how to display negative values in a screen field of a screen.
thanksHi Kishore,
You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
I have created a field of CHAR of name say TEXT.
In the main program,
declare a variable of the same name ie. TEXT.
data: TEXT(5) TYPE C.
In PBO, just assign the negative values.
It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
Regards,
Sylendra. -
How to display a cursor with sand glass ?
I would like to know how to display a cursor with sand glass I am performing a long operation ?
Thanks in advance.As long as you are using anything that extends Component...
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
doLongOperation();
this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));Hope this helps,
Radish21
PS the API is ALWAYS your friend
http://java.sun.com/j2se/1.4.1/docs/api/
http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Cursor.html -
How can i import procedure with %ROWTYPE in Oracle 10.2 (paris) warehouse b
Hello.
How can i import procedure with %ROWTYPE in Oracle 10.2 (paris) warehouse builder?Everytime i try to do it i get an error message:
API0411: Name should be an empty string.
If i comment out %rowtype i can import it without problems.
I have tried re-creating the procedure in OWB but once again i cannot find the %rowtype anywhere. the %type is there etc. I have tried to use Publish transformation / custom and cannot find %rowtypa there either.
Thank you very much for your helpJust in case you are having the same problem and cannot find any help anywhere - it is a bug in OWB.
I got in touch with Oracle Support and it appears that it is possible to import procedure/package with %ROWTYPE inside it, but it is not possible if the %ROWTYPE is in the arguments.
Just waiting for them to provide me with the bug ID. -
How to display horizontally to vertically column in oracle
Dear All
How to display horizontally to vertically column in oracle,Please give me Sol. ASAPSunil,
Which column is the sal column? I canât see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you canât build sums on string columns. If you want to build sums in an updateable report / tabular form, then donât use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
Regards,
Marc -
How to configure portal server with the Backend Oracle database
Hi Portal Experts,
we are planning to install Netweaver 04s sp stack 9 full java edition with Oracle 8i on windows platform.
we have the installation docs of portal but we didn't have any idea about how to configure Portal server with the Backend Oracle database at the time of installation or after ost installation of portal.can anyone provide the documentation about this or guide me how to achieve this.
PLZ share ur views---your help would be highly appreciable.
Regds
Phani.HI
if you r working in Sap enterprise portal use for connection url
jdbc:sap:sqlserver://ilsql01.tlv.sap.corp:1433;DatabaseName=Northwind
ilsql01.tlv.sap.corp:1433 this is your portal url with port number
Northwind is your database name.
for dirver you need to give
com.sap.portals.jdbc.sqlserver.SQLServerDriver
in case if you r working on other than sap say windows along with oracle try to use
Connection URL as jdbc:oracle:<drivertype>:@<database>
Driver name as oracle.jdbc.driver.OracleDriver
ex jdbc:oracle:thick:@localhost:3036:mydb
Oracle implements two types of JDBC drivers:
Thick JDBC drivers built on top of the C-based Net8 client, as well as a Thin (Pure Java) JDBC driver to support downloadable applets. Oracle JDBC drivers are used to create JDBC applications to communicate with Oracle databases.
Oracle extensions to JDBC include the following features:
Data access and manipulation
LOB access and manipulation
Oracle object type mapping
Object reference access and manipulation
Array access and manipulation
Application performance enhancement
*************if the information is helpful to you please reward points************ -
Please Help::How to display a Map with LIsts as Keys and Values using JSTL
Hi,
I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
OrderDetails.java
package orderitems;
import java.sql.*;
import java.util.*;
public class OrderDetails {
private LineOder lineOrder;
private Map lineItems;
//returns an item number, key_item, from its unique keys
public int getItemNumber(int key_item, String key_year,
String key_office,String key_client,String key_company){
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
int itmNum = 0;
* key_item a unique number for an item.
* key_year,key_office,key_client,key_company unique keys
* for each order where this key_item is taken
* from.
String select = "SELECT key_item FROM "+
Constants.WEB_TABLE +" WHERE key_item = " + key_item +
" AND key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company +"'";
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
rst = stat.executeQuery(select);
if(rst.next()){
itmNum = Integer.parseInt(rst.getString("key_item"));
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return itmNum;
//get a list of item number(item codes)
public List getAllItemNumbers(String key_year,
String key_office,String key_client,String key_company){
List itemNumbers = new ArrayList();
LineItem itemNumber = null;
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
" WHERE key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company + "'";
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
rst = stat.executeQuery(select);
while(rst.next()){
itemNumber = new LineItem();
itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
itemNumbers.add(itemNumber);
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return itemNumbers;
//get a list of tax codes
public List getAllTaxCodes(int key_item, String key_year,
String key_office,String key_client,String key_company){
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
ItemTax taxCode;
List taxCodes = new ArrayList();
int itemNum = getItemNumber(key_item, key_year,
key_office,key_client,key_company);
String select = "SELECT key_tax_code FROM "+
Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
" AND key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company +"'";
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
rst = stat.executeQuery(select);
while(rst.next()){
taxCode = new ItemTax();
taxCode.setKey_tax_code(rst.getString("key_tax_code"));
taxCodes.add(taxCode);
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return taxCodes;
/////This methode returns a Map which am trying to display in JSP
//use tax code to get tax details
public Map getItemTaxDetails(String key_year,String key_office,
String key_client,String key_company,int key_item){
ItemTax taxDetail = null;
List taxDetails = new ArrayList();
List itemTaxCodes = new ArrayList();
Map itemTaxDetails = new HashMap();
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
//get a list of all tax codes of an item with a
//given item number
itemTaxCodes = getAllTaxCodes(key_item,key_year,
key_office,key_client,key_company);
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
String taxCode = itemTaxCode.getKey_tax_code();
String select = "SELECT tax_type,tax_value," +
"tax_limit_val FROM "+ Constants.WEB_TABLE +
" WHERE key_item = "+ key_item +
" AND key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company +"'" +
" AND key_tax_code = '" + taxCode + "'";
rst = stat.executeQuery(select);
while(rst.next()){
taxDetail = new ItemTax();
//records to be displayed only
taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
taxDetail.setTax_value(rst.getString("tax_value"));
taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
//////other details records ommited//////////////////////////
taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
* A HashMap which has all taxCodes of an item as its keys
* and an ArrayList of taxdetails as its values.
* I return this for display in a JSP.
itemTaxDetails.put(taxCode,taxDetails);
System.out.println();
System.out.println("*********CONSOLE OUTPUT*************");//display on console
Set set = itemTaxDetails.keySet();
Iterator iter = set.iterator();
System.out.println("Key\t\tValue\r\n");
while (iter.hasNext()) {
Object taxCode=iter.next();
Object details=itemTaxDetails.get(taxCode);
System.out.println(taxCode +"\t" + details);
System.out.println("************************************");
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return itemTaxDetails;
//details of an item with all its taxes
public List getAllItemDetails(String key_year,
String key_office,String key_client,String key_company){
List lineItems = new ArrayList();
List itemNumbers = new ArrayList();
Map taxDetails = new HashMap();
LineItem item = null;
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
//A list of all item numbers in the declaration
itemNumbers = getAllItemNumbers(key_year,
key_office,key_client,key_company);
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
LineItem itemNum = (LineItem)itemIter.next();
int itemNumber = itemNum.getKey_item();
String select = "SELECT item_description,item_mass," +
"item_cost" +
" FROM " + Constants.WEB_TABLE +
" WHERE key_year = '"+key_year+"'" +
" AND key_office = '"+key_office+ "'"+
" AND key_client = '"+key_client+ "'"+
" AND key_company = '"+key_company+ "'"+
" AND key_item = " + itemNumber;
rst = stat.executeQuery(select);
while(rst.next()){
item = new LineItem();
item.setItem_description(rst.getString("item_description"));
item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
//////other details records ommited//////////////////////////
/* A HashMap of all itemTaxeCodes as its keys and an
* ArrayList of itemTaxedetails as its values
taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
item.getKey_client(),item.getKey_company(),item.getKey_item());
//item tax details
item.setItmTaxes(taxDetails);
//list of items with tax details
lineItems.add(item);
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return lineItems;
public Set getOrders(String key_year,String key_office,
String key_client,String key_company){
List lineItems = new ArrayList();
Set lineOrders = new HashSet();
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
LineOder lineOrder = null;
String select = "SELECT * FROM " + Constants.WEB_TABLE +
" WHERE key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company + "'";
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
rst = stat.executeQuery(select);
while(rst.next()){
lineOrder = new LineOder();
lineOrder.setKey_year(rst.getString("key_year"));
lineOrder.setKey_office(rst.getString("key_office"));
lineOrder.setKey_client(rst.getString("key_client"));
lineOrder.setKey_company(rst.getString("key_company"));
////list of items with all their details
lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
lineOrder.getKey_client(),lineOrder.getKey_company());
//setting item details
lineOrder.setItems(lineItems);
//a list of order with all details
lineOrders.add(lineOrder);
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
return lineOrders;
Controller.java
package orderitems;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Controller extends HttpServlet {
private Map taxDetails = new HashMap();
private OrderDetails orderDetails = null;
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)throws
ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String key_year = "2007";
String key_office = "VZX00";
String key_company = "DG20";
String key_client = "ZI001";
int key_item = 1;
String nextView = "/taxdetails_list.jsp";
orderDetails = new OrderDetails();
taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
key_company,key_client,key_item);
//Store the collection objects into HTTP Request
request.setAttribute("taxDetails", taxDetails);
RequestDispatcher reqstDisp =
getServletContext().getRequestDispatcher(nextView);
reqstDisp.forward(request,response);
protected void doGet(HttpServletRequest request,
HttpServletResponse response)throws
ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request,
HttpServletResponse response)throws
ServletException, IOException {
processRequest(request, response);
taxdetails_list.jsp
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Simple Tax Detail Diaplay ::</title>
<link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
</head>
<body>
<jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
<table>
<c:forEach items="${taxDetails}" var="hMap">
<tr>
<td><c:out value="${hMap.key}" /></td>
<!--td><%--c:out value="${hMap.value}" /--%></td-->
</tr>
</c:forEach>
</table>
</body>
</html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
both in my JSP and on the console:
*******************************CONSOLE OUTPUT****************************
Key Value
ICD [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
Edited by: aiEx on Oct 8, 2007 6:54 AMhi evnafets,
yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
public List getItemTaxDetails(String key_year,String key_office,
String key_client,String key_company,int key_item){
ItemTax taxDetail = null;
List taxDetails = new ArrayList();
List itemTaxCodes = new ArrayList();
Map itemTaxDetails = new HashMap();
Connection conn = null;
Statement stat = null;
ResultSet rst = null;
//get a list of all tax codes of an item with a
//given item number
itemTaxCodes = getAllTaxCodes(key_item,key_year,
key_office,key_client,key_company);
DbConnection dbConn = new DbConnection();
try {
conn = dbConn.getDbConnection(Constants.WEB_JNDI);
stat = conn.createStatement();
for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
String taxCode = itemTaxCode.getKey_tax_code();
String select = "SELECT tax_type,tax_value," +
"tax_limit_val FROM "+ Constants.WEB_TABLE +
" WHERE key_item = "+ key_item +
" AND key_year = '" + key_year + "'" +
" AND key_office = '" + key_office + "'" +
" AND key_client = '" + key_client + "'" +
" AND key_company = '" + key_company +"'" +
" AND key_tax_code = '" + taxCode + "'";
rst = stat.executeQuery(select);
while(rst.next()){
taxDetail = new ItemTax();
//records to be displayed only
taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
taxDetail.setTax_value(rst.getString("tax_value"));
taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
//////other details records ommited//////////////////////////
taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
* A HashMap which has all taxCodes of an item as its keys
* and an ArrayList of taxdetails as its values.
* I return this for display in a JSP.
itemTaxDetails.put(taxCode,taxDetails);
} catch (SQLException ex) {
ex.printStackTrace();
} finally{
SQLHelper.cleanUp(rst, stat, conn);
//return itemTaxDetails;
return taxDetails;
}And my JSP
taxdetails_list.jsp
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
</head>
<body>
<table>
<c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
<c:choose>
<c:when test="${rowCounter.count % 2 == 0}">
<c:set var="rowStyle" scope="page" value="odd" />
</c:when>
<c:otherwise>
<c:set var="rowStyle" scope="page" value="even" />
</c:otherwise>
</c:choose>
<tr class="${rowStyle}">
<td>${curRecord.key_item}</td>
<td>${curRecord.tax_value}</td>
<td>${curRecord.tax_limit_val}</td>
</tr>
</c:forEach>
</table>
</body>
</html>I can't see where am going wrong even with your advice.Please help.
Thnx. -
How To display the value of outer loop with inner loop fields
Hi All
I have a issue that i have to display the values flexfield wise ,like i have 3 DFF values in xmlp layout ,each will have some list of records which will be displayed under the DFF values,so it means
DFF values will be in outer loop with its group
while related records of DFF will comes in inner loop with its group
my problem is that i have to display the DFF values also with respective inner records ,
Would somebody please suggest how can we achieve this ,please let me know if my question is not clear.
Thanks
PratapI think you will be having xml structure like this:
<G_HEADER>
<LIST_G_LINES>
<G_LINES>
</G_LINES>
</LIST_G_LINES>
</G_HEADER>
So in this case, if you want to refer G_HEADER details in G_LINES then, you should navigate 2 levels above.
It will be <?../../element_name?>
Maybe you are looking for
-
Getting error in a report program
Hello, I have a report program where I am sending worklists for a user to mysql database using PI interface. Now, my report program is getting timed out with error. I am basically using one fetch operation SELECT bname FROM usr02 INTO TABLE lt_user.
-
Black Becomes Gray Only When Image Placed
I am new at InDesign (CS5) and having a problem. I have the output set to rich black etc and have a file with pages that have an RGB 0,0,0 black background. When I put text on a page it seems to export to pdf with a jet black background. However if
-
I have been having trouble with itunes for months now, since I got my new laptop. Everytime I try to import my itunes library it appears to be there and then when I go back on all the music is gone from itunes. All the music is in the correct file an
-
Active version of the BDoc type PRODUCT_MAT is not consistent
Hello, We are using CRM 7.0. We tried to release change request but got an error message: Active version of the BDoc type PRODUCT_MAT is not consistent in the table SEGM Do you know what should we perform to resolve this problem? Thanks in advance, S
-
Oracle Projects integration to Primavera
Hi, We are integrating Oracle Projects to Primavera for a construction client. We are able to: - Send project header and wbs information from Oracle Projects to Primavera - Send activity and resource assignment from Primavera to Oracle However, when