Re: Please Please Portlet

2009-03-03 Thread Niels van Kampenhout
On Tue, Mar 3, 2009 at 7:43 AM, Francisco Diaz Trepat - gmail
 wrote:
> Hi all, I decided to ask for help, since last night I had nightmares of xml
> files extrangulating me.
> I read the portlet how-to in the wiki, probably misread it. I have an
> application that has no portlet usage (as in no blabla extends blaportlet),
> but I was told that all the application could be seen from inside a portle,
> simply by configure xmls:
>
> web.xml
> portlet.xml
> sun-web.xml
>
> (using Netbeans, wicket 1.4rc2, glassfish v3, portlet-container from
> open-portal project)
>
>
> I have this on the web.xml:
>
>   
>      WicketFilter
>
>  org.apache.wicket.protocol.http.WicketFilter
>
>      
>      
>         portletOnlyFilter
>         true
>      
>
>      
>         detectPortletContext
>         true
>      
>
>
>      
>         configuration
>         development
>      
>
>     
>         filterMappingUrlPattern
>
> /MyApplicationThatDoesNotWorkWithPortlet/*
>      
>
> I have this on the portlet.xml:
>
> 
>   
>       MyApplicationThatDoesNotWorkWithPortlet
> portlet version
>       MyApplicationThatDoesNotWorkWithPortlet 
>       MyApplicationThatDoesNotWorkWithPortlet -
> Portlet
>
>  org.apache.wicket.protocol.http.portlet.WicketPortlet
>
>      
>        wicketFilterPath
>        /MyApplicationThatDoesNotWorkWithPortlet
>      
>
>      -1
>      
>         */*
>         VIEW
>      
>      
>         MyApplicationThatDoesNotWorkWithPortlet
>
> Portlet MyApplicationThatDoesNotWorkWithPortlet
>      
>   
> 
>
> finally I have this on the sun-web.xml:
>
> 
>  /MyApplicationThatDoesNotWorkWithPortlet
>  
>  
>    
>      Keep a copy of the generated servlet class' java
> code.
>    
>  
> 
>
> Please, could someone help me out. I couldn't find a comprehensive guide to
> these 3 xml file and I am sure that I am missing something.

I suggest looking at the web.xml and portlet.xml in wicket-examples
[1]. That's what I did and I had my Wicket app running as a portlet in
no time.

One thing I miss in your filter configuration is the init-param
'applicationClassName' which should have your Wicket application class
as value.

HTH,

Niels

[1] 
http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4-rc2/wicket-examples/

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



Re: sneak peek - brix - wicket/jcr cms

2008-07-09 Thread Niels van Kampenhout

[EMAIL PROTECTED] wrote:

If you compile on jdk6 it will work.


Ah, that explains, I am using jdk 5 :-)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sneak peek - brix - wicket/jcr cms

2008-07-09 Thread Niels van Kampenhout

Igor Vaynberg wrote:

suggestions, feedback, etc are welcome as well as any help. we have
not been working on this very long so it is not extremely polished
yet. for more info see the website.


Very interesting, thanks for sharing this. Your current svn trunk seems 
to be broken though (revision 356). I could only get it to build and run 
by commenting out two @Override annotations in MenuEditor.java (lines 81 
and 89) and adding the following method to FileUtils.java:


public static String getTemporaryFileName() {
return "/tmp/brix";
}

But maybe I am missing something.

Niels


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Palette and ajax behaviours

2008-04-28 Thread Niels van Kampenhout

Igor Vaynberg wrote:

we will have to rig the javascript that palette uses to invoke the
onchange handler on recorder manually, or maybe not on the recorder
but on its own tag so you can attach behaviors directly to it...

open a jira. attach a patch if you want this to be handled quickly,
shouldnt be that hard at all.


OK I created an issue in Jira:

https://issues.apache.org/jira/browse/WICKET-1574

Niels

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Palette and ajax behaviours

2008-04-22 Thread Niels van Kampenhout

Igor Vaynberg wrote:

palette is a javascript component, what parts do you want to ajaxify?


If the selection in the Palette changes, I'd like to update another form 
field (also a Palette as a matter of fact).


So I'd like to attach an AjaxFormComponentUpdatingBehavior("onchange") 
to the Palette, like the mini example in the apidoc [1].


thanks
Niels

[1] 
http://wicketframework.org/wicket-extensions/apidocs/wicket/extensions/markup/html/form/palette/Palette.html



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Palette and ajax behaviours

2008-04-22 Thread Niels van Kampenhout

What is the best way to attach ajax behaviours to a Palette?

Igor, in the javadoc for Palette you say that ajax behaviours for a 
Palette should be attached to the recorder component [1]. However in 
your reply on [2] you say that "recorder wont get onchange because its 
value is changed pragmatically".


I tried getting the recorder using getRecorderComponent() but it returns 
null.


Any ideas?

thanks

Niels

[1] 
http://wicketframework.org/wicket-extensions/apidocs/wicket/extensions/markup/html/form/palette/Palette.html


[2] 
http://www.nabble.com/Palette-and-on-change-notifications-to16177630.html



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "option transfer" widget

2008-04-22 Thread Niels van Kampenhout

Igor Vaynberg wrote:

thats kind of a waste because this [1] has been there since 1.2

[1]  
http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.PalettePage


Thanks everyone for the quick replies, this is very useful.

Niels


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



"option transfer" widget

2008-04-22 Thread Niels van Kampenhout

Hi all

Before I write it myself, is there any component in Wicket stuff or 
somewhere else like the "option transfer" on [1]. I couldn't find it, 
but I don't know what the generally accepted name for such a widget is 
which makes searching a little difficult.


Shouldn't be too difficult to write but if it's readily available ;-)

thanks

Niels

[1] http://www.mattkruse.com/javascript/optiontransfer/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tabbing from one AjaxEditableLabel to the next

2007-12-10 Thread Niels van Kampenhout

Johan Compagner wrote:

I think you need some javascript hacking because there is no input
field yet that could be targetted and what is the next one? Labels
dont really have a tab sequence or maybe if you use the labelfor
property somehow?

Of course this could be somehow also coded in the wicket component,
for example you set what the next one should become, and the textfield
listens for a tab (and maybe shift tab) and then does its call to the
next


I was hoping someone had already done exactly that ;-)

I'll give it a try.

Thanks

Niels


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tabbing from one AjaxEditableLabel to the next

2007-12-07 Thread Niels van Kampenhout

Hi,

On a page with several AjaxEditableLabels (like [1]), is there a nice 
way to specify that the Tab key should select the next editable field 
(like ordinary input fields)? Or do I need to use some good old plain 
Javascript hacking?


Thanks
Niels

[1] http://www.wicketstuff.org/wicket13/ajax/editable-label.1




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Thx everybody that attended the user group meeting in The Netherlands

2007-12-03 Thread Niels van Kampenhout

Roy van Rijn wrote:

Somebody answer this question please, I would love to see the Hippo
presentation again :-)

It was the best presentation I've seen in years, I learned something
and had a good laugh with all the Lego and Hippo pictures. (see the
IRC logs).


Thanks! :-)


But its a good question, where can we find the slides?


I put our presentation on slideshare:

http://www.slideshare.net/nielsvk/wicket-plugin-architecture

Can the other speakers upload their slides too please?

Niels

P.S. Are the IRC logs available online?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Thx everybody that attended the user group meeting in The Netherlands

2007-12-03 Thread Niels van Kampenhout

Eelco Hillenius wrote:

Where are the pictures, slides and videos? :-)


Do we have a place to upload slides to, e.g. slideshare?

Niels


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup variants on component level

2007-11-23 Thread Niels van Kampenhout

Igor Vaynberg wrote:

variants and styles work on component level...pages inherit that
functionality from components


Right, I think I understand how this works now (simpler than I thought!).

I find the Wiki page a bit short on info. I suggest to add some 
explanatory introduction like:


--8<--

Each Wicket component has at least one associated markup (in the form of 
an HTML file). It is possible to have multiple markup alternatives for 
one component. These are called "variations", and have an HTML file with 
a name like "ComponentName_foo.html". Which markup variation is used, is 
determined by the getVariation() method of Component, i.e. if it returns 
the string "foo", the HTML file "ComponentName_foo.html" is loaded 
instead of "ComponentName.html".


Variations are inherited down the component hierarchy, and the default 
is null, which means no variation (i.e. load "ComponentName.html"). Any 
component can override the getVariation() method to change this behaviour.


If a markup variation with the name returned by getVariation() is not 
found, Wicket will load the default markup for that component.


The example below shows how you can use a request parameter to load 
different markup variations for a Page on the fly.


[and then the example which is already on the page]

--8<--

If this make sense I'll add it to the page. Or is this already 
documented somewhere else?


Regards

Niels




-igor

On Nov 22, 2007 7:40 AM, Niels van Kampenhout <[EMAIL PROTECTED]> wrote:

Hello Wicketeers,

I read about markup variants on the wiki [1]. I need this, however I
need it on component level rather than page level. Is this possible?

In the most extreme case I would like to have different instances of the
same component on one page, but each with their own markup variant.

The workaround I use right now is extending my component with an empty
class for each variant.

Thanks

Niels

[1] http://cwiki.apache.org/WICKET/multiple-markups-per-page.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Markup variants on component level

2007-11-23 Thread Niels van Kampenhout

Igor Vaynberg wrote:

variants and styles work on component level...pages inherit that
functionality from components


Ah, I see. Stupid question eh? ;-)

I'll give it a try.

Thanks

Niels




-igor

On Nov 22, 2007 7:40 AM, Niels van Kampenhout <[EMAIL PROTECTED]> wrote:

Hello Wicketeers,

I read about markup variants on the wiki [1]. I need this, however I
need it on component level rather than page level. Is this possible?

In the most extreme case I would like to have different instances of the
same component on one page, but each with their own markup variant.

The workaround I use right now is extending my component with an empty
class for each variant.

Thanks

Niels

[1] http://cwiki.apache.org/WICKET/multiple-markups-per-page.html




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Markup variants on component level

2007-11-22 Thread Niels van Kampenhout

Hello Wicketeers,

I read about markup variants on the wiki [1]. I need this, however I 
need it on component level rather than page level. Is this possible?


In the most extreme case I would like to have different instances of the 
same component on one page, but each with their own markup variant.


The workaround I use right now is extending my component with an empty 
class for each variant.


Thanks

Niels

[1] http://cwiki.apache.org/WICKET/multiple-markups-per-page.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket, Selenium and generated id attributes

2007-11-21 Thread Niels van Kampenhout

Timo Rantalaiho wrote:

On Tue, 20 Nov 2007, Gerolf Seitz wrote:

you can call setMarkupId(String) in the constructor of your components.
just make sure that the ids are unique in a single page.


This works sometimes, and is a good idea. Having stable HTML
ids for unique HTML elements also makes facilitates good CSS 
styling, I understand.


However, when this is not practical, you can omit the HTML 
id altogether from the markup, because then Selenium IDE 
will automatically look for other ways of identifying the
element. These are typically xpath expressions operating on 
the DOM tree. You can of course also write them yourself to 
the test script, if you like xpath ;)


When using Selenium in a more white-box-way, testing single
components within developer tests, there is also the 
possibility of getting the dynamic markup id directly from
the component object. This can be done at least with 
SeleniumTestCase of Wicket Bench and I believe also with
jdave-wicket-selenium 


  http://www.jdave.org/modules.html


Thanks everyone for the suggestions, they sound very useful :)

Cheers

Niels


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket, Selenium and generated id attributes

2007-11-20 Thread Niels van Kampenhout

Hi,

I am experimenting with Selenium tests for our Wicket application. Many 
of my test have code like


  selenium.click("login_dialog_link22");

Because the id "login_dialog_link22" is generated by Wicket, and changes 
often as the app is still under heavy development, it's a bit of a PITA 
to keep the tests in sync.


Anyone knows a neat way to make the tests more robust? Can I influence 
the generated id?


Thanks,

Niels




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket meetup (the netherlands) ideas

2007-11-14 Thread Niels van Kampenhout

Eelco Hillenius wrote:

This is your chance to do some practicing on presenting Johan! One
idea that comes in mind is to let Arje or someone else from Hippo talk
about how they plan to use Wicket (or are already doing so) and/ or
have a talk on why and how to use portlets with Wicket.


We can do a short informal talk on why and how we use Wicket to build 
our new CMS. I can do the "why", and I'll try to persuade someone else 
to do the "how" ;-)


Since we are basically Wicket newbies this might turn into a rather 
"Idols" like assessment, but we are interested to know what others think 
of our approach so I guess that's all right :-)


Cheers

Niels



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]