ADF/Struts Generated tag code variations? Struts html:text vs Html input

Hi,
JDev 10.1.2.1
ADF/Struts
I noticed that the JDev IDE generates different code for a same component/binding combination.
Example:Data Control of type Input form with same VO selection.
Generated code for 1 field:
case 1)
JSP code:
<tr>
<td>
<c:out value="${bindings['TitleLang1'].label}"/>
</td>
<td>
<html:text property="TitleLang1"/>
</td>
</tr>
HTML output:
<tr>
<td>
Short Title Language 1
</td>
<td>
<input type="text" name="TitleLang1" value="Preliminary Demo">
</td>
</tr>
case 2)
JSP code:
<tr>
<td>
<c:out value="${bindings['TitleLang1'].label}"/>
</td>
<td>
<input type="text" name="<c:out value='${bindings.TitleLang1.path}'/>" value="<c:out value='${bindings.TitleLang1}'/>"/>
</td>
</tr>
HTML output:
<tr>
<td>
Short Title Language 1
</td>
<td>
<input type="text" name="VB_TitleLang1" value="Preliminary Demo"/>
</td>
</tr>
Case 1 generated code is obvious to me, the html name of the field equals the field binding id.
In Case 2, the VB_ prefix is added and the binding variable references bindings.fieldName.path?
Could someone explain me the second flavor?
When should we use the path reference and replace the Struts html:text tag with html input tag?
Thanks
Fred

I dont think you can mix static values and rt expressions together in attribute values.
String onBlurString = "dontLeaveItEmpty(this);referenceEntered(" + recordNumber + ")" ;
html:text styleClass="textFieldInTable" name="refrences" property="referenceName" onblur="<%=onBlurString%>" />cheers,
ram.

Similar Messages

  • Acquiring HTML Text From HTML Page

    Just wanting to make a simple html editor. I read the documentation, and yes I know that not all pages form to the specifiecations, but I just want to know how to get all that yummie HTML into text rather than serving up a webpage. I am using the JEditorPane, and I think this answer may lay in the javax.swing.text.*; packages.

    Just trying to make a code editor by allowing the loading of an html page as a text file. Assuming you have the HTML source and now you wish to get the plain text from the HTML source,the following piece of code can help you:
    private String getPlainText(String htmlText)
    String str=null;
    JTextPane text=new JTextPane();
    text.setContentType("text/html");
    text.setText(htmlText);
    try{
      str=text.getDocument().getText(0,text.getDocument().getLength());
    }catch(BadLocationException){e.printStackTrace();}
    return str;
    }

  • Retrieving html text not html document from RichEditableText control

    Hi,
       I have some html text
    Ex- This is <b> test </b>
    which i am setting to RichEditableText using TextConvert.importToFlow(),I want to format this text just bold and italic and then get back  same html text back with
    only formatting i have done.
    Suppose i have formatted this text in RichEditableText like;
    Ex- This <i>is</i> <b> test</b>
    But when i am trying to get back this from RichEditableText using;
      TextConverter.export(richedittxt.textFlow,TextConverter.TEXT_FIELD_HTML_FORMAT,ConversionT ype.STRING_TYPE);
    It gives a complete html document with <html><body><font> tags, which i dont want. It should not includes all these extra tags.
    Can any one suggest, whether it is feasible or not ? Please reply if any one has solution
    Thanks..

    Leao,
    > I didn't write the original actionscript so I don't
    > really know how to implement what you suggested.
    Aha! Well, that can be a bit like painting yourself into a
    corner. ;)
    > Could you explain a little more?
    Spend a bit of time with the String class. Before you even
    do that, you
    may want to familiarize yourself with the concept of objects
    in general.
    See this introductory article ...
    http://www.quip.net/blog/2006/flash/actionscript-20/ojects-building-blocks
    ... then spend a bit of time in a completely new FLA
    experimenting with the
    String class. Many of its methods are specifically geared
    toward changing
    the value of the text content, including stripping away
    certain characters.
    e.g., you can use String.indexOf() to return the position of
    a particular
    character (or characters) in a string of text. You may then
    use that
    position in cahoots with String.substr() to return a new
    string that as been
    "pruned" of undesired content.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • No getter method when used html:text

    hi frnds,
    this is the way i ve written-->
    <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5">
    but its giving me an error which seems irrelevent..
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /pages/admin/addbdgt.jsp:61
    58: <tr>
    59: <td width="50%" height="25"><strong><small><font face="Verdana">Publicity Code </font></small></strong></td>
    60: <td width="50%" height="25">
    61: <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5"></html:text>
    62: <!-- <input type="text" size="5" maxlength="5" name="publicity_code"></td> -->
    63:
    64: </tr>
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:467)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:371)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    root cause
    javax.servlet.ServletException: No getter method for property publicity_code of bean bdgtmastForm
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:846)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:779)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspService (addbdgt_jsp.java:89)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    root cause
    javax.servlet.jsp.JspException: No getter method for property publicity_code of bean bdgtmastForm
    org.apache.struts.util.RequestUtils.lookup(Request Utils.java:968)
    org.apache.struts.taglib.html.BaseFieldTag.doStart Tag(BaseFieldTag.java:176)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005ftext_005f0(addbdgt_jsp.java:577)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005fform_005f0(addbdgt_jsp.java:184)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005fhtml_005f0(addbdgt_jsp.java:116)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspService (addbdgt_jsp.java:82)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    Apache Tomcat/5.5.23
    my bean class is--->
    public String getPublicity_Code()
    return(this.publicity_code);
    why am i getting this error when i ve already declared publicity_code in the bean class????
    regards,
    a_joseph

    hi guyz,
    herz my jsp page for submiting the values,
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html:html>
    <head>
    <title>Budget Master Administration</title>
    <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
    <SCRIPT LANGUAGE="JavaScript" SRC="bscript.js"></SCRIPT>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    </head>
    <body topmargin="0" leftmargin="0" bgproperties="fixed">
    <div align="left">
    <html:form action="/BdgtMastAction" name="bdgtmastForm" type="publicity.BdgtMastForm" method="get">
    <table border="0" width="100%">
    <tr>
    <td width="100%" bgcolor="#DFDFFF" background="images/niceblue.gif"><font face="Tahoma"
    color="#000000"><strong>B u d g e t   M a s t e r</strong></font></td>
    </tr>
    </table>
    <div align="left">
    <table width="60%" height="127">
    <tr>
    <td valign="top" width="50%" height="34"><strong><small><font face="Verdana"></font></small></strong></td>
    <td width="50%" height="34"></td>
    </tr>
    <tr>
    <td valign="top" width="50%" height="27"><strong><small><font face="Verdana">Branch</font></small></strong></td>
    <td width="50%" height="27">
    <!-- <input type=hidden name="option" value="new"> -->
    <html:hidden name="bdgtmastForm" property="option" value="new"/>
    <p>
    <html:select property="branch" size="1">
    <html:option value="Bombay"></html:option>
    <html:option value="Ahmedabad"></html:option>
    <html:option value="Madras"></html:option>
    <html:option value="Bangalore"></html:option>
    <html:option value="Calcutta"></html:option>
    <html:option value="Hyderabad"></html:option>
    <html:option value="Pune"></html:option>
    <html:option value="Lucknow"></html:option>
    <html:option value="Jaipur"></html:option>
    <html:option value="Patna"></html:option>
    <html:option value="Cochin"></html:option>
    <html:option value="Chandigarh"></html:option>
    <html:option value="Bhopal"></html:option>
    </html:select>
    </p>
    </td>
    </tr>
    <tr>
    <td width="50%" height="25"><strong><small><font face="Verdana">Publicity Code </font></small></strong></td>
    <td width="50%" height="25">
    <html:text name="bdgtmastForm" property="publicity_Code" size="5" maxlength="5"></html:text>
    <!-- <input type="text" size="5" maxlength="5" name="publicity_code"></td> -->
    </tr>
    <tr>
    <td width="50%" height="25"><strong><small><font face="Verdana">Annual Budget Alloted (<em>Rs</em>)</font></small></strong></td>
    <td width="50%" height="25">
    <!-- <input type="text" size="10" maxlength="10" name="budget"> -->
    <html:text property="budget" name="bdgtmastForm" size="10" maxlength="10" ></html:text>
    </td>
    </tr>
    </table>
    </div>
    <p align="left">
    <html:submit value="Submit" property="thesubmit" onclick="everything(form)"> </html:submit>
    </p>
    <hr>
    <strong><small><font color="#0080C0">
    <p align="center">�</font><font color="#0080C0" face="Verdana">Response - Corporate
    1998-1999</font></small></strong>
    </html:form>
    </div>
    </body>
    </html:html>
    and the exceptions that im getting when clicked on submit
    when i click on submit normally the javascript validation shud check for improper values,instead its getting submitted,and the below exceptions r the result..
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column 'Publicity_Code' cannot be null
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'Publicity_Code' cannot be null
         com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
         com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
         com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
         com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
         com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
         com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
         org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
         publicity.BdgtMastAction.execute(BdgtMastAction.java:57)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    Apache Tomcat/5.5.23

  • Html:text converting the chinnes letters to unicode when error occurs .....

    Hi all
    Thank you to every one for giving support who are really needs.....
    Here i have a small query that goes like this
    Iam converting a web page from english version to chinees version
    This is a struts application
    In one jsp page i have 2 text fileds like name and descrption
    Here iam entering chinees charaters into these text boxes(these text boxes are <html:text>)
    when both are filled and submit the form it is working fine.if
    i missed one field... the validation.xml file will catching this and displaying the error mesage in the corresponding jsp page. At this time the values which are enter in this text fileds are converting to unicode so this is my problem i don't want to happen like this. so please can you help me to come out this problem ....this is some urget for me..
    Thanx in advance
    Srikanth

    I solve This problem
    here the only sol i found is that
    change the html:text to plain html text (i.e <input type="text">)
    the code in jsp page like this
    <input type="text" name="name" value="<bean:write name="formName which you are using to get the property" property="name(property from FormBean" filter="false"/>
    I hope this will solve any one of your problems......
    Thanking you
    Srikanth

  • Dynamic text box, HTML Text with Image

    Hello Everyone,
    I am using Flash version 8. I have used the text tool and
    created a dynamic text box and have attached the UIScrollBar
    component to it. This text box is configured to allow the use of
    html text to be inputted to it. I have code that reads a file which
    contains a list of text files that I then read and place them into
    the text box. The user can use the scroll bar to scroll through all
    the text.
    I have created an image that is a picture of the tab portion
    of a file folder. On the tab I have place some text. This was all
    done in Photoshop. This tab image is used to separate the different
    stories in the text box. The image is save as a jpeg file
    Everything you have just read works with out any problems.
    Now for the problem!
    This image is only 20 pixels tall and the text is not very
    readable. As we all know the HTML tags are very limited in Flash 8.
    Ideally I would like to put the text and image in to the text
    box as I would normally do. Then place text on top of the image and
    have it all scroll properly with in the text box.
    I have taken the tab image and converted it in to a graph
    symbol and then put the text on top of the image. This looks good;
    however I don’t know how (or if it is even possible) to place
    the graphic symbol in to the text box at the correct place within
    the text.
    Does anyone have ideas on what may work? Remember that the
    image I am working with is only 20 pixels tall which is why the
    text quality on the image is so poor.
    Thank you all for any help you may provide,
    Steve

    Yes Tim I am using the <img> tag and I know that I
    can’t place text over the image. I have set the height and
    width to be the exact size of the image. However When you go to the
    webpage it will open the movie to the maximum size based on the
    resolution of your display; however I do maintain the aspect ratio
    of the movie. For testing I did set a fix size to the size of the
    movie. Sometimes the fix size (1000x750) looks better and sometimes
    a larger size (example 1280x1024). I believe that the main problem
    is the fact the size of the image is 670 pixels wide by 25 pixels
    high and of the 25 pixels the text is only 18 pixels tall. In
    Photoshop this makes it about a 1.75 point font. As you can see the
    real problem is that I don’t have enough pixels to make up
    the text. This is why I am looking for an alterative way to create
    the text.
    I tried importing the image into flash as a graphic symbol
    and then using the text tool to create the text. The results looked
    real sharp, the text was nice and crisp (just what I wanted). The
    problem is that I could not find a way to place the graphic symbol
    into the dynamic text area like id did using the <img> tag.
    This symbol needs to scroll as you scroll the text in the text
    area.
    This is why I am asking for help. I am looking for some ideas
    that may work.
    Thank you,
    Steve

  • How to use bean write in  struts html:text tag

    hi,
    i'm new to struts concepts.here i'm trying to write a value in html struts tag using <bean:write>
    my current tag is
    <html:text property="empname" value='<bean:write name="employee" property="empid">' />
    but it gives same tag in the text box.how i can solve this.

    what am I doing wrong?You will notice above that I mentioned
    YOU CAN'T USE CUSTOM TAGS AS ATTRIBUTES TO OTHER CUSTOM TAGS
    (was that loud enough for you to notice this time)?
    Try
    <html:text styleId="instruction" styleClass="text" size="50" name="instruction" property="value"/>
    //or
    <html:text styleId="instruction" styleClass="text" size="50" property="instruction" value="<%= instruction.getValue() %>"/>
    better alternative: populate your formbean with your action and just have:
    <html:text styleId="instruction" styleClass="text" size="50" property="instruction"/>
    If you set the "instruction" property of your formBean in the action, the value will be automagically reflected here.
    Cheers,
    evnafets

  • Struts html:text tag background colour

    How to change the background colour of Struts <html:text> tag?

    styleClass and styleId, you can put css value on it

  • How to use logic:present tag in struts el tag

    Hi
    I am trying to use struts el tags in the jsp page.I am struggling with the following exception: Cannot find bean: "result" in any scope.I couldn't understand why this error is coming even i had the property "result" in my ActionForm.
    ActionForm:
    package com.finocus.cam.struts.bean;
    import java.util.List;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import com.finocus.cam.common.ValidateFormat;
    public class DetailsForm extends org.apache.struts.action.ActionForm {
         private final static String LOG_TAG = DetailsForm.class.getName() + ".";
         private static final long serialVersionUID = 1L;
         // VARIABLES DECLARATION
         private String name = null;
         private String searchField = null;
         private String searchCriteria = null;
         private String phonenumber = "";
         private String email = "";
         private List results = null;
         private String adminUserName = "";
         private String adminUserEmail = "";
         public DetailsForm() {
         // GETTER AND SETTER METHODS
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public String getSearchCriteria() {
              return searchCriteria;
         public void setSearchCriteria(String searchCriteria) {
              this.searchCriteria = searchCriteria;
         public String getSearchField() {
              return searchField;
         public void setSearchField(String searchField) {
              this.searchField = searchField;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public List getResults() {
              return results;
         public void setResults(List results) {
              this.results = results;
         public String getPhonenumber() {
              return phonenumber;
         public void setPhonenumber(String phonenumber) {
              this.phonenumber = phonenumber;
         public String getAdminUserEmail() {
              return adminUserEmail;
         public void setAdminUserEmail(String adminUserEmail) {
              this.adminUserEmail = adminUserEmail;
         public String getAdminUserName() {
              return adminUserName;
         public void setAdminUserName(String adminUserName) {
              this.adminUserName = adminUserName;
         // DUMPING THE VALUES IN THE CONSOLE
         public void dumpValues() {
              StringBuffer sb = new StringBuffer();
              sb.append("Name'");
              sb.append(name);
              sb.append("SearchField");
              sb.append(searchField);
              sb.append("searchCriteria");
              sb.append(searchCriteria);
              sb.append("'");
              sb.append(" ");
              System.out.println(sb.toString());
         // RESET() METHOD IS USED FOR STORE FORM'S CURRENT VARIABLES DECLARATION
         public void reset(ActionMapping actionMapping, HttpServletRequest request) {
              System.out.println("reset() method is called");
              this.email = null;
              this.searchCriteria = null;
              this.searchField = null;
              this.results = null;
         // VALIDATE() METHOD IS USED TO VALIDATE THE FORM DATA
         public ActionErrors validate(ActionMapping actionMapping,
                   HttpServletRequest request) {
              ActionErrors errors = new ActionErrors();
              System.out.println("Validate()is called");
              // Determine if name has been entered.
              if (getName() == null || getName().length() == 0
                        || getName().equals(" ")) {
                   errors.add("accountText", new ActionError("searchText.error"));
              } else if ((getSearchField().equals("name") == true)
                        && (ValidateFormat.isValidText(getName()) == false)) {
                   errors.add("validAccountName", new ActionError("validName.error"));
              if (getSearchField() == null || getSearchField().length() == 0) {
                   errors.add("accountSearchField", new ActionError(
                             "searchField.error"));
              } else if ((getSearchField().equals("email") == true)
                        && (ValidateFormat.isValidEmail(getName()) == false)) {
                   errors
                             .add("validAccountEmail", new ActionError(
                                       "validEmail.error"));
              } else if ((getSearchField().equals("phonenumber") == true)
                        && (ValidateFormat.isValidPhoneNoFormat(getName()) == false)) {
                   errors.add("validPhoneFormat", new ActionError(
                             "validPhoneFormat.error"));
              if ((getSearchField().equals("searchallfields"))
                        && ((ValidateFormat.isValidText(getName()) == false)
                                  && (ValidateFormat.isValidEmail(getName()) == false) && (ValidateFormat
                                  .isValidPhoneNoFormat(getName()) == false))) {
                   errors.add("validNameEmail",
                             new ActionError("validNameEmail.error"));
              return errors;
    Action class:
    package com.finocus.cam.struts.action;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import com.finocus.cam.db.CAMDbAccess;
    import com.finocus.cam.struts.bean.DetailsForm;
    public class DetailsAction extends org.apache.struts.action.Action implements
              com.finocus.cam.common.CAMConstants {
         private final static String LOG_TAG = DetailsAction.class.getName() + ".";
         // Global Forwards
         public static final String GLOBAL_FORWARD_search = "login";
         // Local Forwards
         public static final String SUCCESS_search = "success";
         private boolean dumpRequestParams = true;
         public DetailsAction() {
         public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response)
                   throws Exception {
              System.out.println("SearchAccount execute() is called");
              HttpSession session = request.getSession(true);
              ArrayList results = null;
              DetailsForm search = (DetailsForm) form;
              String name = search.getName();
              String searchField = search.getSearchField();
              String searchCriteria = search.getSearchCriteria();
              // Dumping the values of input patameters
              if (dumpRequestParams == true) {
                   request.setAttribute("SearchCriteria", searchCriteria);
                   request.setAttribute("SearchField", searchField);
                   request.setAttribute("Text", name);
                   search.dumpValues();
              // Perform search based on what criteria and search Field was entered.
              CAMDbAccess dbAccess = CAMDbAccess.getInstance();
              if (null != searchCriteria && searchField != null) {
                   System.out.println("Search Criteria =" + searchCriteria
                             + "Selected Option =" + searchField);
                   if (searchCriteria.equals(Search_Account) && searchField != null) {
                        results = dbAccess.searchByAccountInfo(name, searchCriteria,
                                  searchField);
                        System.out.println(" Search criteria :Exact Match was selected.<BR>");
              // Place search results in SearchForm for access by JSP.
              search.setResults(results);
              // Forward control to this Action's input page.
              return mapping.findForward(SUCCESS_search);
    My jsp page:
    <%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean" %>
    <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic-el" %>
    <%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html" %>
    <html:html>
    <head>
    <title>Search Page</title>
    </head>
    <body colorants="LightGreen">
         <table width="100%" bgcolor="LightGreen">
              <tr>
                   <td align="left"><font color="brown"><h3><b>Search Info</b></h3></font><hr></td>
              </tr>
                   <tr>
              <td align="left"><h4><font color="brown"><b>Search Text:</b></font><%=request.getAttribute("Text")%></h4></td>
                   </tr><tr>
              <td align="left"><h4><font color="brown"><b>Search Field:</b></font><%=request.getAttribute("SearchField")%></h4></td>
              </tr><tr>
                   <td align="left"><h4><font color="brown"><b>Search Criteria:</b></font><%=request.getAttribute("SearchCriteria")%></h4></td>
                   </tr><tr>
                   <html:form action="/results.do">
                        <td><center><html:submit value="AllSearchOptions " /></center></td>
                        </html:form>
                   </tr>
              <tr>
                   <td align="left"><font color="brown"><hr><h2><b>Search Results</b></h2></font></td>
              </tr>
              <tr>
              <td>
              <table border="1" cellspacing="1" cellpadding="3" width="70%"
                   bgcolor="white">
                   <logic:present name="searchbyaccount" property="results">
                   Results exists
                        <c:if test="${size==0 }">
                   <center><font color="red"><b>No Results Found</b></font></center>
                   </c:if>
                   <br>
                        <c:if test="${size>0}">
                        Size is greater than ZERO
                             <table border="1" cellspacing="1" cellpadding="3" width="70%"
                                  bgcolor="white">
                                  <tr>
                                      <th>Customerid</th>
                                       <th>First Name</th>
                                       <th>Last Name</th>
                                       <th>Email</th>
                                       <th>phone Number</th>
                                       <th>Details</th>
                                  </tr>
                                       <c:forEach var="result" items="${results}">
                                        <c:out value="${result}"/>
                                       <tr>
                                            <td><bean:write name="result" property="customerid"></bean:write></td>
                                            <td><bean:write name="result"
                                                 property="accountAdminFirstName"></bean:write></td>
                                            <td><bean:write name="result"
                                                 property="accountAdminLastName" /></td>
                                            <td><bean:write name="result" property="accountability" /></td>
                                            <td><bean:write name="result" property="accountAdminPhone" /></td>
                                            <td><html:form action="/accountDetails.do">
                                                      <html:submit value="Details" />
                                            </html:form></td>
                                       </tr>
                                  </c:forEach>
                             </table>
                        </c:if>
              </logic:present>
              </table>
              </td>
              </tr>
         </table>
    </body>
    </html:html> Please refer me where i done a mistake.Thanks in Advance

    hi all,
    I am doing programs in sturts. My program
    My program purpose is to retrieve data from the
    database.My database is MySql. I know that we can
    write connection code in Action Class, it is ok for
    some less prog's if i want to use the sane connection
    code in more Action Classes it is vasting time and
    so.I don't think it's a good idea to put database code in Action classes. (That's one of the biggest drawbacks of Struts - it's completely tied to Actions, HTTP, and the Web.) Better to move that code into plain old Java objects and let the Actions call them.
    You'll be able to test them without the container or Struts, and you'll be able to reuse those objects in other, non-Web contexts.
    So i want to use <data-sources> tag that is available
    in struts-config.xml. I know that thre is tag withThis is the wrong place to configure a connection pool, too. Struts should have nothing to do with it. What if you change Web frameworks to WebWork or Spring? The connection pool should be configured in the container that hosts your app, not Struts.
    this name, but the problem is i don't know how to use
    this tag. If any budy know how to use this please
    tell me the syntax or any example.
    plese... reply soon..Don't do it. Think about doing it in your container, not Struts.
    %

  • Pdk struts jsp tags not working.

    The problem we have hited is that pdk-struts tags are not rendered corectly:
    From next piece of code:
    <pdk-html:form action="/auth_portlet/doLogin.do" name="loginFormBean" type="passport_portlets.auth_portlet.loginFormBean">
    <%--<pdk-html:errors/>--%>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><pdk-html:text property="username"/></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><pdk-html:text property="password"/></td>
    </tr>
    <tr>
        <td></td>
        <td><pdk-html:submit value="Login"/></td>
    </tr>
    </table>
    </pdk-html:form>We recieve next output in the browser window:
    <form name="loginFormBean" method="post" action="/passport_portlets/auth_portlet/doLogin.do">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><input type="text" name="username" value=""></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><input type="text" name="password" value=""></td>
    </tr>
    <tr>
        <td></td>
        <td><input type="submit" value="Login"></td>
    </tr>
    </table>
    </form>But it's wrong output, there aren't any qualifiing naming prossed, as much as no hidden fields included into form. We don't receive any kind of errors, just such simple output in browser.

    to be more detailed and specific, source follows
    provider.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
       <session>true</session>
       <passAllUrlParams>false</passAllUrlParams>
       <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
          <id>1</id>
          <name>AuthPortlet</name>
          <title>portlet name</title>
          <description>description</description>
          <timeout>40</timeout>
          <showEditToPublic>false</showEditToPublic>
          <hasAbout>false</hasAbout>
          <showEdit>false</showEdit>
          <hasHelp>false</hasHelp>
          <showEditDefault>false</showEditDefault>
          <showDetails>false</showDetails>
          <renderer class="oracle.portal.provider.v2.render.RenderManager">
             <renderContainer>true</renderContainer>
             <renderCustomize>true</renderCustomize>
             <autoRedirect>true</autoRedirect>
             <contentType>text/html</contentType>
             <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
             <defaultAction>/auth_portlet/doDefault.do</defaultAction>
             </showPage>
          </renderer>
       </portlet>
    </provider>
    web.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <description>web.xml file for passport portlets package</description>
      <context-param>
        <param-name>oracle.portal.log.LogLevel</param-name>
        <param-value>4</param-value>
      </context-param>
      <servlet>
        <servlet-name>SOAPServlet</servlet-name>
        <servlet-class>oracle.webdb.provider.v2.adapter.SOAPServlet</servlet-class>
      </servlet>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>SOAPServlet</servlet-name>
        <url-pattern>/providers</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>SOAPServlet</servlet-name>
        <url-pattern>/providers/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
        <session-config>
            <session-timeout>35</session-timeout>
        </session-config>
        <mime-mapping>
            <extension>html</extension>
            <mime-type>text/html</mime-type>
        </mime-mapping>
        <mime-mapping>
            <extension>txt</extension>
            <mime-type>text/plain</mime-type>
        </mime-mapping>
    </web-app>
    struts-config.xml
    <?xml version="1.0" encoding="windows-1251" ?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
        <form-bean name="loginFormBean"
                   type="passport_portlets.auth_portlet.loginFormBean">
          <form-property name="username" type="java.lang.String"/>
          <form-property name="password" type="java.lang.String"/>
        </form-bean>
      </form-beans>
      <action-mappings>
        <action path="/auth_portlet/doDefault"
                type="passport_portlets.auth_portlet.doDefaultAction">
          <forward name="loged" path="/auth_portlet/showLoginState.jsp" redirect="true"/>
          <forward name="notloged" path="/auth_portlet/showLoginForm.jsp" redirect="true"/>
        </action>
        <action path="/auth_portlet/doLogin"
                type="passport_portlets.auth_portlet.doLoginAction"
                name="loginFormBean"
                scope="request"
                validate="true"
                input="/auth_portlet/showLoginForm.jsp">
          <forward name="success" path="/auth_portlet/showLoginState.jsp" redirect="true"/>
          <forward name="failure" path="/auth_portlet/showLoginForm.jsp" redirect="true"/>
        </action>
      </action-mappings>
      <message-resources parameter="passport_portlets.ApplicationResources"/>
    </struts-config>
    showLoginForm.jsp
    <%@ page contentType="text/html;charset=windows-1251"%>
    <%@ taglib uri="http://xmlns.oracle.com/portal/pdk/struts/tags-html" prefix="pdk" %>
    <pdk:xhtml/>
    <pdk:form action="/auth_portlet/doLogin.do" name="loginFormBean" type="passport_portlets.auth_portlet.loginFormBean" method="post">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>Username:</td>
        <td><pdk:text property="username"/></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><pdk:text property="password"/></td>
    </tr>
    <tr>
        <td></td>
        <td><pdk:submit value="Login"/></td>
    </tr>
    </table>
    </pdk:form>all works fine, except the problem that pdk-struts tags in jsp page aren't processed correctly, they output simple html output, which is not formated to inline rendering rules (qualified naming of fields, hidden fields with all values, etc).
    Maybe I'm missing something?

  • How to use struts Logic tags in weblogic8.1

    hi
              i have used jakarta struts in JDeveloper there i used logic tags
              but the same i have to use in weblogic8.1 ,how should i use it
              i am new to weblogic platform
              it is very urgent
              please

    Hi harish,
              Procedure for using a Struts Tag Libraries in weblogic 8.1 :
              â€¢Copy the tag lib jar files under WEB-INF/lib ( if tag handler supplied as
              classes without package a jar file then we need to copy the classes
              under WEB_INF/classes.
              â€¢ Copy the tld files files under WEB-INF or create a directory under
              WEB-INF and copy tld files under this directory.
              â€¢ We need to give the information about the tag libraries in web.xml by
              adding the following lines to it as,
              <taglib>
              <taglib-uri>bean</taglib-uri>
              <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>html</taglib-uri>
              <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>logic</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
              </taglib>
              To use tags in jsp file we need to add taglib directive as ,
              <%@ taglib uri="logic" prefix=“logic"%>
              <%@ taglib uri="html" prefix=“html"%>
              <%@ taglib uri="bean" prefix=“bean"%>
              Every tag can support zero or more number of attributes and a tag may or
              may not support body content
              Every Tag Library Uniquely identified by uri defined in web.xml.
              we can use the tags in jsp according to the tags and attributes which are defined in *.tld files.
              if we look at .tld files we can find several tags and its attributes.
              note :any jar files that are related to struts framework ,place under the lib directory of the webapplication.
              ----- Anilkumar kari

  • Struts dynamic html:text property truncated

    hello!
    I am tring to dynamically generate the property of an indexed property in struts, my property name seems to get truncated after submission. What am I doing wrong?
    <html:text property="quantity('quantity(0)')" styleId="quantity" styleClass="text" size="15" value=""/>
    The value comes out like this and the key is truncated (it doesn't have a
    close bracket)
    quantity(QUANTITY-0 = 10 piecesThanks

    The key:value comes out like this:
    quantity(0 = 10 pieces

  • JSP - Nested Jakarta Struts Logic Tags

    Hi,
    Simple question....
    Can Jakarta Struts Logic tags be nested when coding JSP's
    i.e.
    ==========================================
    <logic:iterate id="searchSizeTracker" name="searchSizeTracker" type="uk.co.troutlure.bom.SearchTrackerObject" scope="request">
    <logic:greaterEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <logic:lessEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getMaxPage()%>'>
    <logic:equal name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </logic:equal>
    <logic:notEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <a href="<%=request.getContextPath()%>/performSearch.do?pageRequired=<bean:write name='searchSizeTracker' property='page_no'/>&action_id=<bean:write name='searchActionForm' property='currentActionId'/>&searchType=<bean:write name='searchActionForm' property='searchType'/>&currentScreen=search_reorder"><jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </a>
    </logic:notEqual>
    </logic:lessEqual>
    </logic:greaterEqual>
    </logic:iterate>
    =========================================
    The above code sample seems to fail to get past the first <logic:greaterEqual tag even though the conditions are met. And the iterator just loops throught the rest of the SearchTrackerObjects.
    I'm not sure whether logic tags can be nested as shown???
    Thanks in advance.

    Yes you should be able to nest logic tags like that.
    However you seem to be wanting to limit the values that are iterated through using the greaterEqual and lessEqual tags.
    I would suggest you use the offset and length attributes on the logic:iterate tag:
    something like:
    <logic:iterate id="searchSizeTracker" name="searchSizeTracker" type="uk.co.troutlure.bom.SearchTrackerObject" scope="request" offset ="<%searchActionForm.getCurrentPage()%>" length="<%searchActionForm.getMaxPage() - searchActionForm.getCurrentPage()%>">Cheers,
    evnafets

  • WML help for  Struts-wml tag lib

    I tried using the tag lib of struts but I didn't find wml:card tag..........

    thank you Shay Shmeltzer
    i added the tld to my jdev.
    but now the property inspector of any component of this tag lib is empty.
    i can see all components in the component palette.
    another thing can you help me to use struts-layout libraries?
    i see in the code
    <layout:form action="/login" styleClass="FORM" key="form1.title" reqCode="login" focus="login">
    i can't find were are styleClass (css)?
    i looked for in all the project and in libraries?
    thank you very much..
    Talel...;

  • Struts Layout-Tag Library

    Can anyone suggest a book or site for Struts Layout-Tag Library.......
    i got only www.struts.application-servers.com/
    Thanks.

    I know for Struts, there is Struts Layout tag library
    that provides treeview, calendar, table, etc. Is
    there any such tag library for JSF? Thanks.Sure. The most popular is MyFaces Tomahawk (http://myfaces.apache.org/tomahawk/index.html). JSF Central has a comprehensive list as well: http://www.jsfcentral.com/products/components.
    Kito D. Mann - Author, JavaServer Faces in Action
    http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
    * Sign up for the JSF Central newsletter! http://oi.vresp.com/?fid=ac048d0e17 *

Maybe you are looking for

  • Time Capsule can't find data

    Hi I recently moved house and with it my time capsule, the problem is I can no longer find the data I held on my Time Capsules hard drive (primarily Movies and Photos). It's a 1TB TC, showing free space of 57GB so I believe the data is there but I ju

  • Sorry, this content is not allowed when trying to post.

    Hi all, With text like NVL, tmp when wrapped between <code>....<code> ? For actual posting, had used {  } instead of < > for the above. Any workaround ? Regards Zack

  • Senders Name - System ID

    Dear Experts <u><i>SAP R/3 4.7</i></u> We are having a setup to send workflow work-item to external e-mail address as well and SAPconnect is place and working fine. Question: When SAP sending these workflow work-items to external e-mail the sender na

  • How can I print from Firefox using my Epson Workforce 610 printer?

    I call technical support at Epson regarding my Workforce 610 printer because I'd tried to print out an e-mail using my Mozilla FireFox web browser. During the conversation with Epson technical support I learned that my printer does in fact work and w

  • How to select the files of the selected directory?

    I want to select a directory, and then I want to work with the files into this directory. I need that the application gets these files. Thanks.