Hello,
Take a look at the hello-widgetset example. There is a good
description about the widgetset mode in the documentation for the
Wt::WServer class:
----------------------
WidgetSet Specifies an application that manages one or more widgets.
A widget set application is part of an existing HTML page. One or more
HTML elements in that web page may be bound to widgets managed by the
application.
A widgetset application presents itself as a JavaScript file, and
therefore should be embedded in the web page using a <script> tag,
from within the <body> (since it needs access to the <body>).
Note:
A WidgetSet application requires JavaScript support
See also:
WApplication::bindWidget()
----------------------
On Thu, May 21, 2009 at 5:54 PM, Vivek Baindoor Rao <[email protected]> wrote:
> Thanks a lot for that response.
>
> That kept me busy for a while as I have been trying to get a customised web
> page 'served' by the built in httpd but without much luck.
>
> At the moment it looks as though Witty would be interesting to work on - as
> our requirement is to process a web page template which has some #tags (or
> #elementid as it is also known as) which need to be processed and the web
> page needs to be served by replacing the #tag so that a drop down list or
> line edit box appears in the resulting web page.
>
> Trying to figure out whether this is possible at all with Witty - the example
> programs don't seem to include any example which does this. The CSS tutorial
> on the wiki (http://www.webtoolkit.eu/wt/wiki/index.php/Using_CSS) seems to
> be out of date.
>
> Any pointers as to where I can get more up-to-date and relevant information
> would be highly appreciated.
>
> -----Original Message-----
> From: Pau Garcia i Quiles [mailto:[email protected]]
> Sent: 18 May 2009 11:59
> To: [email protected]
> Subject: Re: [Wt-interest] Exploring possible use of Witty - but need togetit
> to work with Automake based codebase
>
> On Mon, May 18, 2009 at 12:45 PM, Vivek Baindoor Rao <[email protected]>
> wrote:
>> Thanks once again,
>>
>> I am using it on Fedora 10 Linux.
>>
>> The specific distribution is probably irrelevant here.
>>
>> Because my point was that if I built it using the CMake and try it - it runs
>> without the need for setting the
>> LD_LIBRARY_PATH - whereas if I try my own automake based makefiles and build
>> it, it is unable to find the
>> library unless I set the LD_LIBRARY_PATH - both on the same computer.
>
>> So if the CMake can create a binary which is able to look for the library in
>> the /usr/local/lib at run time why is my makefile unable to do that please?
>> My guess is that my makefile is missing some option - either compile time or
>> link time. I would like to know which option this is and use it.
>>
>> As I said earlier if I export the LD_LIBARY_PATH my automake makefile
>> generated binary works as well - but this would be an additional variable to
>> be taken care of when the actual binary is then transferred to the actual
>> target hardware - hence want to avoid the need for such an environment
>> variable
>>
>> CMake generated binary - is able to open library file at /usr/local/lib -
>> but -
>> Automake generated binary can not find the library unless the
>> LD_LIBRARY_PATH is exported to include that
>> path - what is missing.
>
> That's because by default CMake sets the RPATH (
> http://en.wikipedia.org/wiki/Rpath_(linking) ).
>
> You would have experienced the same problem if you had passed the
> -DCMAKE_SKIP_RPATH:BOOL=1 parameter to CMake when you built Wt.
>
> Building *without* RPATH is the recommended approach in Unix systems
> (it's *mandatory* when building packages in Debian, for instance).
> This is how I invoke CMake to build the Debian and Ubuntu packages:
>
> cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=1 -DCONNECTOR_FCGI:BOOL=1
> -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCONFIGDIR:PATH=/etc/wt/
> -DWT_CMAKE_FINDER_INSTALL_DIR:PATH=/share/cmake-2.6/Modules
> -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_SKIP_RPATH:BOOL=1
> -DWEBUSER:STRING=www-data -DWEBGROUP:STRING=www-data ..)
>
> Where $(CURDIR) is the build directory.
>
>>
>> -----Original Message-----
>> From: Pau Garcia i Quiles [mailto:[email protected]]
>> Sent: 18 May 2009 10:55
>> To: [email protected]
>> Subject: Re: [Wt-interest] Exploring possible use of Witty - but need to
>> getit to work with Automake based codebase
>>
>> Hello,
>>
>> There is nothing wrong. You have installed Wt in /usr/local/lib
>> instead of /usr/lib and /usr/local/lib is not in your LD_LIBRARY_PATH
>> (strage, but possible; what Linux distribution are you using?)
>>
>> You have to solutions:
>>
>> * Install Wt in /usr/lib. When invoking CMake to build Wt, pass this
>> parameter: -DCMAKE_INSTALL_PREFIX:PATH=/usr
>>
>> * Add /usr/local/lib to the LD_LIBRARY_PATH. Add that directory to
>> /etc/ld.so.conf. In modern distributions, the recommended approach is
>> to add a new file containing that path in the /etc/ld.so.conf.d/
>> directory. After that, run ldconfig. If you want the linker/exec
>> loader to search that new path in other consoles, you may need to run
>> ldconfig in those consoles (or reboot the system and you are done).
>>
>> On Mon, May 18, 2009 at 11:01 AM, Vivek Baindoor Rao <[email protected]>
>> wrote:
>>> Thanks for the quick response.
>>>
>>> After further analysis I have the following situation:
>>>
>>> In my 'configure.ac' file I have:
>>>
>>> PKG_CHECK_MODULES(DEPS, libwthttp-2.2.4 >= 0.0.1)
>>>
>>> So this results in DEPS_CFLAGS and DEPS_LIBS being defined for the
>>> makefile generarion - since
>>> in my Automake based 'Makefile.am' file I have:
>>> INCLUDES = $(DEPS_CFLAGS)
>>> LDADD = $(DEPS_LIBS)
>>> AM_LDFLAGS = -rdynamic -Wl -lgd -lm -ljpeg -lpng12
>>> -lboost_regex-mt -lboost_signals-mt -lz -lssl -lcrypto \
>>> -lboost_thread-mt -lboost_filesystem-mt
>>> -lboost_program_options-mt -lboost_date_time-mt
>>>
>>> The above line forces the libraries to be linked.
>>>
>>> The example program links correctly but when I try to run it I get the
>>> following error:
>>>
>>> error while loading shared libraries: libwthttp.so.4: cannot open shared
>>> object file: No such file or directory
>>>
>>> But the libwthttp.so.4 file is installed in /usr/local/lib directory and
>>> I have created a libwthttp-2.2.4.pc file and the DEPS_CFLAGS and
>>> DEPS_LIBS seem to be defined correctly since the linking goes through.
>>>
>>> Strangely if I export LD_LIBRARY_PATH=/usr/local/lib and run the same
>>> binary it works without problems - in my analysis this is due to some
>>> option being missed out/wrong during compilation and/or linking process
>>> because the CMake based Makefile creates a binary which runs even when
>>> the LD_LIBRARY_PATH is not exported.
>>>
>>>> Date: Fri, 15 May 2009 11:45:26 +0200
>>>> From: Pau Garcia i Quiles <[email protected]>
>>>> Subject: Re: [Wt-interest] Exploring possible use of Witty - but need
>>>> to get it to work with Automake based codebase
>>>> To: [email protected]
>>>> Message-ID:
>>>> <[email protected]>
>>>> Content-Type: text/plain; charset=windows-1252
>>>>
>>>> On Fri, May 15, 2009 at 11:25 AM, Vivek Baindoor Rao
>>> <[email protected]> wrote:
>>>> > Hi Witty members,
>>>> >
>>>> > At the moment exploring and evaluating different packages to provide
>>> a ?Web
>>>> > interface? for existing product with uses a lot of code written in
>>> C++ but
>>>> > managed by Autoconf and Automake set of tools.
>>>> >
>>>> > Having installed the Witty 2.2.4 on a Fedora10 system I find it hard
>>> to get
>>>> > the examples provided with the Wt package work using Automake.? I
>>> have
>>>> > created the configure.ac and Makefile.am files but the linking
>>> options used
>>>> > for creating the executable are a bit of a mystery for me.
>>>> >
>>>> > Can someone tell me how to find the proper options that need to be
>>> given for
>>>> > proper linking of the examples.
>>>>
>>>> I am not sure I have understood what you want.
>>>>
>>>> It should be easy:
>>>> - You always need to link to libwt
>>>> - If the example source code has any #include <Wt/Char/Whatever>, you
>>>> need to link to libwtchart, too
>>>> - If the example source code has any #include <Wt/Ext/Whatever>, you
>>>> need to link to libwtext, too
>>>> - If you want to deploy using the embedded webserver, link to
>>>> liblwthttp. If you want to deploy using FastCGI, link to libwtfcgi.
>>>>
>>>> Please note you need to run the examples from the directory where the
>>>> resources are. If you are not running "make install" for the examples,
>>>> that means you need to run the examples from the directory where the
>>>> source files are, not from where the binaries are.
>>>>
>>>> --
>>>> Pau Garcia i Quiles
>>>> http://www.elpauer.org
>>>> (Due to my workload, I may need 10 days to answer)
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Crystal Reports - New Free Runtime and 30 Day Trial
>>> Check out the new simplified licensing option that enables
>>> unlimited royalty-free distribution of the report engine
>>> for externally facing server and web deployment.
>>> http://p.sf.net/sfu/businessobjects
>>> _______________________________________________
>>> witty-interest mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>>
>>
>>
>>
>> --
>> Pau Garcia i Quiles
>> http://www.elpauer.org
>> (Due to my workload, I may need 10 days to answer)
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables
>> unlimited royalty-free distribution of the report engine
>> for externally facing server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.5.329 / Virus Database: 270.12.32/2119 - Release Date: 05/17/09
>> 16:58:00
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables
>> unlimited royalty-free distribution of the report engine
>> for externally facing server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>
>
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.329 / Virus Database: 270.12.32/2119 - Release Date: 05/17/09
> 16:58:00
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest