Kurt Roeckx | 1 May 2011 10:57
Picon

Creating a form going to an other page

Hi,

I would like a create form that does a post and doesn't go to the
application.  Is there a way to create such a form?

Kurt

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Dmitriy Igrishin | 1 May 2011 20:15
Picon

Re: Creating a form going to an other page

Hey Kurt,

2011/5/1 Kurt Roeckx <kurt-burXGKnpAKGzQB+pC5nmwQ@public.gmane.org>
Hi,

I would like a create form that does a post and doesn't go to the
application.  Is there a way to create such a form?
Yes, use HTML.
Seriously, what does it means in the context of Wt application?


Kurt


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
witty-interest mailing list
witty-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest



--
// Dmitriy.


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Kurt Roeckx | 1 May 2011 21:05
Picon

Re: Creating a form going to an other page

On Sun, May 01, 2011 at 10:15:09PM +0400, Dmitriy Igrishin wrote:
> Hey Kurt,
> 
> 2011/5/1 Kurt Roeckx <kurt@...>
> 
> > Hi,
> >
> > I would like a create form that does a post and doesn't go to the
> > application.  Is there a way to create such a form?
> >
> Yes, use HTML.
> Seriously, what does it means in the context of Wt application?

The form I want to create contains a bunch of (hidden) input fields
that need to be send to something else.  So I want a real form
with a submit input, not a button.  And I want to create those
hidden input fields.

So I created the HTML myself and show it using Wt::WText with
TextFormat set to XHTMLUnsafeText.

But now I have to start wondering about properly quoting/escaping
the values I set.  I potentionally also have to start wondering
about XSS, but I don't think that's a problem in this case.

I think the library should provide me ways to automate this, so
that I don't have to worry about those things.  But I don't find
anything in the documentation to:
- create hidden input fields
- create a submit button
- set the method and action of a form
- quote/escape the string for the input field

Kurt

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Gurpreet Kaur Karwal | 2 May 2011 07:52
Picon

hello example problem

Hello everyone, I am very new to Wt and I am very much impressed by its awesome features and under-lying model. I want to use it for the development of various applications. I installed Wt successfully and its examples are working fine too. Then I tried creating my own application using the same source code given in examples. After trying a lot I successfully deployed Dialog Example by putting it in my own folder and creating CMakeLists.txt of my own following various links. But there is always a problem when I try to do the same with "hello" examples. The problems appear after "make" command, these are:

In constructor ‘HelloApplication::HelloApplication(const Wt::WEnvironment&)’:
62: error: no match for call to ‘(Wt::EventSignal<Wt::WMouseEvent>) ()’
/usr/include/Wt/WSignal:875: note: candidates are: void Wt::EventSignal<E>::operator()(E) [with E = Wt::WMouseEvent]
:67: error: invalid use of ‘void’
make[2]: *** [file/CMakeFiles/file.wt.dir/file.o] Error 1
make[1]: *** [file/CMakeFiles/file.wt.dir/all] Error 2
make: *** [all] Error 2

Can anybody tell what am I doing wrong?

Warm Regards

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Koen Deforche | 2 May 2011 08:44
Picon
Favicon

Re: hello example problem

Hey,

2011/5/2 Gurpreet Kaur Karwal <er.gurpreet90@...>:
> Hello everyone, I am very new to Wt and I am very much impressed by its
> awesome features and under-lying model. I want to use it for the development
> of various applications. I installed Wt successfully and its examples are
> working fine too. Then I tried creating my own application using the same
> source code given in examples. After trying a lot I successfully deployed
> Dialog Example by putting it in my own folder and creating CMakeLists.txt of
> my own following various links. But there is always a problem when I try to
> do the same with "hello" examples. The problems appear after "make" command,
> these are:
>
> In constructor ‘HelloApplication::HelloApplication(const
> Wt::WEnvironment&)’:
> 62: error: no match for call to ‘(Wt::EventSignal<Wt::WMouseEvent>) ()’
> /usr/include/Wt/WSignal:875: note: candidates are: void
> Wt::EventSignal<E>::operator()(E) [with E = Wt::WMouseEvent]
> :67: error: invalid use of ‘void’

It seems you are trying to copy something (a widget, the application
?), which isn't allowed.

Regards,
koen

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Wim Dumon | 2 May 2011 11:22
Picon
Favicon

Re: Wt Wrapper

Hi Mohammed,

A minimalistic wrapper for OpenLayers with an OpenStreetMap map looks like this:

class WOpenLayers: public WContainerWidget
{
public:
 WOpenLayers(WContainerWidget *parent):
   WContainerWidget(parent)
 {
   wApp->require("http://www.openlayers.org/api/OpenLayers.js");

   resize(640, 480);
   std::stringstream ss;
   ss << "var map = new OpenLayers.Map('" + id() + "');"
     "var osm = new OpenLayers.Layer.OSM();"
     "map.addLayer(osm);"
     "map.zoomToMaxExtent();";
   doJavaScript(ss.str());
 }
};

See also http://redmine.emweb.be/boards/2/topics/1838

BR,
Wim.

2011/4/20 Mohammed Rashad <mohammedrashadkm@...>:
> yes our application also support OpenStreetMap,google,anyWMS,postgis,bing
> and so on
> Now i am loading the library using require. I need to create the Wt version
> of OpenLayers for that I need help  Wt developers
>
> On Wed, Apr 20, 2011 at 5:53 PM, <FTegtmeyer@...> wrote:
>>
>> Please consider handling OpenStreetmap with the same priority as Google
>> Maps then.
>> Unfortunately this is not done too often.
>>
>> With kind regards,
>> Frank
>>
>>
>>
>>
>> From:   Mohammed Rashad <mohammedrashadkm@...>
>> To:     witty-interest@...
>> Date:   20.04.2011 14:20
>> Subject:        [Wt-interest] Wt Wrapper
>>
>>
>>
>> I had a  JavaScript library called OpenLayers. I would like to develop a
>> Wt
>> Wrapper for that library. Can anyone throw some light?
>> How  JQuery library became a part of Wt. In the same way I would like
>> create WtOpenLayers.
>>
>>
>> I need Wt geeks help ....
>>
>> --
>> Thanks && Regards
>> Rashad
>>
>> ------------------------------------------------------------------------------
>>
>> Benefiting from Server Virtualization: Beyond Initial Workload
>> Consolidation -- Increasing the use of server virtualization is a top
>> priority.Virtualization can reduce costs, simplify management, and improve
>> application availability and disaster protection. Learn more about
>> boosting
>>
>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@...
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
>
>
> --
> Thanks && Regards
> Rashad
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> witty-interest mailing list
> witty-interest@...
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Wim Dumon | 2 May 2011 15:32
Picon
Favicon

Re: Creating a form going to an other page

> The form I want to create contains a bunch of (hidden) input fields
> that need to be send to something else.  So I want a real form
> with a submit input, not a button.  And I want to create those
> hidden input fields.
>
> So I created the HTML myself and show it using Wt::WText with
> TextFormat set to XHTMLUnsafeText.
>
> But now I have to start wondering about properly quoting/escaping
> the values I set.  I potentionally also have to start wondering
> about XSS, but I don't think that's a problem in this case.
>
> I think the library should provide me ways to automate this, so
> that I don't have to worry about those things.  But I don't find
> anything in the documentation to:
> - create hidden input fields
> - create a submit button
> - set the method and action of a form
> - quote/escape the string for the input field
>

Hi Kurt,

There's a mechanism in Wt that may allow you to do what you want. See
the manual of WTemplate. If you can make your form a WTemplate, Wt
will still perform XSS filterning on the tags that you supply to the
template - I would expect that this will also be the visible text in
your case.

Can this approach solve your problems?

BR,
Wim.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Wim Dumon | 2 May 2011 15:46
Picon
Favicon

Re: Leakage in WObject.C

Well observed, patch is applied.

Thank  you,
Wim.

2011/4/29 Gaetano Mendola <mendola@...>:
> Hi all,
> looking at the code it seems that WObject has a lazy initialization of
> signal member "destroyed_" only when
> someone asks to be notified. I immagine the lazy initialization is due
> the fact the majority of classes derived
> by WObject are not asked to emit that signal.
>
> Patch to destroy this signal instante in WObject DTOR follows.
>
> diff --git a/src/Wt/WObject.C b/src/Wt/WObject.C
> index 09cc975..d89b5cc 100644
> --- a/src/Wt/WObject.C
> +++ b/src/Wt/WObject.C
>  <at>  <at>  -76,6 +76,7  <at>  <at>  WObject::~WObject()
>  #ifndef WT_CNOR
>   if (destroyed_)
>     destroyed_->emit(this);
> +  delete destroyed_;
>  #endif
>
>   for (unsigned i = 0; i < statelessSlots_.size(); ++i)
>
>
>
> Gaetano
>
> --
> cpp-today.blogspot.com
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> witty-interest mailing list
> witty-interest@...
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Kurt Roeckx | 2 May 2011 17:48
Picon

Re: Creating a form going to an other page

On Mon, May 02, 2011 at 03:32:31PM +0200, Wim Dumon wrote:
> > I think the library should provide me ways to automate this, so
> > that I don't have to worry about those things.  But I don't find
> > anything in the documentation to:
> > - create hidden input fields
> > - create a submit button
> > - set the method and action of a form
> > - quote/escape the string for the input field
> >
> 
> Hi Kurt,
> 
> There's a mechanism in Wt that may allow you to do what you want. See
> the manual of WTemplate. If you can make your form a WTemplate, Wt
> will still perform XSS filterning on the tags that you supply to the
> template - I would expect that this will also be the visible text in
> your case.
> 
> Can this approach solve your problems?

I've just looked at this.  From what I understand:
- I would still have to write my own (X)HTML
- When using the bindString() with FormatText set to Wt::PlainText
  I can probably get the proper escaping done for me.

But then I wonder if the bindString() is going to add things like
a span around it, which is not what I want.

Kurt

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Dmitriy Igrishin | 2 May 2011 19:43
Picon

Re: Creating a form going to an other page

Hey Kurt,

2011/5/1 Kurt Roeckx <kurt-burXGKnpAKGzQB+pC5nmwQ@public.gmane.org>
On Sun, May 01, 2011 at 10:15:09PM +0400, Dmitriy Igrishin wrote:
> Hey Kurt,
>
> 2011/5/1 Kurt Roeckx <kurt <at> roeckx.be>
>
> > Hi,
> >
> > I would like a create form that does a post and doesn't go to the
> > application.  Is there a way to create such a form?
> >
> Yes, use HTML.
> Seriously, what does it means in the context of Wt application?

The form I want to create contains a bunch of (hidden) input fields
that need to be send to something else.
May I ask you about destination ?
 
 So I want a real form
with a submit input, not a button.  And I want to create those
hidden input fields.

So I created the HTML myself and show it using Wt::WText with
TextFormat set to XHTMLUnsafeText.

But now I have to start wondering about properly quoting/escaping
the values I set.  I potentionally also have to start wondering
about XSS, but I don't think that's a problem in this case.

I think the library should provide me ways to automate this, so
that I don't have to worry about those things.  But I don't find
anything in the documentation to:
- create hidden input fields
- create a submit button
- set the method and action of a form
- quote/escape the string for the input field
Yes, and that great, because the primary Wt philosophy is
"complete abstraction of any web-specific implementation details".



Kurt


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today.  Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
witty-interest mailing list
witty-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest



--
// Dmitriy.


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest

Gmane