How do you expand items in a list of items in jsp page

I have this list of task items being retrieved from the data from master table:
     <%
     List taskList = (List) request.getAttribute("searchresult");
     if (searchresultList.size() != 0) { 
     for (Iterator itr=searchresultList.iterator(); itr.hasNext(); )
          TaskList  workList =
        (taskList )itr.next();
     %>     
     <tr>
          <td>
                 <a href="/taskItemDetail.do?itemId=<%=taskList.getId()%>" >
                <%=taskkList.getId()%></a>
          </td>
          <td><%=taskList.getTask()%></td>
          <td><%=taskList.getDate()%></td>
     </tr>
<%}%>
now when I click on the above link I want to be able to get the detail for that item from
the detail table and want to be able to show it inbetween the other master tables results.
Kind of like when you expand an item in windows folders by clicking the plus sign (+).

Basically you have two choices. You can include the whole, expanded list in your HTML, and use Javascript on the client side to fold and unfold sections, or you can maintain a list of folded items in your web app, and have transactions which alter this list and return an appropriate new page.
Remember, JSPs are not interactive. All they do is generate HTML.
Ideally, store the folding state on the page (e.g. encoded into a hidden field). You could put it in Session, but then if you have two browser windows open on the same browser windows can interfere with one another.

Similar Messages

  • .How can I add data from one list to other in Jsp Page

    Hi..I have three multiple selection ListBox..I want to add the selected item from 2 list boxes to 3rd list box how can i do that..do i need to write javascript? If possible then suggest me some link where i can get help?
    Thanks
    Regards
    Chintan

    Yep, Javascript.
    Unless you want to post the data to the server and then rewrite the page (ie. jsp/servlets) then you are going to need to use a client side script to modify the page.
    Javascript. You need to get the onClick() event of one list box and get the item that was clicked. then you can rewrite the 3rd list box.
    If possible, try doing a search on google. Or do you want someone to hold your hand.

  • How do you specifically let the Itemlistener know which Item was selected..

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    getSelectedItem()

  • How do you specifically let an Itemlistener know which Item was selected?

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    Hi,
    Try this method
    String[] petStrings = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };
    JComboBox petList = new JComboBox(petStrings);
    if ( petStrings[0]==(String)petList.getSelectedItem() )
    System.out.println("I'm a bird");
    }else{

  • How do you highlight iHelp Buttons and List Applet fields

    How do you highlight iHelp Buttons and List Applet fields? I've followed all the steps in the Bookshelf but it seems like buttons and list applet fields do not highlight. The highlight feature only seems to work in form applets. Is this a known issue? Are there workarounds for this?
    Thanks
    Bernhard
    Edited by: Bernhard on Dec 12, 2011 2:06 PM

    Bernhard
    I remember that colors of single list applet fields cannot be changed, since the whole list is regarded as one "control" itself. It works for single fields in form applets (as you said) but not in list applets. There is a document in MyOracleSupport pointing this out, but at the moment I can't find it.
    Regarding iHelp Buttons I have no idea.

  • How do you setup an email distribution list on an iPad?

    How do you setup an email distribution list on an ipad?

    Although you could create a contact group with your distribution list on icloud.com, you couldn't select the group to email to.  To email a group of contacts (as well as create contact groups) you would need to use an app like Speed Names.

  • How to add SharePoint 2013 Promoted link list view web part in page programatically with Tiles view using CSOM.

    How to add SharePoint 2013 Promoted link list view web part in page programatically with Tiles view using CSOM. I found that it can be
    done by using XsltListViewWebPart class but how can I use this one by using shraepoint client api.
    shiv

    Nice, can you point me to the solution please ?
    I'm  trying to do this but I get an error : 
    Web Part Error: Cannot complete this action. Please try again. Correlation ID: blablabla
    StackTrace:    at Microsoft.SharePoint.SPViewCollection.EnsureViewSchema(Boolean fullBlownSchema, Boolean bNeedInitallViews)     at Microsoft.SharePoint.SPList.GetView(Guid viewGuid)   
    All help really appreciated.

  • HT4641 How do you copy and paste text from a website to a pages document please. I could do this on my old ipad but not with ipad air  thank you

    How do you copy and paste text from a website to a Pages document please. I could do this from my old ipad but not from ipad air. Thank you

    Welcome to the Apple Community.
    Why what happens when you try.

  • How do I Display a string from a servlet into a JSP Page???? NEED HELP!!!!

    Hi guys,
    How do I Display a string from a servlet into a JSP Page...
    Ive tried so many bloody things!.....
    Simply.
    I get text from JSP. The servlet does what ever it does to the string.
    Now. Ive create sessions and bean things,.... how the hell do I display it in a text box... I can display on the screen.. but not in the text box.!!!
    please help!!!

    hmmm, I dont really like using JSP programming, u should be using JAVA..
    the way to do it is:
    Call and cast to the bean like this:
    <%@ page import="beans.*" %>
    <% //cast to bean get request create object
    userNameBean u= (userNameBean) request.getSession().getAttribute("userNameBean");
    then... all you do is call it like this:
    <input type="text" name="firstName" value="<%= u != null? u.getFirstName(): "" %>">
    this is the real programmers way,,,
    chet.~

  • How can i get more than 1000 items in Custom List Displaying Items?

    http://.....sites/_vti_bin/listdata.svc/AddressBook(List) allows 1000 items Only my AddressBook List, but i have more than 1000 items in my AddressBook list. I want to get items
    from AddressBook list and bind in another place using Autocomplete method like this.
    =======>>>>listurl=http://.....sites/_vti_bin/listdata.svc/AddressBook.
    and my coding in camel like below
    protected void btnpopulatedetails_Click(object sender, EventArgs e)
    SPSite objSite = SPContext.Current.Site;
    SPWeb objWeb = objSite.OpenWeb();
    objWeb.AllowUnsafeUpdates = true;
    SPList list = objWeb.Lists["Address Book"];
    SPQuery query = new SPQuery();
    query.QueryThrottleMode = SPQueryThrottleOption.Override;
    query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + txtcustomer.Value + "</Value></Eq></Where>";
    query.RowLimit = 500;
    SPListItemCollection items = list.GetItems(query);
    function fnCustomerSearchBind() {
    if ($("input[id$='txtcustomer']").length != 0) {
    var collcustomer = searchCustomers('', urlTo, fieldto);
    $("input[id$='txtcustomer']").autocomplete({
    source: collcustomer,
    //maxLength:10,
    select: function (event, ui) {
    //debugger;
    event.preventDefault();
    $("input[id$='txtcustomer']").val(ui.item.value);
    $("input[id$='btnpopulatedetails']").click();
    return false;
    minLength: 0,
    function searchCustomers(value, listurl, fieldto) {
    var collcus = new Array();
    var custresults;
    var url =listurl + "?$filter=startswith('" + fieldto + "','" + value + "')";
    //debugger;
    $.ajax({
    cache: true,
    type: "GET",
    async:false,
    dataType: "json",
    url: url,
    success: function (data) {
    custresults = data.d.results;
    //alert(listurl);
    // alert(data.d.results);
    for (var x = 0; x < custresults.length; x++) {
    //alert(custresults[x]['To']);
    collcustList.push(custresults[x]['To']);
    //debugger;
    //debugger;
    return collcustList;
    In my research listurl=http://.....sites/_vti_bin/listdata.svc/AddressBook has 1000 items in 1st Page by default, So how to change 1st Page by default to All Pages through
    code. I think you understand my environment by look above coding, if you don't I am using office 365 sandbox solution. One more thing i know through my research Pages can be change by using Ado.Net Data Service, i tried this one but this one support windows
    server 2008 r2 only but i am using Windows Server 2012 r2. Please help me if you know the answer.

    Hi,
    Here is a blog would be helpful:
    ADO.NET Data Services returns 1000 items
    https://gilleslauwers.wordpress.com/2010/12/08/ado-net-data-services-returns-1000-items/
    Best Regards,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • ADF mobile: how to link task flow to a list view item

    Hi
    I am trying to build a mobile app in adf and i created a popup on the left button on the header. this popup has a list view showing few options.
    now the requirement is to click on the option and navigate to that feature (which is created as a task flow).
    so, i am not sure how do like the task flow to the link in the listView of the popup. Please advise

    Well, if that list contains all features, you can use the 'features' from the ApplicationFeatures DC (they contain the ID, name, ... so you can use #{row.id} instead of hardcoding it).
    If that list does only contain a few features, you can make your own list.
    In your own backing bean or data control, you can get all the features by using:
            ApplicationFeatures af = new ApplicationFeatures();
            af.getFeatures();And filter them.
    An example that I made/use myself:
    It uses an commandLink to navigate because I need to be able to 'disable' (= not clickable) some features (it has the same look as an ListView).
    So iff just use the getFeatures(), you can use the ListView for navigation.
    <amx:iterator var="row" value="#{bindings.features.collectionModel}" id="i1">   
            <amx:tableLayout width="100%" id="tl2" inlineStyle="background-color:White;">
              <amx:rowLayout id="rl2">
                <amx:cellFormat width="50px" height="50px" halign="center" id="cf4" valign="middle"
                                inlineStyle="border-bottom:thin solid #b8b9c8;">
                  <amx:image source="#{row.icon}" id="i2" inlineStyle="width:40px;"/>
                </amx:cellFormat>
                <amx:cellFormat width="100%"  height="43px" id="cf3" valign="middle"
                                inlineStyle="border-bottom:thin solid #b8b9c8;">
                  <amx:commandLink text="#{row.name}" id="cl1" inlineStyle="color:Black; font-weight:bolder; font-size:110%;"
                                   disabled="#{!row.enable}">
                    <amx:setPropertyListener from="#{row.id}" to="#{pageFlowScope.feature}" />
                    <amx:actionListener binding="#{bindings.resetFeature.execute}"/>
                  </amx:commandLink>
                </amx:cellFormat>
              </amx:rowLayout>
            </amx:tableLayout>
          </amx:iterator>This my own data control :
    public class MenuDC {
        private ExtendedFeatureInformation[] features;
        private String message;
        public MenuDC() {
        public ExtendedFeatureInformation[] getFeatures()
            ApplicationFeatures af = new ApplicationFeatures();
            this.fillExtendedFeatureList(af.getFeatures());
            return features;
        private void fillExtendedFeatureList(FeatureInformation[] realFeatures)
            message = "";
            ModelController.getSingletonModelController().refreshMinorTables();
            features = new ExtendedFeatureInformation[realFeatures.length];
            for(int i = 0; i < realFeatures.length; i++) 
                boolean enable = true;
                FeatureInformation fi = realFeatures;
    if(fi.getId().equals("be.kpd.newDayReport"))
    if(ModelController.getSingletonModelController().getVarFormLocalDB(HardcodedVarCodes.LAST_SYNC).equals(""))
    enable = false;
    if(fi.getId().equals("be.kpd.overviewDayReport"))
    if(ModelController.getSingletonModelController().getRegisDFromLastSevenDays().size() == 0)
    enable = false;
    if(!enable)
    message = "SYNC_NEEDED";
    ExtendedFeatureInformation efi = new ExtendedFeatureInformation(fi.getId(),fi.getName(),fi.getIcon(),fi.getImage(),enable);
    features[i] = efi;
    public String getMessage() {
    return message;
    I made my own POJO which implements the FeatureInformation interface,
    because I needed an extra boolean attribute for disabling some features.
    public class ExtendedFeatureInformation implements FeatureInformation {
        private String id,name,icon,image;
        private boolean enable;
        public ExtendedFeatureInformation() {
            super();
        public ExtendedFeatureInformation(String id, String name, String icon, String image, boolean enable) {
            super();
            this.id = id;
            this.name = name;
            this.icon = icon;
            this.image = image;
            this.enable = enable;
        public String getId() {
            return id;
        public String getName() {
            return name;
        public String getIcon() {
            return icon;
        public String getImage() {
            return image;
        public boolean isEnable() {
            return enable;

  • How do you see your Ipod track list in Itunes 7???

    When you connect your Ipod to Itunes 7 all it shows is a summary page and not the track list.
    How to you see the tracks on your Ipod manually???

    iPod: How to find the serial number
    Also if you go to iTunes>Preferences>Devices and hover the mouse pointer over the iPod backup the SN will pop up.

  • How would you limit the number of Web App items a user can enter.

    I am creating a web app where people can list objects/items. I want to offer plans that will enable users to enter up to a predefined number of entries and no more than what they paid to enter. They can then come back as often as they wish during their subscription period to update, create, and/or delete entries ( but again, never more than what thier subscription entitles them ).
    Fore sake of illustration.
    User Plan 1 entitles user to enter 1 web app item,
    while
    User Plan 2 entitle user to enter 3 web app items, and
    User Plan 3 entitles user to enter 5 web app items.
    These are annual plans.
    Any ideas?

    Hi,
    As per your query you can not define to any user for schedule selected background jobs. I hope you are clear for this.
    Anil

  • How do you maintain multiple device music lists from 1 computer?

    How do you maintain different music lists on separate devices to be synched from one computer? Is it best to establish multiple ID's?

    I would just make playlists.

  • How Can i display a checkbox with list of items

    Hi All,
            How can i include a check box beside the list of items in a combo box/list box
    Here is the requirement which i need to display
    i need to do above requirement. i have to display the check boxes  beside the each item.
    i can show the list of items but unable to show the check boxes.
    Can any one help me regarding this.
    Thanks in advance
    Raghu

    Hope this can help u
    <mx:ComboBox id="cmbtheme" labelField="id" width="30" dropdownWidth="100">
      <mx:itemRenderer>
       <mx:Component>
        <mx:HBox horizontalGap="0">
         <mx:CheckBox id="{data.Nid}" label="{data.label}"/>     
        </mx:HBox>
       </mx:Component>
      </mx:itemRenderer>
    </mx:ComboBox>
    Regards,
    Kapil Arora

Maybe you are looking for

  • Date and Time Formatting

    I'd like to parse out the year and month from a modified date from a file. I can get the the full date time string but is there an easy way to get only what I need? I also need single digits padded with a 0. (i.e. 01 vs just 1) The returned string is

  • Photos with numbers and titles.

    I have transferred folders of photos from my PC to my iPad and found that the order of the images the Album has changed despite the fact that they were numbered in the original file folder.   Also on iPad Albums they loose any titles. What I would re

  • Max amount of recipients in to: entry

    Hi Is there a maximum amount of recipients in the to:entry that oes is accepting? Or maybe a maximum lenth? Regards Christian Bretting

  • Ftp connection problem with cs5.5

    Hi,    I am jsut starting to use the Dreamweaver part of CS5.5 after upgrading from CS4. I have been trying to access my previous web sites using ftp as I have done before. The pop up window asks for the ftp address which is ftp.sonic.net/pub/users/u

  • I have made a programme in word on my window pc. the data is copied to my ext.hd.

    On my ext.hd I have copied a program from word from my window-pc. when I open this program on my iMac it will not open. it shows the right name of the program but also the title in the pictogram "exec"". how can I open this correctly?