netui-data:getData tag related query

Hi
I need to be able to compare the values returned by <netui-data:getData> tag against
another variable (which is also implemented as <netui-data:getData>) .
I have something as below :-
<netui-data:getData resultId="variableA" value="{container.item.value}"/>          
<netui-data:getData resultId="variableB" value="{request.variableB}"/>     
<logic:equal value="variableB" name="variableA" >                         A equals B               
</logic:equal>                                             
I am trying to the use the struts <logic:equal> tag but I am not sure as to how
to compare the two variables . I can easily compare variableA with a constant
like "apples" as mentioned below :-
<logic:equal value="apples" name="variableA" >                         A equals apples          
</logic:equal>                                   
But my requirements are I need to compare the two variables . How do I do that
using the NetUI tags or struts tags ??
Thanks
Kar                    

It worked like a charm John !! Still the good old scriplets to the rescue . Looks
like when things get way too comlicated in the jsp pages , we can flip back to
sciplets .
- Kar
"John Rohrlich" <[email protected]> wrote:
Kar,
If using scriptlet is okay you could do something like this
<netui-data:getData resultId="foo1" value="{pageFlow.foo1}"/>
<netui-data:getData resultId="foo2" value="{pageFlow.foo2}"/>
<%
if (pageContext.getAttribute("foo1") ==
pageContext.getAttribute("foo2"))
%>
<netui:label value="foo1 == foo2"/>
<%
%>
- john
"kar piyush" <[email protected]> wrote in message
news:4086b0f6$[email protected]..
Hi
I need to be able to compare the values returned by <netui-data:getData>tag against
another variable (which is also implemented as <netui-data:getData>).
I have something as below :-
<netui-data:getData resultId="variableA" value="{container.item.value}"/>
<netui-data:getData resultId="variableB" value="{request.variableB}"/>
<logic:equal value="variableB" name="variableA" > A equals B
</logic:equal>
I am trying to the use the struts <logic:equal> tag but I am not sureas
to how
to compare the two variables . I can easily compare variableA witha
constant
like "apples" as mentioned below :-
<logic:equal value="apples" name="variableA" > A equals apples
</logic:equal>
But my requirements are I need to compare the two variables . How doI do
that
using the NetUI tags or struts tags ??
Thanks
Kar

Similar Messages

  • Netui-data:getData no populating pageContext attribute in portlet

    I am attempting to create several pageContext attributes in a page flow and I'm having issues. When I test the page flow itself it works like a charm. But when I generate a portlet based on the same page flow netui-data does not populate the pageContext attribute.
    My code is pasted below. Any help would be greatly appreciated, pulling my hair out.
    <%@ page language="java" contentType="image/gif"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui-data:getData resultId="imageByteArray" value="{pageFlow.img.TnImage}"/>
    <netui-data:getData resultId="mimeType" value="{pageFlow.img.TnMimeType}"/>
    <%
    Enumeration e1 = pageContext.getAttributeNamesInScope(1);
    while (e1.hasMoreElements())
    System.out.println("pageContext attributtes: " + e1.nextElement().toString());
    request.setAttribute("byArr", pageContext.getAttribute("imageByteArray"));
    request.setAttribute("mimeType", pageContext.getAttribute("mimeType"));
    request.setAttribute("tiny", "tim");
    Enumeration e = request.getAttributeNames();
    while (e.hasMoreElements())
    System.out.println("request attributtes: " + e.nextElement().toString());
    %>
    <jsp:forward page="/showImage" />

    Personally, I have had a hard time doing what you are asking for using netui tags. I have had the same case, and asked the person in my team to just return a collection of value objects and then iterate through it without the repeater tag. To use the checkbox, I have had to use a String[].
              Kunal

  • Problem with netui:data repeater tag

    Hi,
    I have 10 checkboxes in a form. It is represented as array of boolean in the form.
    The form and the checkbox values are initialised in the JPF class. Using repeater
    tag to display the checkboxes.
    When the user clicks on first check box, all other check boxes should be selected.
    Need to do this with client side validation.
    Can someone tell me how to do this?

    Hi kunal,
    Thanks for your immediate response.
    But, if I use , I am getting an saying that the file does not exist.
    I have included your code, can you check it. Also, I just want the link to be displayed, not the values that I am getting through the netui-data:repeaterItem tag. Can you please help me.
    I am attaching my code here:
    <netui-data:repeater dataSource="{pageFlow.results2}">
    <netui-data:repeaterHeader></netui-data:repeaterHeader>
    <netui-data:repeaterItem >
    <netui:label value="{container.item.title}" defaultValue=" " ></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterItem>
    <netui:label value="{container.item.link}" defaultValue=" " ></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterItem>
    <netui:label value="{container.item.title}" defaultValue=" "></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></ol></netui-data:repeaterFooter>
    </netui-data:repeater>
    Thanks,
    Latha

  • How to Display string array in jsp page using netui-data:repeater tag ??

    hi,
    I am trying to display a string array in a table using the netui-data:repeater tag.
    I have to use a page flow controller Array(1 Dimensional) to be displayed in the jsp.
    Can any one tell me how to print the array in a table of 3rows & 5 columns.
    Here is the code on which I am crrently working on.
    <netui-data:repeater dataSource="{pageFlow.strWorkObject_Array}">
    <netui-data:repeaterHeader>
    <table cellpadding="4" border="1" class="tablebody">
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item}" >
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter>
    </table>
    </netui-data:repeaterFooter>
    </netui-data:repeater>

    weblogic.developer.interest.workshop
    Mansoor Naseem wrote:
    I would like to know where the pageflow newsgroup is.
    These are all the groups in weblogic.developer.interest:
    weblogic.developer.interest.60beta.* (5 groups) weblogic.developer.interest.management
    weblogic.developer.interest.61beta.* (2 groups) weblogic.developer.interest.misc
    weblogic.developer.interest.clustering.* (1 group) weblogic.developer.interest.performance
    weblogic.developer.interest.commerce weblogic.developer.interest.personalization
    weblogic.developer.interest.ejb.* (3 groups) weblogic.developer.interest.portal
    weblogic.developer.interest.environment weblogic.developer.interest.rmi-iiop
    weblogic.developer.interest.jdbc weblogic.developer.interest.security
    weblogic.developer.interest.jms weblogic.developer.interest.servlet
    weblogic.developer.interest.jndi weblogic.developer.interest.tools
    weblogic.developer.interest.jsp weblogic.developer.interest.weblogicenterprise
    MN

  • netui-data:repeater tag

    Hi,
    I am using <netui-data:repeater> tag to display array of object.
    This array has 20 elements and I am displaying only 5 elements at one time and
    providing next and previous button to the user.
    Can I specify the starting index and the end index in repeater tag so that I
    display
    the processing array object values in my repeater tag.

    Tim,
    I had a similar issue and I could not find a way via the start index and end index
    as you would expect.
    However, what you can do is write a method in your JPF and access it via <netui-data:choiceMethod...>
    tag.Disdavntage being the repeater tag would still loop through rthe entire set,
    but would display only what you want.
    <netui-data:repeaterItem>
    <netui-data:choiceMethod object="{pageFlow}" method="isLineCounterMaxed">
    <netui-data:methodParameter value="{container.index}"/>
    <netui-data:methodParameter value="{pageContext.lastLineNumber}"/>
    </netui-data:choiceMethod>
    <netui-data:choice value="true">
    ........DIsplay Your Data Here.......
    </netui-data:choice >
    </netui-data:repeaterItem>
    Thanks
    Rishi
    "Tim" <[email protected]> wrote:
    >
    Hi,
    I am using <netui-data:repeater> tag to display array of object.
    This array has 20 elements and I am displaying only 5 elements at one
    time and
    providing next and previous button to the user.
    Can I specify the starting index and the end index in repeater tag so
    that I
    display
    the processing array object values in my repeater tag.

  • Netui-data repeater tag question

    Hi,
    I am using netui-data:repeater tag to iterate through the results. I am adding a small code snippet:
    <netui-data:repeater dataSource="{pageFlow.results2}">
    <netui-data:repeaterItem>
    <netui:label value="{container.item.title}" defaultValue=" " ></netui:label>
    <netui:label value="{container.item.link}" defaultValue=" " ></netui:label>
    </netui-data:repeaterItem>
    Once, I get the link and the title, I want to construct a href, using the above values. Can anyone tell me how this can be done.
    Thanks,
    Latha

    Hi kunal,
    Thanks for your immediate response.
    But, if I use , I am getting an saying that the file does not exist.
    I have included your code, can you check it. Also, I just want the link to be displayed, not the values that I am getting through the netui-data:repeaterItem tag. Can you please help me.
    I am attaching my code here:
    <netui-data:repeater dataSource="{pageFlow.results2}">
    <netui-data:repeaterHeader></netui-data:repeaterHeader>
    <netui-data:repeaterItem >
    <netui:label value="{container.item.title}" defaultValue=" " ></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterItem>
    <netui:label value="{container.item.link}" defaultValue=" " ></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterItem>
    <netui:label value="{container.item.title}" defaultValue=" "></netui:label>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></ol></netui-data:repeaterFooter>
    </netui-data:repeater>
    Thanks,
    Latha

  • Display string array in a table using netui-data:repeater tags

    hi,
    I am trying to display a string array in a table using the netui-data:repeater tag.
    I have to use a page flow controller Array(1 Dimensional) to be displayed in the jsp.
    Can any one tell me how to print the array in a table of 3rows & 5 columns.
    Here is the code on which I am crrently working on.
    <netui-data:repeater dataSource="{pageFlow.strWorkObject_Array}">
    <netui-data:repeaterHeader>
    <table cellpadding="4" border="1" class="tablebody">
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item}" >
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter>
    </table>
    </netui-data:repeaterFooter>
    </netui-data:repeater>

    weblogic.developer.interest.workshop
    Mansoor Naseem wrote:
    I would like to know where the pageflow newsgroup is.
    These are all the groups in weblogic.developer.interest:
    weblogic.developer.interest.60beta.* (5 groups) weblogic.developer.interest.management
    weblogic.developer.interest.61beta.* (2 groups) weblogic.developer.interest.misc
    weblogic.developer.interest.clustering.* (1 group) weblogic.developer.interest.performance
    weblogic.developer.interest.commerce weblogic.developer.interest.personalization
    weblogic.developer.interest.ejb.* (3 groups) weblogic.developer.interest.portal
    weblogic.developer.interest.environment weblogic.developer.interest.rmi-iiop
    weblogic.developer.interest.jdbc weblogic.developer.interest.security
    weblogic.developer.interest.jms weblogic.developer.interest.servlet
    weblogic.developer.interest.jndi weblogic.developer.interest.tools
    weblogic.developer.interest.jsp weblogic.developer.interest.weblogicenterprise
    MN

  • Netui:data-CallMethod tag

    I have a question regarding this tag...
    <netui-data:callMethod
    object="{pageFlow}"
    method="hello"
    resultId="helloMessage"
    />
    How do I specify which pageFlow to call the method on?
    Thanks
    Kunal

    Hi,
    As per my knowledge u cannot specify other page flow.Only the JPF by which it is called will be called.
    thanks
    prasanth

  • Netui-data:repeater tag error

    hi ,
    While using the netui repeater tag and am getting this
    ERROR [11:45:10] (Logger.java:190) - Caught exception when evaluating expression
    "{container.item.id}" with available binding contexts [actionForm, pageFlow, gl
    obalApp, request, session, appication, pageContext, bundle, container, url, page
    Input]. Root cause: com.bea.wlw.netui.script.xscript.UnsupportedContextOperation
    Exception: A java.util.List types can not be indexed with a String with value "id"
    any ideas why ? also the same code works elsewhere

    hi there,
    Its been resolved now , was a code error , it was actually using the wrong object.
    thanks anyways

  • Prob in accessing DataSourece value from netui-data:repeater after submit

    HI all,
              I am new to this WLWS. PLease guide me in the following scenario:
              I am retrieving an array of records (activityDetails[]) from a Db control and setting this to the datasource property of a netui-data:repeater. Basically I am populating a list of records in my jsp page which works fine.
              But When a submit the page, I am not able to access that array of records from the action method difined in my controller.jpf file, even though I have declared the array in the Form bean.
              And I am not sure if have set the proper datasource for the checkBox defined within the records. The purpose of this checkbox is to select the records form the list to be saved in the database. Is there any better way of achieving the same.
              It's throwing Null pointer exception in the method called
              doProcess.
              Here is the related code:
              activities.jsp
              <netui:button type="submit" tagId="btnSave" value="Save" styleClass="btn" action="doProcess"/>
              <netui:button tagId="btnPrint" value="Print" styleClass="btn" onClick="doPrint()"/>
                                       </td>
                                  </tr>
              <netui-data:repeater dataSource="{actionForm.activityDetails}" >
              <netui-data:getData resultId="pkg" value="{container.item.pkg_header_id}" />
              <tr bordercolor="#A8A8A8" >
              <%
              if (pageContext.getAttribute("pkg") == null)
              %>
              <td><netui:content value=" "/></td>
              <%
              else
              %>
              <td><netui:checkBox dataSource="{container.item.activity_id}"/>
              <%
              %>
              <td><netui:content value="{container.item.prt_no}"/> </td>
              <td><netui:content value="{container.item.activity_num}"/> </td>
              <td><netui:content value="{container.item.frc_acct_code}"/> </td>
              <td><netui:content value="{container.item.frc_acct_code}"/> </td>
              <td><netui:content value="{container.item.status_code}"/> </td>
              <td><netui:content value="{container.item.location_code}"/> </td>
              <td><netui:content value="{container.item.task_code}"/> </td>
              <td><netui:content value=" "/> </td>
              <td><netui:content value="{container.item.wpid}"/> </td>
              <td><netui:content value="{container.item.original_qty}"/> </td>
              <td><netui:content value="{container.item.act_obj_hrs}"/> </td>
              <td><netui:content value="{container.item.act_actual_hrs}"/> </td>
              <td><netui:content value="{container.item.act_rmng_hrs}"/> </td>
              <td><netui:content value="{container.item.act_rmrk}"/> </td>
              </tr>
              </netui-data:repeater>
              </table>
              </netui:form>
              </netui-template:section>
              </netui-template:template>
              Here is the .jpf file
              public class VSchedController extends PageFlowController
              * @common:control
              private custom.ConstSched constSched;
              private ActivityDetails[] activityDetails;
              * @jpf:action
              * @jpf:forward name="index" path="index.jsp"
              * @jpf:forward name = "success" path = "packageActivities.jsp"
              protected Forward begin(PackageSchedForm form) throws SQLException
              HttpSession s = getRequest().getSession(false);
              int jobID = (s.getAttribute("JOB_ID") != null) ? Integer.parseInt(s.getAttribute("JOB_ID").toString()) : 0;
              if (jobID == 0) jobID = 6;
              setActivityDetails(constSched.getAllActivities(jobID));
              form.setActivityDetails(activityDetails);
              return new Forward("success");
              * @jpf:action
              * @jpf:forward name="success" path="packageActivities.jsp"
              protected Forward doProcess(PackageSchedForm form) throws SQLException
              System.out.println("----------------------------------------");
              System.out.println("ActivityDetails is null ? " + (form.activityDetails == null));
              for(int i=0; i < 6; i++)
              try
              System.out.println("Checked -> " + form.activityDetails.activity_id);
              catch(Exception e)
              System.out.println(i);
              System.out.println("----------------------------------------");
              return new Forward("success");
              public ActivityDetails[] getActivityDetails()
              return this.activityDetails;
              public void setActivityDetails(ActivityDetails[] activityDetails)
              this.activityDetails = activityDetails;
              * FormData get and set methods may be overwritten by the Form Bean editor.
              public static class PackageSchedForm extends FormData
              private ActivityDetails[] activityDetails;
              public ActivityDetails[] getActivityDetails()
              return this.activityDetails;
              public void setActivityDetails(ActivityDetails[] activityDetails)
              this.activityDetails = activityDetails;

    Personally, I have had a hard time doing what you are asking for using netui tags. I have had the same case, and asked the person in my team to just return a collection of value objects and then iterate through it without the repeater tag. To use the checkbox, I have had to use a String[].
              Kunal

  • netui-data:pager action to dynamically fetch rows

    Hi,
    How can I configure a data grid pager to dynamically fetch new rows when a user swap pages through the pager?
    I know I can fetch all my rows to a collection / array before rendering the datagrid and set the pager to iterate over it like this:
    [Controller]
    private List<Ride> rides;
    public List<Ride> getRides() {
         return rides;
    [Action]
    rides = rideDBControl.getAllRides(); // huge amount of data
    return forward;
    [JSP]
         <div style="border-width:2px;"><netui-data:dataGrid name="currentRidesGrid" dataSource="pageFlow.rides">
              <netui-data:configurePager pagerFormat="prevNext" pageSize="${pageSize}" />
              <netui-data:header>
                   <netui-data:headerCell headerText="Name" />
                   <netui-data:headerCell headerText="Description" />
              </netui-data:header>
              <netui-data:rows>
                   <netui-data:spanCell value="${container.item.name}" style="background-color: #f0f0f0;font-size:14pt;">
                   </netui-data:spanCell>
                   <netui-data:spanCell value="${container.item.description}">
                   </netui-data:spanCell>
              </netui-data:rows>
         </netui-data:dataGrid></div>
    But how can I make the pager call a method to update the contents of the collection "rides" according to the current selected page and page size? And how can I obtain the current page and page size inside that method?
    I want to paginate queries that may return a huge amount of data (1m + rows), so, fetching all rows at once is impracticable. What I want to do is propagate the current page and page size from the pager to a method that will update the current collection according to a query such as:
    Select X, Y, Z
    From Table
    Where ...
    And ROWNUM BETWEEN page * pageSize AND (page + 1) * pageSize
    Can anyone help a noob?

    For further reference I've found the answer by myself.
    To dynamically fetch rows you need to modify the <netui-data:configurePager> tag and include both a pageAction and partialDataSet attributes, e.g.:
    <netui-data:configurePager pagerFormat="prevNext" pageSize="${pageSize}" pageAction="pagination" partialDataSet="true" />
    Within the pagination action you can obtain the current row and page size from a PagerModel object. You can then update the dataSource (just remember to call the setDataSetSize providing the length of the full dataset so that the pager displays the correct amount of pages), e.g.:
    @Jpf.Action(forwards = { @Jpf.Forward(name = "success", navigateTo = Jpf.NavigateTo.currentPage) })
         public Forward pagination() {
              DataGridStateFactory dataGridStateFactory = DataGridStateFactory
                        .getInstance(getRequest());
    // Gets the pagerModel object for the grid
              PagerModel pagerModel = dataGridStateFactory.getDataGridState(
                        "currentRidesGrid").getPagerModel();
    // => Code to get the entire dataSource size <=
              pagerModel.setDataSetSize(dataSourceSize);
              // Obtain the first row and page size from the model
              int firstRow = pagerModel.getRow();
              int pageSize = pagerModel.getPageSize();
              // => Code to fetch the rows to be displayed <=
              rides = pageRides;
              Forward forward = new Forward("success");
              return forward;
    I hope this helps.
    Cheers

  • Alternating row colors inside netui-data:repeater?

    Is there an easy way to make the row colors alternate inside the netui-data:repeater?
    I am looking for somthing similar to what happens with the netui-data:grid tag.
    A code sample maybe?
    Thanks,
    John

    Hi John,
    This article might help:
    http://dev2dev.bea.com/products/wlworkshop81/articles/repeater.jsp
    "John Hundley" <[email protected]> wrote:
    >
    Is there an easy way to make the row colors alternate inside the netui-data:repeater?
    I am looking for somthing similar to what happens with the netui-data:grid
    tag.
    A code sample maybe?
    Thanks,
    John

  • CheckBoxGroup, checkBoxOption and netui-data:repeater

    Greetings,
    How can I have multiple options (<netui:checkBoxOption>) inside a checkbox group (<netui:checkBoxGroup>) dinamycally, using netui tags?
    CheckBoxOption doesn't allow using another tag like <netui-data:repeater> as it's parent.
    I really appreciate any help.
    Mariano

    Tim,
    I had a similar issue and I could not find a way via the start index and end index
    as you would expect.
    However, what you can do is write a method in your JPF and access it via <netui-data:choiceMethod...>
    tag.Disdavntage being the repeater tag would still loop through rthe entire set,
    but would display only what you want.
    <netui-data:repeaterItem>
    <netui-data:choiceMethod object="{pageFlow}" method="isLineCounterMaxed">
    <netui-data:methodParameter value="{container.index}"/>
    <netui-data:methodParameter value="{pageContext.lastLineNumber}"/>
    </netui-data:choiceMethod>
    <netui-data:choice value="true">
    ........DIsplay Your Data Here.......
    </netui-data:choice >
    </netui-data:repeaterItem>
    Thanks
    Rishi
    "Tim" <[email protected]> wrote:
    >
    Hi,
    I am using <netui-data:repeater> tag to display array of object.
    This array has 20 elements and I am displaying only 5 elements at one
    time and
    providing next and previous button to the user.
    Can I specify the starting index and the end index in repeater tag so
    that I
    display
    the processing array object values in my repeater tag.

  • netui-data:anchorColumn

    Guys and Gals -
    I need the url generated by the netui-data:anchorColumn tag (that is used with
    rowsets for a grid layout) to open in a new window. How do I do this?
    Thanks
    Rishi

    Rishi--
    Please see the thread:
    Re: Confirmation dialog w/netui:anchor and netui-data:anchorColumn
    in weblogic.developer.interest.workshop.
    The short answer is that it's somewhat possible, but support for
    JavaScript in the grid is pretty limited in 8.1.
    Hope that helps.
    Eddie
    Rishi Vishi wrote:
    Guys and Gals -
    I need the url generated by the netui-data:anchorColumn tag (that is used with
    rowsets for a grid layout) to open in a new window. How do I do this?
    Thanks
    Rishi

  • Diplaying messages using netui-data:declareBundle

    I need to display error messages in a error page
    based on an error code set in the request object in the jpf. I have defined the error messages in a property file
    ( errorMessages.properties in WEB-INF/classes) and used
    the <netui-data:declareBundle> tag to display the messages.
    <netui-data:declareBundle name="firstPort" bundlePath="resources"/>
    <netui:label value="{bundle.firstPort['{request.errorCode}']}"/>
    But it does not work. Can anyone let me know
    as to how can I get this working?

    Hi hebbark,
    Have you tried like this ?
    <netui:label value='{bundle.firstPort["{request.errorcode}"]}'/>
    <netui:label value="{bundle.someMessages[\"{request.errorcode}\"]}"/>
    ---Anilkumar kari

Maybe you are looking for