How to iterate dyna validation form using jstl tag

i have create dyna validation form in struts-config.xml
<form-bean name="DynaValidationForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String" />
<form-property name="cityName" type="java.lang.String[]" />
<form-bean>
and i want to disply these value on my jsp by usig jstl tag
<c:forEach var="form" item="${DynaValidatorForm.????????}">
<c:out value="form.username">
</c:forEach>
but problem is item is of collection object And in dyna validation form
how can i create the collection object or to call this .
please help me

posting the same question more than once won't
increase your chances of getting an answer.
sometimes nobody knows or no one is interested in
putting in the time to figure out an answer. your
question might be one of those.
%sometimes I get the feeling that I'm actually helping someone do me out of a job.

Similar Messages

  • How can I read a form using session in javaServerlet?(thanks)

    How can I read a form using session in javaServerlet?(thanks)

    you can not. You get the form entries through the request object.

  • How to write this java code in jsp using jstl  tags?

    Can anybody help me on this?
    I dont know how to check the containsKey using jstl tags?
    <%
         LinkedHashMap yearMap     =     (LinkedHashMap)request.getAttribute("yearMap");
         TreeSet nocSet               =     (TreeSet)request.getAttribute("nocSet");
         Iterator     yearMapIt     =     yearMap.keySet().iterator();
         while(yearMapIt.hasNext())
              int yearValue               =     (Integer)yearMapIt.next();
    %>
    <tr>
              <td><%=yearValue%></td>
    <%
              LinkedHashMap monthMap     =     (LinkedHashMap)yearMap.get(yearValue);
              Iterator     nocSetIt     =     nocSet.iterator();
              while(nocSetIt.hasNext())
                   String nCase=(String)nocSetIt.next();
                   if(monthMap.containsKey(nCase))
                        String count     =     (String)monthMap.get(nCase);
    %>
                        <td> <%= count %> </td>
    <%            }
                   else
    %>          
                        <td> 0 </td>     
    <%          
    %>
    </tr>
    <% } %>Edited by: avn_venki on Feb 18, 2008 11:54 PM

    <c:forEach var="yearMap" items="${requestScope.yearMap}">
         <th> <c:out value="${yearMap.key}"/> </th>
    <bean:define id="monthMap" value="${yearMap.value}"/>
    <c:forEach var="nocSet" items="${nocSet}">
    then how to write containsKey using tags??

  • How to format a calculated field using JSTL

    Hi,
    I have one field as following:
    <input type="text" class="fixedInput" name="grossRevenue<%=i%>" value="<%=((LineOfBusinessMetrics)lineOfBusinessMetricsList.get(i)).getGrossRevenue().setScale(2,BigDecimal.ROUND_HALF_UP)%>" size="16" onfocus="this.blur()" /></td>
    In the above line of code, I have one list called lineOfBusinessMetricsList. From this list, I am fetching the object of LineOfBusinessMetrics, from this object, I am fetching the value of Gross Revenue and casting it to LineOfBusinessMetrics.
    Now I am trying to format the Gross Revenue using JSTL tag "fmt" as following:
    <td class="grey3"><input type="text" class="fixedInput" name="<c:out value='grossRevenue${i}'/>" value="<fmt:formatNumber type="number" value='${lineOfBusinessMetricsList.grossRevenue}' minFractionDigits="2" maxFractionDigits="2" />" size="16" onfocus="this.blur()" /></td>
    The above modified code wth JSTL tag fmt is not working correctly.
    Can anyone help me to get this code work.
    Thanks in Advance,
    Vijay

    You must submit the page to do it with PL/SQL. If you do not want to submit the page, you must do it with JavaScript.
    Thanks,
    Tyler

  • How to add a validator to a custom tag

    Hello,
    I would like to know how to add a validator to my custom tag as an attribute.
    <mytags:custom validator=???/>
    Thanks.
    Sebastien

    Are you wanting to use one of the JSF validators or a home brewed one?

  • Use JSTL tags for ATG droplets and beans

    Hi,
    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tag
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>

    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tagIn the <dsp:importbean> use var to give an EL variable name to the component you are importing.You can also set its scope attribute to page, request, session, or application with page scope being the default. You can then access it as a page scoped attribute. So this should do:
    <dsp:importbean var="profileFormHandler" bean="/atg/userprofiling/ProfileFormHandler" />
    <c:out value="${pageScope.profileFormHandler.ProfileJSON}" />In case you change the scope in importbean you can accordingly use pageScope, requestScope, sessionScope or applicationScope.
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>Any ATG droplet is nothing but a servlet which is also a Nucleus component. So essentially you want to call a servlet from JSTL which as such shouldn't be done in a well written script-less JSP. You can probably try to use the droplet as a bean and use JSTL on top of it but since ATG droplets also have different types of parameters like input, output and open so you will have to specially handle those.

  • Is it possible todeclare primitive variable by using JSTL tag

    Hi friends..........
    I have to use jstl tags in my project , so i have to know how to declare primitive variables with jstl tag. Is it possible with <c:set > jstl tag........
    Hope i get the answer...........
    Thanks in advance...............

    JSTL variables are attributes in the page, request, session and application scopes.
    As such, they can only be objects, because you can't store a primitive value as an attribute.
    However you shouldn't need to declare primitive variables. You should hardly need to declare any variables.
    JSTL is not a programming language. It is a language to aid the display of a JSP. Therefore most of its attention is geared towards outputting things, with a much lesser concern on setting them.
    Cheers,
    evnafets

  • Posting huge data on to JSP page using JSTL tags

    Hi,
    I have one application where I have to post huge data (approximately 2000 rows of data) into JSP page. I am using JSTL tags and running on Tomcat 5.
    It is taking almost 20 to 25 seconds to load the entire page.
    Is it the optimal time to load or it could be improved?
    Please let me know.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Evnafets,
    Thank you for the response.
    Here are the tasks I am doing to display the data on JSP.
    0. We are running on Tomcat 5 and the memory size is 1024MB (1GB).
    1. Getting the data - I am not performing any database queries. The data is stored in the static cache memory. So the server side response is so quick - less than a milli second.
    2. Using Java beans to pass data to the presentation layer (JSP).
    3. 10 'if' conditions and 2 'for' loops and 2 'choose' statements are being used in the JSP page while displaying the data.
    4. Along with the above, there are 4 javascript files are being used.
    5. The jsp file size after rendering the data, is aprox. 160 kb
    Hope this information helps you to understand the problem.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Use jstl tags in jsf page

    I have h:dataTable in each row of which i'd like to output row data as text, inputfield or link depending on row data type
                        <h:dataTable id="pnlHistory" value="#{UserOrdersBean.orderLineWrappers}" var="wrapper" rendered="#{UserOrdersBean.isBasicUser}"
                                     columnClasses="history_col1, history_col2, history_col3, history_col4, history_col5" width="100%" cellpadding="5" >
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_itemName}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="itemName"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <h:outputText value="#{wrapper.itemName}" styleClass="itemdescription"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_data}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="data"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <c_rt:choose>
                                    <c_rt:when test="#{wrapper.type==0}">
                                        <h:outputText value="#{wrapper.data}" styleClass="basic_thin"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==1}">
                                        <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==2}">
                                        <h:outputLink value="#{wrapper.data}">
                                            <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
                                        </h:outputLink>
                                    </c_rt:when>
                                </c_rt:choose>
                            </h:column>
                         </h:dataTable>trying to use jstl tags but unsuccessfull. Is it ever possible user jstl tags in jsf tags like listed above

    Replace the c:choose block by<h:outputText value="#{wrapper.data}" styleClass="basic_thin" rendered="#{wrapper.type == 0}" />
    <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px" rendered="#{wrapper.type == 1}" />
    <h:outputLink value="#{wrapper.data}" rendered="#{wrapper.type == 2}">
        <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
    </h:outputLink>

  • Problem in using JSTL tag libs

    Hi there,
    I am trying to use JSTL tag libs in my web app, but i get the following error message:
    org.apache.jasper.JasperException: /index.jsp(22,0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
    as it might be clear i am using Tomcat and line 22 of the code for index.jsp is:
    <c:if test="${user.role > 0 }">
    Please help my identify whats wrong in there. I suspect that it is because of my web.xml file, but i am not sure.
    thanx in advance,
    Capitan Haddock

    try to use gt instead of >

  • How to create a MD form using dynamic page ?

    Rahul and Sharmila,
    You have answered several of my queries earlier and I am thankful for them.
    I have been trying to creating a MD form using dynamic page and I haven't fiqured it out. I need help. You both advised me on creating a simple form using dynamic page. The complexity changes drastically when I have to create a MD form. Has no body ever tried to create a MD form with dynamic page?
    I haven't heard from you anything either. I am stuck with this and I need help urgently. Would you kindly tell me if this is possible and how ? Otherwise, I will stop crying for help on this.
    Thanks for your kind attention.
    Mainak

    Hi,
    I have replied to this in the morning.
    Re: Oracle portal and JSR 168 compliance
    Hope it helps.
    Thanks,
    Sharmila

  • How to Create an Input Form using a Transient View Object?

    I would like to use a Transient View Object to store data from input forms across a multiple-page enrollment process.
    My question is how to I create the input form using the Transient View Object on the .jspx page? Do I drag/drop an ADF creation form onto the page? Or, use a regular ADF form? Do I need to create the initial row progammatically?
    Just looking for some general directions or set of instructions? I've looked at the SRDemo example (Globals Transient View Object), but I'm not sure how they created the page at design time?
    thanks

    Well following the SRDemo example, this seems to work:
    1. Create Transient View Object
    2. Add to Application Module as a Data control
    3. Add to .jspx page as an ADF Form (not as an ADF Create Form)
    4. Add following code to Application Module containting Transient VO instance:
    protected void prepareSession(Session session) {
    super.prepareSession(session);
    insertTransientViewObjRows();
    private void insertTransientViewObjRows() {
    ViewObject transientvo = getViewObj1();
    transientvo.clearCache();
    transientvo.insertRow(transientvo.createRow());
    }

  • How to open Batch Details Form using a LinkedButton?

    Hi all,
    I just want to know how can I open the Batch Details system Form, using a LinkedButton from my user form.
    Just like the Batch Number Transaction Report window, from the Batch Column.
    It's difficult because this document don't have the ObjectType.
    Thanks a lot.
    Cheers
    David

    Solved!
    I did this:
    From the MatrixLinkPressedEvent:
    if (pVal.BeforeAction)
                        switch (pVal.ColUID)
                              case "column":
                                BubbleEvent = false;
                                AddOnApplication.Application.ActivateMenuItem("12290");//Form for Batch Details
                                form.EnableMenu("12290", true);
                                bool _runThread = true;
                                while (_runThread)
                                    Thread.Sleep(500);
                                    try
                                        ((SAPbouiCOM.EditText)AddOnApplication.Application.Forms.ActiveForm.Items.Item("40").Specific).Value = _dtGrid.GetValue("ItemCode", pVal.Row - 1).ToString();
                                        ((SAPbouiCOM.EditText)AddOnApplication.Application.Forms.ActiveForm.Items.Item("62").Specific).Value = _dtGrid.GetValue("Batch Hide", pVal.Row - 1).ToString(); ;
                                        AddOnApplication.Application.Forms.ActiveForm.DefButton = "38";
                                        AddOnApplication.Application.SendKeys("{ENTER}");
                                        _runThread = false;
                                    catch (Exception){}
                                    finally
                                        _runThread = false;
                                        form.Freeze(false);
    And that's it.
    Hope this help to someone
    Cheers

  • Validating forms using check boxs

    hi i am trying to validate a form using check boxs where all of the elements have the same name. Using the code below it enables validation when only one check box is available, however with muliple check-boxs it goes into and eternal loop and never executes the code! Any help on this matter would be most appreciated.
    <SCRIPT language="javaScript">
    function validate()
    if (!document.myform.pkey.checked)
    alert("Please Select a Questionnaire to delete!!");
         return false;
    </SCRIPT>

    Hi,
    When you have multiple checkboxes with same name, it will form an array of check boxes. So you have to validate them as below.
    flag=0;
    if(chkcntr>1)
    for(i=0;i<frm.ch.length;i++)
         if(frm.ch.checked)
    flag=1;
    break;
    else
    if(frm.ch.checked)
    flag=1;
    if(flag==1)
    //checkbox selected,can give any action
    else
    // checkbox not selected,give alert

  • How to create software request form using Info path functionality?

    Hi All,
    i am trying to create a Software Request Form using Info path functionality. Following are the steps:
    1. Users will fill out the form with all necessary fields.
    2. once they click on Submit button, it will send an email to two specific groups with a link so that they can see the form and Approve/Deny or can put comments on that.
    Thanks in advanced!

    Hi Rakib,
    There are many ways you can achieve this.
    Either by Creating a SharePoint list and then modify it using InfoPath to get all your required fields added
     or
    Use InfoPath application and select any template or blank form template to get all your required fields added and then publish it to SharePoint site
    For the second step you can create an OOTB workflow which can send email to view an approve items using Approval workflow feature
    For the advance notification you can use SPD workflows as well.
    Refer this article for more on InfoPath and SPD integration - http://gallery.technet.microsoft.com/office/Step-By-Step-build-30f84363
    Let us know if this helps, thanks
    Regards,
    Pratik Vyas | SharePoint Consultant |
    http://sharepointpratik.blogspot.com
    Posting is provided AS IS with no warranties, and confers no rights
    Please remember to click Mark As Answer if a post solves your problem or
    Vote As Helpful if it was useful.

Maybe you are looking for