Adding a IRenderer interface ?

2011-03-18 Thread zedros schwartz
hi

I was refactoring some code (to go from DropDownChoice to
AutoCompleteEdit) when I stumbled upon there's no interface just about
how to render some given class instances.

Well, it's for sure no big deal, but I was wondering if, for
unification purpose, a IRenderer interface wouldn't make sense, being
something like :
public interface IRendererT
{
/**
 * Get the value for displaying to an end user.
 *
 * @param object
 *the actual object
 * @return the value meant for displaying to an end user
 */
Object getDisplayValue(T object);
}

Just 2 cents really.

thanks again for all the good work done with Wicket :)

best
zedros

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



Re: Wicket tester test coverage

2009-12-01 Thread ZedroS Schwart

 If the element is not in a loop, just specify the HTML ID in the template.
 If it is in a loop, use xpath.

oh. Thanks :$

I thought wicket id were incremeting on request, meaning that even
without loop the same page loaded twice would end up with a different
id (with an incremented number).

I should test it !



 zedros wrote:

 on a broader picture, my main question was about the way you proceed,
 Do you test every page, including every validator or.. ? If doing so,
 for pages that quite often are then not touched much, i would fear the
 time needed for proper testing quite hard to justify. Am i wrong here
 ?

 I test my code based on risk. If it is the code that is frequently use, has
 a high impact if it breaks, or is likely to contain bugs, I'll test it more
 thoroughly.

ok, thanks for this explanation :)

have a good day

zedros

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



Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart
Hi Kent

On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote:
 What you need is TDD. Once you adopt TDD, you will have every page tested.

I was under the assumption that unit testing isn't valuable for GUI,
esp. web gui, since the effort is too important... I think I even read
uncle bob saying so. How do you suggest to write/do TDD for web pages
?

thanks in advance

++
zedros

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



Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart

 Without reference to his article, I can only guess that it may be pointless
 to test the position or the color of a button in automated tests.

I think it was this one :
http://www.infoq.com/news/2009/11/uncle-bob-tdd-applicability
but in fact uncle bob mainly says it's pointless to do TDD when not
knowing where it'll end, but still one should then write the tests
afterwards.

 On the
 other hand, functionality of GUI can definitely be tested. For example,
 I am writing a Wicket application with TDD (sort of) with the library shown
 in my signature. It is working very well.

I saw it, but we're using guice (when, it wouldn't be a show stopper
in the end). Still, on the technical side, there's also this issue
with selenium using mostly id, whereas wicket'ids change with each
request... How do you solve this issue ?

on a broader picture, my main question was about the way you proceed,
Do you test every page, including every validator or.. ? If doing so,
for pages that quite often are then not touched much, i would fear the
time needed for proper testing quite hard to justify. Am i wrong here
?

bye
zedros




 -
 --
 Kent Tong
 Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net)
 --
 View this message in context:
 http://old.nabble.com/Wicket-tester-test-coverage-tp26505428p26509652.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



Re: Caching a resource on the browser side

2009-08-04 Thread ZedroS Schwart
I finally managed to set the headers this way :
WebResponse response = (WebResponse) getRequestCycle().getResponse();
response.setDateHeader(Date, System.currentTimeMillis());
response.setDateHeader(Expires, System.currentTimeMillis() +
CACHE_DURATION);
response.setHeader(Cache-Control, max-age= +
CACHE_DURATION + ,  must-revalidate);
response.setLastModifiedTime(Time.valueOf(new Date(90, 1,
1).getTime()));
response.setContentType(text/csv);

I see them all in live http headers but... the browser keeps
requesting the file I send back :
http://localhost:8080/charts/data/dataId/AOX



GET /charts/data/dataId/AOX HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en,de;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: JSESSIONID=vk0x2bf8xnpb



HTTP/1.x 200 OK

Last-Modified: Wed, 31 Jan 1990 23:00:00 GMT

Expires: Tue, 04 Aug 2009 09:53:23 GMT

Cache-Control: max-age=360,  must-revalidate

Content-Type: text/csv; charset=UTF-8

Content-Length: 5659

Date: Tue, 04 Aug 2009 08:53:23 GMT

Server: Jetty(6.1.16)


if anyone knows how to resolve that

++

On Wed, Jul 29, 2009 at 12:10 AM, ZedroS
Schwartzedros.schwa...@gmail.com wrote:
 hi Juri

 I did it the same way as you did and it worked fine. Even more : I
 didn't even see lines in http header (???).

 However, it doesn't fit my use case : I need to get the link to the
 file to embed it in a javascript. Previously I did it this way :
        PageParameters parameters = new PageParameters();
        parameters.add(AMChartDataProviderPage.DATA_KEY, set.getDataId());
        return RequestCycle.get().urlFor(AMChartDataProviderPage.class,
 parameters).toString();

 however I don't know how to do it with what you provided...

 ++

 On Tue, Jul 28, 2009 at 10:32 AM, Juri Prokofievproj...@gmail.com wrote:
 It works for me.

 ResourceLink csvLink = new ResourceLink(csvLink, new
 ResourceReference(AnnouncementCsvResource.ID), params);
 add(csvLink);

 public class AnnouncementCsvResource extends WebResource
 {
    public static final String ID = csv;
   �...@override
    public IResourceStream getResourceStream()
    {
        return new CsvResourceStream();
    }

   �...@override
    protected void setHeaders(WebResponse response)
    {
        super.setHeaders(response);
        response.setAttachmentHeader(announcements.csv);
        response.setHeader(Cache-Control, no-cache);
    }

    private class CsvResourceStream extends AbstractStringResourceStream
    {
       �...@override
        public String getContentType()
        {
            return text/plain;
        }

       �...@override
        protected Charset getCharset()
        {
            return Charset.forName(ISO-8859-1);
        }

       �...@override
        protected String getString()
        {
            return bla bla ;
        }
    }
 }


 On Tue, Jul 28, 2009 at 10:44 AM, ZedroS Schwart
 zedros.schwa...@gmail.comwrote:

 Thanks for this answer Juri.

 I tried it (once again) and it didn't work : the setHeaders method
 isn't called...

 I use Live HTTP headers to check what goes through :
 http://localhost:8080/charts/data/dataId/KBU



 GET /charts/data/dataId/KBU HTTP/1.1

 Host: localhost:8080

 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
 Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

 Accept-Language: en,de;q=0.5

 Accept-Encoding: gzip,deflate

 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

 Keep-Alive: 300

 Connection: keep-alive

 Cookie: JSESSIONID=1gxaom5muzh66



 HTTP/1.x 200 OK

 Content-Type: text/csv; charset=UTF-8

 Content-Length: 5726

 Server: Jetty(6.1.16)


 thanks again
 zedros

 On Tue, Jul 28, 2009 at 8:59 AM, Juri Prokofievproj...@gmail.com wrote:
  To set headers to a resource you need to extend setHeaders method from
  WebResource. Example:
    �...@override
     protected void setHeaders(WebResponse response)
     {
         super.setHeaders(response);
         response.setAttachmentHeader(announcements.csv);
         response.setHeader(Cache-Control, no-cache);
     }
 
  Check your headers. If Cache-Control is passed then resource should be
  cached on user side.
 
  On Tue, Jul 28, 2009 at 1:02 AM, ZedroS Schwart
  zedros.schwa...@gmail.comwrote:
 
  hi
 
  We need to provide a flash application (www.amcharts.com if anyone is
  interested) with some content through some files.
 
  As the files are users specific (and determined with data from the
  session), we went for some page delivering the content like this :
   public AMChartDataProviderPage(final PageParameters parameters)
     {
         Object object = parameters.get

Re: Caching a resource on the browser side

2009-07-28 Thread ZedroS Schwart
Thanks for this answer Juri.

I tried it (once again) and it didn't work : the setHeaders method
isn't called...

I use Live HTTP headers to check what goes through :
http://localhost:8080/charts/data/dataId/KBU



GET /charts/data/dataId/KBU HTTP/1.1

Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en,de;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: JSESSIONID=1gxaom5muzh66



HTTP/1.x 200 OK

Content-Type: text/csv; charset=UTF-8

Content-Length: 5726

Server: Jetty(6.1.16)


thanks again
zedros

On Tue, Jul 28, 2009 at 8:59 AM, Juri Prokofievproj...@gmail.com wrote:
 To set headers to a resource you need to extend setHeaders method from
 WebResource. Example:
   �...@override
    protected void setHeaders(WebResponse response)
    {
        super.setHeaders(response);
        response.setAttachmentHeader(announcements.csv);
        response.setHeader(Cache-Control, no-cache);
    }

 Check your headers. If Cache-Control is passed then resource should be
 cached on user side.

 On Tue, Jul 28, 2009 at 1:02 AM, ZedroS Schwart
 zedros.schwa...@gmail.comwrote:

 hi

 We need to provide a flash application (www.amcharts.com if anyone is
 interested) with some content through some files.

 As the files are users specific (and determined with data from the
 session), we went for some page delivering the content like this :
  public AMChartDataProviderPage(final PageParameters parameters)
    {
        Object object = parameters.get(DATA_KEY);
        if ((object == null) || !(object instanceof String) ||
 .equals(object))
        {
            throw new IllegalStateException(Expected parameter  +
 DATA_KEY +  not provided or empty);
        }
        String dataId = (String) object;
        ByteArrayResource resourceStream;
        try
        {
            resourceStream = new ByteArrayResource(text/csv,
 IOHelper.getResourceAsByteArray(dataId + .csv));
        }
        catch (IOException e)
        {
            throw ExceptionHelper.wrap(e);
        }
        getRequestCycle().setRequestTarget(new
 ResourceStreamRequestTarget(resourceStream.getResourceStream()));
    }

 However, I don't manage to get this resource to be cached on the user
 browser side, despite the resource being cacheable. From what I've
 seen, setHeaders() in WebResource is never called... Neither did I
 manage to set them myself (on the page they're never called neither...
 and the request cycle has no webresponse on which to define the
 header).

 Any clue ?

 thanks in advance
 zedros

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




 --
 http://www.autoladu.ee  - kõik varuosad ühes kohas


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



Re: Caching a resource on the browser side

2009-07-28 Thread ZedroS Schwart
hi Juri

I did it the same way as you did and it worked fine. Even more : I
didn't even see lines in http header (???).

However, it doesn't fit my use case : I need to get the link to the
file to embed it in a javascript. Previously I did it this way :
PageParameters parameters = new PageParameters();
parameters.add(AMChartDataProviderPage.DATA_KEY, set.getDataId());
return RequestCycle.get().urlFor(AMChartDataProviderPage.class,
parameters).toString();

however I don't know how to do it with what you provided...

++

On Tue, Jul 28, 2009 at 10:32 AM, Juri Prokofievproj...@gmail.com wrote:
 It works for me.

 ResourceLink csvLink = new ResourceLink(csvLink, new
 ResourceReference(AnnouncementCsvResource.ID), params);
 add(csvLink);

 public class AnnouncementCsvResource extends WebResource
 {
    public static final String ID = csv;
   �...@override
    public IResourceStream getResourceStream()
    {
        return new CsvResourceStream();
    }

   �...@override
    protected void setHeaders(WebResponse response)
    {
        super.setHeaders(response);
        response.setAttachmentHeader(announcements.csv);
        response.setHeader(Cache-Control, no-cache);
    }

    private class CsvResourceStream extends AbstractStringResourceStream
    {
       �...@override
        public String getContentType()
        {
            return text/plain;
        }

       �...@override
        protected Charset getCharset()
        {
            return Charset.forName(ISO-8859-1);
        }

       �...@override
        protected String getString()
        {
            return bla bla ;
        }
    }
 }


 On Tue, Jul 28, 2009 at 10:44 AM, ZedroS Schwart
 zedros.schwa...@gmail.comwrote:

 Thanks for this answer Juri.

 I tried it (once again) and it didn't work : the setHeaders method
 isn't called...

 I use Live HTTP headers to check what goes through :
 http://localhost:8080/charts/data/dataId/KBU



 GET /charts/data/dataId/KBU HTTP/1.1

 Host: localhost:8080

 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
 Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

 Accept-Language: en,de;q=0.5

 Accept-Encoding: gzip,deflate

 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

 Keep-Alive: 300

 Connection: keep-alive

 Cookie: JSESSIONID=1gxaom5muzh66



 HTTP/1.x 200 OK

 Content-Type: text/csv; charset=UTF-8

 Content-Length: 5726

 Server: Jetty(6.1.16)


 thanks again
 zedros

 On Tue, Jul 28, 2009 at 8:59 AM, Juri Prokofievproj...@gmail.com wrote:
  To set headers to a resource you need to extend setHeaders method from
  WebResource. Example:
    �...@override
     protected void setHeaders(WebResponse response)
     {
         super.setHeaders(response);
         response.setAttachmentHeader(announcements.csv);
         response.setHeader(Cache-Control, no-cache);
     }
 
  Check your headers. If Cache-Control is passed then resource should be
  cached on user side.
 
  On Tue, Jul 28, 2009 at 1:02 AM, ZedroS Schwart
  zedros.schwa...@gmail.comwrote:
 
  hi
 
  We need to provide a flash application (www.amcharts.com if anyone is
  interested) with some content through some files.
 
  As the files are users specific (and determined with data from the
  session), we went for some page delivering the content like this :
   public AMChartDataProviderPage(final PageParameters parameters)
     {
         Object object = parameters.get(DATA_KEY);
         if ((object == null) || !(object instanceof String) ||
  .equals(object))
         {
             throw new IllegalStateException(Expected parameter  +
  DATA_KEY +  not provided or empty);
         }
         String dataId = (String) object;
         ByteArrayResource resourceStream;
         try
         {
             resourceStream = new ByteArrayResource(text/csv,
  IOHelper.getResourceAsByteArray(dataId + .csv));
         }
         catch (IOException e)
         {
             throw ExceptionHelper.wrap(e);
         }
         getRequestCycle().setRequestTarget(new
  ResourceStreamRequestTarget(resourceStream.getResourceStream()));
     }
 
  However, I don't manage to get this resource to be cached on the user
  browser side, despite the resource being cacheable. From what I've
  seen, setHeaders() in WebResource is never called... Neither did I
  manage to set them myself (on the page they're never called neither...
  and the request cycle has no webresponse on which to define the
  header).
 
  Any clue ?
 
  thanks in advance
  zedros
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  http://www.autoladu.ee  - kõik varuosad ühes kohas
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org

Caching a resource on the browser side

2009-07-27 Thread ZedroS Schwart
hi

We need to provide a flash application (www.amcharts.com if anyone is
interested) with some content through some files.

As the files are users specific (and determined with data from the
session), we went for some page delivering the content like this :
 public AMChartDataProviderPage(final PageParameters parameters)
{
Object object = parameters.get(DATA_KEY);
if ((object == null) || !(object instanceof String) ||
.equals(object))
{
throw new IllegalStateException(Expected parameter  +
DATA_KEY +  not provided or empty);
}
String dataId = (String) object;
ByteArrayResource resourceStream;
try
{
resourceStream = new ByteArrayResource(text/csv,
IOHelper.getResourceAsByteArray(dataId + .csv));
}
catch (IOException e)
{
throw ExceptionHelper.wrap(e);
}
getRequestCycle().setRequestTarget(new
ResourceStreamRequestTarget(resourceStream.getResourceStream()));
}

However, I don't manage to get this resource to be cached on the user
browser side, despite the resource being cacheable. From what I've
seen, setHeaders() in WebResource is never called... Neither did I
manage to set them myself (on the page they're never called neither...
and the request cycle has no webresponse on which to define the
header).

Any clue ?

thanks in advance
zedros

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



AjaxLink ERROR: Received Ajax response with code: 404 = at random after short delay

2009-06-04 Thread ZedroS Schwart
Hi

I currently have a page with a LinkTree (with AjaxLinks) as well as
multiples others ajax link (sometime opening some modal windows).

Quite often, after a short pause (way less than the session time out,
just the time to say 2/3 phrases) the next time I use an ajax link I
get this error :
INFO: Response parsed. Now invoking steps...
INFO:
INFO: Initiating Ajax GET request on
resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
INFO: Invoking pre-call handler(s)...
ERROR: Received Ajax response with code: 404
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...

Once this error has been received, then all the ajax links are down
with channel busy - postponing. The only solution is to refresh the
page

I don't manage to find a predictive way to reproduce this issue, it
just happens pretty often, which is really bad for the user... I tried
many things without success. Apparently it's not linked to a specific
ajax link.

Do you have a clue of what could go wrong ? Or any idea on how to debug ?

NB : it happens on ubuntu 9.04/Firefox 3.0.10/Wicket 1.4 rc4 (a bit
patched)/resin 3.1.5. I've put
getPageSettings().setAutomaticMultiWindowSupport(true); in my
application. I use as well the wicket stuff annotation with mount
hybrid. I checked the generated html, it's fine (up to the w3c
generator), apart that I don't specify the encoding or (x)html
version.

NB2: in order to refresh my whole page, I often do :
setResponsePage(getPage()); or setResponsePage(new
MyPage(someAttribute))... I don't know if it could have an impact...

Any help really welcome.

thanks in advance

cheers
zedros

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



Re: How to add a component in a behavior ?

2009-02-08 Thread ZedroS

hi 

Just a question, about this suggestion :
wicket:composernormal html or wicket
componentswicket:composedComponentnormal html or wicket components
/wicket:composer 
Is it completely far off or could it be interesting ? What do you think of
it ? 

thanks in advance
++
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-component-in-a-behavior---tp21758993p21903642.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



Re: How to add a component in a behavior ?

2009-02-03 Thread ZedroS



igor.vaynberg wrote:
 
 you cant because it wont have any markup to attach to, instead you can
 simply output the messages yourself, see my reply to this thread:
 

Thanks a lot Igor

However, I'm a bit upset not to be able to use other components in a
Behavior, it kind of breaks the Wicket way of doing things.

Thinking about that, I was wondering whether it would be possible to have
Behavior with markup attached working this way, let's called it composer :

wicket:composernormal html or wicket
componentswicket:composedComponentnormal html or wicket components
/wicket:composer

The idea is to be able to enrich a component through the composer (or
whatever name is best suited) : the component whom the composer is added
would be surrounded by the content of the wicket:composer component (be it
html or components). It would avoid the use of
component.getResponse().write(XX) and allow the use of components. 

For sure it might not be perfect, for example multiple composers on the same
composedComponent might be tricky, but overall, what do you think of the
idea ?

++
zedros
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-component-in-a-behavior---tp21758993p21820319.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



Re: How to add a component in a behavior ?

2009-02-03 Thread ZedroS



igor.vaynberg wrote:
 
 exactly how does this break the wicket way?
 
 behaviors are meant to augment rendering of components
 
 -igor
 

I hope the wording wasn't offensive, it wasn't the aim at all.

back to the topic : here, instead of using a feedback panel (which was
exactly what was needed), the solution is to copy/paste/adapt the feedback
panel inside the behavior. 

However, simply adding the feedbackpanel in it like this would have done the
trick :
FeedbackPanel dedicatedFP = new FeedbackPanel(fbLabel);
dedicatedFP.setFilter(new IFeedbackMessageFilter(){

public boolean accept(FeedbackMessage message)
{
if (message.getReporter().equals(myComponent) 
!(message.isRendered())){
message.markRendered();
return true ;
}else{
return false ;
}

}});
add(dedicatedFP);

Simply put, I found it odd to rewrite some already existing component.

Furthermore, doing it directly through write(xxx) commands feels like good
old servlet and not like wicket, which usually provides a html template.
Where is the usual separation between code and presentation ? 

Hence this suggestion of a composer, which I thought might nicely solve
this issue (clean separation of html and Java, possibility to add
components).

thanks for your time responding !

zedros



-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-component-in-a-behavior---tp21758993p21821052.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



How to add a component in a behavior ?

2009-01-30 Thread ZedroS

Hi

I'm using a behaviour to add component's label like this :
public class AddLabelBehavior extends AbstractBehavior
{
@Override
public void beforeRender(Component component)
{
super.beforeRender(component);
component.getResponse().write(new
StringResourceModel(component.getId(),component,null,component.getId()).getString()
+  : );
}
}

However, I would like to add as well a dedicated feedbackpanel just after
the component in question. 

In short, it's just a component that I would like to add (both in the Java
code and html rendered) just after my component.

Is it possible ? If so, how ?

NB : I guess it should use onRendered(Component component) but I don't see
how to add a component.

Thanks in advance

best, 
zedros
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-component-in-a-behavior---tp21758993p21758993.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



Re: Twenty Six Wicket Tricks

2009-01-04 Thread ZedroS



Jonathan Locke wrote:
 
 yeah. good one.
 

oh oh... so I'll have to buy this book ;)

lol

bye

zedros

-- 
View this message in context: 
http://www.nabble.com/Twenty-Six-Wicket-Tricks-tp21214357p21280822.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



Re: Twenty Six Wicket Tricks

2008-12-31 Thread ZedroS

Hi !

Good idea :) 

Personally, intra components communication is something I would be keen to
read more about  : what are the pro and cons of the various ways of letting
various components know about other components states/model changes ? I
found some interesting blogs entry about this topic but an extensive review
would be welcome.

Happy new year

Best,
ZedroS


-- 
View this message in context: 
http://www.nabble.com/Twenty-Six-Wicket-Tricks-tp21214357p21238924.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



Re: Direclty using parent's compoundpropertymodel not possible ?

2008-07-31 Thread ZedroS

hi 

Sorry for the delay, holidays went in the way ;)



Alex Jacoby-2 wrote:
 
 More than once I've tried accessing my inherited model from within a  
 constructor, forgetting that since the component hasn't been added yet  
 it can't access its inherited model there.
 
 That's not your problem, right?
 
 Alex
 
 

hum, Alex, thanks a lot !! It's something I hadn't figured out by myself and
most probably stuck my head against more than once without even realizing it
! Thanks a lot (and shame on me) ! It would be nice for it to be included in
the Working with Wicket models wiki page for people like me...

I'll definitely makes more tries of it, since I'm not sure I properly get
how compound property models are shared among inheritors. And the day I'm
sure of it, I'll update the wiki page if noone has done it before me.

++
zedros
-- 
View this message in context: 
http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18763687.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Direclty using parent's compoundpropertymodel not possible ?

2008-07-10 Thread ZedroS

Thanks a lot for your answer. One question though :

Johan Compagner wrote:
 
 CPM is used that child components can have sub objects/properties of that
 main object by using the child components id as the property
 
how can I easily get the CPM in sub component ?

For example, if I have a family object with children in itm and a panel
displaying the basic family info with a subpanel displaying the children
info, how would you do to give/get the CPM's children in there ?

thanks again !

zedros
-- 
View this message in context: 
http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18377171.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Component self updating when Ajax call changed a commun model ?

2008-07-10 Thread ZedroS

Hi

Thanks again !

Were you thinking of this discussion :
http://www.nabble.com/AJAX-validation-and-multiple-requests-td15546309.html
?

If so it looks like there is no real feature for this need in the
framework and that it should be done by hand each time, do we agree ?

++
-- 
View this message in context: 
http://www.nabble.com/Component-self-updating-when-Ajax-call-changed-a-commun-model---tp18355808p18377341.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: disabling error validation

2008-07-10 Thread ZedroS

Hi

If you don't want our form to be validated, why do you use a SubmitLink ? A
simple Link wouldn't trigger  the validation. Isn't that what you're looking
for ?

++
zedros

-- 
View this message in context: 
http://www.nabble.com/disabling-error-validation-tp18375841p18377437.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Component self updating when Ajax call changed a commun model ?

2008-07-09 Thread ZedroS

Hi

I've the following issue : in a panel a checkbox needs to be disabled
depending on a ajax updated list in a sub panel (if there is something in
the list the checkbox is disabled).

Currently I give the checkbox reference to the other panel and then use it
in the sub panel add AjaxLink.  

However, I will have soon more components on which this checkbox will depend
for its state (lists in other sub panels). 

As such, I wonder if there is a way for this checkbox to be updated each
time one of the sub panels list is changed, knowing that they all share the
same model.

What do you think of it ?

NB : I saw this discussion
http://www.nabble.com/Updating-distant-(unrelated)-components-via-Ajax-when-a-shared-model-changes-to13165777.html#a13165777
but I'm not sure it's the only way...

Let's see if Wicket surprises me one more time ;)

++
zedros
-- 
View this message in context: 
http://www.nabble.com/Component-self-updating-when-Ajax-call-changed-a-commun-model---tp18355808p18355808.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Direclty using parent's compoundpropertymodel not possible ?

2008-07-09 Thread ZedroS

Hi

I have a compoundpropertymodel (cpm for the rest of the mail) set on my
first level panel, then in one added second level panel I tried to do
getModelObject(); which returned null.

How comes ? I was expecting the cpm to be inherited in all my sub
components... Is it possible to do so ? How should I do otherwise ?

For the time being, I give a reference to the model at each sub component
(panels, forms...) and directly access it, but I find it kind of not
proper.

Thanks in advance

++
zedros
-- 
View this message in context: 
http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18356056.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-03 Thread ZedroS Schwart
Hi

Congratulations !

I put a word about it there
http://blog.developpez.com/index.php?blog=136title=wicket_1_3_est_arrive
, I hope it'll help !

Cheers !

ZedroS


On Jan 3, 2008 10:37 PM, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Help promote wicket: digg our release:

 http://digg.com/programming/Apache_Wicket_1_3_released

 Martijn


 On Jan 3, 2008 8:58 AM, Jonathan Locke [EMAIL PROTECTED] wrote:
 
 
  yeah, baby, yeah!!!  way to go everyone!
 
 
 
  Martijn Dashorst-4 wrote:
  
   Starting the new year with a bang the Wicket Team has released Apache
   Wicket 1.3. With this release comes a lot of great successes, but most
   of all the team wanted to express their wishes to everyone for a happy
   new year.
  
   You can download Apache Wicket 1.3 here:
  
   http://wicket.apache.org/getting-wicket.html
  
   Apache Wicket is one of the fastest growing Java open source component
   based web frameworks. With a focus on producing valid html and a
   logical separation between design and code.  Within minutes you can
   start to enjoy throwing out tag soup, complex components and high
   maintenance overhead for a simple POJO + html data model.
  
   See the Apache Wicket website for more information:
  
   http://wicket.apache.org
  
   Take a look at some of the following highlights or skip to the bottom
   and get started now.
  
* last JDK-1.4 release (next release will be Java 5 based)
* first Apache release: renamed packages to org.apache.wicket
* simplified several core APIs
* now works with zero-config behind a proxy server using relative URLs
* added Google Guice support
* use your Wicket pages directly in a portal without changing a line
   of code (JSR-168/JSR-286 support)
* switched logging API from commons-logging to slf4j
* integrate velocity templates as panels in your pages
* YUI-calendar and Joda time based date picker (wicket-datetime)
* contribute new javascript dependencies to the page header using an
   Ajax requeset
* improved, more robust header contributions
* scale to extremely large numbers of users with stateless pages and
   components
* improved AjaxTree/AjaxTreeTable
* hybrid URL encoding to make search engines and your users happy
* create form panels and use them anywhere without worrying about the
   nesting of form tags
* minimized session use by storing component hierarchy in file system
   (DiskPageStore)
  
   Get started today by downloading Wicket using this link:
  
   http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
  
   The distribution contains all the Wicket libraries, and all the source
   code including the examples project. In the root of the download you
   will find a README document with full instructions.
  
   Migrate your Wicket 1.2 application to Wicket 1.3 using our migration
   guide:
  
   http://cwiki.apache.org/WICKET/migrate-12.html
  
   Best wishes from the Wicket Team and a prosperous 2008!
  
- The Wicket Team
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context: 
  http://www.nabble.com/-ANNOUNCE--Apache-Wicket-1.3-released-tp14585070p14593193.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


 -
 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: Wicket and Netbeans 6

2007-10-23 Thread ZedroS Schwart
hi all

Great answers !

I'm downloading the latest NB to avoid bugs corrected in the Beta 1,
and then I'll follow your advice Ayodeji.

I'll let you know of the outcome :)

Cheers
ZedroS

On 10/23/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 I have checked out and built wicket support for netbeans from
 http://blogs.sun.com/geertjan/entry/when_boudreau_met_wicket
 before,

 if you have NB6 installed already,

 install these two NB modules, create a WebApplication Project in NB and you
 will have a ready sample application that runs fine and contains all the
 artifacts you need to build without errors

 Download and install this module into NB6
 http://www.dabarobjects.com/downloads/org-netbeans-modules-web-wicket.nbm
 Download and install this module in Netbeans6
 http://www.dabarobjects.com/downloads/org-netbeans-modules-wicket-library.nbm

 start netbeans, create a new Web Application Project, Select Wicket 1.2 and
 then BOOM! everything is ready to go

 yu may have to remove the * behind the url when it launches browser

 On 10/22/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:
 
  Op zaterdag 20-10-2007 om 16:20 uur [tijdzone +0100], schreef Ayodeji
  Aladejebi:
   if you are a beginner with both Netbeans and Maven then find one of the
   wicket plugins for NB6 and install them. they have a quickstart project
  by
   default
 
  One of the wicket plugins for NB6?
 
  As far as I have been able to track down, there's exactly one Wicket
  plugin supposed to work with Netbeans 6. You have to fetch it from a CVS
  branch and build it yourself -- which I haven't managed yet; it keeps
  complaining about an undefined nbplatform.default.harness.dir.
 
  If anyone else wants to try, here's how far I got:
  - create an account on dev.java.net;
  - follow cvs instructions but use the -r nb_60 branch:
  cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout -r nb_60
  nbwicketsupport
  - open the subproject 'nbmodule' in Netbeans
 
  regards,
 
  --
  Reinout van Schouwen
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 Get A Free Blog:
 http://blogs.cowblock.net/


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



Re: Wicket and Netbeans 6

2007-10-23 Thread ZedroS Schwart
Hi again

So, it's great : the latest nightly build of NB 6 managed to retrieve
a lost UML project and, even better, the modules you've indicated were
of fact for Wicket 1.3 and not 1.2 as I was fearing :)

Let's continue digging in !

Thanks a lot

Cheers,
ZedroS

On 10/23/07, ZedroS Schwart [EMAIL PROTECTED] wrote:
 hi all

 Great answers !

 I'm downloading the latest NB to avoid bugs corrected in the Beta 1,
 and then I'll follow your advice Ayodeji.

 I'll let you know of the outcome :)

 Cheers
 ZedroS

 On 10/23/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
  I have checked out and built wicket support for netbeans from
  http://blogs.sun.com/geertjan/entry/when_boudreau_met_wicket
  before,
 
  if you have NB6 installed already,
 
  install these two NB modules, create a WebApplication Project in NB and you
  will have a ready sample application that runs fine and contains all the
  artifacts you need to build without errors
 
  Download and install this module into NB6
  http://www.dabarobjects.com/downloads/org-netbeans-modules-web-wicket.nbm
  Download and install this module in Netbeans6
  http://www.dabarobjects.com/downloads/org-netbeans-modules-wicket-library.nbm
 
  start netbeans, create a new Web Application Project, Select Wicket 1.2 and
  then BOOM! everything is ready to go
 
  yu may have to remove the * behind the url when it launches browser
 
  On 10/22/07, Reinout van Schouwen [EMAIL PROTECTED] wrote:
  
   Op zaterdag 20-10-2007 om 16:20 uur [tijdzone +0100], schreef Ayodeji
   Aladejebi:
if you are a beginner with both Netbeans and Maven then find one of the
wicket plugins for NB6 and install them. they have a quickstart project
   by
default
  
   One of the wicket plugins for NB6?
  
   As far as I have been able to track down, there's exactly one Wicket
   plugin supposed to work with Netbeans 6. You have to fetch it from a CVS
   branch and build it yourself -- which I haven't managed yet; it keeps
   complaining about an undefined nbplatform.default.harness.dir.
  
   If anyone else wants to try, here's how far I got:
   - create an account on dev.java.net;
   - follow cvs instructions but use the -r nb_60 branch:
   cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout -r nb_60
   nbwicketsupport
   - open the subproject 'nbmodule' in Netbeans
  
   regards,
  
   --
   Reinout van Schouwen
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
  Get A Free Blog:
  http://blogs.cowblock.net/
 


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



Wicket and Netbeans 6

2007-10-20 Thread ZedroS Schwart
Hi all

Following what's written here http://wicket.apache.org/quickstart.html
I've tried to have the quickstart to run in Netbeans 6 beta 1.

I successfully managed to create the project using the mvn
archetype:create ... command, but I don't manage to use it with
Netbeans 6 even if I read :
* To create a NetBeans project perform the mvn netbeans:netbeans
command inside the project directory, or if using NetBeans 6, just
open the pom.xml directly.

I've tried the mvn netbeans:netbeans command in various locations
(at the same level as the project folder and inside it) but got :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'netbeans'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exis
t or no valid version could be found
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time:  1 second
[INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
[INFO] Final Memory: 1M/4M
[INFO] 

Furthermore, I don't manage to just open the pom.xml directly. I
open the file with Netbeans, then I see it but I see nothing to have
some action. Furthermore, when doing open project in my project
folder, NEtbeans doesn't recognise the pom file, so no project is
open.

Where am I doing wrong ?

Thanks in advance
ZedroS

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



Re: Wicket and Netbeans 6

2007-10-20 Thread ZedroS Schwart
Thanks a lot.

Netbeans has now created a quickstart project. However its name is
quickstart (war) and I don't manage to have it running. I run the
Start.java but nothing happens...

Sorry for all these questions, I'm new to Netbeans (which I choose to
try out the UML part).

Thanks in advance

ZedroS

On 10/20/07, David Bernard [EMAIL PROTECTED] wrote:
 I try NB 6 some time ago with wicket and maven.
 You don't need to mvn netbeans:netbeans, but you need to install NB 
 module/plugins to manage maven2 project.
 ToolsPluginsAvailable plugins
 Sort by category, select to install : maven in category java, and if you want 
 (optional) other plugin in category maven.

 Regard

 ZedroS Schwart wrote:
  Hi all
 
  Following what's written here http://wicket.apache.org/quickstart.html
  I've tried to have the quickstart to run in Netbeans 6 beta 1.
 
  I successfully managed to create the project using the mvn
  archetype:create ... command, but I don't manage to use it with
  Netbeans 6 even if I read :
  * To create a NetBeans project perform the mvn netbeans:netbeans
  command inside the project directory, or if using NetBeans 6, just
  open the pom.xml directly.
 
  I've tried the mvn netbeans:netbeans command in various locations
  (at the same level as the project folder and inside it) but got :
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'netbeans'.
  [INFO] 
  
  [ERROR] BUILD ERROR
  [INFO] 
  
  [INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not 
  exis
  t or no valid version could be found
  [INFO] 
  
  [INFO] For more information, run Maven with the -e switch
  [INFO] 
  
  [INFO] Total time:  1 second
  [INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
  [INFO] Final Memory: 1M/4M
  [INFO] 
  
 
  Furthermore, I don't manage to just open the pom.xml directly. I
  open the file with Netbeans, then I see it but I see nothing to have
  some action. Furthermore, when doing open project in my project
  folder, NEtbeans doesn't recognise the pom file, so no project is
  open.
 
  Where am I doing wrong ?
 
  Thanks in advance
  ZedroS
 
  -
  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]