Simple question about custom tags really easy!!

I am trying to make my own custom tags, so far i have created simple one that have i use for heading or to set the page layout for a jsp page, My question is I want to make a custom tag with a body , with a start and end tag can anybody give a simple example of a custom tag which has a body.
I do not mean write me a tag i mean what could a tag with a body be used for? Can you give me some example of what a tag of this kind could do?

Thanks having read that and some other pages i have another question:
would it be possible to put the following code into a custom tag so that i can pass in a list and have it output it to a table?
<TABLE >
<% 
out.println("<TABLE >\n" +
                "<TR BGCOLOR=\"#FFDDAA\">\n" +
                "  <TH>ID Number\n" +
                "  <TH>Artist\n"
Iterator it = pricePassed.getpricePassed().iterator();
while( it.hasNext() ){
   MySite.VideoBean vids = (MySite.VideoBean) it.next();
   out.println( "<TR>\n" +
               "<TD><Center><B>" + vids.getRecId() + "</TD>" +
                "<TD><Center><B>" + vids.getArtist() + "</TD>"
</TD></TR>\n" );
%></TABLE>At the moment i use the above in a jsp to put data into a table, would it be a massive task to undertake to put into a custom tag?

Similar Messages

  • Question about custom tags

    Hi All,
    Please tell me what is differnce between javabean and custom tags.
    thank you.

    Javabean is a data object (or a data holder) whose properties can be accessed using getters, setters - ex getName() and setName()
    JSP custom tags are merely Java classes that implement special interfaces (Tag interface). Once they are developed and deployed, their actions can be called from your HTML using XML syntax. Refer the article http://java.sun.com/developer/technicalArticles/xml/WebAppDev3/
    Cheers,
    Janesh

  • Simple question about mount and delay script

    Hello, I have a simple question about mounting volumes on start up.
    My computer wakes up auto - and then auto there are serveral applescript tasks (mount and start up programs)
    I use this script (daily) for serveral connections with external volumes I always need the connect to. ( In the script I use this code 3 times for other locations) I do this on start up.
    set Uname to "XXX"
    set Pword to "XXX"
    set someVolume to "afp://XXX.XXX.XXX.XXX/XXX/XXX
    mount volume someVolume as user name Uname with password Pword
    (same code for 2 other locations)
    When i do this on start up sometimes the script says there is no connection possible. I guess it's because on start up the connection isn't there. And 1 minute later when computer is total ready the connection is ok. When I run the script then It works. Just sometimes ( In the morning) 'It' want to connect but the script stops. When i do it manually(I run the script again) it works just fine.
    Is it possible that I need a delay? Can someone explain this?
    How would I make a delay handler for this script? Is that the best solution?
    Thanks in advance. This is something small i'm wondering about.
    Colin

    BTW, If you saved the script as an application +(and not as an application bundle)+ you could drop the script on to *Drop Script Backgrounder* (freeware).
    Then the script would run in the background, so, you wouldn't see it running in the Finder.
    <http://www.macupdate.com/info.php/id/7922/drop-script-backgrounder-x>
    Tom

  • A simple question about combo box

    Dear All,
    Just got a simple question about combo box: I have one of these selectors with labels based on filtered rows from a table.
    Is it possible to have one more label that would select all options?
    Like:
    Product A
    Product B
    Product C
    All Product
    Many thanks for your help!
    Gilles

    Hi Gilles,
    The purpose of ComboBox itself to select single option out of many.
    For your purpose, you may have to use "List Builder" which can accomodate 1 or more  to select.
    Please revert for more clarification if you need.
    With best wishes
    BaaRaa.

  • A simple question about performance!

    Hi! I have a simple question about performance. Suppouse that you have a servlet or a class with DB access, and you need to use a value several times in that page. What is best, to assign the value from say, a resultset or a request.getParameter() to a variable or to call the resultset or the request every time you need to retrieve that value? Which option uses less memory, which is faster, etc.?
    Hoping the best fou u
    Raul

    If you need more values from a db, the best is to open some connections (connection pool) and use the for accessing the db.
    To get the data only once, open the connection, get the data, store the data whereever you want: variable (class), hidden control (if you want to send from one page to another by request) and close the connection as quicky as possible.
    The advantage of the first method is that the most time consuming activity (connections opening) is done only once.

  • Question about Id3-tags and song managem

    Hello, I am getting ready to buy a Zen Touch 20GB in a couple of weeks and I have a few questions about the management software.
    (Correct me if I am wrong about something)
    ) Are songs organized into groups by Genre instead of just folders like on the Ipod?
    2) Are Id3-tags used instead of filename for identification?
    3) What parts of the tag are needed besides title and artist?
    4) Which version of tags does the Zen Touch recognize: Version or Version 2?
    5) If I edit my tags using an external program such as Id3-TagIT, will the tags carry over to the Creative software and to the player?
    Thanks a lot for your help. I want to make sure I have my music collection in order before I get my Zen Touch.

    euph_jay wrote:Ok, so lets say I have all my music in folders right now seperated into different categories on my hard dri've. Some folders denote the artist, some the album, and some a genre. Example: Folder: Chicago Contents: Chicago .mp3 files Folder: Techno Contents: various Techno artist's songs What is the best way of organizing my folder system, so that the transition will be easy to the player?
    Folders are pretty much irrelevant. What the software will do is look at the *tags* in the files and then use these to build the player's library.
    Will imbedded folders work on the player? (like Techno->Crystal Method->Cystal Method .mp3's)
    Again the player has no concept of folders, although if you set Techno as a Genre tag you will be able to view via this in the Music Library.
    Or, am I misunderstanding how music is stored into the mp3 player. Instead of storing music in a "folder like" system (like the Chicago folder or Techno folder), does it store all the songs individually on the device? Then you have to sort it by artist, album, or genre?
    Using your example, in the Music Library you have essentially three categories: Album, Artist, and Genre. So under Album you would see "Vegas" (the Crystal Method's album), under Artist you would see "The Crystal Method", and under Genre you would see "Techno" (and then either the album or artist under this... I forget which it is offhand).
    Make sense?

  • Questions in Custom Tag

    Hi,
    I have couple of questions in Custom Libraray Tags:
    1) How I can from Tag Java file to open a new JSP window without the toolbars and determine the window size.
    2) How I can read a JSP parameter from Tag Java file. For example I have a field called "x" in JSP is not connected to the TAG by setAttribute.
    3) How I can pass a dynamic value to custom tag. <route:routeList agentID = "1" >
    how I can change the "1" to a field. When I change it to: <route:routeList agentID = "<%=request.getParameter("agentID")%>" > or to <route:routeList agentID = <%=request.getParameter("agentID")%> > I get empty value, even though the field has a value.
    Thank you ...

    [email protected] ... Well, if you put something as an attribute in the pageContext object, you can get it... same as request or session scope attributes, but I thought the OP meant to do this (I guess not, though.. see below):
    <%
    String str = "...";
    %>
    <mytag:stuff .... />
    And within the stuff tag, use str as a variable. I don't believe that's possible, because the compiled page in effect becomes like this:
    String str = "...";
    doStuffTag(whatever the parameters are);
    Obviously that's not the right naming for the tag, but you get the idea...
    JavaUserProg....
    2) First, it's best to put quotes around the tag attributes...
    <INPUT readOnly style="WIDTH: 84px; HEIGHT: 22px" name="operation[<%= lineNum%>"] value="<%=operation%>">
    Second, do you mean you want to read from the tag what the HTML input field has in it? First, you have to submit the form, then the call request.getParameter("fieldname") to get the value. Otherwise, I'm not clear on what you are really trying to do.
    3) If the field in the tag is an int field: setAgentID(int)
    Then you can define the tag value as:
    <mytag:stuff agentID="1" />
    or
    <% int aid = 1; %>
    <mytag:stuff agentID="<%= aid %>" />
    If you just put a static string value like the first way, it converts it. If you put an expression, the expression has to match the type of value it really is. So int for int, String for String, Collection for Collection.

  • Simple question about flex and AS 3.0

    Hi, this might sound like a simple question so I apologize...
    I have both a copy of flex 2 and 3, and i want to simply code in AS
    3.0 not mxml. I referred to the help of both flex 2 and 3, and all
    i could come up with is "you can add dynamic behavior to your
    documents using actionscript", which means to me, you only write
    your functions in AS and create instances with mxml (...ugh).
    personally, i find mxml to be ugly (mainly because it looks like
    html to me), and i'd rather not use it. coming from programming in
    an IDE in Java, it seems like it would be nicer to have something
    similar, all the while having the power and cool features of flash.
    I'm not fully educated in this matter so i understand that i could
    be totally wrong.
    i mean, if i have to code in mxml, i will. i'm a web
    programmer for a living, and if a more experience programmer said
    something like "if you don't code mxml in flex, you'll never get a
    job coding in flex", i would trust the advice, and learn the ugly
    code. :)
    yes, i do have Flash cs3, it's great but it seems like a pain
    to me the way you organize classes.... i've only seen a few
    tutorials, ones that explain how you cannot simply import a custom
    class, you have tell your movie to link to it, put it in the same
    directory, or manually name the package, it's sort of confusing.
    my main point here is that i'm very eager to start building
    apps in straight AS 3.0 instead of using flash cs3 (for some
    projects), and it would be cool to get some help or be pointed in
    the right direction.
    to simplify:
    can i write AS 3.0 and only as 3.0 in flex 2 or 3? how? can
    you link me to a tutorial? any advise?
    thanks!

    Hey William, thanks for the post. It's a great coincidence
    because I'm reading that book as well. I'm about half way through
    it, and I love it. I installed mxmlc on my linux box and am writing
    pure AS 3 apps. I think that's the way to go, though I know it's
    not for everybody.
    My problem with mxml is that it has a weird syntax for
    function calls, and it's not as 'intuitive' for a person like me,
    who came from C++ and Java programming in the past. I like writing
    programs in the C++ and Java style syntax, and since so many other
    languages use a similar syntax, I don't see any reason to learn the
    nuances of mxml, unless I was getting paid to do it. As far as I
    can tell there is no benefit.
    I hate using Flash to write flash apps as well, I feel like
    they become messy and confusing, especially when trying to write an
    OOP application. I only use it if I want to move an object in a
    very specific way and can't do it with the Tween methods.

  • Noob question about DIV tags

    Learning DW and CSS so patience is in order .
    I've being reading numerous posts here and on the web about avoiding tables for laying out web pages. I can see the advantages in terms of cleaner codes and easiness of updating and changing sites at a later time. So I started learning about DIV tags (although tables is very easy for me) and have practice a few times with fairly good results, love the absolute positioning with it. Having said that, for the love of me, can't find a way of centering horizontally a page designed with DIV tags (due to ignorance), for example, 1 column/three rows page, after defining styles, size and colors I enclosed everything in another DIV tag, wrapper I think is called, but have not found a way of centering it on the page, text-aligment on the DIV tag only centers the text not the DIV itself, how to go about this? Help is appreciated.

    love the absolute positioning with it.
    Get over it.  It's a trojan horse.  Absolute positioning is not a general layout method.
    To center ANY block (non-absolutely positioned) element, use CSS to give it a width and left/right margins of 'auto'.  For example -
    <div id="foo">...</div>
    That div will be centered with this CSS -
    #foo { width:300px; margin:0 auto; }
    I think you are on the wrong path already, though.  Stick with tables (which you say are very easy for you) UNTIL you a) understand CSS well enough to understand what absolute positioning is and why I say it's bad, and b) understand how to use float, margin, and padding to place things on the page.  Then you are ready to move away from tables.

  • A simple question about Drag and Relate navigation

    Dear experts
    I have found SAP help or related manuals only good at talking difficult things such as how to customise the drag and relate targets, etc.  However, after I followed exactly and then how to test.
    Then I just see pieces of information, very unstructured.  Spending me a whole day, even I can't get a good simple example on how to really perform a drag and relate at least for the proof of concept at EP 6.0.   It spent a lot of time in describing what the navgiation panels about, what drag and relate targets.  Then how to do it in once transversal.  That is, with all customisation, how to drag and relate an object.
    My step is with iview A, shows a purchase order details showing a drag and relate enabled object like vendor no.
    Then I try to drag this vendor no. to a display vendor iview, iview B.
    I have known I have to put iview A and iview B to a Drag-and-relate targets.  I am sure I have done this.  Does it mean opening the portal, I will see both iview A and iview B appearing at the same time in the drag-and-relate target area?  However, in my case, it is not, iview A only appears in that area when I load it once, same to view B.  When I load iview B, iview A links from D&R target will be wiped off.  Then how I can drag an item from iview A to B while each one of them can only appear at any time.
    Can anyone give me a simple guide (don't give me an internet link from help.com) I have been tired of this.
    First, I would to make sure if my so called self-learnt drag-and-relate simple action is correct in the steps or really I have made something wrong in the customisation or even a bug there.
    Can anyone on the planet have this experience, pls. act as my teacher in this area?
    Rgds
    Stephen

    Thanks
    I have tried the 1st way already.  But I can see both iviews existing in the D & R targets.  Now I try to drag an item with business object BUS2002 from iview A to relate to LFA1 of iview B of the same back end system.
    But iview B shown up with that data of LFA1 shown up (in my case the vendor no.)
    I have used autocomplete relationship and I have checked it has been well-defined already.  Also check from metadata at backend they are both active.
    Do you have any clues to the pitfall in my case?
    Rgds

  • A very simple question about WF

    hi experts
    I would like to ask a question about workflow
    as u may know there is 'Loop' step in workflow, but I am confused when should I use Loop?
    Is this step used for processing internal table?  if yes, why shouldn't I create a custom BOR method and pass the entire internal table to the method?
    many thanks

    hi
    loop step for not process the internal table,
    this is used to process the some steps repetely until condition True or False.
    we have two loop steps is there
    WHILE AND UNTIL.
    Thanks
    sitaram

  • Maybe a simple question about M2T ?

    Hi
    I record in HDV on the JVC GY 101.
    I store on the Focus Enhancements DR HD100 Hard disk recorder.
    The footage I have is in HDV 25frames Progressive.
    The hard disk stores as m2t file and I seem to need to use Mpeg streamclip to convert for Final Cut Pro HD.
    I have a few questions about this.
    1) What should i convert to with mpeg streamclip ? mov, dv m2v etc etc
    2) What setting should I have on FCP with regards to screen size ? The converted clips are 1280x720. When I choose this setting on the sequence, I end up with small black bars left and right of the video on the canvas ???
    3) I will also later have to add some digi beta footage which will be PAL, 720x576 Anamorphic.
    4) What is the best resolution for me here ?
    5) And will the quality of the original m2t file be downgraded by the mpeg streamclip ?
    Thanks so much for your help
    All the best
    Simon

    HDV isn't an "edit-friendly" format, meaning: HDV uses inter-frame compression, combined with a long group-of-pictures (GOP) of 15 frames (12 frames in PAL-equivalent). In intra-frame compression (as in DV, DVCPRO HD, etc.), each video frame is a complete image that stands alone. Inter-frame compression (which is also used in DVDs) uses only a limited number of complete image frames, the GOP determines that number. So, in HDV for example, with a GOP of 15 frames, 1 second of 30fps video contains only 2 complete frames, while the other 28 frames are determined by calculations used in conjunction with the Bi-directional ('B') and Predicted ('P') frames, which contain partial information on the changes in the video in between the 'I' frames which contain whole images. This process, of course, requires much more computer processing power than when editing DV, DVCPRO HD, Uncompressed, etc.
    Editing video streams such as HDV (and XDCAM HD) is made difficult by the reduced number of I-frames. For example, if you make a cut in between the I-frames in the video clip, the computer has to then recalculate new I-frames that are placed at both sides of the cut. Converting on capture/after import to an intra-frame codec like DVCPRO HD, ProRes 422, or Uncompressed will reduce processing power and increase real-time performance, as well as give better performance when adding effects and performing compositing like chroma-keying.
    A common rule of thumb in professional applications is to acquire in HDV, XDCAM HD, etc., but capture and edit in DVCPRO HD, ProRes 422, or even Uncompressed. Native HDV editing is not taboo by any means; it's just not as easy or robust -- especially with the LONG render times. Depending on what kind of work you do (and of course personal preference), you may not see much benefit by transcoding to another format.
    Are you suggesting i have to convert each clip after capture?
    Unless you have an HDV deck with HD-SDI and a capture card, you would have to convert each clip. Batch-conversion would be very useful for that.
    Hope that helps.
    tim

  • A simple Question about % in CR Chart!

    Hi, I have another simple question.
    When i use SQL to storage data and wanna Crystal Report to display the data in chart using %
    which data type should i use?
    float or string?
    and I found when i use 0.12 as 12% in database , It could not display in Crystal Report line chart normally.
    What should I do??
    Please Help!!!
    Thank you VERY MUCH!!!

    If you have the datatype as string from your database then try adding the string field as a summary field in chart and select maximum instead of count and if you have them in number format then you can directly select the percentage in chart.
    Regards,
    Raghavendra

  • Simple question about generate proxy

    Hi guys...
    This is a simple but a truly simple question....
    When trying to create a proxy from our messages interfaces using SPROXY, i'm not able to get the Software component versions that were used from the sld...
    Do I have to export them? Or import them?

    Hi Goncalo,
    Check if it helps...
    Re: SW component version not visible in SPROXY
    Regards
    Anand

  • Simple question about JAVA path

    Hi. I have a simple question , but I spent several hours trying to find an answer.
    How do I know the location of the java executable which is used by Concurrent Manager.
    I already know that running which java under application user will not give me the correct answer

    Maybe you can try like this:
         public String getPath(){
              Class cls=getClass();
              String className=cls.getName();
              String packageName=cls.getPackage().getName();
              System.out.println(className);
              System.out.println(packageName);
              String newClassName=className.replaceAll("\\.", "/");
              String resouceName=newClassName+".class";
              System.out.println(resouceName);
              URL url;
              url=cls.getClassLoader().getResource(resouceName);
              String path="";
              path=url.getFile();
              return path;
         }

Maybe you are looking for

  • Substitution in FI -NEWGL

    Hi all, Is there any substitution available only for  General Ledger view in NEW GL after document splitting took place or at the point of document splitting ??? Thanks, Sai.

  • I installed the ios7 in my iPhone 5 mail problem

    I installed the ios7 in my iPhone 5 and now I can not see the messages receives on my Hotmail?

  • I have a WiFi issue : (

    Hello... this is my first time on here, because I just got my ipod touch last Friday. I have been trying and trying to get my wireless to work on my touch. But I have had no luck. It picks up my connection perfectly and has a full 3 par connection. A

  • In appearence Acrobat X hung opening a document

    We have a problem on multiple computers in which to open pdf documents it remains hung in appearance. Actually the application does not crash, but it takes 20, 30 seconds or almost a minute to open the document. The computer is new, with XP updated.

  • AVCHD will not load into Log & transfer

    Just got an AVCHD  card and tried to import via log and transfer. Keep getting the error that it is "unsupported media" and "unknown file structure" This is a newer system (last 6mos) intel imac FCP V7 so it should import.  Okay file structure looks