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
Similar Messages
-
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 -
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,
LathaHi 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 -
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 -
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 elsewherehi there,
Its been resolved now , was a code error , it was actually using the wrong object.
thanks anyways -
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.
MarianoTim,
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. -
Workshop 8.1 - netui-data:repeater and netui:checkBox
Hi everybody.
How can i use netui-data:repeater and netui:checkBox to build a group of checkboxes ? I need something like Struts "indexed and mapped properties" (http://struts.apache.org/struts-doc-1.1/faqs/indexedprops.html)
I've tried something like this
== FORM ==
public List getSearchResult() {
return searchResult;
public void setSearchResult(List searchResult) {
this.searchResult = searchResult;
}== JSP ==
<<netui-data:repeater dataSource="{actionForm.searchResult}">>
<<tr bgcolor="#ffffff" class="text8b">>
<<td>><<netui:checkBox dataSource="{container.item.selected}" />><</td>><</tr>>
<</netui-data:repeater>>
I can see the values inside this page but when i submit this form, my list is empty (null).
What is the right way of do it ?
Thanks in advance.Hi Daniel
There are 2 ways you can acheive this.
1) Using something called Pageflowscoped form for this. This will let you use arrays for checkbox group.
The main part will be that you need to define a member varaible of the form at the pageflow level there by the data will not be lost
2) Using Request scoped form like you have now but need to modify the getter method to populate the "searchResult" object.
public List getSearchResult() {
if( null == searchResult){
System.out.println(" Pouplate the searchResult here. ");
searchResult= new ArrayList();
//populate the default values.
return this.searchResult;
More info at:
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conReqScopedVsPageScopedBean.html
I have a sample with pageflowscoped bean and requestscoped bean that I can send you if you provide your email address.
Unfortunately we cannot attach files in the newsgroup.
Thanks
Vimala -
How can I use javascript to access netui data-repeater item?
I have a 2-dim table of <netui: checkbox> using a <netui data-repeater> to interate over a contact email (column) and an event (rows).
My problem is that I need to have a select all checkbox at the bottom of each column (per email) and be able to select all event for an email (when checked) and deselect all when the checkbox is unchecked.
I can do it in java page flow but I can't have a page refresh.
I want to do it on the page with javascript. The problem is that using
document[getNetuiTagName("aform", this)][getNetuiTagName("email1", this)].checked
with the "tagId" in each <netui> tag I can't access each iteration of the data repeater (I only get the last one).
What I need is a reference to each repeater element. I do not know how many rows or columns I will have (based on the data).
Is there any way to reference the obeject itself in javascript so I can loop through the items in the netui data-repeater?
This is what is rendered in the html netui mapping:
netui_names.con1="portlet_2_3wlw-checkbox_key:{actionForm.opts[4].cons[1].selContact}"
I really want to be able to access this and loop through the arrays for opts (event) and cons(email)
Here's the code:
<netui:form action="submitEvents" tagId="eform" focus="">
<table>
<tr>
<td>
<table id="eTable" cellpadding="2" cellspacing="1" border="0">
<tr bgcolor="#cccccc" class="BlackHeavy8">
<!-- <td>Selected</td> -->
<td colspan="2">Event</td>
<netui-data:repeater dataSource="{pageFlow.contacts}" defaultText="No contacts configured.">
<netui-data:repeaterHeader>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui-data:choiceMethod object="{pageFlow}" method="getAddHeader">
<netui-data:methodParameter value="{container.item.contact_icon}" />
</netui-data:choiceMethod>
<netui-data:choice value="default">
<td nowrap="true" bgcolor="#FFCCCC"><netui:image src="{container.item.contact_icon}"/>
<netui:label value="{container.item.contact_value}" defaultValue="Â "></netui:label>
</td>
</netui-data:choice>
<netui-data:choice value="blue">
<td nowrap="true" bgcolor="#D8EBFE"><netui:image src="{container.item.contact_icon}"/>
<netui:label value="{container.item.contact_value}" defaultValue="Â "></netui:label>
</td>
</netui-data:choice>
<netui-data:choice value="green">
<td nowrap="true" bgcolor="#CCFFCC"><netui:image src="{container.item.contact_icon}"/>
<netui:label value="{container.item.contact_value}" defaultValue="Â "></netui:label>
</td>
</netui-data:choice>
<netui-data:choice value="yellow">
<td nowrap="true" bgcolor="#FFFFCC"><netui:image src="{container.item.contact_icon}"/>
<netui:label value="{container.item.contact_value}" defaultValue="Â "></netui:label>
</td>
</netui-data:choice>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></netui-data:repeaterFooter>
</netui-data:repeater>
</tr>
<tr>
<td colspan="7">
<netui-data:repeater dataSource="{actionForm.opts}">
<netui-data:repeaterHeader>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui-data:choiceMethod object="{pageFlow}" method="isEvenRow">
<netui-data:methodParameter type="int" value="{container.index}" />
</netui-data:choiceMethod>
<netui-data:choice value="true">
<tr class="BlackNorm8">
<!-- <td align="center"> -->
<!-- </td> -->
<td colspan="2">
<netui:label value="{container.item.eventName}" />
<netui:hidden dataSource="{container.item.eventId}" />
</td>
<netui-data:repeater dataSource="{container.item.cons}">
<netui-data:repeaterHeader>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui-data:choiceMethod object="{pageFlow}" method="getAddHeader">
<netui-data:methodParameter value="{container.item.contact_icon}" />
</netui-data:choiceMethod>
<netui-data:choice value="default">
<td align="center" bgcolor="#FFCCCC" >
<netui:checkBox tagId="con1" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden dataSource="{container.item.contact_id}" tagId="conid1" />
</td>
</netui-data:choice>
<netui-data:choice value="blue">
<td align="center" bgcolor="#D8EBFE" >
<netui:checkBox id="con2" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden dataSource="{container.item.contact_id}" tagId="conid2" />
</td>
</netui-data:choice>
<netui-data:choice value="green">
<td align="center" bgcolor="#CCFFCC" >
<netui:checkBox tagId="con3" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden dataSource="{container.item.contact_id}" tagId="conid3" />
</td>
</netui-data:choice>
<netui-data:choice value="yellow">
<td align="center" bgcolor="#FFFFCC" >
<netui:checkBox tagId="con4" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden dataSource="{container.item.contact_id}" tagId="conid4" />
</td>
</netui-data:choice>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</netui-data:repeaterFooter>
</netui-data:repeater>
</tr>
</netui-data:choice>
<netui-data:choice value="false">
<tr class="BlackNorm8" bgcolor="#eeeeee">
<!--<td align="center">-->
<!--</td>-->
<td colspan="2">
<netui:label value="{container.item.eventName}" />
<netui:hidden dataSource="{container.item.eventId}" />
</td>
<netui-data:repeater dataSource="{container.item.cons}">
<netui-data:repeaterHeader>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui-data:choiceMethod object="{pageFlow}" method="getAddHeader">
<netui-data:methodParameter value="{container.item.contact_icon}" />
</netui-data:choiceMethod>
<netui-data:choice value="default">
<td align="center" bgcolor="#FFCCCC" >
<netui:checkBox tagId="conalt1" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden tagId="conidalt1" dataSource="{container.item.contact_id}" />
</td>
</netui-data:choice>
<netui-data:choice value="blue">
<td align="center" bgcolor="#D8EBFE" >
<netui:checkBox tagId="conalt2" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden tagId="conidalt2" dataSource="{container.item.contact_id}" />
</td>
</netui-data:choice>
<netui-data:choice value="green">
<td align="center" bgcolor="#CCFFCC" >
<netui:checkBox tagId="conalt3" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden tagId="conidalt3" dataSource="{container.item.contact_id}" />
</td>
</netui-data:choice>
<netui-data:choice value="yellow">
<td align="center" bgcolor="#FFFFCC" >
<netui:checkBox tagId="conalt4" dataSource="{container.item.selContact}" defaultValue="{container.item.selContact}" />
<netui:hidden tagId="conidalt4" dataSource="{container.item.contact_id}" />
</td>
</netui-data:choice>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</netui-data:repeaterFooter>
</netui-data:repeater>
</tr>
</netui-data:choice>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</netui-data:repeaterFooter>
</netui-data:repeater>
 </td>
</tr>
<!-- Select All Checkboxes -->
<tr bgcolor="#cccccc" class="BlackHeavy8">
<!-- <td>Selected</td> -->
<td colspan="2">Select ALL</td>
<netui-data:repeater dataSource="{pageFlow.contacts}" defaultText="Â ">
<netui-data:repeaterHeader>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<netui-data:choiceMethod object="{pageFlow}" method="getAddHeader">
<netui-data:methodParameter value="{container.item.contact_icon}" />
</netui-data:choiceMethod>
<netui-data:choice value="default">
<td align="center" nowrap="true" bgcolor="#FFCCCC">
<netui:hidden dataSource="{container.item.contact_id}" tagId="chbox1" />
<input type="checkbox" value="false"
onclick="selectAllEvents('chbox1')">Select ALL
</td>
</netui-data:choice>
<netui-data:choice value="blue">
<td align="center" nowrap="true" bgcolor="#D8EBFE">
<netui:hidden dataSource="{container.item.contact_id}" tagId="chbox2" />
<input type="checkbox" value="false"
onclick="selectAllEvents('chbox2')">Select All
</td>
</netui-data:choice>
<netui-data:choice value="green">
<td align="center" nowrap="true" bgcolor="#CCFFCC">
<netui:hidden dataSource="{container.item.contact_id}" tagId="chbox3" />
<input type="checkbox" value="false" onclick="selectAllEvents('chbox3')">Select All
</td>
</netui-data:choice>
<netui-data:choice value="yellow">
<td align="center" nowrap="true" bgcolor="#FFFFCC">
<netui:hidden dataSource="{container.item.contact_id}" tagId="chbox4" />
<input type="checkbox" value="false" onclick="selectAllEvents('chbox4')">Select All
</td>
</netui-data:choice>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></netui-data:repeaterFooter>
</netui-data:repeater>
</tr>
<!-- END Select ALL checkboxes -->
</table>
</td>
<tr align="right">
<td>
<netui:button type="submit" value="Cancel" action="begin" styleClass="BlackNorm8"></netui:button>
<netui:button value="Update" styleClass="BlackNorm8"/>
</tr>
</table>
</netui:form>hi ,
i dont know anything about delphi but from the experience from VB if the connection to oracle in delhpi doesnt recognise object type data field. Then try using OO4O drivers from oracle.if u use these drivers then u can access the sdo_geometry field !
Hope this helps
Vikesh -
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 -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
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:repeater for haspmap?
Could someone advise me how to iterate through a hashmap using netui repeater to display the keys and values on jsp page.
Here is my code:
HashMap Structure:
Key Value
Question Label List<AnswerBean>
JSP Code:
<netui-data:repeater dataSource="pageFlow.surveyForm.surveyAnswers"> // this returns the Map<QuestionText, List<AnswerBean>> , Answers contains answer Id and answer Text.
<netui-data:repeaterItem>
<netui:span value="${container.item}"/> //display the question text
<netui-data:repeater dataSource=""> // here i want to iterate through the values (List<AnswerBean>)
<netui-data:repeaterItem>
<netui:span value=""/> // here i want to display the answer (answerBean.answerText)
</netui-data:repeaterItem>
</netui-data:repeater>
</netui-data:repeaterItem>
</netui-data:repeater>Appreciate your help.
ThanksThanks Deepak for your suggestion. Now i am able to retrieve the keys from the hashmap.
Could you please advise me what is wrong with the below code to retrieve the values?
// my entry set : Set<Entry<String, Collection<SurveyAnswer>>> converted from HashMap<String, Collection<SurveyAnswer>>
<netui-data:repeater dataSource="pageFlow.surveyForm.surveyAnswers">
<netui-data:repeaterItem>
<netui:span value="${container.item.key}"/>
<netui-data:repeater dataSource="container.item.value">
<netui-data:repeaterItem>
<netui:span value="${container.container.item.surveyQuestionLabel}"/>
</netui-data:repeaterItem>
</netui-data:repeater>
</netui-data:repeaterItem>
</netui-data:repeater>
I get the below error:
javax.el.PropertyNotFoundException: The class 'java.util.HashMap$Entry' does not have the property 'surveyQuestionLabel'.
surveyQuestionLabel property does exist in SurveyAnswer. -
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
KarIt 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 -
Simple Paging with netui-data:repeater
Hello,
Does anyone have a simple paging example (code, etc) for use with the netui-data:repeater? I have seen Gerald Nunn's solution and while I got the example to work, I have been unable to get it to work with my own project. I'm afraid I just do not yet have enough skill with BEA and java. A simple example would be great.
Thanks...hi there,
Its been resolved now , was a code error , it was actually using the wrong object.
thanks anyways
Maybe you are looking for
-
Compatibility of earlier InDesign versions with Mac OS 10.6 Snow Leopard
For more than 5 years I've happily used my registered ver. of Indesign 2.0 to produce and update my two self-published books (I love it!), only to discover recently that my upgrading to Mac OS 10.6.8 (Snow Leopard) on my Intel dual-core MacMini effec
-
Cant seem to be able to get 802.1x working
Hi, I have an ESW 520 switch, and one of the reasons I bought this switch is so that I could have some piece of mind about what computers are plugged into the wired network. I was hoping to be able to manage this on the ESW 520, however configuring t
-
What is the maximum number of movies in iTunes?
Hi iTunes People, I have 4073 entries in my iTunes MOVIES library. I cannot add any more titles to the library. Is there a maximum number of movies allowed in the iTunes movie database - or what? This is not a disk space issue - it is specifically
-
Can you run a PC Synth via the PC Emulator, on a MAC Version of Logic?
Hey guys, Odd question here ... I've got OSX 10.6.4 . I have Logic Pro 9 on it. I have a PC version of Nexus however. I've heard you can run PC programs on your Mac by getting some kind of PC emulator. I think it's Flip4Mac or something? Would that b
-
When I open dark images, my iPad has this yellow like spots around the screen next to the bezel. It only happens when there is a dark screen like for instance when a YouTube video is loadeding or when I have dark pictures. Is this normal.? Or should