Tiles and breadcrumb - Don't want final breadcrumb to link - tiles

I'm using struts 1.x and tiles. I want to create a breadcrumb trail containing a path to the current page, but, I don't want the final breadcrumb to point to the current page. This is because the final page is the result of a search. So it doesn't make sense to point to a search result page.
How do I add a breadcrumb that is only a label and not a link?
I'd like it to look like:
Home Page (link) > Search Criteria (link) > Search Results (not a link)
My tiles def looks like:
<putList name="breadCrumbList">
<item value="Home Page" link="/blablabla" />
<item value="Search Criteria" link="/blablabla2" />
<item value="Search Results" link="/blablabla2" /> <-- this needs changed
</putList>

Change the link value to # as follows.
<item value="Search Results" link="#" />
EDIT :
This is what we have done in our project if that helps:
<definition name="tile.success" extends=".layout">
<put name="content" value="/jsp/routing.jsp"/>
<put name="title.section" value="My Title"/>
<putList name="breadcrumbs">
<item link="#" value="Add Name"/>
</putList>
</definition>
"Add Name" just shows up as a label in the breadcrumb.

Related

Extraction Rule configuration in Visual Studio 2013 web performance tests

I've been following this guide to create my web performance tests in VS 2013 and I found interesting thing, which I am not sure how to understand.
I have a web application. On certain request this application returns me a page, where I have a span element which has style attribute, which is equal to "color:Blue;". In my performance test I go to that page and I have "Extract Attribute Value" extraction rule to get a value of style attribute of that span tag. When I configure my rule to get attribute style1 for that tag, the rule fails (which I expect to happen), but when I create a rule with match attribute value "c#l#r-BBBB", it doesn't fail (although, I expect it to fail).
Does anybody know why?
Here is the page source:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title></head>
<body>
<form method="post" action="Blue.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="QG+BA5tJt9bUUKK/SNJvCYaITvz71sZMdjWwNGygbhGjjs6Vy/29qy+kskbo3g4Vaz2Zfpi8hlr2F4g366EChHwtM2N676WWg0LBR3+9hc0=" />
</div>
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="D66C0198" />
</div>
<div>
<span id="Label1" style="color:Blue;">Blue</span>
</div>
</form>
</body>
</html>
These is the extraction rule in .webtest, that I expect to fail:
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractAttributeValue, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="ExtractionTest" DisplayName="Extract Attribute Value" Description="Extract the value of an attribute from a specified HTML tag.">
<RuleParameters>
<RuleParameter Name="TagName" Value="span" />
<RuleParameter Name="AttributeName" Value="style" />
<RuleParameter Name="MatchAttributeName" Value="" />
<RuleParameter Name="MatchAttributeValue" Value="c#l#r-BBBB" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
</RuleParameters>
</ExtractionRule>
I believe you need to specify vales for both the MatchAttributeName and the MatchAttributeValue properties. The documentation for the ExtractAttributeValue rule is not clear about what combinations of its properties are supported. However, I interpret the rule as saying: look for a TagName tag TagName where the attribute MatchAttributeName has the value MatchAttributeValue and from that tag return the value in AttributeName. Using that interpretation has always worked for me.
The documentation for AttributeName says that it "is used to identify the attribute whose value you want to extract", it does not say it is used to match any values. This documentation goes on to say that MatchAttributeName and (my emphasis) MatchAttributeValue are used in some cases.

Formatting legend in Anychart included with Application Express

I am trying to format the legend within Application Express Anychart Flash chart. Here is the relevant XML section:
<legend enabled="true" position="Right" align="Near" elements_layout="Vertical">
<title enabled="true">
<text>Legend</text>
<font family="Tahoma" size="10" color="0x000000" />
</title>
<icon>
<marker enabled="true" />
</icon>
<font family="Tahoma" size="10" color="0x000000" />
</legend>
I am simply trying to add two line items, Sales and Tickets, to describe the lines in my chart with a correctly colored line icons but instead I get two generic entries - Value and Value. Can anyone help me sort out the proper code for this XML?
When I change it to the following:
<legend enabled="true" position="Right" align="Near" elements_layout="Vertical" ignore_auto_item="True">
<title enabled="true">
<text>Legend</text>
<font family="Tahoma" size="10" color="0x000000" />
</title>
<items>
<item>
<text>This is a test</text>
</icon></item>
<item><text>Item 2</text>
</item>
</items>
<icon>
<marker enabled="true" />
</icon>
<font family="Tahoma" size="10" color="0x000000" />
</legend>
This gives me the two series I want but no icon.
Please forgive my ignorance here. I still am not getting the simple legend I want. I am using two series queries, Total_Sales and Total_Tickets:
SELECT NULL Link,
trunc(tix.timestamp) AS label,
sum(tixp.Price) AS value
FROM LS_tickets tix LEFT OUTER JOIN
LS_ticket_prices tixP
ON tixp.series_prefix = tix.ticket_series
WHERE tix.event_id = :P145_event_id
and tix.event_id = tixp.event_id
and tix.voided_flag != 'Y'
GROUP BY trunc(tix.timestamp)
ORDER BY trunc(tix.timestamp) ASC
And
SELECT NULL Link,
trunc(tix.timestamp) AS label,
sum( tixp.quantity ) AS value
FROM LS_tickets tix LEFT OUTER JOIN
LS_ticket_prices tixP
ON tixp.series_prefix = tix.ticket_series
WHERE tix.event_id = :P145_event_id
and tix.event_id = tixp.event_id
and tix.voided_flag != 'Y'
GROUP BY trunc(tix.timestamp)
ORDER BY 1
But I am getting an empty legend whenever i try and add ICON information specific for each label as follows:
<legend enabled="true" position="Right" align="Near" elements_layout="Vertical" ignore_auto_item="True">
<title enabled="true">
<text>Legend</text>
<font family="Tahoma" size="10" color="0x000000" />
</title>
<icon><marker enabled="true" /></icon>
<items>
<item source="Series" series="Total_Sales">
<text>{%Icon} Sales</text>
</item>
<item source="Series" series="Total_Tickets"><text>{%Icon} Tickets</text>
</item>
</items>
<font family="Tahoma" size="10" color="0x000000" />
</legend>
It depends on what data structure you are using. You can specify what data should be shown in legend using these xml settings.
Each automatic item have attributes source which can be "Points" or "Series" and series, that specifies the series name:
http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#automatic-items
In case of custom line items you can add your own items with any information:
http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#custom-items
Here is a list of all keywords that you can use to format the items values:
http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#keywords
it looks like the issue occurs while apex working with the series, all of them are created with the name set to "VALUE. Here is a solution for the similar problem:
https://community.oracle.com/message/12637203#12637203

How to insert url of a selected article from popup in joomla?

I have small plugin(which work for joomla article in admin) of joomla which has a field in xml file like :
<field name="url" type="modal_article" default="" label="Internal Link"
description="" />
Right now it contains only articleId when I save it.
How can I insert url of selected article like index.php?option=com_content&view=article&id=517&catid=28&Itemid=267 ?
if that is not possible how can I use Article select button of joomla admin editor in my custom plugin.
If you want to insert a url, change the type to url
<field name="url" type="url" default="" label="Internal Link"
description="" />
else if you want to have a proper article select, you're using the right type but your fieldset is not importing the modal_article, hence it's rendered as text (where you end up inserting the id). Just import modal_article from
administrator/components/com_content/models/fields/modal/article.php
like this:
<fieldset name="request"
addfieldpath="/administrator/components/com_content/models/fields">
<field name="url" type="modal_article" default="" label="Internal Link"
description="" />
this will make your current code show the modal select (you'll still need to select the right Itemid from the menu to build a proper url).
Finally, another field type you might want to consider is menuitem:
<field name="url" type="modal_article" default="" label="Internal Link"
description="" />
see the full docs on
http://docs.joomla.org/Standard_form_field_types

Spring & Tiles - Get rid of tiles.xml

I have a Tiles template where each page provides a title, some stuff to add in the <head>, stuff to put in some concrete <div>, and stuff to append to <body> after everything else.
Most of those things are very small since the page is rendered with JS.
How can I get rid of tiles.xml or make it more manageable?
I don't want each of the pages to require 3 files:
<definition name="my_page" template="/template.jsp">
<put-attribute name="title" value="My Title" />
<put-attribute name="head" value="/tiles/my-head.jsp" />
<put-attribute name="body" value="/tiles/my-page.jsp" />
<put-attribute name="body-append" value="/tiles/my-append.jsp" />
</definition>
And I don't want to put content of all pages in tiles.xml.
Ideally, it would simply redirect my_page to /my_page.jsp which would import and fill the template by itself.
I'm talking about a Spring app with TilesView.
You can use the tiles JSP tags directly in your JSP. You don't have to use definitions if you don't want to.
In your my_page.jsp:
<tiles:insertTemplate template="/template.jsp" flush="true">
<tiles:putAttribute name="title" value="My Title" />
<tiles:putAttribute name="head" value="/tiles/my-head.jsp" />
... etc
</tiles:insertTemplate>
See http://tiles.apache.org/framework/tiles-jsp/tlddoc/index.html

Best way to set HTML head title in a Spring+Tiles2 application?

I have a usability problem in my Spring webapp which uses Tiles as the view technology.
At the moment all of the pages display the same HEAD_TITLE and the PAGE_TITLE is page specific:
<html>
<head><title>HEAD_TITLE</title></head>
<body>
<h1>PAGE_TITLE</h1>
</body>
</html>
This is a major usability problem as the browsers history lists all different pages of the application with the same title. The reason why the HEAD_TITLE is same for all pages is that I haven't found a reasonable way to use the PAGE_TITLE as the HEAD_TITLE.
In most cases the PAGE_TITLE comes from a message bundle with <fmt:message /> tag and
some parameters are passed to it. The Tiles layout is such that the HEAD_TITLE should be already set at that point because all pages of the webapp use the same common layout which defines the <HEAD> elements of the pages amongst other stuff.
Any suggestions how to fix this usability problem? Should I set a "pageTitle" request attribute in my Spring controllers for all pages and use that as the PAGE_TITLE and also as the HEAD_TITLE? Or is it possible to somehow set the HEAD_TITLE in the page specific JSP?
Create a general definition and define headTitle and pageTitle attributes.
<definition name="threeColumnLayout" template="/WEB-INF/ThreeColumnLayout.jsp" >
<put-attribute name="headTitle" value="" />
<put-attribute name="pageTitle" value="" />
<put-attribute name="left" value="/WEB-INF/left.jsp" />
<put-attribute name="middle" value="" />
<put-attribute name="right" value="/WEB-INF/right.jsp" />
</definition>
Set appropriate values in more specific definition.
<definition name="/user/new" extends="threeColumnLayout">
<put-attribute name="headTitle" value="Administration" />
<put-attribute name="pageTitle" value="Create User" />
<put-attribute name="middle" value="WEB-INF/views/UserCreate.jsp" />
</definition>
Use <tiles:getAsString /> tag to retrieve such values in jsp page.
<head>
<title><tiles:getAsString name="headTitle"/></title>
</head>
<body>
<h1>
<title><tiles:getAsString name="pageTitle"/></title>
</h1>
</body>
Reference:- http://tiles.apache.org/framework/tiles-jsp/tagreference.html#tiles:getAsString

Resources