Struts collection question

hi friends,
I have question with struts collection. I have a colletion called chapters which contains about 10 items(strings) , i am displaying these items in jsp with iterate tag and displaying the collection items , one on each line..
now i want to place a small symbol like arrow beside eash collection item in jsp page so that when i click the symbol it should reposition the items....like if i click the symbol beside item1, then item1 should move to item2 position and item2 should move to item1 position....
Any ideas please
Sorry please tell me if i am not clear
Thanks in advance

go tru below code to display alert messsaces to the user
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
<title>
getPID
</title>
<html:javascript formName="pidAForm"/>
</head>
<body bgcolor="#ffffff">
<html:errors/>
<html:form action="/pidAction" onsubmit="return validatePidAForm(this)">
<table>
<tr>
<td><bean:message key="check.appid"/></td>
<td><html:text property="applicationID"></html:text></td>
<td><button id="btnApplication" value="choose"></button>
</td>
</tr>
<tr>
<td><bean:message key="check.projid"/></td>
<td><html:text property="projectID"></html:text></td>
<td><button id="btnProject" ></button>
</td>
</tr>
<tr>
<td><bean:message key="check.objid"/></td>
<td><html:text property="objectID"></html:text></td>
<td><button id="btnObject" ></button>
</td>
</tr>
<tr>
<td><bean:message key="check.date"/></td>
<td><html:text property="date"></html:text></td>
<td><button id="btnDate" ></button>
</td>
</tr>
<tr>
<td><html:submit value="submit"/></td>
</tr>
</table>
</html:form>
</body>
</html:html>

Similar Messages

  • Struts Interview questions

    Send Struts interview question in my mail id [email protected]

    send me struts interview questionsDumb idiots. Couldn't you read the thread?another racist?!?Another idiot. Spamming fora again?!?Sorry Maris not here now please try again later.No thanks. I'm tired os talking nonsense. :(Sorry. :(
    You do know that despite any other commentary over time this thread will balloon to 100's of posts just like 2 and 4 though right?
    <crawling behind rock again/>

  • [scjp exam] garbage collection questions

    can someone please post me some garbage collection questions + correct answers, because i've taken the SCJP test again and i didn't passed it again. A co-worker of mine also didn't passed either.
    (We both got 0% on Garbage Collection every time) And i really thought i had it correct the last time.
    So please can someone mail/post me some garbage collection questions? thanks!

    The garbage collector collects unreachable objects.
    You have no control over when the objects are
    collected, but there is a guarantee that all
    unreachable objects will be collected before an
    OutOfMemoryError is thorwn.Exactly my thoughts...
    That's it. It really is just that simple. I scored 94%
    on the Programmer's Exam, with 100% in the garbage
    collection section.Hmm i got 54% last exam i took. I really begin to doubt about myself, because i find the questions on the exam so tricky.. Last book was Exam Cram (Java), and i found this a very nice and good book to study for the exam. Garbage collection is just one question, so it's either 0% or 100%. So far it hasn't gone anything higher then 0% with me.
    Here are some questions:
    1. When is the Object first available for garbage
    collection (when does it become unreachable)?
    Object o = new Object();
    Object p = o;
    o = null;
    p = null;p = null; -> available for gc.
    2. When is the Object first available for garbage
    collection?
    Object o = new Object();
    Vector v = new Vector();
    v.add(o);
    o = null;
    v = null;v = null; -> available for gc.
    3. Can the Vectors be garbage collected at the end of
    this code?
    Vector v = new Vector();
    Vector w = new Vector();
    v.add(w);
    w.add(v);
    v = null;
    w = null;yes
    Now i have a question:
    public int foo {
    Integer result = new Integer(10);
    result = null;
    return result;
    when is result available for gc?

  • Collection Question - Clearing a computer from one collection to another

    Hey Guys,
    I have quick question. I have two collection , one for windows 7 and for windows 8.
    When adding a computer to my windows 8 collection, can I simply delete
    the old object from the windows 7 collection?
    Or is there a process for doing this?
    Thanks.

    Yes, easily. Just go to the collection and you can right click, Membership, and remove the entry there. 
    You can also open the collection and right click the object and Remove from collection.
    If you delete the object you not only lose any membership it had, you also lose its DDR information as well as all inventory information. 
    Daniel Ratliff | http://www.PotentEngineer.com |
    @PotentEngineer

  • 1-to-many and collections question

    I'm modeling a standard container and container elements relationship using
    Kodo.
    I'm also trying to be fairly RDBMS efficient, so I'm using the kodo inverse
    properties
    avoid the extra 'mapping' table.
    Here is a simplification:
    class Container
    private Collection myChildren = new ArrayList();
    // + more properties
    public Collection getChildren() { return myChildren;}
    class ContainerElement
    // only have this so Kodo can use reverse property mappings
    private Container myParent = null;
    // + more properties
    public void setParent(Container c) { myParent = c;}
    // here is the code snippet from the Container.jdo
    <field name="myChildren">
    <collection element-type="ContainerElement"/>
    <extension vendor-name="kodo" key="inverse"
    value="myParent"/>
    </field>
    Now what I would like to do is this:
    Container c = new Container();
    c.getChildren().add(new ContainerElement())
    c.getChildren().add(new ContainerElement())
    and have the parent property automatically set.
    Basically the question is:
    How can I do Containers through the Coolection APIs, and have the underlying
    RDBMS use standard 1-Many by having a parent column?
    Thanks for looking into this.
    --Eivind Skildheim
    Motive Communications, Inc

    Eivind-
    Could I implement my own collection by subclassing AbstractList (or
    AbstractSet) that upon add calls the setParent method?The persistent member itself can only be an instance of that custom
    List/Set implementation if you implement your own ProxyManager so
    Kodo knows how to maintain the proxies for those classes. Take a look
    at:
    http://www.solarmetric.com/docs/2.4.0/docs/manual.html#com.solarmetric.kodo.ProxyManagerClass
    A simpler solution might be to have the class implement
    InstanceCallbacks, and then implement jdoPreStore() to ensure that your
    relations are set up correctly. E.g.,
    public void jdoPreStore ()
    // ensure that all the elements of the children collection
    // have the proper parent set in the inverse of the relation.
    for (Iterator i = myChildren.iterator (); i.hasNext ();
    ((Child)i.next ()).setParent (this));
    Another option is to have your accessor methods just wrap the collection
    in a small decorator that does the right thing when elements are added.
    In article <[email protected]>, Eivind Skildheim wrote:
    Thanks for the answer.
    Could I implement my own collection by subclassing AbstractList (or
    AbstractSet)
    that upon add calls the setParent method? The collection would take the
    inverse
    property name as a constructor argument and lookup up the property by
    reflection.
    The questions is: Is that safe in regards to bytecode enhancement.
    Thanks,
    Eivind Skildheim
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Eivind-
    It is a common question that people have why their JDO model does not
    automatically retain inverse relations in the java model. This is
    because that JDO's transparency means that your enhanced classes should
    not behave any differently than normal java classes. Thus, it is the
    responsibility of the application programmer to ensure that their data
    model remains consistent, just as they would have to in a normal,
    non-JDO application.
    In your case, you could just have a method that deals properly with the
    relation. E.g.:
    public class Parent
    private Collection children = new HashSet ();
    public void addToChildren (Child child)
    children.add (child);
    child.setParent (this).
    In article <[email protected]>, Eivind Skildheim wrote:
    I'm modeling a standard container and container elements relationship
    using
    Kodo.
    I'm also trying to be fairly RDBMS efficient, so I'm using the kodoinverse
    properties
    avoid the extra 'mapping' table.
    Here is a simplification:
    class Container
    private Collection myChildren = new ArrayList();
    // + more properties
    public Collection getChildren() { return myChildren;}
    class ContainerElement
    // only have this so Kodo can use reverse property mappings
    private Container myParent = null;
    // + more properties
    public void setParent(Container c) { myParent = c;}
    // here is the code snippet from the Container.jdo
    <field name="myChildren">
    <collection element-type="ContainerElement"/>
    <extension vendor-name="kodo" key="inverse"
    value="myParent"/>
    </field>
    Now what I would like to do is this:
    Container c = new Container();
    c.getChildren().add(new ContainerElement())
    c.getChildren().add(new ContainerElement())
    and have the parent property automatically set.
    Basically the question is:
    How can I do Containers through the Coolection APIs, and have theunderlying
    RDBMS use standard 1-Many by having a parent column?
    Thanks for looking into this.
    --Eivind Skildheim
    Motive Communications, Inc
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Large music collection questions...

    Hello All,
    I am new to iTunes and I have a couple of questions I need answers to before I make a big mess.
    I am moving from all windows to all mac environment. My music collection (77,000 songs) exists on several external HDD and are configured for the win 7 machine. The only organization for the collection is my own folder system, it has not been scanned or compiled into a whole by any program, win or mac.
    I also have a Mini hard wired to a 2TB TC. I want to get the music into iTunes and I am looking for some direction.
    First, I want to clean up the collection and get it all on 1 drive before I move it to iTunes. Or do I?  This is my first issue, dont know what to do first. Do I work with the collection in Win first and then move a clean collection into itunes or move it to iTunes first?
    I have read about the tuneup program and it seems like it either works great or not. Any opinions here? Of course I am smart enough not to just dump the whole collection on it and expect it to be fluffed and folded in an hour. It is available for Win as well as being an iTunes plug-in... is it better one way or another.
    If the opinion is that tuneup is not the best program then what are the better alternatives?
    Second question involves final resting place of clean collection. I want to keep the clean collection on an external HDD. Do I want it to be plugged into the mini or the TC for it to be shared accross all devices?
    If there is something I am overlooking please chime in, as I said, new to iTunes and Mac and there is a lot to learn.
    Thank you for your time in this matter.
    Cheers,
    Alex

    Hello All,
    I am new to iTunes and I have a couple of questions I need answers to before I make a big mess.
    I am moving from all windows to all mac environment. My music collection (77,000 songs) exists on several external HDD and are configured for the win 7 machine. The only organization for the collection is my own folder system, it has not been scanned or compiled into a whole by any program, win or mac.
    I also have a Mini hard wired to a 2TB TC. I want to get the music into iTunes and I am looking for some direction.
    First, I want to clean up the collection and get it all on 1 drive before I move it to iTunes. Or do I?  This is my first issue, dont know what to do first. Do I work with the collection in Win first and then move a clean collection into itunes or move it to iTunes first?
    I have read about the tuneup program and it seems like it either works great or not. Any opinions here? Of course I am smart enough not to just dump the whole collection on it and expect it to be fluffed and folded in an hour. It is available for Win as well as being an iTunes plug-in... is it better one way or another.
    If the opinion is that tuneup is not the best program then what are the better alternatives?
    Second question involves final resting place of clean collection. I want to keep the clean collection on an external HDD. Do I want it to be plugged into the mini or the TC for it to be shared accross all devices?
    If there is something I am overlooking please chime in, as I said, new to iTunes and Mac and there is a lot to learn.
    Thank you for your time in this matter.
    Cheers,
    Alex

  • BI data collection question

    Dear colleagues,
    I have one big question regarding the BI data collection functionality (within the solution reporting tab of T-cd: DSWP).
    To whom it may concerned,
    According to the SAP tutor located at the learning map,
    it looks like SolMan system requires XI installed in order to use the BI data collection. Is this correct? If so, are there any step by step configuration guide that covers from installing XI to enabling the BI data collection function?
    Thank you guys in advance.
    rgds,
    Yoshi

    Hi,
    But we want to maintain Item Master in ITEM02, Item Branch in ITEM03  data separate infoobjects because the discriptions always changing that is the reason I created different  Master Data infoobject.
    Let me give one sample data
    Record1: IT001 LOT1 BRAN1 CODE1 CODE2 DS01 DS02 in  2006
    Record2: IT001 LOT1 BRAN1 CODE1 CODE2 DS05 DS04 in  2007
    If you look at above data in 2006 item description was DS01,DS02 and in 2007 Description changed from DS01, DS02 to DS05,DS04 with the same item no.
    We want to maintain item descriptions will be the same in 2006 and 2007 if we change item descriptions in 2007. How can it be possible?
    If I go your way how can we achive this task?
    Do we need Dalta loads?
    Also do i need to create InfoCube? Can I use ITEMNO infoobject as a Data target ?
    Please let me know your thoughts.
    Regards,
    ALEX

  • Struts+Tiles question

    Hi all,
    I have a simple question trying to use struts 1.2
    I'm using Tiles and I have defined a layout that includes:
    header.jsp
    left-menu.jsp
    content
    rigth-menu.jsp
    footer.jsp
    "content" get updated with the current page asked by the user, but the web app supports multilanguage and right-menu.jsp has links to the supported lanuages.
    My question is, since by nature rigth-menu doesn't know what page is currently displayed, what is the best practice to let know rigth-menu.jsp with the Action mapping currently associated with the page currently displayed in order to display a link to the same page in other lamgages?
    Regards,
    OO

    You might want to try a struts forum.

  • Medical Collection Question...

    Hello allI have a question to do with medical collection: I ask the billing office of where all the medical bills stem from for charity care. I was asked to send them a letter and explain my situation to them I did and they forgave my debt. The question is The hospital Approval letter says: "Your request for uncompinsated services has been approved 100%. This is a one time benefit. Our assistance program does not cover other providers such as physicans, Anestesiology or Radiology, you may want to discuss this assitance approval with your other providers.". On the bottom of the letter it says blah blah about if you need to appeal there decision, then it says This application for assistance remains on records for 6 months, if you have additional care needs please contact financial counciling for assistance. NO WHERE on this approval does it say from the hospital billing office anything about a 2 yr time frame. When I called the collection agency they even said there isnt dates for deletions of bills and this was in review in the colleciton agency office. They did get sent from the hospital 4 bills which were deleted off report the next week. There are 5 remaining. One of the 4 falls within the 2 yrs that is assumed the only date on this letter is on the top of when they sent it to me June 25, 2015. I called the colleciton agency and told them there was a bill they missed that is on my CR, its dated Sep 2013. They then said they dont see that in there system, I called the hospital and told them of one of the bills, they dont see it either. So I called back the CA and she told me to dispute it with the credit report agencys, I have dont that on the 18th of this month. Of course I opened pandoras box by disputing which the colleciton told me to do, they sent me a bill with 5 collections I owe for the hospital bills. So Because they didnt put a "we will forgive 2 yrs of debt" on the letter or is it automatic with medical collections. All 3 have the disputes in so far havent heard anything on that. Thank you very much. I did upload the letter I was given to equifax

    can you plz post the solution.http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Collection questions please advise

    Hello everyone, i was was recently reviewing my credit report and see that I have an account that was opened by CO in 2011, as well as a collection (Cavalry portfolio services)  for this account that posted from 2013 in the amount of 750. My first questions is that up until recently I have never opened a CO account. Doing some research my wife had one and supposinly I was added as a AU, even though I never had requested.  Should I dispute this via the CRA for validation of debt.? If so what are the possible. What've impacts of this? Or what else should I do? My only other collection is held by pinnacle credit services for an old Verizon account that originally defaulted back in 2011, for 758 dollars.  They have it reporting on my credit report as opened in 4/2014, which is not the original default date, as mentioned being 2011. From what I read they don't do a DFP and are hard to work with. Can I dispute this with my CRAs as the dates are incorrect? What else would you recommend? I am trying to really boost my credit score, my scores are in my sig. also do I need to worry about any of this resetting the SOL, I'm in NH which is 3 years from my research. Thanks

    You can also check out the Rebuilding Forum here: http://ficoforums.myfico.com/t5/Rebuilding-Your-Credit/bd-p/rebuildingcredit If you were an AU (authorized user), you can get that removed from your report (do as RobertEG suggests) as you have no legal obligation to pay it back. However, if you were a joint account holder, you are liable.  Does the DoFD (Date of first deliquency) show for the collection? It is 7 years plus 180 days from the DoFD for the collection to fall off. Nothing can change the DoFD. The "wrong" date might just be referring to the date the CA got authority of the collection. 

  • Device collections question

    I have created a custom Device ollection called test group, I also have added workstations to it. My question is (I cant remember anymore) is how to add another computer to that custom collection.
    MSB

    Hi,
    Have you seen this:
    Import Computer to Configuration Manager 2007 / 2012
    http://www.david-obrien.de/?p=413
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • BC4J + Struts: Design questions!

    OK, I'm wanting to use Struts with BC4J and have a design question for you BC4J users and gurus.
    Here's how I think things would work:
    1. User requests page
    2. Struts ActionServlet calls perform() on Struts ActionForm
    3. Struts ActionForm instantiates BC4J AppModule and calls business method
    4. BC4J AppModule instantiates necessary BC4J ViewObjects and performs business operations which return data
    5. Struts ActionForm receives value objects from BC4J AppModule
    6. Struts ActionForm populates Struts FormBean
    7. Struts ActionForm forwards to Struts JSP which displays Struts FormBean
    I prefixed the components with Struts/BC4J to keep things clear where things belong.
    Now, here are my questions:
    In step 3, what's the best method of doing this? Do I need to do JNDI lookups every time? What's the performance overhead of this? Anyone have any best-practice code that does this?
    Is this the accepted way of doing things? Is there a better way of designing this system?
    Thanks!

    In Step3 you should use the ApplicationModule pooling framework, especially if you are trying to work in stateful mode because the pooling automatically handle the AM activation/passivation.
    There are different way to go at it.
    If you are using the BC4J custom tag library and have an ApplicationModule tag in your jsp, the pooling is already initialize. By the time your action is trigger you just need to retrieve the am using the application id:
    in your jsp:
    <jbo:ApplicationModule id="myAM" ... />
    in your Action implementation:
    HttpContainer container = HttpContainer.getInstanceFromSession(request.getSession());
    SessionCookie cookie = container.getSessionCookie("myAM");
    ApplicationModule am = null;
    if (cookie != null)
    am cookie.useApplicationModule();
    This AM id can be passed as URL parameter...
    If you do have a JSP with an AM tag you need to create the pool with findSessionCookie call.
    For more info about AM pooling look at the end of this thread for Steve resources:
    http://forums.oracle.com/forums/message.jsp?id=912431&gid=513211
    This is what we are currently doing for to provide support for BC4J in Struts for our next release.
    Charles.

  • Struts app question

    Hi everybody.
    I'm still working on my first struts app.
    I have a form with one row(consists of 3 text tags and 1 select tag, where I can choose a currency code) and one submit button.
    How can I do this......I want to have here another button and on its click I want to add another same row that consists of same elements.
    And than I want to have the SAVE button, that will save the data from those few rows into the database.
    It is possible to do it and how?
    Thanks a lot.
    my jsp:
    <%@ page.....
    <%@ taglib.....
    <jsp:useBean id="helper" class="helper.Helper" scope="session" />
    <jsp:useBean id="zalohy" class="model.PdZalohyCppTabLocalDTO" scope="session" />
    <html>
    <head>
    <link href="<html:rewrite page="/rr.css" />" rel="stylesheet" type="text/css">
    <title><bean:message key="title.cpp.cppform"/></title>
    <script type="text/JavaScript"></script>
    </head>
    <body>
    <form>
    <h1>CPP</h1>
    <logic:messagesPresent>
    <span id="errorsHeader"><bean:message key="errors.validation.header"/></span>
    <html:messages id="error">
    <li><c:out value="${error}"/></li>
    </html:messages>
    <hr>
    </logic:messagesPresent>
    <html:form action="insertCpp">
    <table>
    <tr>
    <td>Money:</td>
    <td>Currency:</td>
    <td>Name:</td>
    <td>Plan:</td>
    </tr>
    <tr>
    <td><html:text property="money"/></td>
    <td>
    <html:select name="cppForm" property="codCur">
    <html:options collection="MenaBean" property="codCur" labelProperty="nameCur"/>
    </html:select>
    </td>
    <td><html:text property="name"/></td>
    <td><html:text property="plan"/></td>
    </tr>
    </table>
    <html:submit><bean:message key="button.cpp.submit"/></html:submit>
    </html:form>
    </form>
    </body>
    </html>

    nobody? ...pls,look at it

  • Struts ActionMapping Question

    Hello,
    I am pretty new to Struts and have hit a snag.
    I understand the concept of the ActionMapping like this: The Action Servlet reads the request and matches up the html form with the proper form bean (and forwards) and sends it all to the action class which does the pocessing and forwards on to the specified forward.
    My question is, how does this process change if I don't have an html form?
    I want to display editPerson.jsp with the information from Bob's account by clicking on a link like this:
    <a href="editPerson.jsp?personId=bob">Edit Bob</a>but editPerson.jsp is expecting to see a Person bean in session scope and it is not there. How do I pass personId to a formless ActionMapping so that I can get to my DisplayPerson class to instantiate the Person bean, store it in session and forward to editPerson.jsp?

    I think I have the same problem, but I'll go over it again to try to make sure.
    I have a table full of data; on each element of the table I want to put a link so the user can look at the details for that row.
    I know I can use to invoke an action, and likewise <html:link ... with a parameter, and that the parameter needs to translate to a string.
    I can use a string that server-end code can then use to retrieve a bean, and what I want is to have that bean be the formbean for the form that displays all the data for the row. In other words, I'm displaying some info about one item on the row, and I want to go to a page that displays a bean having all the data for that item.
    It seems to me what I want to do is invoke an action that has that bean in the "form-beans" mapping attached to the action, but I don't know how to do it. I can't set the bean in the JSP that displays the table; it doesn't know which row to use until the user clicks.
    It seems like I could have an action that takes the row identifier, creates the bean I want, and forwards to another action, but does that work? I thought an action was activated by the user clicking on a submit button -- is there a way to have an action execute the code I need and then forward to another action without requiring a user action in between?
    Or is there another way to go from a link in my table of summary data to a page with a bean containing all of the data?
    rc

  • Struts beginner question

    hi everyine
    i am new to struts.please tell me how to use struts.how i can use jsp and servlet page
    i am usinf sun applications server with netbeans ide .
    for usinf struts in netbeans what all i have to change
    thankyou

    Here you are having the answer for both the question.
    http://www.jajakarta.org/struts/struts1.2/documentation/ja/target/faqs/netbeans.html
    Go to the link and click Kiskstart at top left of the page to know about struts.The struts configuration is given for Eclipse and Netbeans IDE.

Maybe you are looking for