Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » using UI libraries in custom parameter page
using UI libraries in custom parameter page [message #701948] Mon, 25 July 2011 19:13 Go to next message
Scroon  is currently offline Scroon Friend
Messages: 28
Registered: June 2011
Junior Member
Hello,

I've used BIRT tag library to build a custom parameter page:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body>

<birt:parameterPage id="birtParmPage" reportDesign="report\Report.rptdesign"
name="my form"
pattern="frameset"
format="html"
isCustom="true"
showTitle="true"
showToolBar="true"
showNavigationBar="true"
target="content"
>
ClientName: <birt:paramDef id="11" name="ClientName" />
<br>
Date From:
<birt:paramDef id="22" name="date_from"/>
Date To:    
<birt:paramDef id="33" name="date_to"/>
<br>
<input type="submit" name="submit" value="Run Report"/>
</birt:parameterPage>
<br>
</body>
</html>


It works well, the only problem is it does not looks lovely. Especially the input for the dates, they are just plain text boxes...:
index.php/fa/3465/0/

Since the input boxes is defined by the BIRT tag library, the input elements does not defined in regular way like
<input id="datefrom" type="text">

but with:
<birt:paramDef id="33" name="datefrom"/> 


How can I use some UI library with the custom parameter page for some elements in the page ? e.g: Add a calendar widget for the Date inputs.

Thanks in advance.

Scroon
  • Attachment: 2.JPG
    (Size: 9.19KB, Downloaded 1202 times)

[Updated on: Mon, 25 July 2011 19:32]

Report message to a moderator

Re: use UI libraries in custom parameter page [message #702015 is a reply to message #701948] Mon, 25 July 2011 21:09 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Why not just use normal text boxes for the two date parameters and add
onclick events to these. Just make sure to use the name attribute and
set it to the correct parameter name. Next use something like is shown
in this thread to hook up a calendar.

http://www.birt-exchange.org/org/forum/index.php/topic/11498-birt-datepicker-plzzzzzzzzzzz/

Jason



On 7/25/2011 3:13 PM, Scroon wrote:
> Hello,
>
> I've used BIRT tag library to build a custom parameter pages:
>
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> pageEncoding="ISO-8859-1"%>
> <%@ taglib uri="/birt.tld" prefix="birt" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> </head>
>
> <body>
>
> <birt:parameterPage id="birtParmPage" reportDesign="report\Report.rptdesign"
> name="my form"
> pattern="frameset"
> format="html"
> isCustom="true"
> showTitle="true"
> showToolBar="true"
> showNavigationBar="true"
> target="content"
>>
> ClientName:<birt:paramDef id="11" name="ClientName" />
> <br>
> Date From:
> <birt:paramDef id="22" name="date_from"/>
> Date To:
> <birt:paramDef id="33" name="date_to"/>
> <br>
> <input type="submit" name="submit" value="Run Report"/>
> </birt:parameterPage>
> <br>
> </body>
> </html>
>
>
> It works well, the only problem is it does not looks lovely. Especially the input for the dates, they are just plain text boxes...:
>
>
> Since the input boxes is defined by the BIRT tag library, the input elements does not defined in regular way like
> <input id="datefrom" type="text">
> but with:
> <birt:paramDef id="33" name="date_to"/>
>
> How can I use some JavaScript UI library with the custom parameter page for some elements in the page ? e.g: Add a calendar widget for the Date input.
>
Re: use UI libraries in custom parameter page [message #702556 is a reply to message #702015] Tue, 26 July 2011 14:13 Go to previous messageGo to next message
Scroon  is currently offline Scroon Friend
Messages: 28
Registered: June 2011
Junior Member
Hi,

Do you mean to define the parameters like:
<birt:parameterPage
......
.....
>
......
Date From:
<input type="text" name="date_from" />
To:
<input type="text" name="date_to" />
<br>
<input type="submit" name="submit" value="Run Report"/>
</birt:parameterPage>


It works good, but the input box is still a plain text box.


I already added a calendar widget to the BIRT viewer, and parameters with date type in BIRT default parameter page are now rendered with a calendar:
index.php/fa/3482/0/

But it does not work for parameters defined with BIRT tag library in a custom parameter page:

index.php/fa/3483/0/

I also tried:
Date From:
<input type="date" name="date_from" />
To:
<input type="date" name="date_to" />

It still rendered as plain text boxes...


Jason Weathersby wrote on Mon, 25 July 2011 17:09
Why not just use normal text boxes for the two date parameters and add
onclick events to these. Just make sure to use the name attribute and
set it to the correct parameter name. Next use something like is shown
in this thread to hook up a calendar.

http://www.birt-exchange.org/org/forum/index.php/topic/11498-birt-datepicker-plzzzzzzzzzzz/

Jason



On 7/25/2011 3:13 PM, Scroon wrote:
> Hello,
>
> I've used BIRT tag library to build a custom parameter pages:
>
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> pageEncoding="ISO-8859-1"%>
> <%@ taglib uri="/birt.tld" prefix="birt" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> </head>
>
> <body>
>
> <birt:parameterPage id="birtParmPage" reportDesign="report\Report.rptdesign"
> name="my form"
> pattern="frameset"
> format="html"
> isCustom="true"
> showTitle="true"
> showToolBar="true"
> showNavigationBar="true"
> target="content"
>>
> ClientName:<birt:paramDef id="11" name="ClientName" />
> <br>
> Date From:
> <birt:paramDef id="22" name="date_from"/>
> Date To:
> <birt:paramDef id="33" name="date_to"/>
> <br>
> <input type="submit" name="submit" value="Run Report"/>
> </birt:parameterPage>
> <br>
> </body>
> </html>
>
>
> It works well, the only problem is it does not looks lovely. Especially the input for the dates, they are just plain text boxes...:
>
>
> Since the input boxes is defined by the BIRT tag library, the input elements does not defined in regular way like
> <input id="datefrom" type="text">
> but with:
> <birt:paramDef id="33" name="date_to"/>
>
> How can I use some JavaScript UI library with the custom parameter page for some elements in the page ? e.g: Add a calendar widget for the Date input.
>

  • Attachment: c1.JPG
    (Size: 19.29KB, Downloaded 1170 times)
  • Attachment: c2.JPG
    (Size: 8.51KB, Downloaded 1004 times)

[Updated on: Tue, 26 July 2011 14:18]

Report message to a moderator

Re: use UI libraries in custom parameter page [message #702586 is a reply to message #702556] Tue, 26 July 2011 14:27 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I am not sure what widget you are using but I assumed it needed to be
launched from javascript. So to hook it you would use normal text box
with onclick event like:

<script type="text/javascript">
function callcalendar()
{
//do something with calendar
}
</script>


<input type=text name=type onclick="callcalendar();">

Jason

On 7/26/2011 10:13 AM, Scroon wrote:
> Hi,
>
> Do you mean to define the parameters like:
> <birt:parameterPage
> ......
> .....
>>
> ......
> Date From:
> <input type="text" name="date_from" />
> To: <input type="text" name="date_to" />
> <br>
> <input type="submit" name="submit" value="Run Report"/>
> </birt:parameterPage>
>
>
> It works good, but the input box is still a plain text box.
>
>
> I already added a calendar widget to the BIRT viewer, and parameters
> with date type are now rendered with a calendar. But it does not work
> for parameters defined with BIRT tag library....
>
> I also tried:
> Date From:
> <input type="date" name="date_from" />
> To: <input type="date" name="date_to" />
>
> It still rendered as plain text boxes...
>
>
> Jason Weathersby wrote on Mon, 25 July 2011 17:09
>> Why not just use normal text boxes for the two date parameters and add
>> onclick events to these. Just make sure to use the name attribute and
>> set it to the correct parameter name. Next use something like is shown
>> in this thread to hook up a calendar.
>>
>> http://www.birt-exchange.org/org/forum/index.php/topic/11498-birt-datepicker-plzzzzzzzzzzz/
>>
>>
>> Jason
>>
>>
>>
>> On 7/25/2011 3:13 PM, Scroon wrote:
>> > Hello,
>> >
>> > I've used BIRT tag library to build a custom parameter pages:
>> >
>> >
>> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>> > pageEncoding="ISO-8859-1"%>
>> > <%@ taglib uri="/birt.tld" prefix="birt" %>
>> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> > "http://www.w3.org/TR/html4/loose.dtd">
>> > <html>
>> > <head>
>> > <meta http-equiv="Content-Type" content="text/html;
>> charset=ISO-8859-1">
>> > </head>
>> >
>> > <body>
>> >
>> > <birt:parameterPage id="birtParmPage"
>> reportDesign="report\Report.rptdesign"
>> > name="my form"
>> > pattern="frameset"
>> > format="html"
>> > isCustom="true"
>> > showTitle="true"
>> > showToolBar="true"
>> > showNavigationBar="true"
>> > target="content"
>> >>
>> > ClientName:<birt:paramDef id="11" name="ClientName" />
>> > <br>
>> > Date From:
>> > <birt:paramDef id="22" name="date_from"/>
>> > Date To:
>> > <birt:paramDef id="33" name="date_to"/>
>> > <br>
>> > <input type="submit" name="submit" value="Run Report"/>
>> > </birt:parameterPage>
>> > <br>
>> > </body>
>> > </html>
>> >
>> >
>> > It works well, the only problem is it does not looks lovely.
>> Especially the input for the dates, they are just plain text boxes...:
>> >
>> >
>> > Since the input boxes is defined by the BIRT tag library, the input
>> elements does not defined in regular way like
>> > <input id="datefrom" type="text">
>> > but with:
>> > <birt:paramDef id="33" name="date_to"/>
>> >
>> > How can I use some JavaScript UI library with the custom parameter
>> page for some elements in the page ? e.g: Add a calendar widget for
>> the Date input.
>> >
>
>
Previous Topic:Multi-value cascading parameters in Custom Parameter Page
Next Topic:Using BIRT APIs
Goto Forum:
  


Current Time: Thu Apr 18 20:19:27 GMT 2024

Powered by FUDForum. Page generated in 0.02685 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top