Duplicate input tags generated

Hello--
JSF appears to be generating two elements for
one startElement/endElement pair.
Using JSF 1.2/Tomcat 6.0/Eclipse 3.3.2
I am writing a simple custom tag: an input field, a button, and
an input field.
I have written three 'encode' helpers for my encodeBegin() method.
Here is relevant code:
public void encodeBegin(FacesContext context) throws IOException {
ResponseWriter rw = context.getResponseWriter();
String id = getClientId(context);
encodeInputField(rw, id);
encodeButton(rw, id);
encodeOutputField(rw, id);
private void encodeInputField(ResponseWriter rw, String id) throws IOException {
rw.startElement("input", this);
rw.writeAttribute("name", id+".in", null);
String value = (String) getAttributes().get("initialIn");
if (value != null) {
rw.writeAttribute("value", value, "value");
rw.endElement("input");
private void encodeButton(ResponseWriter rw, String id) throws IOException {
rw.startElement("input", this);
rw.writeAttribute("type", "submit", null);
rw.writeAttribute("name", id+".button", null);
rw.writeAttribute("value", "click", null);
rw.endElement("input");
private
void encodeOutputField(ResponseWriter rw, String id) throws IOException {
rw.startElement("input", this);
rw.writeAttribute("type", "text", null);
rw.writeAttribute("name", id, "clientId");
if (getValue() != null) {
rw.writeAttribute("value", getValue().toString(), "value");
rw.endElement("input");
The problem is that the last method, encodeOutputField, appears to
be invoked twice, ie, there is an extra <input> element generated
with exactly the same id. And, the page displays okay (with the
extra <input> element with NO complaints about duplicate id).
Here is generated HTML:
<td>
<input name="j_id_jsp_723507922_1:j_id_jsp_723507922_7.in" value="initial text" />
<input type="submit" name="j_id_jsp_723507922_1:j_id_jsp_723507922_7.button" value="click" />
<input type="text" name="j_id_jsp_723507922_1:j_id_jsp_723507922_7" value="initial text" />
<input type="text" name="j_id_jsp_723507922_1:j_id_jsp_723507922_7" value="initial text" /></td>
</tr>
What is up?

Hai
I am Getting some doubt from you answer , These three are your component you know , this component will not call default EncodeBegin() method , it will call those method Encodebegin() which you wrote . then how you are saying UIInput class generate automatically one <input> tag . if you think so, there should 6 component totally because in your form totally 3 component so your encode method will create 3 component and then default system encode method will create 3 component .
please explain me
thanks
Selvakumar

Similar Messages

  • HOW TO: Use Input tags to edit records

    The question has been asked, "What does using the BC4J Input data tags provide
    over standard HTML input fields?" It is true that either type of input field allows
    your JSP to take user input and update your BC4J datasource. Both types of input
    fields submit a name-value pair to a JSP processing page that bind the data with
    a datasource row and attribute. However, unless you use the BC4J Input data tags,
    users will not be able to edit data in existing records. To see the difference,
    use the JDeveloper DataPage Wizard to create an Insert Record form and an Edit
    Record form.</p>
    To create the Insert Record form:</p>
    <ol>
    [*]Use the Business Components Wizard to create an entity object and view object for a database table you can update.
    [*]In the same project or another project, if you wish, use the DataPage Wizard to create an Insert Form for the view object.
    [*]Look in your JSP project folder in the Navigator and notice that two pages were generated: one JSP to render the insert HTML form and the other JSP to process the incoming parameters.
    [*]Open the file VO_Insert.jsp and notice that it does not use the BC4J input data tags.
    </ol>
    In the Insert form, the input data tags are not needed to render static HTML form elements such as empty text fields. It is important to note, however, that the name of these text fields corresponds to the attributes of your selected view object. This is extremely important because the processing page looks for parameters corresponding to the names of the attributes to update the view object datasource.</p>
    Now, create the Edit Record form:
    <ol>
    [*]Use the DataPage Wizard again, but this time select Edit Form for the view
    object.
    [*]Open the file VO_Edit.jsp and notice that it uses the BC4J input data tags,
    which contain the prefix <jbo:Input ...>.
    [*]Look in your JSP project folder in the Navigator and again notice that two
    pages were generated: one JSP to render the edit HTML form and the other JSP
    to process the incoming parameters.
    [*]Open the file VO_Edit.jsp and notice that it uses the BC4J input data tags.
    </ol>
    In the Edit form, the BC4J input data tags are needed because in this case,
    the page has to query the current value of the record and place that data into
    the text field. The Edit form uses a second page to process the edited values.</p>
    To summarize the differences:</p>
    Use the <jbo:Input ...> data tags when you need to create an Edit Existing Record type of JSP page. This page will query the current data from the view object datasource and display it in each input field.
    OR
    Use standard HTML input fields when you do not need to query the database to show existing records. This is the case in a static Insert Record form where only empty HTML fields are rendered.
    The end goal of each Input tag is to supply a name-value pair to a processing
    page which will then update the database according to the value passed to it.
    For example in order to update the &quot;Ename&quot; column of the Emp table,
    a name-value pair such as Ename=&quot;smith&quot; must be passed via an HTML
    form to a processing page. The processing page will then be able to update the
    table with the new value of the attribute using the following code:
    <jbo:Row id="myrow" datasource="ds" rowkeyparam="MyRowKey" action="Update">
    <jbo:SetAttribute dataitem="*"/>
    </jbo:Row>
    </p>
    By setting the attribute 'dataitem=&quot;*&quot;' in the SetAttribute tag,
    it is able to update all database columns where a name-value pair is supplied.
    The SetAttribute tag must be used inside of the Row tag to allow an operation
    on a single row.</p>
    The Row tag is able to identify a specific row through the rowkeyparam attribute.
    The rowkeyparam takes the HTML request parameter that contains the value of
    a BC4J rowkey. It is the BC4J rowkey that uniquely identifies the row within
    a rowset. By default Row tag by default obtains the rowkey for the cu rrent row.
    (You can also specify the row when you want to perform a Find action as explained
    in the OTN topic &quot;How To: Navigating Using DataTags&quot;.)
    </p>

    Ok. I didn't understand your question.
    You have to do some settings for adding new  rows for the analysis grid in Analyzer. And in the new rows you can input the characteristic values. To enable the new rows
    In Analyzer - uncheck the setting Suppress New Lines in the proprties of the Analysis grid item.
    In WAD - Check the property Number of New Lines (NEW_LINES_COUNT) of Analysis grid item. You use this parameter to insert any required number of empty rows into the table. The parameter is set to 0 by default.

  • Html input tags

    why doesn't the jsf <input_text> tag generate a correctly terminated html <input> tag?
    It leaves off the closing /, ie,
    <input type="text" name="vendor_name" maxlength="25" size="50">
    instead of
    <input type="text" name="vendor_name" maxlength="25" size="50"/>

    The standard renderKit renders HTML and not XHTML. XHTML requires a webpage to be a well-formed XML document, HTML doesn't. I hope that several renderkits will be provided in the final release.
    Kind regards,
    Rune Bj?rnstad.

  • Duplicate requisitions being generated.

    I have two issues that are similar:
    ***FIRST -
    On 5/2/08 I cut a PO (4500113566) for Material 1000067027 (requisition 100213878). 
    A few days later another requisition was generated (100216117)  for the exact same Material.  Min/Max on the Material master is set to 1 and 1, there are no reservations and no work order assigned.
    ***SECOND -
    On 4/28/2008 I cut a PO (4500113270) for the following materials and
    quantities:
    MM 1000071901 (req# 100214520) Qty 3
    MM 1000071902 (req# 100214521) Qty 2
    MM 1000071903 (req# 100214522) Qty 2
    A few days later duplicate reservations were generated for the exact same materials.  With no work orders or reservations assigned and the Min / Max levels set to the appropriate levels.
    MM# 1000071901 (req# 100215638) - qty 1  Min/Max 1/1 MM# 1000071902 (req# 100215639) - qty 2 Min/Max 2/2 MM# 1000071903 (req# 100215640) - qty 2 Min/Max 2/2
    We need to find out why duplicate reqs are being generated.

    Hi Reinhardt,
    I am not sure please give it a try, Auto Syndication Task Delay (seconds) Integer.  Default is 0. Check if it helps..
    Set it to 0 if you have set any other parameter, see Figure 87. The MDSS-specific Report Detail pane page 279/403
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/71608566ae3260e10000000a42189b/MDMConsole71.pdf
    It may be also possible because of Bug, let's have input from others if it works else i would suggest to raise an OSS Note to SAP
    Regards,
    Mandeep Saini

  • Manual bank statement: no batch input was generated

    Hi,
    maybe somebody has a clue with this problem regarding FF67: after the data processing, no batch input is generated in order to post the bank statement.
    Please, I need your help with an OSS note or with a posting solution without batch input ( I tried to process the bank statement with "processing type = 4", but it didn't work).

    Hi Andrea,
    Try to add value in <i>Session name for bank postings</i>
    Do not hesitate to ask for further clarifications. Award points if useful.
    Regards,
    Siva

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Simultaneously read more than one input and generate output

    Is it possible To simultaneously read more than one input and generate outputs depending on these inputs? If this isn't possible what is the best way to go about making some sort of timed loop that will read an input, read the next input, decide whether or not to output and so on. Hope someone can help. Thanks.Message Edited by Esmith13 on 05-25-2005 01:36 PM

    Hi,
    You should look at the synchronized examples for analog input and output that can be found in the example finder under:
    Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Synchronization>>Multi-Function
    These will get you started to being able to handle multiple tasks at the same time.
    I hope this helps. Have a Great Day!
    George

  • Get filename from uploaded file then place in input tags

    i have an upload feature with the use of upBean and i can get the filname thru filename=file.getFileName
    when i place in the input tags it takes an error what i suppose to do
    <input type="hidden" name="getfilename" value="<%=filename%>">
    if (MultipartFormDataRequest.isMultipartFormData(request)) {
                            // Uses MultipartFormDataRequest to parse the HTTP request.
                            MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
                            String todo = null;
                            String filename=null;
                            String description=request.getParameter("txtDesc");
                            String checkfilename=mrequest.getParameter("uploadfile");
                            if (mrequest != null) todo = mrequest.getParameter("todo");
                            if ( (todo != null) && (todo.equalsIgnoreCase("upload")) ) {
                                Hashtable files = mrequest.getFiles();
                                if ( (files != null) && (!files.isEmpty()) && (description!=null)) {
                                    UploadFile file = (UploadFile) files.get("uploadfile");
                                    if (file != null){
                                        filename=file.getFileName();                                    if(checkfilename==null){
                                            filename="";
                                  upBean.store(mrequest, "uploadfile");  // Uses the bean now to store specified by jsp:setProperty at the top.
                                             else out.println("<BR> todo="+todo);
                    %>
                    Message was edited by:
    BlingBling15

    Thanks for reply.
    I replaced messageFileUpload (binded to blob table column) with messageStyledText (binded to filename attribute). Above the table placed single messageFileUpload and submitButton nearby. After user select file on submit I do:
    *if (pageContext.getParameter("DoUploadButton") != null) {*
    .. DataObject fileUploadData = pageContext.getNamedDataObject("FileData");
    .. *if (fileUploadData != null) {*
    .... String fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    .... String contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    .... BlobDomain fileContent = (BlobDomain)fileUploadData.selectValue(null, fileName);
    .... String seqNumber = pageContext.getParameter("seqNumber");
    .... am.insertInstanceAttachRowBlob(seqNumber, fileName, fileContent, contentType);
    .... pageContext.removeNamedDataObject("FileData");
    .. return;
    Edited by: user12086842 on 02.01.2013 2:41

  • Every time I sync my iCal computer with my iPhone 4 or iPad, duplicate entries are generated on both systems. What am I doing wrong or how can I avoid the duplications?

    Every time I sync my iCal on my computer through iTunes with my iPhone 4 or iPad, duplicate entries are generated on both systems. What am I doing wrong or how can I avoid the duplications? I have been doing this for several years and this problem is a more recent issue, like in the last 6 months. I have been deleting the duplicate entries, on both systems, but some duplicates reappear through "general" entries that are connected to the correct color for a Calendar, but not the name. I am going nuts and wasting tons of hours trying to get the 3 calendars to sync without generating duplicate entries.

    Choose one of the Calenders on ONE of the computers OR the MobileMe as the Master / correct account.
    The REINITAILISE the data of MobileMe within preferences on the computer defining the datatransfer correctly (in the advanced box of preferences). The synchronise iphone contacts and calender directly on-line to MobileMe.
    I posted a question on this today, and gave my own reply !
    Regards,
    Kevin

  • Firefox didn't show any response to AUTOCOMPLETE="off", I implment this code in form tag and even in input tag too, but no response

    Firefox didn't show any response to AUTOCOMPLETE="off", I try so many codes using jquery and html but no response, I implement this code in form tag as well as in input tag, in my registration form when ever the cursor focus on the username field already saved username display, pls let me help me to solved this issue.
    Thanks.
    Saravanaraj
    [email protected]

    If autocomplete data already previously has been saved in Firefox then adding autocomplete=off won't have effect since this data is already stored and you need to remove this manually via (Shift+) Delete.
    If you are experimenting with code then you need to take this into account and possibly use forget about this site.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.

  • Problem in input tag of type file

    Hi,
    I am using FireFox v.22, whenever i browse Default.aspx page in browser with <input type="file" />
    it allows me to show a dialog box to select file from local drive. but when i add my own custom javascript it doesn't shows me a select file dialog box for input tag of file type.
    can anybody tel me what is an compatibility issue with file input tag with javascript functions?

    This forum focuses more on end-user support and the built-in features. For scripting issues, I suggest trying the unofficial [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board]. It's a separate site with separate registration. For best results, please note the tips in the Sticky Post at the top of the forum before posting.

  • How do I combine duplicate keyword tags in the organizer ?

    While organizing my photos I realized I made duplicate keyword tags for the same person. Is there a way that I can combine two keyword tags for one person  into one ?

    Do you mean you assigned two slightly different keywords to the same person ? Like personA  and personB ? If that is the case, select all persoB, assign also person A. Then delete 'personB' keyword.

  • Why do input tags stop working when I add more tags to my project ?

    I'm having a problem with tags, when I add more input tags to my project the rest of the tags stop responding, that is when I monitor them with the tag monitor I get a low limit error, if I delete the new tags in the project the rest of the tags start working ok, the whole project has 804 tags, and I'm using a Pentium 4 2.8GHz server, 256 Mb RAM and Windows 2000 Advanced Server, Any idea of what could be happening ?

    Hello, I'm attaching the SCF File, the new tags that we created when the problem started are "VoltajeBateriaPozo11" and "VoltajeLineaPozo11" through "VoltajeBateriaPozo15" and "VoltajeLineaPozo15" (new set of tags)
    When this set of new tags are included in the SCF file the tags "VoltajeBateriaPozo1" and "VoltajeLineaPozo1" through "VoltajeBateriaPozo15" and "VoltajeLineaPozo15"
    don't show the correct value when we monitor them (We get the low limit alarm), the rest of the tags work properly.
    When we delete the new set of tags all the tags work properly (including "VoltajeBateriaPozo1" and "VoltajeLineaPozo1" through "VoltajeBateriaPozo10" and "VoltajeLineaPozo10").
    The OPC server we are using is the National Instruments OPC Lo
    okOut Driver Version 4.5, the alarms are not communication alarms.
    Thank you for your help.
    Attachments:
    TurbioTags.scf ‏282 KB

  • Required attribute in dsp input tag

    Hi
    dsp:input tag is unable identify the required attribute if i keep like this <dsp:input bean="something" type ="text" required="required"/>
    but it is working if i keep like this <dsp:input bean="something" type ="text">
                                                           <dsp:tagAttribute name="required" value="required"/>
                                                    </dsp:input>
    if i follow second option i am getting some issues in my application
    please give me solution how 1st one will work

    It should be required="true". For reference see
    Oracle ATG Web Commerce - dsp:input

  • Duplicate title tags in soft repeat region google

    hello,
    i have a page that has a soft repeat region on it that gives
    the following
    link
    /mypage.asp?wee=191&tfm_order=ASC&tfm_orderby=dcountry_usr
    My question is. In google
    Dashboard > Diagnostics > Content analysis
    the above link is reported to have Duplicate title tags, how
    can I fix this
    to be seo compliant.
    regards
    k

    Twocans wrote:
    > hello,
    > i have a page that has a soft repeat region on it that
    gives the following
    > link
    >
    >
    /mypage.asp?wee=191&tfm_order=ASC&tfm_orderby=dcountry_usr
    >
    > My question is. In google
    >
    > Dashboard > Diagnostics > Content analysis
    >
    > the above link is reported to have Duplicate title tags,
    how can I fix this
    > to be seo compliant.
    >
    > regards
    >
    > k
    What is your title at the moment? It sounds like you need to
    test for
    each parameter and display a unique title for all
    possibilities.
    So, if tfm_order does equal ASC, dynamically place "in
    ascending order"
    in your title, and the same for the order by parameter from
    the
    querystring.
    Dooza

Maybe you are looking for

  • I can't activate my iPhone

    Greetings, my name is CookieXtreme, I'm having some big problems with my iPhone 4 32GB, iOS 7. So, I had this problem since saturday, to be honest. I've had iOS 7 Beta, I bought it around 3 months ago in america. (I'm from the Luxembourg) Let me expl

  • What Is The Best Way To Transfer Music Files to New MacBook

    Just got my new MacBook. So far, love it. Now, I need to transfer all the music files from my iTuns on my old PC to the MacBook. I have all the files backed up on a network drive, that the MacBook can access no problem Should I try to manually copy a

  • List workflow with "Start workflow when an item is changed" will run twice when creating a new wiki page

    I have created the following workflow on the wiki page library to run when an item is changed:- And it will send emails as follow:- Currently when a user creates a new wiki page and he enters the wiki page name. Then he enters the content and click o

  • Message Mapping - Filter on parent element

    Hi, I'm using message mapping for mapping IDoc ORDERS05 to flat file. This is the source structure : ORDERS05  1..1 ---- IDOC  1..1      ---- E1EDKT1  0..99           ---- TDID  0..1           ---- TSSPRAS_ISO           ---- E1EDKT2  0..9999999      

  • Compaq NC6320 HD Problems

    Got a Compaq NC6320 here with a dead hard drive. Removed the drive and tested it with hd-tune, it was full of bad sectors... No problem - Slap in a brand new 320GB WD Install windows - gets to point of first boot and claims to have a read error - so