Wicket AutoComplete example does not work

2012-05-04 Thread Brian Mulholland
I just looked at the wicket autocomplete example at
http://www.wicket-library.com/wicket-examples/ajax/autocomplete?0 does
not work in IE8 or Firefox.

Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket ListMultipleChoice or DropDownChoice with code/decode

2012-05-02 Thread Brian Mulholland
For some reason I am finding that most Wicket examples have select box
examples that offer single dimension arrays.  But most lookup
selection use cases I've ever encountered use a short key or 'code'
that the user does not see, and then a longer descriptive 'decode' for
the user.  The classic being a state lookup using the postal code (MD,
NY, FL, etc) but showing the user a state name (Maryland, New York,
Florida respectively).  What is the usual way to do this?

Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



ModalWindow parameters

2012-05-01 Thread Brian Mulholland
I am popping up a modal window when an ajax event fires.  The event
has a parameter of which key the user selected.  I know I can get the
parameters from the AjaxRequestTarget in the onClick event, but in
ModalWindow.PageCreator.createPage(), how can I get the parameters so
that I can load the right record into the popup?

Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AbstractAjaxBehavior and second request

2012-04-24 Thread Brian Mulholland
I have a javascript widget on my page that will issue multiple
requests.  I am using an AbstractAjaxBehavior and priming the
javascript component with the uri from getCallbackUri().  First
request works flawlessly.  But the next request using the same uri
(excepting the extra parameters that the javascript widget tacks on),
and it is not getting to the onRequest() method.

I can confirm that the request is going out because I can see it in firebug.

first request:
http://localhost:9080/ManagementCenter/?wicket:interface=:7:subscriptionList::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true&_dc=1335302423707&page=1&start=0&limit=20&group=%5B%7B%22property%22%3A%22RECIPIENT_USER%22%2C%22direction%22%3A%22ASC%22%7D%5D&sort=%5B%7B%22property%22%3A%22RECIPIENT_USER%22%2C%22direction%22%3A%22ASC%22%7D%5D

second request:
http://localhost:9080/ManagementCenter/?wicket:interface=:7:subscriptionList::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true&_dc=1335302444162&page=2&start=20&limit=20&group=%5B%7B%22property%22%3A%22RECIPIENT_USER%22%2C%22direction%22%3A%22ASC%22%7D%5D&sort=%5B%7B%22property%22%3A%22RECIPIENT_USER%22%2C%22direction%22%3A%22ASC%22%7D%5D

I see the wicket:interface portion in there.  Does this number need to
increment or something?

Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AbstractAjaxBehavior and ModalWindow

2012-04-18 Thread Brian Mulholland
I have a page where I show a javascript widget.  Based on events in
said widget, I may fire one of five different ajax events.  On some of
them, I am required to show a modal window with a form in it.  I am
using, based on advice found while googling, AbstractAjaxBehavior to
handle the ajax events, which is working swell for the non-modal
window events.  But ModalWindow (the wicket extension) wants an
AjaxRequestTarget passed to the show() method.  Unlike the example
which uses a link to trigger the modal window, AbstractAjaxBehavior
does not pass an AjaxRequestTarget for me to pass along to the show()
method.

I tried to pass along the request from the RequestCycle, but that got
me the following ClassCastException:
java.lang.ClassCastException:
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget
incompatible with org.apache.wicket.ajax.AjaxRequestTarget




Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Freemarker+ExtJS vs Wicket questions

2011-12-05 Thread Brian Mulholland
> I'm not sure what exactly you tried but here is how I'd approach it:
> - create a Wicket component that purpose is to render just the HTML
> needed by the ExtJS component
> e.g. 
> for this simple HTML snipper you can just use WebMarkupContainer, but
> for something more complex you'll need your own Panel
> - create a Behavior that should contribute the JS code
> this will load the js template, populate it with some options, connect
> it to "someId" and finally just contribute it to the response with
> #renderHead()

That's not too far from what I did.  But as you get into it, all kinds
of little problems arise.  For example, Ext wants it's form in place
instead of the basic HTML form, Ext controls often want to tie into a
separate data source, making the JS controls breaks alot of Wicket's
behaviors which are geared towards markup, and so on.  The devil is in
the details.  As i said, each individual hurdle that presented itself
I was able to overcome, but as time went on, I began to feel like I
had a package full or workarounds.

>> I would really love it if a more experienced Wicket developer took a
>> serious crack at creating a Wicket extension that worked with rich
>> internet controls.  I get the feeling that my effort failed as much
>> because I didn't have deep Wicket knowledge as anything else.
>
> There are several: wiquery, jqwicket, jwicket, wicketstuff-dojo,
> wicketstuff-yui, ...

I saw WiQuery and JQWicket...but didn't really seem to me to be geared
towards a full integration as much as a collection of random stuff for
specific web use cases.  I wasn't familiar with the others.  I'll go
look at those.

> I guess these use different approach to integrate Wicket with the JS
> widgets. Pick the one that you like the most and make it better.

Perhaps once I am more deeply familiar with Wicket I would be
confident enough to try to extend something for public consumption,
but I don't really feel experienced enough to do things Wicket's way.
And Wicket seems like one of those frameworks that really wants you to
know the "right way".  I probably shouldn't have attempted this until
I'd had a few years of development time in Wicket first.  But since
Ext is basically a component hierarchy and Wicket is basically a
component hierarchy, it SEEMED like a perfect fit.  And to some extent
i still believe it could be...in the hands of a more experienced
Wicket developer.

> There are talks about making official integration of Wicket with
> JQuery UI, i.e. maintained by Wicket core developers but so far there
> is nothing done on it.

I read some of those threads.  I think this would be an excellent
idea.  Accessibility is a BIG deal for my contract (US Govt), and many
jQuery widgets aren't ARIA enabled, so I would gently prod those
thinking about it to keep an eye on accessibility if they decided to
do this.  Try to pick jQuery components that support ARIA.

I think the world is going this way.  Users expectations of browser
interfaces are increasing quickly.  If Wicket were to come to market
with it's strong object-orientation (the selling feature that
attracted my contract), and more rich client features built in (like
the various GWT frameworks, but not using that javascript generating
methodology), I think it would capture a space most other web
frameworks aren't as well positioned to exploit.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Freemarker+ExtJS vs Wicket questions

2011-12-05 Thread Brian Mulholland
As a Wicket neophyte myself I can't comment on most of this, but we
did just look deeply into the notion of subclassing components for the
purpose of making them render as rich text widgets from ExtJS.  Having
just done that I will say that there are ALOT of little hidden nits
and difficulties that come up in such an effort.  Wicket and ExtJS
both want to control the rendering of the end markup, so when you
replace the generated markup with Ext widgets, many of Wicket's little
pre-created solutions for various internet use cases breaks.  Each
problem is circumventable, but eventually you find yourself almost
writing your own framework rather than extending a framework.

I would really love it if a more experienced Wicket developer took a
serious crack at creating a Wicket extension that worked with rich
internet controls.  I get the feeling that my effort failed as much
because I didn't have deep Wicket knowledge as anything else.

Brian Mulholland




On Sun, Dec 4, 2011 at 12:30 AM, Andrei Voden  wrote:
> Hi. I have been developing for a while using Freemarker + some JS
> frameworks (like ExtJS, Dojo and JQuery) and Java as Model building on
> back-end. Now I hear lots of talks about Wicket so Im trying to understand
> pros and cons. After reading intro in Wicket I have mixed feelings. Below
> are my conclusions. I know Im biased but dont take it as offense. Instead
> rather as my misunderstanding since Im really trying to see if Wicket
> is thing to switch to.
>
> Pros:
>
> -Seems like this is good for companies where you have Java programmers that
> you can now utilize for building Front-end.
>
> - Clean HTML code and all logic handled by Java.
>
> - Quick to start building simple apps that fall into the box of the
> framework.
>
> - No JScript or HTML/CSS knowledge needed. Can separate easier Frot-end and
> Back-end developers --> easier to hire.
>
> Cons:
>
> - On other hand, as Front-end developer this looks weird to me since I feel
> like I don't have full control of JScript code.
>
> 1) Since Wicket uses Java for generating HTML/CSS/JScript UI controls for
> me meaning if I need to tweak those controls outside of their box it maybe
> problematic. In my experience any framework good until you start doing
> something different from what it was intended and then you can spend more
> time trying to do simple out of box thing then using native JScript. Is
> there JScript sources for Wicket controls?
>
> 2) Prototyping: using Freemarker I can do changes and simply refresh page.
> In case of Wicket I need to recompile.
>
> 3) Logic blocks: Looks like Wicket allows injection of values into HTML
> tags with wicket: attribute but how do you handle block logic like
> IF(condition) then {use HTML block1} else { use another HTML block}?
>
> 4) Non html data templating: often during page generation I compose some
> AJAX data from FreeMarker inside tag. How do I do similar things from
> Wicket?
>
> 5) Is it harder/simpler to create custom UI controls in Wicket vs using say
> Dojo, ExtJS or JQuery?
>
> Andrei

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



jQuery Validation & Wicket

2011-11-30 Thread Brian Mulholland
There is a javascript jQuery client validation framework
(http://bassistance.de/jquery-plugins/jquery-plugin-validation/) that
I tried to integrate with my wicket pages.  Ran it in a local simple
htm, and it worked fine.  I put i into my wicket page and form and it
does not.  No indication of javascript errors or any reason for
failure.  Has anyone used this lib with Wicket?  Does it not work with
Wicket?

The objective is to simply use a client side validation to give quick
feedback on errors, while still enforcing them on the server.  I know
Wicket has it's ajax validation behavior, but i don't want to issue an
ajax request for every component.  This library seems like it should
intgrate fairly seemlessly relying on simple css classes to define
rules.  And yet, it does not.  Anyone know why?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WiQuery vs JQWicket

2011-11-25 Thread Brian Mulholland
Another question.  It looks to me like this grid doesn't set any ARIA
stuff.  I don't suppose that it is WCAG2 AA comformant, is it?

Brian Mulholland





On Fri, Nov 25, 2011 at 9:47 AM, Brian Mulholland
 wrote:
> Nevermind, found it at wicketstuff:
> (http://wicketstuff.org/grid-examples  for future seekers).
>
> But the demo doesn't have source nearby like other wicketstuff demos.
> Does inmethod grid support remote sorting, or is that sorting I see
> local?  In a paged grid, sorting really has to be remote.
>
> Also, what about things like client side validation?  Has anyone done
> a Wicket extension that does client validation?
>
> Brian Mulholland
> "A wise and frugal government which shall restrain men from injuring
> one another, which shall leave them otherwise free to regulate their
> own pursuits of industry and improvement, and shall not take from the
> mouth of labor the bread it has earned. This is the sum of good
> government."
> --Thomas Jefferson (1801)
>
>
>
>
> On Fri, Nov 25, 2011 at 9:14 AM, Brian Mulholland
>  wrote:
>> I hadn't.  I'm a wicket neophyte, so I am often not aware of what is
>> available.  I've been poking around on the internet...is there
>> somewhere where this inmethod grid is demoed?  I see the inmethod
>> website is not a mobile video streaming site, and I saw a couple
>> static photos of it, but I haven't seen a good demo like one finds
>> with wicketstuff.  Is there such a thing?
>>
>> Brian Mulholland
>>
>> On Wed, Nov 23, 2011 at 2:51 PM, Warren Bell  wrote:
>>> Have you tried the InMethod grid, and if you have is there a reason you
>>> are looking for something different? I am just curious.
>>>
>>> Thanks,
>>>
>>> Warren
>>>
>>> On 11/23/11 8:26 AM, Brian Mulholland wrote:
>>>> As I am looking at them, I am not noticing either implementing the
>>>> jQuery grid, much less the paging scrollbar.  Am I overlooking it?
>>>>
>>>> Brian Mulholland
>>>>
>>>>
>>>> On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
>>>>  wrote:
>>>>> I've never used either framework, but your question made me curious
>>>>> again. (Years ago I evaluated the existing wicket-jquery integrations
>>>>> and wasn't happy with how they were designed. Since than I've always
>>>>> just used jquery inside wicket, it's not that hard for simple designs,
>>>>> and for complex designs these frameworks may be just to rigid). That
>>>>> being said I just had a quick glance at the projects again and it seems
>>>>> that WiQuery does the integration via Components (i.e. you create an
>>>>> Accordion Component), while JqWicket does the integration via Bahaviors
>>>>> (i.e. you add an AccordionBehavior to an existing Component, e.g. a
>>>>> ListView). The latter (thus using Behaviors) is how I have always done
>>>>> it, feels more natural to me, and is a lot more flexible.
>>>>>
>>>>> On Wednesday, November 23, 2011 10:16 AM, "Brian Mulholland"
>>>>>  wrote:
>>>>>> We are considering WiQuery and JQWicket.
>>>>>>
>>>>>> 1) Which is better and why?
>>>>>> 2) Is one more established or better supported than the other?
>>>>>> 3) Is one more full featured?
>>>>>>
>>>>>> What differentiates the two?
>>>>>>
>>>>>> Brian Mulholland
>>>>>>
>>>>>> -
>>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WiQuery vs JQWicket

2011-11-25 Thread Brian Mulholland
Nevermind, found it at wicketstuff:
(http://wicketstuff.org/grid-examples  for future seekers).

But the demo doesn't have source nearby like other wicketstuff demos.
Does inmethod grid support remote sorting, or is that sorting I see
local?  In a paged grid, sorting really has to be remote.

Also, what about things like client side validation?  Has anyone done
a Wicket extension that does client validation?

Brian Mulholland
"A wise and frugal government which shall restrain men from injuring
one another, which shall leave them otherwise free to regulate their
own pursuits of industry and improvement, and shall not take from the
mouth of labor the bread it has earned. This is the sum of good
government."
--Thomas Jefferson (1801)




On Fri, Nov 25, 2011 at 9:14 AM, Brian Mulholland
 wrote:
> I hadn't.  I'm a wicket neophyte, so I am often not aware of what is
> available.  I've been poking around on the internet...is there
> somewhere where this inmethod grid is demoed?  I see the inmethod
> website is not a mobile video streaming site, and I saw a couple
> static photos of it, but I haven't seen a good demo like one finds
> with wicketstuff.  Is there such a thing?
>
> Brian Mulholland
>
> On Wed, Nov 23, 2011 at 2:51 PM, Warren Bell  wrote:
>> Have you tried the InMethod grid, and if you have is there a reason you
>> are looking for something different? I am just curious.
>>
>> Thanks,
>>
>> Warren
>>
>> On 11/23/11 8:26 AM, Brian Mulholland wrote:
>>> As I am looking at them, I am not noticing either implementing the
>>> jQuery grid, much less the paging scrollbar.  Am I overlooking it?
>>>
>>> Brian Mulholland
>>>
>>>
>>> On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
>>>  wrote:
>>>> I've never used either framework, but your question made me curious
>>>> again. (Years ago I evaluated the existing wicket-jquery integrations
>>>> and wasn't happy with how they were designed. Since than I've always
>>>> just used jquery inside wicket, it's not that hard for simple designs,
>>>> and for complex designs these frameworks may be just to rigid). That
>>>> being said I just had a quick glance at the projects again and it seems
>>>> that WiQuery does the integration via Components (i.e. you create an
>>>> Accordion Component), while JqWicket does the integration via Bahaviors
>>>> (i.e. you add an AccordionBehavior to an existing Component, e.g. a
>>>> ListView). The latter (thus using Behaviors) is how I have always done
>>>> it, feels more natural to me, and is a lot more flexible.
>>>>
>>>> On Wednesday, November 23, 2011 10:16 AM, "Brian Mulholland"
>>>>  wrote:
>>>>> We are considering WiQuery and JQWicket.
>>>>>
>>>>> 1) Which is better and why?
>>>>> 2) Is one more established or better supported than the other?
>>>>> 3) Is one more full featured?
>>>>>
>>>>> What differentiates the two?
>>>>>
>>>>> Brian Mulholland
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WiQuery vs JQWicket

2011-11-25 Thread Brian Mulholland
I hadn't.  I'm a wicket neophyte, so I am often not aware of what is
available.  I've been poking around on the internet...is there
somewhere where this inmethod grid is demoed?  I see the inmethod
website is not a mobile video streaming site, and I saw a couple
static photos of it, but I haven't seen a good demo like one finds
with wicketstuff.  Is there such a thing?

Brian Mulholland

On Wed, Nov 23, 2011 at 2:51 PM, Warren Bell  wrote:
> Have you tried the InMethod grid, and if you have is there a reason you
> are looking for something different? I am just curious.
>
> Thanks,
>
> Warren
>
> On 11/23/11 8:26 AM, Brian Mulholland wrote:
>> As I am looking at them, I am not noticing either implementing the
>> jQuery grid, much less the paging scrollbar.  Am I overlooking it?
>>
>> Brian Mulholland
>>
>>
>> On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
>>  wrote:
>>> I've never used either framework, but your question made me curious
>>> again. (Years ago I evaluated the existing wicket-jquery integrations
>>> and wasn't happy with how they were designed. Since than I've always
>>> just used jquery inside wicket, it's not that hard for simple designs,
>>> and for complex designs these frameworks may be just to rigid). That
>>> being said I just had a quick glance at the projects again and it seems
>>> that WiQuery does the integration via Components (i.e. you create an
>>> Accordion Component), while JqWicket does the integration via Bahaviors
>>> (i.e. you add an AccordionBehavior to an existing Component, e.g. a
>>> ListView). The latter (thus using Behaviors) is how I have always done
>>> it, feels more natural to me, and is a lot more flexible.
>>>
>>> On Wednesday, November 23, 2011 10:16 AM, "Brian Mulholland"
>>>  wrote:
>>>> We are considering WiQuery and JQWicket.
>>>>
>>>> 1) Which is better and why?
>>>> 2) Is one more established or better supported than the other?
>>>> 3) Is one more full featured?
>>>>
>>>> What differentiates the two?
>>>>
>>>> Brian Mulholland
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WiQuery vs JQWicket

2011-11-23 Thread Brian Mulholland
As I am looking at them, I am not noticing either implementing the
jQuery grid, much less the paging scrollbar.  Am I overlooking it?

Brian Mulholland


On Wed, Nov 23, 2011 at 10:56 AM, Pointbreak
 wrote:
> I've never used either framework, but your question made me curious
> again. (Years ago I evaluated the existing wicket-jquery integrations
> and wasn't happy with how they were designed. Since than I've always
> just used jquery inside wicket, it's not that hard for simple designs,
> and for complex designs these frameworks may be just to rigid). That
> being said I just had a quick glance at the projects again and it seems
> that WiQuery does the integration via Components (i.e. you create an
> Accordion Component), while JqWicket does the integration via Bahaviors
> (i.e. you add an AccordionBehavior to an existing Component, e.g. a
> ListView). The latter (thus using Behaviors) is how I have always done
> it, feels more natural to me, and is a lot more flexible.
>
> On Wednesday, November 23, 2011 10:16 AM, "Brian Mulholland"
>  wrote:
>> We are considering WiQuery and JQWicket.
>>
>> 1) Which is better and why?
>> 2) Is one more established or better supported than the other?
>> 3) Is one more full featured?
>>
>> What differentiates the two?
>>
>> Brian Mulholland
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WiQuery vs JQWicket

2011-11-23 Thread Brian Mulholland
We are considering WiQuery and JQWicket.

1) Which is better and why?
2) Is one more established or better supported than the other?
3) Is one more full featured?

What differentiates the two?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Adding a converter to a label

2011-11-10 Thread Brian Mulholland
Please ignore.  I got my wires crossed.

Brian Mulholland





On Thu, Nov 10, 2011 at 1:00 PM, Brian Mulholland
 wrote:
> Is it not possible to add a converter to label?  The Label's add()
> takes Behaviors, and Converters evidently aren't behaviors.  I know I
> can modify the model or do the conversion beforehand, but I like
> snapping converters onto controls.
>
> Brian Mulholland
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Adding a converter to a label

2011-11-10 Thread Brian Mulholland
Is it not possible to add a converter to label?  The Label's add()
takes Behaviors, and Converters evidently aren't behaviors.  I know I
can modify the model or do the conversion beforehand, but I like
snapping converters onto controls.

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Form action from Form component

2011-11-04 Thread Brian Mulholland
How do I get the value wicket is going to write out in the form action
from the form component.  The links have a getURL method, but I
haven't seen an equivalent method for the form.

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Getting the html output of a wicket panel

2011-11-01 Thread Brian Mulholland
I found that an AbstractTransformerBehavior can be plugged into the
component and gets a callback that tells it the HTML it is going to
render, and gives it a chance to modify it.

Brian Mulholland

On Tue, Nov 1, 2011 at 9:56 AM, Martin Grigorov  wrote:
> See 
> http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/asemail/
>
> On Tue, Nov 1, 2011 at 11:01 AM, Martin Grigorov  wrote:
>> I'll extend the examples with this use case soon
>>
>> On Tue, Nov 1, 2011 at 3:58 AM, mango-object
>>  wrote:
>>> we are trying to get the rendered output of a wicket panel (inside the
>>> current page) into a string variable so that it can be embedded into a email
>>> or let the user edit it in an editor such as TinyMCE.
>>>
>>> I found this post that is really helpful, but we only need the output of a
>>> panel, not the current page.
>>>
>>> http://apache-wicket.1842946.n4.nabble.com/WebPage-geting-string-tt2993717.html
>>>
>>> first thought would be to get the output from the whole page and parse and
>>> extract the panel content, but is there a better way?
>>>
>>> thanks for any help
>>>
>>> --
>>> View this message in context: 
>>> http://apache-wicket.1842946.n4.nabble.com/Getting-the-html-output-of-a-wicket-panel-tp3962290p3962290.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket and ExtJS

2011-10-24 Thread Brian Mulholland
First, thanks for the prompt response.

Okay, so I am struggling with writing a menu component.  I saw the
Suckerfish menu example and tried to adapt that towards my needs.  I
want my fellow developers to be able to write something like:

MyMenu topMenu = new MyMenu("topMenu");
MyMenu subMenu1 = new SubMenu("subMenu1", "Here is a submenu");
MyMenu subMenu2 = new SubMenu2("subMenu2", "Here is another submenu");
subMenu1.addMenuItem(new BookmarkableLink(LINK_ID, SomePage.class),
"Some Page");
subMenu2.addMenuItem(new BookmarkableLink(LINK_ID,
SomeOtherPage.class), "Some Other Page");
submenu1.addMenuItem(new MyMenuSeparator());
subMenu1.addMenuItem(new Link(LINK_ID) {
public void onClick() {
 //do something
}
}, "An action");
subMenu1.addMenuItem(new MyClientSideAction("Do Local Work", "some
javascript code or the name of a client side function to invoke or
something"));
subMenu2.addMenuItem(new Link(LINK_ID) {
public void onClick() {
 //do something else
}
}, "Another action");
subMenu2.addMenuItem(new MyClientSideAction("Other Local Work", "some
javascript code or the name of a client side function to invoke or
something"));

Which would then generate Ext code.  Either as one large block using
the Ext JSON config objects (if you've ever seen Ext code you know
what I mean), or generating a series of smaller scriptlets each
generating the indiidual item needed and adding by name to the
component that is it's parent.

The former might look like this ("m just typing this now so forgive
any typoes).
Ext.onReady(function() {
  //some code to make parent components not shown until we get to it's
items array which might look like:
  items: [{
xtype: 'menu',
items: [{
  xtype: 'menu',
  text: 'Here is a submenu',
  items: [{
xtype: 'menuitem',
text: 'Some Page',
handler: { //some magic code that somehow gets the wicket link
to forward to Some Page }
  }, {
xtype: 'separator'
  }, {
xtype: 'menuitem',
text: 'An Action',
handler: { //some magic code that somehow invokes the onClick
method on the server in the right link }
  }, {
xtype: 'menuitem',
text: 'Do Local Work',
handler: { //the code or function provided  }
  }] //end first submenu's items
 }, {
  xtype: 'menu',
  text: 'Here is another submenu',
  items: [{
xtype: 'menuitem',
text: 'Some Other Page',
handler: { //some magic code that somehow gets the wicket link
to forward to Some Other Page }
  }, {
xtype: 'menuitem',
text: 'Another Action',
handler: { //some magic code that somehow invokes the onClick
method on the server in the right link }
  }, {
xtype: 'menuitem',
text: 'Other Local Work',
handler: { //the code or function provided  }
  }] //end secondsubmenu's items
}] //end topMenu's items
  }] //end the parent object (whatever that is) items
});


the second proposal might have independent script tags at each
wicket:id tag, replacing the element with a script tag that gets the
parent (as detected by the parent hierarchy in wicket) and adds the
component to it's parent.  Because Ext stores each function and
executes it in order, it should have the same effect as above, but
allow the component to be more independent.  It only needs to detect
it's parent.  I like this style better, but I have less idea how to
implement it through wicket.  How can I override what wicket writes
for it's body?

So I would end up with many small block like the following throughout
my rendered markup.

  Ext.onReady(function(){
 var parent = Ext.getCmp("myParent");
 parent.add(Ext.create("whatever we are creating", {
//the config parms
 });
  });


Since I don't know how to do that, I have been writing towards the
first example.  the result of my stumblings is a set of components
that all implement an interface that asks for the snippet of the first
example that represents their contribution, and then adds it as a
header contribution to the page.  Links are resolved by css styling
the markup wicket generates as display:none, and then using javascript
to pick up the link and text of the menu item to add after render.

But this solution feels 'hacky' and inelegant.  It feels like I am
sneaking around the framework, not USING the framework.

As to jQuery.  I know zilch about jQuery.  Because I also am just
learning wicket, I am leery of getting 'sucked into the rabbit hole'
on reading and learning how anothe

Wicket and ExtJS

2011-10-24 Thread Brian Mulholland
So I am on the verge of giving up on integrating Wicket and ExtJS and
going with some other webapp framework.  I thought Wicket and ExtJS
would be the perfect companions because Wicket is basically a
hierarchy of components and so is ExtJS.  If I could extend wicket
components to write out the required javascript instead of their HTML
(or even in addition to), it would be a perfect fit.  My developers
wouldn't need to be expert javascript developers as long as enough of
us were to maintain the components.  The developer could simply snap
in an extended component in Wicket, and like magic, a beautiful
full-featured UI widget appears in their browser.

The problems I am having are probably mostly from my Wicket
inexperience.  I just cannot figure out how to make components that do
what I want.  I try using header contributors to write out the
javascript, but many wicket values (like the links generated by the
link components) don't seem available in the page.  I envisioned being
able to override a method in an extended component to write out what I
wanted to write like myComponent.writeMe() to write out what I wanted
to write out.  But that seems like it's not how Wicket works.

I am presently overriding onBeforeRender at the page level, iterating
through child components looking for an interface I hung on my
extended components, and calling methods to get javascript
contributions from them, and then adding a header contributor to the
page.  But this feels like I am ESCAPING the tool, not using it.

And the strict Wicket component to markup structure is frustrating
because ExtJS 4 builds components solely through javascript.  It feels
like Wicket is fighting me every step of the way, and that screams to
me that I am misusing the tool.

Has anyone done something like this in Wicket?  Can anyone provide
some guidance?  Am I approaching the problem from the wrong
perspective?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Validation

2010-06-15 Thread Brian Mulholland
The two are added to the same component, but have no direct
relationship to each other.  It IS true that the non-working one is
added 2nd.  However in the test where I am trying to get control to
the 2nd one, I typed input that did not evoke a message from the first
validator.

But could you elaborate on that point?  Do you mean that the order in
which I add validators dictates the order in which they execute and
that when a validator fails, others are not executed?  Does that rule
only apply within the component?  And do form validators run if a
field validator fails?

I've been looking around for details like this, and all I see are
highly simplistic examples about required checks.  I never seem to
find an in depth discussion about when validators fire, how they
interact and so forth.  Where is this info discussed?

Brian Mulholland




On Tue, Jun 15, 2010 at 6:12 PM, Jeremy Thomerson
 wrote:
> On Tue, Jun 15, 2010 at 4:57 PM, Brian Mulholland 
> wrote:
>
>> I have two validations on a textbox.  One is extended from the
>> EmailValidation class that comes with wicket and works fine.  The
>> other is an extension of AbstractValidator.  That one never gets
>> called.  It never gets to the onValidate().  Why would one validator
>> get invoked and function perfectly while the other got ignored?  Both
>> were added to the component.
>>
>> Brian Mulholland
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> IIRC, a second validator will not get called if the first fails.  Does the
> second one get called when the first succeeds?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Validation

2010-06-15 Thread Brian Mulholland
I have two validations on a textbox.  One is extended from the
EmailValidation class that comes with wicket and works fine.  The
other is an extension of AbstractValidator.  That one never gets
called.  It never gets to the onValidate().  Why would one validator
get invoked and function perfectly while the other got ignored?  Both
were added to the component.

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Validation Messages

2010-06-07 Thread Brian Mulholland
This is probably a stupid question, but when I set up a validation
like required or a custom validator, I want the "label" in the message
to reflect a value other than the Id of the component.  How can I set
that to a value I'd prefer?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can I develop without recompiling/restarting after every change?

2010-05-30 Thread Brian Mulholland
I have similar frustrations with WAS 7 in RAD 7.5.  WAS 6 supported
hot code replacement while debugging and life was good, but WAS 7
doesn't seem to.  The hot code checkbox is checked, but seems ignored.
 Any RAD users out there have this problem and/or know how to fix it?

Brian Mulholland




On Sun, May 30, 2010 at 9:30 AM, David Chang  wrote:
> Alex,
>
>> 1) Run-jetty-run plugin: http://code.google.com/p/run-jetty-run/
>
> You are right. I googled it out yesterday and tested it. It works perfect.
>
> Thanks for chiming!
>
> Best,
> David
>
>
> --- On Sun, 5/30/10, Alex Objelean  wrote:
>
>> From: Alex Objelean 
>> Subject: Re: Can I develop without recompiling/restarting after every change?
>> To: users@wicket.apache.org
>> Date: Sunday, May 30, 2010, 6:27 AM
>>
>> If you are using eclipse IDE for your development, I find
>> the best tools the
>> following:
>> 1) Run-jetty-run plugin: http://code.google.com/p/run-jetty-run/
>> 2) jRebel
>>
>> With these two, you require absolutely no restart, no
>> matter what you have
>> changed in your wicket application (and not only wicket).
>>
>> Alex
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Can-I-develop-without-recompiling-restarting-after-every-change-tp2226360p2236201.html
>> Sent from the Wicket - User mailing list archive at
>> Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Panel tag

2010-05-21 Thread Brian Mulholland
Cool, those both helped alot.  Unfortunately, they have lead me to
realize another major flaw in my plan.  Of course the wicket panel is
destroying the content in the template.  In most cases that is a
feature, but in this case the point is for the control to act as a
wrapper around other content (both static AND wicket replaced).  But
of course, the panel is replacing that content.

So is there a way to preserve the child content?  To illustrate the
plan, I want my markup in the HTMl template to look something like:


  Tab One! 
  Tab Two!
 

but the rendered HTML would add a hidden input, and some javascript,
but would otherwise preserve the rest of it's content, including any
wicket:id marked tags.  It would go to the browser as something like:


  
  Tab One! 
  Tab Two!
 
/* some javascript not worth repeating here */

I suppose I *might* be able to have the drawTabsHere div NOT
encapsulate the tab1 and tab2 div's.  That is the direction I will
start moving, but is there a way to achieve the above ideal?  Since
tab1 and 2 are children of the drawTabsHere node, it would be better
if the markup reflected that.

On 5/21/10, Richard Wilkinson  wrote:
> Hi,
>
> 1)
> To get wicket to output a dom id you must call
> mycomponent.setOutputMarkupId(true).  This will output a generated dom
> id, which you can access in your java code by calling
> mycomponent.getMarkupId().
> Wicket will overrwrite any dom id in your code, if that element is
> used for a wicket component (ie has wicket:id="myid")
>
> 2)
> Wicket tags like  are removed if the application is
> running in deployment mode, but are rendered if the application is
> running in development.  You can control this explicitly by calling
> getMarkupSettings().setStripWicketTags(true); in your application init
> code, or by using
> Application.get().getMarkupSettings().setStripWicketTags(true); in any
> wicket code.
>
>
> --
> Regards - Richard Wilkinson
> Developer,
> jWeekend: OO & Java Technologies - Development and Training
> http://jWeekend.com
>
>
> On 21 May 2010 17:51, Brian Mulholland  wrote:
>> Our app will be using ExtJS tab controls.  So to make that easier I
>> wrapped the ExtJS code up into a Wicket Panel to hide the complexity
>> of working with ExtJS.  The idea is that I would tell my class what
>> the wicket:id of the span/div was to draw the thing to, as well as
>> naming the N subtab id's (these are the HTML ids) so that the class
>> could write out the javascript code to render the tabs from the markup
>> already in the page.  So the HTML would look like:
>>
>> 
>>  Tab One!
>>  Tab Two!
>> 
>>
>> And the java code would look like:
>>
>> add(new MyTabPanel("drawTabsHere", "tab1", "tab2"));
>>
>> The premise is REALLY close to working.  Here's my problems:
>>
>> 1) The wicket:id="" attribute on the div won't copy the id into the
>> markup.  I must repeat it in the template > wicket:id='drawTabsHere' id='drawTabsHere'>.  I tried adding the id
>> via an Attribute Modifier like so:
>>
>> add(new AttributeModifier("id", new Model(renderToID)));
>>
>> But it ignores me.  I'd rather not force my developers to repeat the
>> id.  How can I accomplish that?
>>
>> 2) More importantly, the rendering of the tabs is malfunctioning.  I
>> believe that it is because the panel actually DRAWS the 
>> tag around the subtab div's and thus screws up ExtJS.  I didn't
>> realize that panels wrote the wicket tags out to the browser until i
>> hit this.  I'd always assumed that "wicket:" tags were for the
>> server's use, and were not rendered.  How can I suppress this so that
>> the DOM hierarchy is right for my use?
>>
>> I do have a hidden input tag in the wicket:panel in order to preserve
>> the selected tab so that we preserve it between submits.  I tried
>> removing it and it did not help, but cannot remove the wicket:panel
>> without Wicket throwing an exception.
>>
>>
>> --
>> Brian Mulholland
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket Panel tag

2010-05-21 Thread Brian Mulholland
Our app will be using ExtJS tab controls.  So to make that easier I
wrapped the ExtJS code up into a Wicket Panel to hide the complexity
of working with ExtJS.  The idea is that I would tell my class what
the wicket:id of the span/div was to draw the thing to, as well as
naming the N subtab id's (these are the HTML ids) so that the class
could write out the javascript code to render the tabs from the markup
already in the page.  So the HTML would look like:


  Tab One!
  Tab Two!


And the java code would look like:

add(new MyTabPanel("drawTabsHere", "tab1", "tab2"));

The premise is REALLY close to working.  Here's my problems:

1) The wicket:id="" attribute on the div won't copy the id into the
markup.  I must repeat it in the template .  I tried adding the id
via an Attribute Modifier like so:

add(new AttributeModifier("id", new Model(renderToID)));

But it ignores me.  I'd rather not force my developers to repeat the
id.  How can I accomplish that?

2) More importantly, the rendering of the tabs is malfunctioning.  I
believe that it is because the panel actually DRAWS the 
tag around the subtab div's and thus screws up ExtJS.  I didn't
realize that panels wrote the wicket tags out to the browser until i
hit this.  I'd always assumed that "wicket:" tags were for the
server's use, and were not rendered.  How can I suppress this so that
the DOM hierarchy is right for my use?

I do have a hidden input tag in the wicket:panel in order to preserve
the selected tab so that we preserve it between submits.  I tried
removing it and it did not help, but cannot remove the wicket:panel
without Wicket throwing an exception.


-- 
Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Combo Box (help!)

2010-05-06 Thread Brian Mulholland
This is a second asking, so sorry if I am being impatient, but I was
hoping to see a response to this.

I've got a combo box with the list in a List of string arrays (code
and decode).  The bean has the currently selected code.  I created a
DropDownChoice with a custom ChoceRenderer as below.  The CR interface
is invoked for both the acquisition of the bean value and for each row
of the list, which is why the below code checks the type of object
coming in.

This works great when displaying, but when the value comes back to the
server, it is loaded back into the bean as
"[Ljava.lang.String;@3c6f3c6f".  It looks like the Object.toString().
What am I doing wrong here?

DropDownChoice ddc = new DropDownChoice(id, new PropertyModel(bean,
id), listOfStringArrays, new IChoiceRenderer(){
   @Override
   public Object getDisplayValue(Object array) {
   if(array instanceof String)
   return (String) array;
   else if(array.getClass().isArray()){
   String[] result = (String[]) array;
   return result[1];
   }
   else
   throw new RuntimeException("Huh?");
   }

   @Override
   public String getIdValue(Object array, int arg1) {
   if(array instanceof String)
   return (String) array;
   else if(array.getClass().isArray())
   {
   String[] result = (String[]) array;
   return result[0];
   }
   else
   throw new RuntimeException("Huh?");
   }
});


-- 
Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Panel without HTML

2010-05-04 Thread Brian Mulholland
I don't have this situation right now, it's mostly curiosity, but I've
had these requirements at times in the past.  If I had a panel whose
appearance was highly dynamic, say perhaps because it was driven by
some personalization or data, can a Wicket panel add components that
don't have a corresponding tag in HTML?

So I would just have a tag for where the wicket panel renders, but the
panel might consist of an unknown combination of other controls so
that I could not have a static HTML template for it.  How might I
handle that in wicket?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Combo Box

2010-05-03 Thread Brian Mulholland
I've got a combo box with the list in a List of string arrays (code
and decode).  The bean has the currently selected code.  I created a
DropDownChoice with a custom ChoceRenderer as below.  The CR interface
is invoked for both the acquisition of the bean value and for each row
of the list, which is why the below code checks the type of object
coming in.

This works great when displaying, but when the value comes back to the
server, it is loaded back into the bean as
"[Ljava.lang.String;@3c6f3c6f".  It looks like the Object.toString().
What am I doing wrong here?

DropDownChoice ddc = new DropDownChoice(id, new PropertyModel(bean,
id), listOfStringArrays, new IChoiceRenderer(){
@Override
public Object getDisplayValue(Object array) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray()){
String[] result = (String[]) array;
return result[1];
}
else
throw new RuntimeException("Huh?");
}

@Override
public String getIdValue(Object array, int arg1) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray())
{
String[] result = (String[]) array;
return result[0];
}
else
throw new RuntimeException("Huh?");
}
});


-- 
Brian Mulholland
"One of the greatest delusions in the world is the hope that the evils
in this world are to be cured by legislation."
--Thomas B. Reed (1886)

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket Wiki

2010-04-29 Thread Brian Mulholland
I've been noticing it for about two weekswhich is about how long
I've worked with Wicket.  :)

On 4/29/10, Ernesto Reinaldo Barreiro  wrote:
> I also noticed that yesterday... I just though was some side effect of
> the attack suffered a few days ago???
>
> Ernesto
>
> On Thu, Apr 29, 2010 at 3:48 PM, Brian Mulholland
>  wrote:
>> I must be in some minority given that the problem hasn't been noticed
>> and fixed, but does anyone else have issues seeing the code example on
>> the Wiki site?  I have to view source and pick them out from the code
>> in order to see them.  The rest of the site renders fine, but those
>> sections show up as thin blue lines (almost like custom s).
>>
>> For example, I have attached a screenshot of what this page looks like
>> in my browser (every page on the wiki with source code sections looks
>> the same):
>> https://cwiki.apache.org/WICKET/using-custom-converters.html
>>
>> At work I am using MSIE 6, but at home i use Google Chrome.  They both
>> do this.  Any maintainers of the wiki on this list who might want to
>> pass that along to someone who can fix the style sheet or whatever
>> might be causing it?
>>
>> --
>> Brian Mulholland
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> ---------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Brian Mulholland
"One of the greatest delusions in the world is the hope that the evils
in this world are to be cured by legislation."
--Thomas B. Reed (1886)

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket Wiki

2010-04-29 Thread Brian Mulholland
I must be in some minority given that the problem hasn't been noticed
and fixed, but does anyone else have issues seeing the code example on
the Wiki site?  I have to view source and pick them out from the code
in order to see them.  The rest of the site renders fine, but those
sections show up as thin blue lines (almost like custom s).

For example, I have attached a screenshot of what this page looks like
in my browser (every page on the wiki with source code sections looks
the same):
https://cwiki.apache.org/WICKET/using-custom-converters.html

At work I am using MSIE 6, but at home i use Google Chrome.  They both
do this.  Any maintainers of the wiki on this list who might want to
pass that along to someone who can fix the style sheet or whatever
might be causing it?

-- 
Brian Mulholland


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Wicket Bench

2010-04-28 Thread Brian Mulholland
Would you say those conveniences are worth it?  In other words, would
you recommend Wicket Bench (or any other plugins)?

Brian Mulholland

On Wed, Apr 28, 2010 at 3:36 PM, Igor Vaynberg  wrote:
> wicket does not require any tooling because it is 90% java code and
> 10% markup. so none of ide plugins provide "must have" features, only
> "conveniences"
>
> -igor
>
> On Wed, Apr 28, 2010 at 12:17 PM, Brian Mulholland
>  wrote:
>> Hi,
>>
>> Wicket n00b here.  How good is Wicket Bench?  I read on the site that
>> it lacks maintainers and it didn't seem like it had alot of powerful
>> features, just some nice convenience things.  Is it a "must have"?
>> Also, is it compatible with the latest Wicket release?  I didn't see
>> anything on the wicket bench site saying what version of wicket it was
>> compatible with.
>>
>> Brian Mulholland
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket Bench

2010-04-28 Thread Brian Mulholland
Hi,

Wicket n00b here.  How good is Wicket Bench?  I read on the site that
it lacks maintainers and it didn't seem like it had alot of powerful
features, just some nice convenience things.  Is it a "must have"?
Also, is it compatible with the latest Wicket release?  I didn't see
anything on the wicket bench site saying what version of wicket it was
compatible with.

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Simple TextField Override and A SubmitLink Question

2010-04-22 Thread Brian Mulholland
Thanks for the response.  I have two thoughts.

1) So you would say that expected Wicket best practice would be what?
My control is effectively a TextField.  Would I extend
AbstractTextComponent (which I see has almost every property TextField
has) and then add() a TextField and a Label to it, and simple
oscillate their visibility based on my enabled flag?  I could see
doing that for this situation.

2) However, I wasn't just curious about this situation, but also the
more general principle.  Perhaps there is a better way to skin this
particular cat, but writing components (new or extended from existing
ones) that modify the HTML rendered seems like a sensible and powerful
use of Wicket's component architecture (indeed, it seems to me to be
Wicket's primary advantage).  But if the onRender has implicit
undocumented rules, then I will bump into them later on when I am
writing my HTML.

For example, let's say I wanted to write a rich DHTML control out of
divs and spans that effectively is a specialized Grid (or whatever).
I would want to make a custom control that extends the ListView (since
we have alot of properties in common) but render the output HTML my
own custom way.  I would assume that overriding the onRender would be
a big part of that, but I need to know the rules for doing so, and I
don't see where they are documented.

I would call this the equivalent of writing my own custom taglibs to
support my application's needs.  Wicket's all-java approach has me
drooling of the potential for re-usable bits, but I need to feel
confident that the framework will support that before I sell the
notion to my teammates.

On 4/22/10, Igor Vaynberg  wrote:
> in wicket you would not override the textfield and make it render as a
> label, thats what the label component does. you would create a
> component that would either add a textfield or a label based on some
> condition.
>
> -igor
>
> On Thu, Apr 22, 2010 at 9:42 AM, Brian Mulholland
>  wrote:
>> I have figured out issue #2.  My form had a method='get' on it and I
>> have a very large grid with checkboxes in it, so I suspect that I was
>> overflowing the request size.  Stupid mistake, but the behavior in no
>> way pointed me towards this.  On the observation I made that it seemed
>> to work when I removed the readOnly logic, I don't know why that made
>> it succeed in some tests.  I can only guess that when testing that
>> part I chose a record that had fewer detail records to load in the
>> grid.  *shrug*.
>>
>> However, I am still very eager to get feedback on the first issue
>> below concerning the onRender.
>>
>> On 4/21/10, Brian Mulholland  wrote:
>>> I am a Wicket n00b.  Just learning and writing a demo app to evaluate
>>> Wicket vs a few other MVC solutions which are having demos written by
>>> other developers in the group.  I am having two issues.
>>>
>>> Issue 1 involves me trying to write a custom TextField to demo the
>>> idea of overriding a control and outputting custom HTML to support it.
>>>  The plan was to override the onRender and write out plain text when
>>> the control is disabled instead of writing out a textbox with the
>>> enabled flag set to false (which is the default behavior).
>>>
>>> So I wrote a TextField with the following onRender:
>>>
>>> @Override
>>> public void onRender(MarkupStream stream)
>>> {
>>>   if(this.isEnabled())
>>> super.onRender(stream);
>>>   else
>>>   {
>>> getResponse().write(getModelValue());
>>> this.renderNext(stream);
>>>   }
>>> }
>>>
>>> I read about the renderNext on nabble, which resolved one exception I
>>> got, but now it throws exceptions saying that it cannot find the
>>> component as if I declared it in html, but did not add it to the
>>> hierarchy.  I know the code outside this render is fine because if I
>>> change the code to keep the super.onRender() call, but merely surround
>>> the super with a span tag with display:none, it works fine.
>>>
>>> But I really wanted this style to work as a proof of concept of
>>> overriding the onRender to output whatever HTML we need.  Customizing
>>> components to put our custom HTML seems to be Wicket's greatest
>>> feature.  But clearly there is some aspect of the onRender contract
>>> that I am missing.  The super must be taking care of something that I
>>> am not aware that I am required to take care of.  Any Ideas?
>>>
>>> Issue 2: Same page.  When the page is in readOnly mode, I set a
>>> readOnly flag, set all my controls 

Re: Simple TextField Override and A SubmitLink Question

2010-04-22 Thread Brian Mulholland
I have figured out issue #2.  My form had a method='get' on it and I
have a very large grid with checkboxes in it, so I suspect that I was
overflowing the request size.  Stupid mistake, but the behavior in no
way pointed me towards this.  On the observation I made that it seemed
to work when I removed the readOnly logic, I don't know why that made
it succeed in some tests.  I can only guess that when testing that
part I chose a record that had fewer detail records to load in the
grid.  *shrug*.

However, I am still very eager to get feedback on the first issue
below concerning the onRender.

On 4/21/10, Brian Mulholland  wrote:
> I am a Wicket n00b.  Just learning and writing a demo app to evaluate
> Wicket vs a few other MVC solutions which are having demos written by
> other developers in the group.  I am having two issues.
>
> Issue 1 involves me trying to write a custom TextField to demo the
> idea of overriding a control and outputting custom HTML to support it.
>  The plan was to override the onRender and write out plain text when
> the control is disabled instead of writing out a textbox with the
> enabled flag set to false (which is the default behavior).
>
> So I wrote a TextField with the following onRender:
>
> @Override
> public void onRender(MarkupStream stream)
> {
>   if(this.isEnabled())
> super.onRender(stream);
>   else
>   {
> getResponse().write(getModelValue());
> this.renderNext(stream);
>   }
> }
>
> I read about the renderNext on nabble, which resolved one exception I
> got, but now it throws exceptions saying that it cannot find the
> component as if I declared it in html, but did not add it to the
> hierarchy.  I know the code outside this render is fine because if I
> change the code to keep the super.onRender() call, but merely surround
> the super with a span tag with display:none, it works fine.
>
> But I really wanted this style to work as a proof of concept of
> overriding the onRender to output whatever HTML we need.  Customizing
> components to put our custom HTML seems to be Wicket's greatest
> feature.  But clearly there is some aspect of the onRender contract
> that I am missing.  The super must be taking care of something that I
> am not aware that I am required to take care of.  Any Ideas?
>
> Issue 2: Same page.  When the page is in readOnly mode, I set a
> readOnly flag, set all my controls to disabled, and change what links
> show.  I am using SubmitLinks.  When the page loads the first time one
> set of actions is enabled (such as a Modify link) and upon hitting
> modify, I set the controls to enabled, and display Save and Cancel
> links while hiding the others.  But upon getting to the modifiable
> mode, none of the SubmitLinks work.  I even tried showing all the
> links all the time and once I have run a request through the app, none
> of the links respond anymore.
>
> However, I found that if I eliminate the code that iterates through my
> controls, the links work.  I wrote a simple setEnabled method that
> uses the IVisitor interface like so:
>
> @Override
> public Object component(Component comp)
> {
>   MyBasePage page = (MyBasePage) comp.getPage();
>   if(FormComponent.class.isAssignableFrom(comp.getClass()))
> comp.setEnabled(!page.isReadOnly());
>   return IVisitor.CONTINUE_TRAVERSAL;
> }
>
> Thus each page will inherit from MyBasePage and just change the
> readOnly flag.  I don't want to disable every Component since I want
> some of the links and other things to work.  I may have to make this
> method smarter in the future, but for now this is pretty close to what
> I want...except for the small detail of not actually working.  I know
> that the links are never getting disabled by this code because I
> debugged through it, and also echoed out the isVisible and isEnabled
> after the fact.  However, when I don't do this, my links refuse to
> respond on the 2nd request.  Further, the request they stop working on
> is when I am ENABLING the controls.
>
> So why if the links are not disabled, might they not be responding
> when I click on them.  The onSubmit() method of the form never gets
> control.  I've tried to provide all the information I know.  Anyone
> have ideas?  Even if you don't know what might be wrong, if you can
> suggest an avenue of investigation that would be helpful.
>
> Also, what resources do you suggest for a Wicket noob?  I've been
> looking at the javadoc and the Wicket wiki and the examples on the
> apache site.  But they all seem fairly light.  The javadoc often has
> insufficient detail (see the onRender issue), the wiki has large
> important sections simply labelled "TODO", and the examples seem
> mostly sl

Simple TextField Override and A SubmitLink Question

2010-04-21 Thread Brian Mulholland
I am a Wicket n00b.  Just learning and writing a demo app to evaluate
Wicket vs a few other MVC solutions which are having demos written by
other developers in the group.  I am having two issues.

Issue 1 involves me trying to write a custom TextField to demo the
idea of overriding a control and outputting custom HTML to support it.
 The plan was to override the onRender and write out plain text when
the control is disabled instead of writing out a textbox with the
enabled flag set to false (which is the default behavior).

So I wrote a TextField with the following onRender:

@Override
public void onRender(MarkupStream stream)
{
  if(this.isEnabled())
super.onRender(stream);
  else
  {
getResponse().write(getModelValue());
this.renderNext(stream);
  }
}

I read about the renderNext on nabble, which resolved one exception I
got, but now it throws exceptions saying that it cannot find the
component as if I declared it in html, but did not add it to the
hierarchy.  I know the code outside this render is fine because if I
change the code to keep the super.onRender() call, but merely surround
the super with a span tag with display:none, it works fine.

But I really wanted this style to work as a proof of concept of
overriding the onRender to output whatever HTML we need.  Customizing
components to put our custom HTML seems to be Wicket's greatest
feature.  But clearly there is some aspect of the onRender contract
that I am missing.  The super must be taking care of something that I
am not aware that I am required to take care of.  Any Ideas?

Issue 2: Same page.  When the page is in readOnly mode, I set a
readOnly flag, set all my controls to disabled, and change what links
show.  I am using SubmitLinks.  When the page loads the first time one
set of actions is enabled (such as a Modify link) and upon hitting
modify, I set the controls to enabled, and display Save and Cancel
links while hiding the others.  But upon getting to the modifiable
mode, none of the SubmitLinks work.  I even tried showing all the
links all the time and once I have run a request through the app, none
of the links respond anymore.

However, I found that if I eliminate the code that iterates through my
controls, the links work.  I wrote a simple setEnabled method that
uses the IVisitor interface like so:

@Override
public Object component(Component comp)
{
  MyBasePage page = (MyBasePage) comp.getPage();
  if(FormComponent.class.isAssignableFrom(comp.getClass()))
comp.setEnabled(!page.isReadOnly());
  return IVisitor.CONTINUE_TRAVERSAL;
}

Thus each page will inherit from MyBasePage and just change the
readOnly flag.  I don't want to disable every Component since I want
some of the links and other things to work.  I may have to make this
method smarter in the future, but for now this is pretty close to what
I want...except for the small detail of not actually working.  I know
that the links are never getting disabled by this code because I
debugged through it, and also echoed out the isVisible and isEnabled
after the fact.  However, when I don't do this, my links refuse to
respond on the 2nd request.  Further, the request they stop working on
is when I am ENABLING the controls.

So why if the links are not disabled, might they not be responding
when I click on them.  The onSubmit() method of the form never gets
control.  I've tried to provide all the information I know.  Anyone
have ideas?  Even if you don't know what might be wrong, if you can
suggest an avenue of investigation that would be helpful.

Also, what resources do you suggest for a Wicket noob?  I've been
looking at the javadoc and the Wicket wiki and the examples on the
apache site.  But they all seem fairly light.  The javadoc often has
insufficient detail (see the onRender issue), the wiki has large
important sections simply labelled "TODO", and the examples seem
mostly slanted toward things that don't really show off the good
stuff.  Are there other good resources that I should be using?

Brian Mulholland

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org