Action bindings for html anchor tags

I've used this code to use a link in the same way you would use a button:
<a href="theAnswers.do?event=create&Arg0=<c:out  value=${bindings.Create.enabledString" />">
<img height="26" width="34" src="insert.GIF"/>
It works for several operations except for Commit and Rollback.
This is what i tried for a commit:
<a href="theAnswers.do?event=commit&Arg0=<c:out value=${bindings.Commit.enabledString" />">
can anyone help?
thanx

Hi:
You can parse HTML tags inside the Database using JTidy library.
Load JTidy to the sys schema using loadjava with grant to public or into your own schema.
The you can parse HTML tags in a CDATA section creating a Tidy parser. Look at this code as example, its part of DBPrism CMS XForms actions and it process an HTMLArea HTTP Post action. See the method updateContent(CLOB post_xml):
http://cvs.sourceforge.net/viewcvs.py/dbprism/cms-2.1/src/com/prism/cms/frontend/PageActions.java?rev=1.5&view=auto
The CLOB arguments is an XML XForm instance document, the content node has the HTML tags to be parsed wrapped by CDATA tags:
So the String content are the HTML tags.
Once the document is parsed by JTidy it is converted to a valid XML and it will be accepted by the XMLType instance.
Best regards, Marcelo.

Similar Messages

  • Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

    Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.
    e.g.
    In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.
    /content/myproject/-/
    So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.
    But the problem is there in following scenario.
    I have an anchor tag as follows.
    <a href="#" id="test"> click here </a>
    And I am assigning the href to anchor through JQUERY.
    <script>
    $("#test").attr("href","/content/myproject/en.html");
    </script>
    Ideally this should have been mapped to "/en.html".
    But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".
    How to resolve this.
    Thanks,
    Sai

    In a servlet you have access to the resourceResolver so if you know which attributes contain links then it's relatively easy to apply resourceResolver.map to those links.
    Your challenge is clearly how do you know which attributes are links and which aren't. Its is the same challenge that makes parsing the response and rewriting it on the way out difficult - the JSON doesn't have any semantic meaning so how do identify which attributes require rewriting. There really is no good answer ot that question in my experience - all the options have down sides.
    Create some convention - all attributes matching this pattern X get mapped before being converted to JSON (could be attributes whose name ends in link, or it could a convention applied to the value of the attribute - if the attribute is a string that starts with /content apply the resource resolver mapping. In this case you have train your developers to follow this convention which is the down side.
    Create some configurable list of attribute names that require mapping. This is brittle, requires training and is easy to break.
    Implement a client side version of the resource resolver mapping. It wouldn't be as full proof as server side mapping (because that takes into account but you could make it work for simple logic like stripping of /content/site/en. If ou are just trying to solve the simple version of this issue - stripping off the top of the repository path this might be your best option.
    Not worry about it and set up Apache 301 redirects that catch any long URLs and redirect them to short URLs (so configure apache to look for any URL matching /content/site/en and strip off /content/site/en and do a 301 redirect to the shortened URL. You end up with a lot of extra HTTP request because of all the 301s but it would work (I wouldn't recommend this option - but it is possible).

  • HTML DB HTML (Anchor Tag)

    Hello everyone,
    I have a target of icon which enables me to open a Web page located in a repertory of my network.
    I would like to be able according to the place that I am in my application, to reach a place in page HTML (ANCHOR tag).
    I put in page HTML of the anchors such as <A NAME="Zoom">
    I tested in the target of icon: J:\PROJ\T-bord\LIV_01\relnotes0.3.2.html<a ref="#Zoom"> "target=_blank".
    The page opens, but it is not placed at Zoom inking. Can you say to me if there is another way of being able to regulate my problem?
    Thank you very much! Bye.

    Hello Vikas,
    I will try to reformulate my question with less ambiguity.
    I have in the heading of each page of my application an image with a bond to open a file .PDF.
    The file contains many information and I would like that by opening this file outward journey at a precise place in the file.
    I did not see how proceeding to do that with a file PDF.
    I then thought of modifying file PDF in format HTML.
    With this format, I can place at various places, anchors(ex : A NAME="Zoom"), in order to use them in my application HTML dB.
    At the time when I open file HTML, I want to place myself at the place that I want in the file without being obliged to traverse all the file to go to seek my information.
    In the properties of the image in HTML dB, I placed in the section of the target of icon the address of the file and also the name of the anchor to be located at a precise place of my file: J:\PROJ\T-bord\LIV_01\relnotes0.3.2.html a ref="#Zoom" "target=_blank"
    My file opens but at the beginning of the file. It is not occupied of the anchor to locate me at the desired place.
    I seek how to make?
    Thank you.
    Message was edited by:
    timiche
    Message was edited by:
    timiche
    Message was edited by:
    timiche

  • Parse THIS!!!  XML can't contain HTML (anchor tags)????

    Is there a way to parse XML that has HTML tags and special characters within it?
    <br><br>
    I've been searching for days for a solution with no joy.
    <br>
    The Oracle scripts I wrote below work fine as long as only alphanumeric characters are in the XML doc.
    <br><br>
    Here's what I'm doing...I'm page scraping several dynamic websites using ColdFusion. I remove all the unneeded HTML...and replace the remaining HTML with XML tags.
    <br><br>
    I then want to pass this XML (see below) variable (cfxml) to Oracle so it can be parsed and loaded into the database. If I remove the anchor tags and the CDATA tags...the code works fine....but I want the anchor tags loaded into my table.
    <br><br>
    Anyone have any suggestions....preferably a solution so I can stop pulling my damn hair out.
    <br><br>
    <br>
    Oracle Scripts<br>
    <br>
    create or replace procedure LoadXML (cfxml in varchar) AS
    <br>
    begin<br>
         insert into JOBS (xmldoc) values <br>(xmltype.createxml(cfxml));<br>
    end;
    <br><br>
    create or replace trigger job_bifert as<br>
    begin<br>
    if (:new.xmldoc is null) then<br>
    return;<br>
    end if;<br>
    select <br>
    xmltype.getstringval(:new.xmldoc.extract('/recordset/row/title/text()')),<br>
    xmltype.getstringval(:new.xmldoc.extract('/recordset/row/company/text()')),<br>
              xmltype.getstringval(:new.xmldoc.extract('/recordset/row/location/text()'))<br>
    into :new.title, :new.company, :new.location<br>
    from dual;<br>
    end;<br>
    <br>
    <br>
    Sample XML being sent to Oracle via ColdFusion
    <br>
    <br>
    <?xml version="1.0" encoding="iso-8859-1"?><br>
    <recordset><br>
    <row><br>
    <date><br>
    <![CDATA[
                Jul 27
              ]]><br>
    </date><br>
    <title><br>
    <![CDATA[
                < a href="http://jobsearch.monster.com:80/getjob.asp?JobID=32472300&AVSDM=2005%2D07%2D28+02%3A36%3A26&Logo=1&q=cold fusion&cy=US&sort=dt">ASP.NET Technical Program Manager with Marketing Savvy< /a>
              ]]><br>
    </title><br>
    <company><br>
    <![CDATA[
                Excell Data
              ]]><br>
    </company><br>
    <location><br>
    <![CDATA[
                < a onClick="popMMLL('WA','Redmond'); return false;" href="http://jobsearch.monster.com:80/896">WA-Redmond< /a>
              ]]><br>
    </location><br>
    </row><br>
    </recordset>

    Hi:
    You can parse HTML tags inside the Database using JTidy library.
    Load JTidy to the sys schema using loadjava with grant to public or into your own schema.
    The you can parse HTML tags in a CDATA section creating a Tidy parser. Look at this code as example, its part of DBPrism CMS XForms actions and it process an HTMLArea HTTP Post action. See the method updateContent(CLOB post_xml):
    http://cvs.sourceforge.net/viewcvs.py/dbprism/cms-2.1/src/com/prism/cms/frontend/PageActions.java?rev=1.5&view=auto
    The CLOB arguments is an XML XForm instance document, the content node has the HTML tags to be parsed wrapped by CDATA tags:
    So the String content are the HTML tags.
    Once the document is parsed by JTidy it is converted to a valid XML and it will be accepted by the XMLType instance.
    Best regards, Marcelo.

  • Method call in html anchor tag

    I have read about how to place a hyperlink in JTable cell in other threads. i have a method called Details() which has a mouse pressed event which responds on left click on the first column cells of my JTable. then i get the column and row positions and open up a JDialog.
    so Now i have to show the first column cells as hyperlinks(underlined and handcursor on visit).
    i have done something like this,
    setText( "<html><a href=\"\">" + (String)(value==null?"":value ) +"</a></html>"); this makes the cell values blue colored as well as underlined as soon as the table is loaded.
    how can i make it behave like a hyperlink ? that is colored, underlined and handcursor only when mouse is placed on it.
    Can i have the call to Details() method inside the anchor tag which i have shown above?
    Thanks,

    Well what do you know, I was doing everything correctly.
    Firefox does not allow local file links from a web page.
    http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work

  • Netui anchor tag in netui:form

    I have some code like following:
    <netui:form action="action1" >
    <netui:anchor action="action2">Check</netui:anchor>
    </netui:form>
    Action1 and action2 willl be finally redirected to the same JSP(for example one.jsp).
    The weird thing is that: according to log output, it seems that one.jsp has been hit twice when user click "check" link.
    Is it possible that when user click "check" link, weblogic not only trigger action2 but also trigger action1? forsubmit attribute is not set to true explicitly for netui:anchor tag.
    Thanks in advance

    hi
    verify from a browser trace tool (e.g. livehttpheaders, fiddler or firebug) how many requests your browser is making. (or you can inspect the code that portal generates in the HTML). Once we have determined whether its the browser making the two requests or something on the server, we can see if there are workarounds.
    regards
    deepak

  • Not able to open document using anchor tag in firefox

    Hello Friends,
    I would really need your help in solving this issue.My application is deployed in server machine.
    I'm accessing the application through fire fox. In my application, i have a link where i need to open a document on click of it.
    For this, i am using html anchor tag.
    Eg:
    Test
    where IP is the server machine address and dir is the shared directory.
    It works in IE but didn't work in fire fox. Please help me out on to fix it.
    Cheers,
    Cap

    Try out to open doc using following link, {color:#ff0000}*use 5 back slashes instead of 2*
    {color}Test Link
    once you done the code change, close the browser and open a new browser and try it.
    Edited by: Thagelapally on Jul 17, 2009 6:05 AM

  • Netui Anchor Tag

    Can we use href and action attribute in netui:anchor tag both at a time...*href* is for opening a modal dialog and action is page flow action

    does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
    If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
    regards
    deepak

  • How to add anchor tag dynamically on infopath (OOTB task form of workflow .xsn) by jquery -dynamically as i did by below script on newform.aspx where I will read Help title and URL value from list

    on newform.aspx just above the top of cancel button I want to put 1 hyperlink "Help"
    but I want to do this by script/jquery by reading my configuration list where 1 column is TITLE and other is- URL
    Configuration List has 2 columns Title and URLValue
    Title                                    UrlValue
    HelpNewPage                    
    http://url1
    HelpEditPage                      http://url2
    so script should read Title and display "Help"--->1st part on NewForm.aspx/EditForm
    Script should read UrlValue column and on click of help-(display link) the respective url should be open in new window.-->second part
    Please let me know reference code for adding anchor tag dynamically by reading from list
    Help/Reference 
    http://www.sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=5
    I can see hyperlink near cancel button-
    //This block is just placing help link near cancel button- 
    $(document).ready(function() {
        GetHelpLinkFromConfigList();
    var HelpLinkhtml ='<a href="#" text="Help">Help</a>';
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkhtml ='<a href="#" text="Help" onclick="GetHelpLinkFromConfigList();">Help</a>'; 
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkimageButton ='<IMG SRC="../../Style Library/Help.bmp" style="width:35px;"/>'; 
    var position1 =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkimageButton );
    //Rest script
    function GetHelpLinkFromConfigList()
     //The Web Service method we are calling, to read list items we use 'GetListItems'
     var method = "GetListItems";
     //The display name of the list we are reading data from
     var list = "configurationList";
     //We need to identify the fields we want to return. In this instance, we want the Title,Value fields
     //from the Configuration List. You can see here that we are using the internal field names.
     var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Title' />"+"<FieldRef Name='Value' />"+"</ViewFields>";
     //comment
     var query = "<Query>" +
                            "<Where>" +
                                "<Neq>" +
                                    "<FieldRef Name='Title'/><Value Type='Text'>Help</Value>"
    +
                                "</Neq>" +
                            "</Where>" +
                            "<OrderBy>" +
                                "<FieldRef Name='Title'/>" +
                            "</OrderBy>" +
                        "</Query>";
     $().SPServices(
     operation: method,
        async: false,
        listName: list,
        CAMLViewFields: fieldsToRead,
        CAMLQuery: query,
        completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var displayname = ($(this).attr("ows_Title"));
        var UrlValue = ($(this).attr("ows_Value")).split(",")[0];
        AddRowToSharepointTable(displayname,UrlValue)
    function AddRowToSharepointTable(displayname,UrlValue)
        $("#NDRTable").append("<tr align='Middle'>" +
                                    "<td><a href='" +UrlValue+ "'>+displayname+</a></td>"
    +
                                   "</tr>");
    <table id="NDRTable"></table>
    sudhanshu sharma Do good and cast it into river :)

    Hi,
    From your description, you want to add a help link(read data from other list) into new form page.
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(AddHelpLink, "sp.js");
    function AddHelpLink() {
    var context = new SP.ClientContext.get_current();
    var list= context.get_web().get_lists().getByTitle("configurationList");
    var camlQuery= new SP.CamlQuery();
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>Help</Value></Eq></Where></Query></View>");
    this.listItems = list.getItems(camlQuery);
    context.load(this.listItems,'Include(Title,URL)');
    context.executeQueryAsync(function(){
    var ListEnumerator = listItems.getEnumerator();
    while(ListEnumerator.moveNext())
    var currentItem = ListEnumerator.get_current();
    var title=currentItem.get_item("Title");
    var url=currentItem.get_item("URL").get_url();
    var HelpLinkhtml ='<a href="'+url+'">'+title+'</a>';
    $("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    },function(sender,args){
    alert(args.get_message());
    </script>
    Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Use of titleKey attribute in html:select tag

    Hi,
    There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
    Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag

    Hi,
    There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
    Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag

  • Action listener for struts html tag

    hi i am doing a project using sturts. I have used struts HTML Select tag with a collection of values in select box. now i want to write an actionlistner for that select...ie if i select any value from the select list it should do some action like take me to different page...can anyone tell me how can i do that...
    Thanks

    Soultech, I think you're being a bit harsh. Struts is a valid topic on this forum as it is a java framework related to JSP.
    However having said that, the question does show a basic misunderstanding of JSP technology.
    JSP = Java SERVER Pages. Java code only runs on the server.
    All that gets sent to the client (browser) is an HTML file.
    You can not write java action listeners to run and respond to events on the client.
    For any client side interaction you will have to use javascript (which is NOT java) - probably an onclick/onchange event - the same as any other web page.
    However you can only run javascript code from such events.
    To run java again you have to submit a request to a server - normally done by submitting a form.

  • Download attribute for anchor tag in HTML 5 mozilla browser

    There seem to no download attribute for anchor tag been implemented in Mozilla Firefox ... neither desktop nor mobile version for android.
    can seem to download a file generated via javascript with correct name .....it saves with garbage name and with .part extension.
    Will it be implemeted in the future ....

    ''thak123 wrote:''
    Will it be implemeted in the future ....
    See the following link for details.
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=676619 Bug 676619] - Implement proposed download attribute
    If you want a particular feature or fix to be implemented, vote for it instead of commenting on the bug report. See [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html Bugzilla etiquette].

  • Passing values to action form in struts using html:link tag in struts

    hi
    As we can post values to action form bean in struts using a <html:text> tag in side a form.
    Can the same be achieved by using a html:link attribute.
    If not then how can this be achieved (i.e. posting a form on click of a link and populating action form bean property for the same).
    thanx in advance.

    Crosspost:
    http://forum.java.sun.com/thread.jspa?threadID=5244035&tstart=0

  • Html text anchor tag uses the whole line

    Here's one. When I pull in html formatted text into a text
    field and set the paragraph to align right, the whole line is set
    as a link.
    Is there anyway to make it so the link is not made for the
    whole line?
    Example:
    <p align="right"><a href="link">Link
    Text</a></p>
    Any help would be appreciated.
    Wally

    TIm,
    Thanks for doing that. I came up with the same results. Since
    I'm loading everything from external files, I wanted to shy away
    from escaping all those characters. But, you definately helped me
    come up with a solution.
    I took some of my text links and dropped them all into a test
    movie I had been working with and had accidently left the
    <title> tag in the head, which shows up in the html. Needless
    to say, the text "untitled document" did NOT have the hyperlink
    applied to it.
    So I got to thinking, "What if I put text before and after
    the anchor tag." And sure enough. NO HYPER LINK on the new text. So
    then I got to thinking, "Hmm. Maybe I'll just put a character in
    before and after the hyperlink and set it's color to white so it
    won't show up."
    Sure enough it worked. So, that's my fix/workaround. If you
    have a hyperlink that is aligned right and it shows up on the whole
    line, put a character before and after the hyperlink and make it's
    color the same as the background.
    It worked, but
    HELLO ADOBE / FLASH TEAM!!! Please fix the bug and implement
    HTML 4.0 or above so we don't have to come up with these crazy
    workarounds,
    please.
    Thanks everybody who helped out on this. Great community!
    Wally

  • Struts 2 validation for HTML tags

    Hi,
    I am doing Struts2 validation with validation.xml for HTML tags. Here i am doing a binding between a form (bean) and the respective field in JSP and validation.xml. The validation error messages are populated without any problem but the value entered in the respective text field for HTML tags is not persisted. This problem does not occur if you use Struts 2 tags in JSP. Here is a snippet of what i am doing:-
    JSP:-
    <input:text name="accountForm.firstName" size="12" maxlength="20" />
    Action:-
    class AccountAction {
    private AccountForm accountForm;
    public void setAccountForm (AccountForm accountForm) {
    this. accountForm = accountForm;
    public String insertAccount () throws ApplicationException {
    // To get the account details from the JSP
    String first Name = accountForm.getFirstName ();
    action-validation.xml:-
    <validators>
    <field name="accountBean.firstName">
    <field-validator type="requiredstring">
    <param name="trim">true</param>
    <message> First Name is required.</message>
    </field-validator>
    </field>
    <validators>
    Whether it is possible to persist the value with HTML tags with Struts 2 validation? or i need to go with Struts 2 tags in JSP. Please shed some light in to it.
    Thanks,
    JavaCrazyLover

    FYI
    I am using spring framework with struts2 UI
    ..pls
    do the needful..
    Thanks in advance
    -Satish

Maybe you are looking for

  • How to enter a relative path of flv

    We have a project with flv video embedded in one of the slides.  It works perfectly fine when we use absolute path to insert Flash video, e.g. (D:\Videolessons\communication\101.flv).  Now the client wants to deploy it in a media server and asks us t

  • Creating Excel Files on 9i

    What is the best approach/method to creating excel files on 9i using PL/SQL stored procedures/packages? I have seen multiple posts on this topic but would like one source for this solution. I have also visited asktom and seen an example using owa_syl

  • Screen shot error?

    I just recently bought a MacBook white and the first couple of days, the screen shot process was working. Yesterday I tried to take a screen shot and this bubble pops up. The bubble says, *Screen capture failed* the attempt to take a screen capture h

  • Problems with picture import

    I have tried many times to import a jpg picture that I want to use as a background for a audiotrack so I can export it as a movie. How do I do it properly? I have drag and drop'ed but it wont work. Is it a known bug?

  • Raw fine tuning reverts back to older version

    HI I've spent the last couple of days editing several hundred files, they were originally imported before AP2 was released, so would have been using RAW file tuning version 1.1. However I selected each one individually Removed all adjustments, which