Creating custom jsp component - Finding the jsp tag descriptor htmlb.tld
Hi,
I want to create my own TabStrip component by extending the SAP Standard HTMLB components TabStrip and TabStripItem. I've found the classes that I need to extend under the jar below, but I can't find the htmlb.tld file. I need to make a copy of this file to create a tag descriptor for my new components in order to use them in my JSP.
The classes I am using are in the com.sapportals.htmlb package, located in the file
ECLIPSE_HOME/plugins/com.sap.tc.ap_2.0.0/comp/SAP_JTECHS/DCs/sap.com/com.sapportals.htmlb/_comp/gen/default/public/default/lib/java/htmlb.jar
I've searched the jars in the "plugins" directory of NWDI but can't find it (although I did find some other tld files). I'm guessing it must be somewhere on the poertal, but where?
Please help
Thanks
Any help would be greatly appreciated.
If you have access to your portal's installation box - then you can get this TLD at the following paths:
<Installation Drive>:\usr\sap\<SID>\<instance no>\j2ee\cluster\server0\apps\sap.com\com.sapportals.htmlb.ear\servlet_jsp\htmlb\root\WEB-INF
OR
<Installation Drive>:\usr\sap\<SID>\<instance no>\j2ee\cluster\server0\apps\sap.com\com.sapportals.htmlb.ear\servlet_jsp\htmlb\root
OR
<Installation Drive>:\usr\sap\<SID>\<instance no>\j2ee\cluster\server0\apps\sap.com\com.sap.engine.services.webservices.tool\servlet_jsp\uddiclient\root\WEB-INF
Hope this helps!!!
Shubhadip
Similar Messages
-
Problems in developing custom JSP tags
I have problems in debugging custom JSP tags. Sometimes the doStartTag is not called on tags but the doEndTag is called. I don't know why.
Thanks.Fahr--
A word of caution -- NetUI did not ship a JSP tag SDK in 8.x, and
we're making no compatibility guarantees for custom JSP tags written on
the 8.x release and future releases.
You can accomplish the same sort of functionality with a combination
of the <netui-data:getData> tag and JSTL 1.0. This solution would
probably provide similar functionality and be more future-proof relative
to JSTL and the NetUI tags currently being developed in Beehive.
Hope that helps.
Eddie
Fahr Vegnugen wrote:
We are in the midst of creating our own JSP tags to work with datasources.
In an example where you would need to compare two different datasources how would you do this?
ie.
<prefix:isGreater dataSource="{pageflow.column1}" dataSourceToCompare="{pageFlow.column2}" />
How would I evaluate what column2 is since the tag will only resolve one data source
this.evaluateDataSource();
Any pointers you can provide would be appreciated, or if there is a library of jsp tags that evaluate objects using datasources already created, that would even be better. -
We have our own custom JSP tag libraries (some of them extend the Struts tags, but many do not) and want those to render correctly in the design view.
Is that supported by NitroX Struts, or will it only work with built-in Struts tags?
If it is supported, how does one get NitroX to run the custom tags?It is possible to customize many aspects of the rendering of a custom tag. This is done using a combination of an M7 specific metadata, and standard css rules.
For example, you can change the label, icon and border of a custom tag by doing the following steps:
1) Create a folder named "nitrox" where your tld file is located. For example if you have "/WEB-INF/app.tld" then create a
folder "/WEB-INF/nitrox/".
2) In the nitrox folder created above, create a file named "app.tlei" (for Tag Library Extra Information). The file name used here should match the name of the tld file. In this case "app".
3) Paste the following content in the app.tlei file:
<taglib-extrainfo>
<css-uri>app.css</css-uri> <!-- an optional css file relative to this tlei file -->
<tag name="myTag">
<display-name>My Tag</display-name> <!-- The name displayed in the Tag Libraries view -->
<rendering-label>{tag-name} ({name})</rendering-label> <!-- This will display the value of the "name" attribute in addition to the tag name in the tag view in the JSP design editor. -->
<small-icon>images/myTag.gif</small-icon> <!-- The image uri relative to this tlei file. This is used in the Tag Libraries view and in the JSP design editor.-->
</tag>
</taglib-extrainfo>
All customization tags are optional.
4) Create the css file referenced from the tlei file above (in this example app.css in the same directory containing the tlei file).
5) Paste the following content in the app.css file:
myTag {border: 1 solid red; display: "inline"}
This will render the tag as inline (i.e as one graphical object) even if the tag has nested content.
In addition, you can use any standard css style property.
You can customize other tags in the same fashion.
If a custom tag inherits from a Struts tag, then the tag can inherit the full built-in tag customization as shown in the following example:
Suppose you have a tag named "myText" that extends the Struts html:text form field tag. To inherit the NitroX html:text customization you follow the steps:
1) insert the following in the tlei file described above:
<tag name="myText">
<inherit taglib-uid="http://jakarta.apache.org/struts/tags-html" tag-name="text" />
</tag>
2) Insert the following css rule in the css file referenced from the tlei file:
myText {m7-inherit: "input-text"; display: inline}
This will inherit the built-in css style for form text fields.
Likewise, you can inherit the other Struts tags css styles by using the following rules:
myPassword {m7-inherit: "input-password"; display: inline}
myCancel {m7-inherit: "input-submit"; display: inline}
myCheckbox {m7-inherit: "input-checkbox"; display: inline}
myRadio {m7-inherit: "input-radio"; display: inline}
mySelect {m7-inherit: "select"; display: inline}
myTextarea {m7-inherit: "textarea"; display: inline}
3) The inherited tag library file (in this example the struts-html.tld), must also be present under the WEB-INF directory.
M7 Support -
Problems with custom JSP Tag, can someone offer some advice?
Greetings,
I have a problem here that I am stumped on. I am trying to create a custom JSP tag, I created a simple "Hello World" JSP, however, I am coming up a bit short. I am running Apache Tomcat 6.0 on a Win XP environment.
The code I have is as follows:
TLDTest.tld:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<info>My First Tag</info>
<!-- Here goes nothing!!! -->
<tag>
<name>hola</name>
<tagclass>Hola</tagclass>
<bodycontent>empty</bodycontent>
<info>a simple hello tag</info>
<!-- attributes -->
<!-- Personalize the name -->
<attribute>
<name>name</name>
<required>false</required>
<rtexpvalue>false</rtexpvalue>
</attribute>
</tag>
</taglib>
The Hola.jsp is:
<%@ taglib uri="/Hola" prefix="test" %>
<html>
<head>Just a little test on tags</head>
<body>
<hr />
<test:Hola name="Woot Master" />
<hr />
</body>
</html>
And the source code for the .class file (named Hola) is:
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport
private String name = null;
public void setName(String value)
name = value;
public String getName()
return(name);
/* doStartTag is called and defined below here for the java tag */
public int doStartTag()
try
JspWriter out = pageContext.getOut();
out.println("<table border=1>");
if (name != null)
out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
else
out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
catch (Exception ex)
throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
return SKIP_BODY;
/* doEndTag is defined here. */
public int doEndTag()
try
final JspWriter out = pageContext.getOut();
out.println("</table>");
catch (final Exception ex)
throw new Error("Oops, it's broken, check your coding in the End tag!!!");
What I keep getting is the following error:
org.apache.jasper.JasperException: /Hola/Hola.jsp(6,2) No tag "Hola" defined in tag library imported with prefix "test"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
I've been back and forth on this, but I am lost. Obviously I am missing something, but what is it? It wouldn't be in the web.xml file would it? I am running a vanilla tomcat install. Any help that anyone can provide would be greatly appreciated.
Sincerely,
- JoshOk
1 - In the JSP, your tag should be "hola" not "Hola". Yes case matters.
<test:hola name="Woot Master" />2 - Importing the taglibrary correctly.
Either reference its tld <%@ taglib uri="/WEB-INF/Hola.tld" prefix="test" %>
(and have the tld file sitting in /WEB-INF/Hola.tld )
or
Define a uri for it in the tld...
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<uri>http://mytag/hola</uri>
...and then use that uri to import it in your JSP
<%@ taglib uri="http://mytag/hola" prefix="test" %>
3 - Put your tag class in a package. Classes not in packages have a way of not being found.
package mypackage
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport {
...That will move it in your folder structure to be /mypackage/Hola.java
You would also need to update the tagclass element in the tld to reflect the change:
<tagclass>mypackage.Hola</tagclass>4 - Mistake in your tld: You are missing an "r" in "rtexprvalue". <rtexpvalue> should be <rtexp*r*value>
5 - In your Tag class, you should return something from the "doEndTag()" method.
return super.doEndTag(); or maybe return EVAL_PAGE;
Revised code:
WEB-INF/hola.tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>firstTag</shortname>
<uri>http://mytag/hola</uri>
<info>My First Tag</info>
<!-- Here goes nothing!!! -->
<tag>
<name>hola</name>
<tagclass>mypackage.Hola</tagclass>
<bodycontent>empty</bodycontent>
<info>a simple hello tag</info>
<!-- attributes -->
<!-- Personalize the name -->
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
</taglib>hola.jsp:
<%@ taglib uri="http://mytag/hola" prefix="test"%>
<html>
<head>Just a little test on tags</head>
<body>
<hr />
<test:hola name="Woot Master" />
<hr />
</body>
</html>Hola.java. Compiles into WEB-INF/classes/mypackage/Hola.class
package mypackage;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class Hola extends TagSupport {
private String name = null;
public void setName(String value) {
name = value;
public String getName() {
return (name);
/* doStartTag is called and defined below here for the java tag */
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.println("<table border=1>");
if (name != null)
out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
else
out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
} catch (Exception ex) {
throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
return SKIP_BODY;
/* doEndTag is defined here. */
public int doEndTag() {
try {
final JspWriter out = pageContext.getOut();
out.println("</table>");
return super.doEndTag();
} catch (final Exception ex) {
throw new Error("Oops, it's broken, check your coding in the End tag!!!");
}Cheers,
evnafets -
Hi,
I have several questions regarding this topic:
1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any known
problems ?
2) Does Weblogic come with any tag libraries (for loops, if, etc) and where
can I get them ?
3) Are there any tag libraries out there (JRun, for example) that have been
successfully run on Weblogic ?
Any help would be much appreciated.
Thanks,
Jamie
As there seems to be general interest, a link would probably be a great
help.
Regards
Daniel Hoppe
-----Original Message-----
From: Michael Girdley [mailto:[email protected]]
Posted At: Friday, August 25, 2000 8:03 AM
Posted To: jsp
Conversation: Custom JSP Tags for Weblogic
Subject: Re: Custom JSP Tags for Weblogic
Please see the documentation:
http://www.weblogic.com/docs51/resources.html
Michael Girdley
BEA Systems Inc
"Jamie" <[email protected]> wrote in message
news:[email protected]...
> Update
> =======
>
> Weblogic Portal has some Tag libraries. I've downloaded the trial
version
> of
> the Weblogic Commerce Server. How do I get the tag libraries and use
them
> on WL 5.1 ?
>
> Answers to original post still wanted
>
> Thanks,
>
> Jamie
>
> Jamie <[email protected]> wrote in message
> news:[email protected]...
> > Hi,
> >
> > I have several questions regarding this topic:
> >
> > 1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any
known
> > problems ?
> >
> > 2) Does Weblogic come with any tag libraries (for loops, if, etc)
and
> where
> > can I get them ?
> >
> > 3) Are there any tag libraries out there (JRun, for example) that
have
> been
> > successfully run on Weblogic ?
> >
> >
> > Any help would be much appreciated.
> >
> > Thanks,
> >
> > Jamie
> >
> >
>
>
-
Create a query to find the open PO
Hi all,
I want to create a query to find the Open PO which GR is not complete or Open invoice.
But I don't know how can I get the value: still to be invocied ,still to be delivery .
I want to know which table I can find these information.
I know a T-code :ME2L can run this report, but the format is not user friendly,so I want to create a new query .Hi
No need to create any query to find an Open PO.
You can use ME2N or ME2L or ME2N with proper scope of list and selection parameter.
In scope of list you can use the ALV one to get the user friendly report, if you do not have the ALV then you can
create your own scope of list by following the steps.
1) press F1 and click on the customizing icon
2) Click the button W/O specifying the project
3) Click Define scope of list
4) Copy any scope of list for example BEST and rename it as BEST_ALV and Tick the check box AL on the Bottom
5) You can get this new scope of list in the tcods mentioned above and execute thereports.
6) Once you get the output you can modify the layoout to get the user friendly format. Also you can download into excel sheet.
Hope it helps
Thanks/karthik -
I want to find the image tag name from Image layer name InDesign JavaScript?
I want to find the image tag name from Image layer name InDesign JavaScript?
Hi,
You can use following script to fetch image tag name and the layer name on which it lie:
var imgBox = app.activeDocument.rectangles // fetch all rectangular frames from the active document
for(var i = 0; i< imgBox.length; i++)
if(null != imgBox[i].associatedXMLElement )
var b = imgBox[i]
alert("Image tag name "+imgBox[i].associatedXMLElement.markupTag.name + "\n exist on layer " + imgBox[i].itemLayer.name)
Hope this would help you to resolve your problem. -
How to Find the XML Tag in indesign
HI!!<br /><br />We are working with XML work flow in indesign. In indesign how could we find the XML Tag in indesign.<br /><br />Example::<br />In the Below list we could have to find the xml tag <chapter> in story editor or in the main text frame in indesign using find option. Kindely sent if any Plugins is available.<br /><br />For exmaple:<br />************<br /><book><br /> <part><br /> <chapter><br /> <head><br /> <para><br /> <bold><br /><br />Thanks,<br />C.K.Venkatesan
I imported the xml file in vb.net. now i want to find the number of pages and no. of elements. i found out it. but i was not able to find which elements are placed in which page. i want that information. plz kindly help. i am using vb.net. for eg. <ce:figure> placed in which page no., <ce:sections> placed in which page no., etc..,
-
Migration from PC with MA did not end. Had to shut down MacBookPro. After restart no new user was created. Can't find the transferred data (35 GB). Would like to delete it.
iTunes is required to initially activate the phone. Back when the iPhone 3G was sold, you would take it out of the box and see a "Connect to iTunes" screen. She HAD to connect to a computer in order to begin using the phone. Does she remember what computer this was?
-
Error compiling expressions in custom JSP tags
We had the same problem and we have found the same solution. Not to nice.
Jan
Here is what I have set up:
custom.jsp:
<%@ taglib uri="/WEB-INF/tlds/mytags.tld" prefix="my" %>
<!-- <%@ taglib uri="myTags" prefix="my" %> -->
<HTML>
<HEAD>
<TITLE>Custom tag example</TITLE>
</HEAD>
<BODY>
<H1>Custom tag Example</H1>
<my:wrapper style="k001">
<b>hello!</b>
</my:wrapper>
</BODY>
</HTML>
Under WEB-INF/tlds, I placed mytags.tld:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>MyTags</short-name>
<tag>
<name>wrapper</name>
<tag-class>mytaglib.WrapperTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>style</name>
<required>true</required>
</attribute>
</tag>
</taglib>
I've seen examples for jsp-version 1.1 and 1.2. Can you suggest what should be placed in <uri>...</uri>
Do you think I have a problem with my tomcat config or compiling the java class?
Thanks. -
Firstly, thanks for any assistance. The problem I'm facing is that I am using this open source tag library in WebLogic Platform v8.1.5 and it is showing an error when viewed within Workshop. The problematic custom tag was underlined in red by Workshop with the error message "ERROR: This attribute value is not valid." when hovering the mouse over it.
I tried the other JSP tag specified in the tld file and they were ok. I suspect that there might be an error in one of the Java classes that form the JSP tag. As I hardly do much JSP tag, so my question is my hunch correct? Or should I look elsewhere? The JSP tag in question has an empty <bodycontent> and basically exposes some static variables for use in the JSP page. The tld file is as below and the problematic tag is highlighted in bold. Thank you again for any advise given!
<?xml version="1.0"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>theme</shortname>
<uri>http://liferay.com/tld/theme</uri>
<tag>
<name>box</name>
<tagclass>com.liferay.taglib.theme.BoxTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>top</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>bottom</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>defineObjects</name>
<tagclass>com.liferay.taglib.theme.DefineObjectsTag</tagclass>
<teiclass>com.liferay.taglib.theme.DefineObjectsTei</teiclass>
<bodycontent>empty</bodycontent>
</tag>
<tag>
<name>include</name>
<tagclass>com.liferay.taglib.theme.IncludeTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>page</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>param</name>
<tagclass>com.liferay.taglib.util.ParamTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>nvm..i already fix the problem..
-
How to pass a server side value to an attribute of a custom jsp tag
Hi All:
I needed to passed an integer value from the following code:
<%=ic.getTotalNumOfRecords()%>
to an attribute of a custom tag
<inquiry:tableClaimHistory numberOfRecords="5" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
The function getTotalNumOfRecords returns an int.
The attribute numberOfRecords expects an string.
Here are the different ways I tried in a jsp page but I get also the following errors:
1.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords=<%=ic.getTotalNumOfRecords()%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
claimHistoryView.jsp:190:3: Unterminated tag.
<inquiry:tableClaimHistory numberOfRecords=<%=ic.getTotalNumOfRecords()%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
2.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
claimHistoryView.jsp:190:4: The required attribute "numberOfRecords" is missing.
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
3.)
>
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%ic.getTotalNumOfRecords();%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Error Message:
java.lang.NumberFormatException: For input string: "<%ic.getTotalNumOfRecords();%>"
4.)
>
<%@ include file="../common/page_imports.jsp" %>
<%
int records1 = ic.getTotalNumOfRecords();
Integer records2 = new Integer(records1);
String numberOfRecords2 = records2.toString();
%>
<inquiry:tableClaimHistory numberOfRecords="<%numberOfRecords2;%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
error message:
java.lang.NumberFormatException: For input string: "<%numberOfRecords2;%>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Double.valueOf(Double.java:447)
at java.lang.Double.(Double.java:539)
at com.DisplayTableClaimHistoryTag.displayTable(DisplayTableClaimHistoryTag.java:63)
5.)
>
<%
int records1 = ic.getTotalNumOfRecords();
Integer records2 = new Integer(records1);
String numberOfRecords2 = records2.toString();
%>
<inquiry:tableClaimHistory numberOfRecords=<%numberOfRecords2;%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
error message:
claimHistoryView.jsp:194:3: Unterminated tag.
<inquiry:tableClaimHistory numberOfRecords=<%numberOfRecords2;%> dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
In the custom tag java code called "DisplayTableClaimHistoryTag"
I tried to used the following code:
>
InquiryContext ic = InquiryContext.getContext(session);
>
The problem is that in order to get session I needed HttpSession object. I don't know how to passed HttpSession "session" object
to a custom tag. Is there a way to do this?
>
public class DisplayTableClaimHistoryTag extends InquiryTag
String numberOfRecords;
public void setNumberOfRecords(String numberOfRecords)
this.numberOfRecords = numberOfRecords;
public String getNumberOfRecords()
return numberOfRecords;
public int doStartTag()throws JspException
InquiryContext context = (InquiryContext)pageContext.getSession().getAttribute(Constrain.CONTEXT);
if(context==null)
throw new JspException(TAG_EXCEPTION+ "InquriyContext is null.");
String hasData = (String)context.getAttribute(Constrain.CONTROL_HAS_DATA);
if(hasData==null)
throw new JspException(TAG_EXCEPTION + "The hasData property can not be null.");
boolean hd = Boolean.valueOf(hasData).booleanValue();
Debug.println("hasData="+hd);
Debug.println("hasDataString="+hasData);
if(hd)
displayTable();
else
disPlayError();
return SKIP_BODY;
private void displayTable() throws JspException
String outString ="";
Debug.println("dispalyTable() ********* dataAction="+ dataAction);
JspWriter out = pageContext.getOut();
* Minimum height height= 103,70
* 21.7 per row
* First row==103+21.5=124.5
* Second row ==103+21.5*2=146
* Third row ==103+21.5*3=167.5
Double numberOfRecordsBigDouble = new Double(numberOfRecords);
double numberOfRecordsDouble = 70 + 21.8*numberOfRecordsBigDouble.intValue();
if(order==null || order.equals("0"))
// outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\""+numberOfRecordsDouble+"\"" +" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
// outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
// outString = "<iframe src=\"" + "http://www.google.ca"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
outString = "<iframe src=\"" + "/inquiry/" + dataAction + "?order=0"+ "\"" + " name=\"dataFrame\" id=\"dataFrame\" style=\"height:"+numberOfRecordsDouble+"px; width:100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
else
String orderStr = "?order=" + order;
outString = "<iframe src=\"" + "/inquiry/" + dataAction + orderStr + "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\""+numberOfRecordsDouble+"\"" +" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
//outString = "<iframe src=\"" + "/inquiry/" + dataAction + orderStr + "\"" + " name=\"dataFrame\" id=\"dataFrame\" height=\"161\" width=\"100%\" scrolling=\"NO\" frameborder=\"0\"></iframe>";
Debug.println("dispalyTable() ********* outString = "+ outString);
try {
out.println(outString);
} catch (IOException e) {
this.log.error(TAG_EXCEPTION + e.toString(), e);
throw new JspException(e);
>
Any hint would be greated appreciated.
Yours,
John SmithOk, couple of things
1 - ALWAYS put quotes around attributes in a custom tag. That rules out items #1 and #5 as incorrect.
2 - You were correct using the <%= expr %> tags. <% scriptlet %> tags are not used as attributes to custom tags. That rules out #3 and #4
#2 looks the closest:
2.)
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>Error Message:
claimHistoryView.jsp:190:4: The required attribute "numberOfRecords" is missing.
<inquiry:tableClaimHistory numberOfRecords="<%=ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/>
Check your spelling of that attribute. It looks right here,.
You also said that ic.getTotalNumOfRecords returns an int, while the attribute returns a String
Try
<%@ include file="../common/page_imports.jsp" %>
<inquiry:tableClaimHistory numberOfRecords="<%="" + ic.getTotalNumOfRecords()%>" dataAction="claimHistoryViewData.do" emptyKey="error.noData"/><%= "" + ic.getTotalNumOfRecords %> is the cop-out way to convert an int to a String :-) -
How to find the id of an htmlb component
Hello,
I have a bunch of htmlb components build in java code. I need the id of the components. I want to clearify that I need the id of the components not the value of the components. I know I can get the component id, if the component is created in jsp, as follows
<hbj:inputField
id="autoSave"
visible="false"
jsObjectNeeded="true"
value="FALSE">
<%
String jsAutoSave = myContext.getParamIdForComponent(autoSave);
%>
<SCRIPT>
var jsAutoSave = '<%=jsAutoSave%>';
</SCRIPT>
</hbj:inputField>
but, when the component is created in java code, I can't use the same logic to get to the component id.
If any one could help me, I really appreciate it.
FrankKalyan,
Thanks for your reply.
Maybe I should give a little more information. The doProcessBeforeOutput() method sets the JSP to be forwarded. In the JSP, components are build by calling a method of an other class that builds the components. And I need the ids of some of the components in the JSP. Component ids are generated dynamically, so I as far as I am concerned, I can only access them in JSP, my question how in my situation?
If the component were build in JSP, I could have gotten the ids, like I showed above.
Regards,
Frank -
How to create custom MXML component accepting other MXML componenents as children
How can I create an MXML component that when I use it in the "main" MXML, accepts other MXML components...
For example:
<s:WindowedApplication>
<myComponent>
<otherMXMLcomponent></otherMXMLcomponent>
<otherMXMLcomponent></otherMXMLcomponent>
<otherMXMLcomponent></otherMXMLcomponent>
<otherMXMLcomponent></otherMXMLcomponent>
</myComponent>
<s:WindowedApplication>
How do you declare such a component?
Thanks in advanceBhè non so se ho capito .. ti spiego la prova che ho fatto io.. Dunque, io ho provato a creare un mio componente Custom e a metterci dentro degli oggetti miei di esempio.. Il componente di esempio si chiama mioComponenteCustom e all'interno è strutturato in questo modo:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
</s:Group>
Al posto dei puntini ci metto quello che voglio.. nel tuo caso i tuoi 2 famosi pulsanti..
All'esterno chiamerò :
<mioComponenteCustom>
<s:DataGrid>
</s:DataGrid
</mioComponenteCustom>
Dove DataGrid è un componente a caso qualsiasi.. Ora, con questa struttura non ricevo errori e sembra andare bene..
Dimmi se ho capito bene o volevi fare altro..
Max -
Create custom declarative component like container
Hi all,
I'm using Jdev 12c.
I wanna create a custom declarative component like this:
container.jsf :
<af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
<af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
</af:panelGroupLayout>
</af:panelGroupLayout>
<af:xmlContent>
<afc:component>
<afc:description/>
</af:xmlContent>
I use this custom component to group some child components like this:
<abc:container ...>
<af:inputText ... />
<af:inputText ... />
</abc:container>
But the things is in Java code, I cannot get RichInputText components :
this is my function:
private void getFacetAndChild(UIComponent parent) {
Iterator childrens = parent.getFacetsAndChildren();
while (childrens.hasNext()) {
UIComponent child = (UIComponent)childrens.next();
System.out.println("Log child >> " + child);
getFacetAndChild(child);
this function only print the second RichPanelGroupLayout.
Any ideas to help me to get all RichInputText ?
Thanks and Best Regards!Hi All,
I found the solution. Just add one facet to Custom Container
<af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
<af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
<af:facetRef facetName="child"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
<af:xmlContent>
<afc:component>
<afc:description/>
</af:xmlContent>
And the used page:
<abc:container ...>
<f:facet name="child">
<af:inputText ... />
<af:inputText ... />
</f:facet>
</abc:container>
Maybe this solution will help others to create a custom container
Thanks and Best Regards!
Maybe you are looking for
-
BI template error when running it via Portal
Hi We have recently upgraded Portal to SP18 from SP16 and all the reports were working fine. But when stack level came to SP18 we are facing a problem a bi planning report. The web template opens fine and if I select any option and perform then it is
-
Exchange Rate difference for freight clearing
Hi SAP Gurus, I am facing a problem regarding exchange rate fluctuation. We have an import PO with USD (300 USD for Goods + 24 USD as freight). The Problem has come at the time of IR At the time of GR exchange rate was Rs.46.75, but at the time of IR
-
I created a PowerPivot (SQL Server 2012 SP1) workbook and uploaded it to SharePoint 2010 Portal and started using it as a data source in an excel file. This worked fine and we saw no issues with it until we moved to SharePoint 2013 environment. I upl
-
I have purchased a Epson Workforce 435, can't AirPrint, will this work with the first gen iPad?
-
Process flow of B1 implementation
Hi all, if we are going to implement B1, through which module we have to start and what is the flow? can u explain me Thanks, Varalakshmi