[jira] Created: (DISPL-452) New parameter target for export link

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (DISPL-452) New parameter target for export link

JIRA jira@codehaus.org
New parameter target for export link
------------------------------------

                 Key: DISPL-452
                 URL: http://jira.codehaus.org/browse/DISPL-452
             Project: DisplayTag
          Issue Type: Improvement
          Components: Export
    Affects Versions: 1.1
            Reporter: gabriele mariotti


Whe generating export link in HTMLTableWriter (method writeExportLinks) I would setting a new parameter target for link generated.

Actually is not possible set it (for example _blank).



--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (DISPL-452) New parameter target for export link

JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/DISPL-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101222 ]

Christine Ferdinand commented on DISPL-452:
-------------------------------------------

I've done some code changes for this feature.
Maybe someone who has set up the CVS project is willing to create a patch.

After the change it is possible to specify the export target by adding the following tag inside the table tag:
<display:setProperty name="export.target" value="_blank" />

Here is what I did:

class org.displaytag.properties.TableProperties
added:
/**
 * Property <code>export.target.value</code>. Name of the target frame used in exportLinks
 */
public static final String PROPERTY_STRING_EXPORT_TARGET_VALUE = "export.target";

/**
 *
 * @return the target frame used for construction the exportLinks
 */
public String getExportTargetValue()
{
    String result = getProperty(PROPERTY_STRING_EXPORT_TARGET_VALUE);
    return result;
}

********************************************************

class org.displaytag.util.Anchor
added:

    private String target;

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }
    /**
     * Creates a new Anchor whith the supplied Href and body text.
     * @param linkHref baseHref
     * @param linkBody String link body
     * @param target target frame for the link
     */
    public Anchor(Href linkHref, String linkBody, String target)
    {
        this.href = linkHref;
        this.linkText = linkBody;
        this.target = target;
    }
   
                private String getTargetString()
    {
        if (this.target == null)
        {
            return TagConstants.EMPTY_STRING;
        }
        return " target=\"" + this.target.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
    }

changed
line 116
return TagConstants.TAG_OPEN + TagConstants.TAGNAME_ANCHOR + getHrefString() + TagConstants.TAG_CLOSE;
to
return TagConstants.TAG_OPEN + TagConstants.TAGNAME_ANCHOR + getHrefString() + getTargetString() + TagConstants.TAG_CLOSE;    

********************************************************

org.displaytag.render.HtmlTableWriter

Method writeExportLinks()
added in line 580
if(this.properties.getExportTargetValue()!=null){
        anchor.setTarget(this.properties.getExportTargetValue());
}

> New parameter target for export link
> ------------------------------------
>
>                 Key: DISPL-452
>                 URL: http://jira.codehaus.org/browse/DISPL-452
>             Project: DisplayTag
>          Issue Type: Improvement
>          Components: Export
>    Affects Versions: 1.1
>            Reporter: gabriele mariotti
>
> Whe generating export link in HTMLTableWriter (method writeExportLinks) I would setting a new parameter target for link generated.
> Actually is not possible set it (for example _blank).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
displaytag-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (DISPL-452) New parameter target for export link

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ http://jira.codehaus.org/browse/DISPL-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116509 ]

Mike Calmus commented on DISPL-452:
-----------------------------------

I believe this is a duplicate of DISPL-62

> New parameter target for export link
> ------------------------------------
>
>                 Key: DISPL-452
>                 URL: http://jira.codehaus.org/browse/DISPL-452
>             Project: DisplayTag
>          Issue Type: Improvement
>          Components: Export
>    Affects Versions: 1.1
>            Reporter: gabriele mariotti
>
> Whe generating export link in HTMLTableWriter (method writeExportLinks) I would setting a new parameter target for link generated.
> Actually is not possible set it (for example _blank).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
displaytag-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (DISPL-452) New parameter target for export link

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ http://jira.codehaus.org/browse/DISPL-452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

fabrizio giustina closed DISPL-452.
-----------------------------------

    Resolution: Duplicate

duplicates DISPL-62

> New parameter target for export link
> ------------------------------------
>
>                 Key: DISPL-452
>                 URL: http://jira.codehaus.org/browse/DISPL-452
>             Project: DisplayTag
>          Issue Type: Improvement
>          Components: Export
>    Affects Versions: 1.1
>            Reporter: gabriele mariotti
>
> Whe generating export link in HTMLTableWriter (method writeExportLinks) I would setting a new parameter target for link generated.
> Actually is not possible set it (for example _blank).

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
displaytag-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel
Reply | Threaded
Open this post in threaded view
|

[jira] (DISPL-452) New parameter target for export link

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Andy Malakov commented on Improvement DISPL-452
@Christine Ferdinand : thank you for your patch.

DT 1.2 has Anchor.attributesMap. This patch can be a bit simplified:

    /**
     * add a "target" attribute to the html link.
     * @param target String
     */
    public void setTarget(String target)
    {
        this.attributeMap.put("target", target);
    }
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
displaytag-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel