Writing tag in a tag handler

Hi,
I was wondering if it was possible to embed tags in the output of a tag handler.
for example, depending on an attribute, I would like my custom tag <MyTag/> to write out a <fmt:message/> tag. I tried something like pageContext.getOut().write("<fmt:message key='mykey'/>"), which writes out the message tag, but it doesn't get evaluated because the body content is evaluated already. So all I see is the tag <fmt:message/> instead of the actual message.
Is there a way to re-evaluate the tags in the body after the tag handler has a chance to write something to it first?
Thanks.

No, there isn't.
The best you can do is write a tag handler using a .tag file.
.tag files are to Tag libraries what JSPs are to Servlets.
So you write you custom tag potentially using other custom tags in the process) it then translates that tag into java code.
Cheers,
evnafets

Similar Messages

  • How to remove tags (not color tags)

    How to remove tags (not color tags)
    I love the idea of the tags, however there comes a point when some become irrelevant.  How can I remove them.  I highlighting them in the dialogue box and hitting the delete key, that does not work.  ?

    I accidentally found that you can remove some tags while in the Sidebar view by just draggng them to the trash.
    But after a certain point when you have drug all of tags in the list, you are then left with the "All Tags" button. When you click on that final button, you find that all of the tags you have ever created are still there in the All Tags category. So I guess what I do is just not create any new tags because the list just becomes too long to be useable. I liked the idea of Tags as a management tool, but like so many times before I will just go back to the file name workarounds that I have been using since 1988.  They work because they were developed and tested by an actual user, me.  Just toss a project number into the file name.  Works every time, unlike the undocumented "features" that are apparently not tested.
    But, if what I hear is true that Apple does not monitor these discussions, what was the point of writing this.
    Would like to think they would look at these "discussions" as a resource, but.......

  • Ho wto get a Custom Tag generate other Tags?

    Hi Folks,
    I need your help with this issue. I have a Tag A:X which needs to generate some code containing another tag A:Y. How do I get the container to also evaluate A:Y?
    The long version of the problem. I have a web page that uses the tag A:X which is a custom tag. When executed, this custom tag needs to go through a bunch of other HTML page segments and find the right one, say Page 25. Once it finds this page 25, it has to output the code of page 25 in place of A:X. Yet, Page 25 itself also contains JSP tags. So, somehow, I need to tell the container to reevaluate the code produced by A:X.
    Normally, the handler of tag A:X could behave like the container and invoke A:Y's handler in the following way:
    AYTag tag = new AYTag();
    tag.setPageContext(...);
    tag.setParent(...);
    tag.setAttribute1(value1);
    tag.setAttribute2(value2);
    tag.doStartTag();
    tag.doEndTag();
    tag.release();I, however don't feel like it is a good decision. This is the job of the container and I don't want to have it done in a tag handler. Worst, I might have problem later on, if new pages come (similar to Page 25) that use other tags with different set of attributes.
    Any help is very much welcome.
    Thanks,
    Klaus.

    Note that I've also posted a question to the SiteMesh user forums about this. It has more information about the motivation of this question.
    See http://forums.opensymphony.com/thread.jspa?threadID=8561
    I'm still looking for an answer, though.
    --matthew                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I see the selected tags in the tag bar clearly

    How can I see the selected tags in the tag bar clearly (they used to be in black, now they do not change color; a highlight or Bold would help)

    The History menu lets you revisit the page where you can drag any page element from it.
    How would you sort through thousands (tens of thousands) of files found in a cache?

  • Converter for converting all HTML tags to JSF tags

    hai all,
    i am new to JSF. i need a suggestions to convert all my HTML pages to JSF pages bcoz i was already created more pages in HTML and now i want to convert all the pages to JSF. can u give any suggestion plz post it here or send me a mail to [email protected]
    thanks in advance,
    regards,
    V.Sabarish

    hi roman,
    thanks for ur reply. it converts the file but the links r not converting....so can u suggest me another way for converting a HTML tags to JSF tags.

  • applet tag vs Object tag

    As per W3Schools HTML applet tag is not supported in HTML5. Need to use <Object> tag instead of <applet> tag.
    For more details follow this link: http://www.w3schools.com/tags/tag_applet.asp
    http://dev.w3.org/html5/spec/obsolete.html#the-applet-element
    Point 11.2 Non-conforming features
    So, I go ahead and the change the code as below depicted.
    Below code that is working with <APPLET> tag:
    +<Applet+
    style    = "position:absolute;border:0px;left:184;top:95;height:180;width:364;"
    code     = "jtreeviewapplet.JTreeViewAppletMain.class"
    name     = "TreeView"
    id       = "TreeView"
    hspace   = "0"
    vspace   = "0"
    align    = "top"
    archive  = "/Project/HTML/ABC/XYZ.jar,/Project/HTML/ABC/ABC.jar"
    MAYSCRIPT>
    +<PARAM NAME="onSelected" VALUE="onSelect_Handler">+
    +<PARAM NAME="onFinishNormalize" VALUE="onFinishNormalize_Handler">+
    +</Applet>+
    Here is the snippet, whcih have been changed to <OBJECT> tag so as to support HTML5 in future:
    +<OBJECT type=" application/x-java-applet"+
    style    = "position:absolute;border:0px;left:184;top:95;height:180;width:364;"
    name     = "TreeView"
    id       = "TreeView"
    hspace   = "0"
    vspace   = "0"
    align    = "top"
    +>+
    +<PARAM name="code" value=”jtreeviewapplet.JTreeViewAppletMain.class”>+
    +<PARAM name="codebase" value="/Project/HTML/ABC/">+
    +<PARAM name="archive" value=" XYZ.jar">+
    +<PARAM name="archive" value=" ABC.jar">+
    +<PARAM name="scriptable" value="true">+
    +<PARAM NAME="onSelected" VALUE="onSelect_Handler">+
    +<PARAM NAME="onFinishNormalize" VALUE="onFinishNormalize_Handler">+
    +</OBJECT>+
    After changing the *<applet>* tag to *<object>* tag , my applet itself is not loading and it gives class not found exception for jtreeviewapplet.JTreeViewAppletMain.class.
    (Note: For both working and not working condition, I am using latest JDK 1.7 update 9 for compiling the code and in my system I am having latest JRE1.7 update 9 to run the applet code. I am using InternetExplorer 8 and InternetExplorer 9 browser)
    Can anybody help me to find out where I am going wrong?
    Edited by: 975931 on Dec 12, 2012 1:24 AM

    You might want to stick to the documentation:
    http://docs.oracle.com/javase/tutorial/deployment/index.html
    and use the deployment toolkit.
    PS: use \ tags when posting anything code related. That makes it readable and it keeps the forum from trying to interpret it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Location of custom tags added to tag library on Windows

    Since early DW days, there has been a severe lack of asp.net support in DW in relation to Tags, Document Extensions, etc. With each new version of DW, I find myself re-adding in a stack of tags into the Tag Library as I don't seem to be able to copy them between versions. After I've added them in, I am trying to find where these are stored in the filesystem so I can copy them to each new version of DW.
    I can see most tags are found in C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS6\configuration\TagLibraries , however when I add new ones in, they don't seem to be stored anywhere.
    Where are the custom tags I add into the Tag Library stored for DW on Windows?

    I think I may have found it. There appears to be some action at C:\Users\jtsr\AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration\TagLibraries\aspnet
    Now to figure out if can build them outside of DW and simply paste them back into this folder or C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS6\configuration\TagLibraries to save re-adding them with each version of DW.

  • Parent simple tag invoking child tag's body

    Hey,
    This post is 6 years old:
    http://forum.java.sun.com/thread.jspa?forumID=45&threadID=167332
    And doesnt seem applicable for classic tags which are reused (and after the tag is done, the parent shouldnt invoke), but for simple tags where the instance isnt reused, it seems reasonable that during the parent's body executing, if the child doesnt do anything about register itself with the parent, then at the end of the parent's doTag() method, it writes stuff to the screen, and uses the references to the children to make them process their body to the screen. Is this ok to do or has the container done some cleanup after doTag() to make this impossible?
    Thanks,
    Chris

    I get the error manditory uri missing in the jsp.
    Is there something I'm missing?Yes, a mandatory uri ;)
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %><%@ taglib prefix="tags" uri="/WEB-INF/tags" %>
    Make sure that you define the uri so that it points to the actual tld file in your web.xml.
    ncuka

  • Changing normal tags to people tags

    Hello,
    I'm using Elements 11. I imported some photos to my catalog and the program asked if I wanted to import the tags as well. Of course I did and so did the program. However, now when I want to find pictures of a specific person that I tagged in people taggs in elements are separate from the photos in the normal tag with the same name of that person. So I have to review both places to find all of the pictures for that person.
    Is there any way to change a normal tag to a "peoples tag" so that I will find all images of that person when I want to find it?
    In my opinion it is a little strange that there is now the distinction between two different tag types. If I save the tags to the file via "Save Metadata to Files" then the peoples tags are written in the normal tags section in the files since Windows seems to know only one tag system. So when I import the files again in Elements then naturally the peoples tags are converted to normal tags because it could not distinguish which is which.
    Is there a better solution? Can I just combine the normal tags with people tags? It's far too hard to retag all of the photos and the automatic face recognition doesn't work very well in many cases so a lot of work is necessary.
    Thanks!

    The easiest method is to simply drag the new people icon to a batch of selected photos.
    Start by ensuring the people icons are displayed at the bottom of the right-hand panel under the Media tab. If you cant see them as a list go to the top menu:
    View >>  Show People in Tag Panel
    Then click on the right pointing icon to the left of People Tags to expand the list (see image below) and you can also use the plus symbol to add new people icons.
    Now scroll to the top of your keywords and choose a persons name that  was imported by clicking on the chevron to the right of the highlighted (people) keyword. Press Ctrl+A to select all the photos of that person or use Shift+Click on the first and last. Now drag the new people icon for that person on to one of the thumbnails and it will be added to all the selected photos.
    Return to the top of the keyword list and right click on the old person tag and choose delete. That will remove it from all photos with that word.

  • Seam tags in custom tag libs

    Hi,
    Can't we use seam tags inside Java class ?
    I need to create a custom tag using seam tag <s:link />
    stringbuf.append("<s:link id=\"sample\" view=\"/sample.seam\" value=\"Sample123\" propagation=\"none\"/> ");
    The below given code is not giving me a link in the UI. While taking source from the UI the <s:link /> tag is not converted into html <a href >.
    What should I do to get a link by <s:link> using as a custom tag ?

    Sorry, wrong forum, should be in the JSP forum. Hope someone can still help!

  • When opening the Coloursync utility and pressing the verify button, I received an error message stating that the Tag 'cprt':Text tag has an incorrect length which could not be fixed as the file is locked. Does anyone know how to rectify this?

    When opening the Coloursync utility and pressing the verify button, I received an error message (copy below) stating that the Tag 'cprt':Text tag has an incorrect length which could not be fixed as the file is locked. Does anyone know how to rectify this?
    Checking 25 profiles...
    /Library/ColorSync/Profiles/Displays/iMac-00000610-0000-9C6C-0000-000004271B00.i cc
       Tag 'cprt': Text tag has an incorrect length.
       The file is locked. Could not be fixed.

    Hi guys,
    I followed the steps to unlock the .icc file in the "getinfo" screen then went on clicking repair in colorsync utility.
    This is the message i got:
    Searching for profiles...
    Checking 17 profiles...
    /Library/ColorSync/Profiles/Displays/Color LCD-00000610-0000-9CF3-0000-000004273CC0.icc
       Tag 'cprt': Text tag has an incorrect length. Fixed.
    Repair done - 1 profiles fixed.
    However, when i hit verify again it shows up like this:
    Searching for profiles...
    Checking 17 profiles...
    /Library/ColorSync/Profiles/Displays/Color LCD-00000610-0000-9CF3-0000-000004273CC0.icc
       Tag 'cprt': Text tag has an incorrect length.
    Verify done - found 1 bad profile.
    ... and it keeps like this sine die.
    when i open the .icc file it shows up like this:
    3     'cprt'     'text'     35     Copyright ASCII Text String
    New to mac so I really don't know what to do.
    I didn't get this message so far. What i did before getting this message was to open a jpeg file. I wanted to edit it so when i did right click on the file i went to open with, and colorsync came as an option; so i chose it.
    Then this message started comming up.
    Is there anything i can do?
    Thabks for the support.

  • How to delete XML Tags in already tagged text?

    Hi everyone,
    I looked in all the topics but with no results.
    Is there anyone that can help me with this script?
    Thanks
    Ivan

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to save column widths in tag monitor and tag config editor?

    how to save column widths in tag monitor and tag config editor?

    The attached example may help.
    After launching the editor, I locate a reference to the front panel control named "Tag List".
    This is type cast as a multicolumn list box which then allows me to increment through all of the cells and set the widths as i go.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Set_Width2.vi ‏60 KB
    SET_WIDTH.JPG ‏94 KB

  • Create an own tag  h:name-Tag to replace h:CommandButton

    Hello,
    I have 2 questions :
    1 - How can create a personal tag in a JSF application?
    2 - How can I do to make this application :
    an example :
    I have 3 buttons A, B and C (<h:CommandButton>) .
    That I want to do :
    when I click on A, the value of B is replaced by D.
    when I click on B, the value of B is replaced by D and the value of C is replaced by A. etc...
    So the parameter action="..." for the each <h:name-Tag> call other tags i the same page.
    At the end, I want to create this tag and include it in the form of myTag.jar to be used in my project.
    Thank you

    In the setProperties method, you've got to resolve the valuebinding (#{blah.whatever}) to get the actual value. But you only want to do that if the attribute is set to a valuebinding.
    Here's an example:
          * @see javax.faces.webapp.UIComponentTag#setProperties(UIComponent)
         protected void setProperties(UIComponent component) {
              super.setProperties(component);
              //Set the field reference property
              if (fieldRef != null) {
                   if (UIComponentTag.isValueReference(fieldRef)) {
                        ValueBinding vb = getFacesContext().getApplication().
                             createValueBinding(fieldRef);
                        component.setValueBinding("fieldRef", vb);
                   } else {
                        component.getAttributes().put("fieldRef", fieldRef);
         }This example shows how to determine if the "fieldRef" attribute is a value binding, and extracts the value accordingly. But there's one more step. In your component class, or anywhere you access the attributes of your custom tag, use the following code:
         public String getFieldRef() {
              if (fieldRef != null)
                   return fieldRef;
              ValueBinding vb = getValueBinding("fieldRef");
              if (vb != null)
                   return (String)vb.getValue(getFacesContext());
              else
                   return null;
         }The above snippet is what you would put in your custom component getter method.
    JSF is open source. Something I found very helpful while learning how to create custom components was looking at how the JSF developers created theirs. You should go ahead and download the JSF source code.
    CowKing

  • Tags from other tag output

    Hello.
    I'm currently outputting tags from a TagSupport extended class.. (doing database checks, then outputting the results and using tags)
    The tags i output don"t get evaluated and i see them in the html source.
    How can i make the container evaluate the output again?
    Thanks a lot.

    i dont think you canIn fact, I think the only way you can have one tag use
    another tag is in JSP 2.0 with the first tag written
    as a tag file (for example /WEB-INF/tags/mytag.tag).
    This tag file (like a JSP file) can specify the
    location of other tag libraries, and then use tags
    from that library. This feature (along with the
    built-in expression language) are probably (for me)
    the two best things about JSP 2.0
    Geoff RimmerThanks.
    Unfortunatly, i need the opposite. I'm doing a pseudo tabbedpane based on DB entries, and use a tag for representing buttons.
    I find it amazing that you can't interpret recursively the result of a tag class...
    Maybe i'm simply doing it wrong...

Maybe you are looking for

  • Video clapboard disappeared from iphone 3gs

    my video clapboard has disappeared from my iphone 3gs evne though i have videos & movies saved there

  • Updated to 6.1 but badge still on settings.

    I updated my 4g ipod touch to 6.1 but now on my homescreen the small red circle with 1 in it that indicates there is an update is still there. How can I get rid of this? would anything else be causing it? When I go into settings nothing else has that

  • Copying, pasting and editing audio problem?

    hi, i have some audio tracks that i originally recorded in pro tools le (no plugin delay compensation if using uad's or other 3rd party plugs dont even go there by the way) and have exported them to logic 8 and changed the arrangment for a song. The

  • Tree like structure ??????????? pls help

    Hello I want to get the tree like structure My requirement is that when I write any jsp and put it in webapps's any folder I should get tree like structure of the folders in which I am putting my jsp. Foe example I have structure like webapps --rakes

  • Accesing music store - A FIX

    Calling all with acces problems...................... now I'm not taking credit for this but thought other frustrated users needed to know! I use a Linsys wireless router and connect to AOL broadband. I was having problems with V5 for weeks, upgraded