From c6e1c058d0a83bc523accbe6a6068f295954422e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Oct 2010 11:57:20 +0200 Subject: [PATCH] Add parameter to get the name of the parameter from the data provider. --- .../java/net/pterodactylus/sone/template/RequestChangeFilter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java index d9c453e..bd35fa4 100644 --- a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java @@ -47,6 +47,10 @@ public class RequestChangeFilter implements Filter { public Object format(DataProvider dataProvider, Object data, Map parameters) { Request request = (Request) data; String name = parameters.get("name"); + String nameKey = parameters.get("nameKey"); + if (nameKey != null) { + name = String.valueOf(dataProvider.getData(nameKey)); + } String key = parameters.get("key"); String value = null; if (key != null) { -- 2.7.4