<form method="get" class="aui pq-dynamic-parameter-form" action=""> <button type="submit" class="pq-change-button aui-button aui-style aui-button-primary">Change!</button> #foreach($key in $queryParameters.keySet()) #set($reqKey = "pq_$key") <div> <label for="$reqKey">$key</label> <select class="text" id="$reqKey" name="$reqKey" value="$!req.getParameter($reqKey)"> <option value="CRITICAL">CRITICAL</option> <option value="MAJOR">MAJOR</option> <option value="WARNING">WARNING</option> </select> </div> #end </form> $PocketQuery.template("default")
P5: DatePicker
Put this in your template:
<div class="field-group"> <label for="input-date">Choose Date:</label> <input id="input-date" class="pq-datepicker" /> </div>
Then later in the script tag call this:
jQuery('.pq-datepicker').datePicker({overrideBrowserDefault: true});
P6: LIKE
1.) Full LIKE clause
Example Query:
SELECT Name, Population FROM Country WHERE Name LIKE :CountryNameFullLike
For CountryName "Germany" you could enter this in your macro, for example: %erma%
2.) Only part of the LIKE clause
SELECT Name, Population FROM Country WHERE Name LIKE CONCAT('%',:CountryNameMiddlePart,'%')
For CountryName "Germany" you could enter this in your macro, for example: erma
===
Let me know if this helps!
Felix,
In my initial question i asked for 3 points. On first one, discussion is going on. Could you please answer the remaining two i.e.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
P4:
Actually, I think this is an issue very similar to this one: https://answers.atlassian.com/questions/32997105
Maybe you can first evaluate if this helps you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just found that it could be the JS Code in the template in my answer might not work in PQ >= 2.0.2. I asked the author of the question if it still works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
...I'm actually working on a better solution currently...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Communication on the other ticket ongoing. Please check...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Felix,
Since i had one field in the form, i hardcoded the field and here it is like.
<form method="get" class="aui pq-dynamic-parameter-form" action=""> <button type="submit" class="pq-change-button aui-button aui-style aui-button-primary">Change!</button> <div> <label for="pq_Severity">Severity</label> <select id="pq_Severity" name="pq_Severity" selected="$!req.getParameter("pq_Severity")"> <option value="CRITICAL">CRITICAL</option> <option value="MAJOR">MAJOR</option> <option value="WARNING">WARNING</option> </select> </div> </form> <script> PocketQuery.chart('BarChart', { title: "Alerts by Severity", width: 600, height: 400, bar: {groupWidth: "95%"}, legend: { position: "none" }, }); </script>
My requirement is, based on the value of Severity Chosen, the char should get refreshed without page reload.
Any help on Dynamic Parameters with different form type elements would help. May be another article from your side on this would be beneficial from your side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.