DropDownChoices Removing "Choose One" after Ajax Call

2011-03-13 Thread tech7
I have a dropdownchoice component on my page and according to some selections
on my page, this component is updated by a ajax call.
At the beginning it displays the choices without showing "Choose One" but
after ajax call it displays "Choose One". I know this issue is coming from
any of the choices are not selected right there but I don't know how to say
the component choose first one as selected for not displaying "Choose One".
Can you suggest any solution for this?
With my best regards.

-
Developer
Wicket
Java
JSP
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351515.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



RE: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages

2011-03-13 Thread Chris Colman
>> So to summarize my rant:
>>
>> -1 for removing the ability to use add inside a constructor.
>> +0 for improving the handling of oninitialize
>> +1 for improving the documentation on the lifecycle of components and
>> the event chain called during processing [2]
>
>I assume that means you don't care if 3218 is marked as won't fix and
>onInitialize remains overridable by those that choose to use it.

It depends if the current code calls onInitialize as a side effect of
calling page#add. If so then it would be good to change that so that
onInitialize is called by the framework after page contruction has
completed. The operation of onInitialize would then be nice a 'pure':
that is, it is never invoked during construction - even if someone calls
page#add in a constructor.

>
>Documentation is a good enough alternative when there is an unresolved
>issue that only occurs in rare cases.  So yes, document it, and let
those
>that want to use onInitialize do so.
>
>I never claimed using constructors will make your webapps eat your
young.
>I simply outlined the pros and cons of each approach and argued the
design
>advantages of not touching your components from outside wicket
lifecycle
>methods.
>-
>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: DropDownChoices Removing "Choose One" after Ajax Call

2011-03-13 Thread xFlasH
Hi,

How about setNullValid(true) on the DropDownChoice ?


R


2011/3/13 tech7 [via Apache Wicket] <
ml-node+3351515-1470294512-216...@n4.nabble.com>

> I have a dropdownchoice component on my page and according to some
> selections on my page, this component is updated by a ajax call.
> At the beginning it displays the choices without showing "Choose One" but
> after ajax call it displays "Choose One". I know this issue is coming from
> any of the choices are not selected right there but I don't know how to say
> the component choose first one as selected for not displaying "Choose One".
> Can you suggest any solution for this?
> With my best regards.
> Developer
> Wicket
> Java
> JSP
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351515.html
>  To start a new topic under Users forum, email
> ml-node+1842947-98389252-216...@n4.nabble.com
> To unsubscribe from Users forum, click 
> here.
>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351597.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



Re: DropDownChoices Removing "Choose One" after Ajax Call

2011-03-13 Thread tech7
xFlasH thank you for your suggestion but it removed Choose One but added a
blank choice to the list.

-
Developer
Wicket
Java
JSP
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoices-Removing-Choose-One-after-Ajax-Call-tp3351515p3351668.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



Re: body tag contributions with wicket 1.5 (Dojo needs it)

2011-03-13 Thread Gonzalo Aguilar Delgado
Hi Martin, 

I did it and finally found what was the problem. It was needed another
thing... The MarkupFilter to resolve the ID. 

The idea is that I had to change the component id to make wicket not
parse as raw tag. Becasuse it was a raw tag when used as .

The current effect is that I had to do something like:

public class DojoBodyMarkupFilter extends AbstractMarkupFilter  
implements IComponentResolver
{
...
public static final String DOJO_BODY_COMPONENT_ID =
"_dojo_body_prefix_";

...

public MarkupElement nextTag() throws ParseException {
...

tag.setId(DOJO_BODY_COMPONENT_ID);
tag.setAutoComponentTag(true); 
/// Why?
tag.addBehavior(new AttributeModifier("class", true, 
new Model(name)));
tag.setModified(true);
...
}
}

---

And I had an initializer that does as following:


// FIXME: Ugly hack to be able to control body tag on render.
application.getMarkupSettings().setMarkupParserFactory(
   new DojoMarkupParserFactory());

// FIXME: We need this to be able to substitute the body tag with a
markup container
application.getPageSettings().addComponentResolver(new
DojoBodyMarkupFilter());


So at the end you have three parts:

 1.- Parser Factory
 2.- Markup Filter
 3.- Component resolver


With these three it works flawlessly. I have to check it more though.


Thank you you all!

Please let me any comments or give me a touch if you need help with
this...
gagui...@aguilardelgado.com




-- 


  Gonzalo Aguilar Delgado
  Consultor CRM - Ingeniero en
Informática
M. +34 607 81 42 76


"No subestimes el poder de la gente estúpida en grupos grandes" 

El vie, 04-03-2011 a las 10:44 +0200, Martin Grigorov escribió:
> Run the debugger and see what happens.
> 
> On Fri, Mar 4, 2011 at 10:42 AM, Gonzalo Aguilar Delgado <
> gagui...@aguilardelgado.com> wrote:
> 
> > Yes I did it.
> >
> > It runs as I told but does not change body
> >
> > Martin Grigorov  wrote:
> >
> > >Did you register this custom markup filter ?
> > >See org.apache.wicket.markup.MarkupParserFactory javadoc to see how to do
> > >it.
> > >
> > >On Fri, Mar 4, 2011 at 8:08 AM, Gonzalo Aguilar Delgado <
> > >gagui...@aguilardelgado.com> wrote:
> > >
> > >> Martin,
> > >>
> > >> I tried the filter and the filter runs quite well but no change on the
> > >> tag... Everything remains the same.
> > >>
> > >> Do you see something wrong? It also runs several times, not just one.
> > >> One for each component that has body in it's html. I suppose that is
> > >> normal Right? But how to know which one is the one that is going to be
> > >> rendered? The others are discarded...
> > >>
> > >> Thank you.
> > >>
> > >>
> > >> package com.level2.dojo.core.commons.filter;
> > >>
> > >> import java.text.ParseException;
> > >>
> > >> import org.apache.wicket.AttributeModifier;
> > >> import org.apache.wicket.Component;
> > >> import org.apache.wicket.RequestCycle;
> > >> import org.apache.wicket.behavior.AbstractBehavior;
> > >> import org.apache.wicket.behavior.IBehavior;
> > >> import org.apache.wicket.markup.ComponentTag;
> > >> import org.apache.wicket.markup.MarkupElement;
> > >> import org.apache.wicket.markup.parser.AbstractMarkupFilter;
> > >> import org.apache.wicket.model.Model;
> > >> import org.apache.wicket.request.IRequestCodingStrategy;
> > >> import org.slf4j.Logger;
> > >> import org.slf4j.LoggerFactory;
> > >>
> > >> public class DojoBodyMarkupFilter extends AbstractMarkupFilter {
> > >>/** Logger */
> > >>private static final Logger log =
> > >> LoggerFactory.getLogger(DojoBodyMarkupFilter.class);
> > >>
> > >>/**
> > >> * Behavior that adds a prefix to src, href and background
> > >> attributes to
> > >> make them
> > >> * context-relative
> > >> */
> > >>public static final IBehavior RELATIVE_PATH_BEHAVIOR = new
> > >> AbstractBehavior()
> > >>{
> > >>private static final long serialVersionUID = 1L;
> > >>
> > >>@Override
> > >>public void onComponentTag(Component component,
> > >> ComponentTag tag)
> > >>{
> > >>IRequestCodingStrategy coder =
> > >> RequestCycle.get()
> > >>.getProcessor()
> > >>.getRequestCodingStrategy();
> > >>
> > >>// Modify all relevant attributes
> > >>String attrName = "class";
> > >>String attrValue =
> > >> tag.getAttributes().getString(attrName);
> > >>attrValue = "mytest";
> > >>tag.getAttributes().put(attrName,
> > >> coder.rewriteStaticRelativeUrl(attrValue));
> > >>
> > >This rewrite is not needed. Just use the value.
> > >
> > >>}
> > >>};
> > >>
> > >>public MarkupElement nextT

wicket-dojo project (Should I change project name?)

2011-03-13 Thread Gonzalo Aguilar Delgado
Hi all, 

I started a new project to give support for dojo to the current wicket
base 1.5.

I don't know if it will reach much far but wanted to revamp the dojo
support in wicket. I have not much time but will try to add widgets and
more support when I need it in my projects.

This is why I asked several times last week. I took as base excelent
wiquery+wicket examples projects and refactored them do give it dojo
ability. Looks nice! :-) 


At current time is fairly easy to implement new widgets. I just added
two partially implemented with theme support included. A standard button
and the editor. I have to cleanup the code but as you can see is easy to
use and extend. It has wiquery comments inside. Should I remove it? But
I want to give credits to the original authors...


Please, any comments will be welcome. 


http://gitorious.org/wicket-dojo



PS: Sorry If I should not say this here... Tell me and I will shut any
comments about it but I think it will be useful for the wicket
community.



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



Re: wicket-dojo project (Should I change project name?)

2011-03-13 Thread Martin Grigorov
Congratulations Gonzalo!

Dojo is also my choice of JS library. I hope one day to use your project ;-)
Until then keep the good work and add more components.

I understand you're trying to reuse the good parts of WiQuery (I'm not
saying there are bad parts) but I want to mention
https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/dojo-parent as
well. I'm not sure whether you know or not. This project has been done with
Dojo 0.4 and Wicket 1.(2|3) and then partially upgrated to Dojo 1.1 and
Wicket 1.(4|5).

And yes - this mailing list is the right place for such announcements and
discussions!

On Sun, Mar 13, 2011 at 4:01 PM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hi all,
>
> I started a new project to give support for dojo to the current wicket
> base 1.5.
>
> I don't know if it will reach much far but wanted to revamp the dojo
> support in wicket. I have not much time but will try to add widgets and
> more support when I need it in my projects.
>
> This is why I asked several times last week. I took as base excelent
> wiquery+wicket examples projects and refactored them do give it dojo
> ability. Looks nice! :-)
>
>
> At current time is fairly easy to implement new widgets. I just added
> two partially implemented with theme support included. A standard button
> and the editor. I have to cleanup the code but as you can see is easy to
> use and extend. It has wiquery comments inside. Should I remove it? But
> I want to give credits to the original authors...
>
>
> Please, any comments will be welcome.
>
>
> http://gitorious.org/wicket-dojo
>
>
>
> PS: Sorry If I should not say this here... Tell me and I will shut any
> comments about it but I think it will be useful for the wicket
> community.
>
>
>
> -
> 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 


Re: Stateless Wicket and Ajax

2011-03-13 Thread Martin Grigorov
On Sat, Mar 12, 2011 at 2:48 PM, Serban Balamaci wrote:

> Yes I was looking at jolira tools, but I get the exception ""unable to find
> component  "" and looking at the source:
> final Component component = page.get(pageRelativeComponentPath);
> if (component == null) {
>throw new WicketRuntimeException("unable to find component with
> path "
>+ pageRelativeComponentPath
>+ " on stateless page "
>+ page
> + " it could be that the component is inside a
> repeater make your component return false in getStatelessHint()");
>}
>
> and yes I'm using it inside a ListView, so this means that
> StatelessAjaxFallbackLink cannot be used inside a repeater(and have a
> stateless page)?
>
> Martin I see that you have not replaced StatelessWebRequestCodingStrategy
> in
> your  https://github.com/martin-g/wicket-stateless

I didn't need it so far. The Ajax stateless links and behaviors work just
fine for now.

>
> https://github.com/martin-g/wicket-stateless . So the problem with the
> ajax
> link in the repeater remains?
>
I'm not sure. I'll need more test cases to see when and why it doesn't work.
Please create a quickstart that fails and attach it to GitHub issue.

>
> I'm trying to understand if there is a known case of not using
> StatelessAjaxFallbackLink inside repeaters. Or is it somehow my fault? My
> repeater model does not change beetween renderings so the
> pageRelativeComponentPath should be the same.
>
> -
> http://balamaci.wordpress.com
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3350179.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 


Re: Stateless Wicket and Ajax

2011-03-13 Thread Martin Grigorov
Hi,

On Sat, Mar 12, 2011 at 10:41 PM, robert.mcguinness <
robert.mcguinness@gmail.com> wrote:

> Martin,
>
> With a custom StatelessRequestMapper and and a the change to
> Behaviors.getBehaviorById(int id) below I was able to get stateless
> components to work in 1.5 using a clone
> https://github.com/martin-g/wicket-stateless.  This is probably not the
> best
> approach but it was a fun exercise.
>
> http://apache-wicket.1842946.n4.nabble.com/file/n3350821/Behaviors.java
> Behaviors.java
>
> http://apache-wicket.1842946.n4.nabble.com/file/n3350821/StatelessRequestMapper.java
> StatelessRequestMapper.java
>
> Thanks! I'll check them.
A change in Behaviors.java is indeed needed. But I never needed custom
request mapper to have the stateless ajax links and behaviors working.
Thanks again for sharing your work!

> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3350821.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 


Re: New Wicket tutorial series

2011-03-13 Thread Martin Grigorov
Good work!
Thanks!

On Sat, Mar 12, 2011 at 11:04 PM, Tomasz Dziurko  wrote:

> Hello.
>
> As I am using Wicket for over two years, some time ago I decided to start
> sharing my knowledge and write tutorial where I am showing process of
> creating Wicket application from scratch. Actually tutorial has six parts
> and can be viewed here:
>
>
> http://tomaszdziurko.pl/2011/03/wicket-tutorial-series-building-web-application-scratch/
>
> As this is a my first tutorial, every comment or feedback how can I make it
> better and more useful is more than welcome :)
>
> --
> Best regards
> Tomasz Dziurko
>  
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: wicket-dojo project (Should I change project name?)

2011-03-13 Thread Gonzalo Aguilar Delgado
Hi Martin, 

Yes I knew about this but I thought it was obsolete. I tried to use some
time ago but it didn't worked. Also was a little bit difficult to
implement.


But I will take a reload to see if something can be commited/added.
Maybe this project is not needed if now dojo of wicketstuff works!

:D

Thank you!!! I will keep an eye on it.

Best regards,





"No subestimes el poder de la gente estúpida en grupos grandes" 

El dom, 13-03-2011 a las 18:35 +0200, Martin Grigorov escribió:
> Congratulations Gonzalo!
> 
> Dojo is also my choice of JS library. I hope one day to use your project ;-)
> Until then keep the good work and add more components.
> 
> I understand you're trying to reuse the good parts of WiQuery (I'm not
> saying there are bad parts) but I want to mention
> https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/dojo-parent as
> well. I'm not sure whether you know or not. This project has been done with
> Dojo 0.4 and Wicket 1.(2|3) and then partially upgrated to Dojo 1.1 and
> Wicket 1.(4|5).
> 
> And yes - this mailing list is the right place for such announcements and
> discussions!
> 
> On Sun, Mar 13, 2011 at 4:01 PM, Gonzalo Aguilar Delgado <
> gagui...@aguilardelgado.com> wrote:
> 
> > Hi all,
> >
> > I started a new project to give support for dojo to the current wicket
> > base 1.5.
> >
> > I don't know if it will reach much far but wanted to revamp the dojo
> > support in wicket. I have not much time but will try to add widgets and
> > more support when I need it in my projects.
> >
> > This is why I asked several times last week. I took as base excelent
> > wiquery+wicket examples projects and refactored them do give it dojo
> > ability. Looks nice! :-)
> >
> >
> > At current time is fairly easy to implement new widgets. I just added
> > two partially implemented with theme support included. A standard button
> > and the editor. I have to cleanup the code but as you can see is easy to
> > use and extend. It has wiquery comments inside. Should I remove it? But
> > I want to give credits to the original authors...
> >
> >
> > Please, any comments will be welcome.
> >
> >
> > http://gitorious.org/wicket-dojo
> >
> >
> >
> > PS: Sorry If I should not say this here... Tell me and I will shut any
> > comments about it but I think it will be useful for the wicket
> > community.
> >
> >
> >
> > -
> > 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: New Wicket tutorial series

2011-03-13 Thread Gonzalo Aguilar Delgado
Nice work Tomasz!!!



El sáb, 12-03-2011 a las 22:04 +0100, Tomasz Dziurko escribió:
> Hello.
> 
> As I am using Wicket for over two years, some time ago I decided to start
> sharing my knowledge and write tutorial where I am showing process of
> creating Wicket application from scratch. Actually tutorial has six parts
> and can be viewed here:
> 
> http://tomaszdziurko.pl/2011/03/wicket-tutorial-series-building-web-application-scratch/
> 
> As this is a my first tutorial, every comment or feedback how can I make it
> better and more useful is more than welcome :)
> 


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



Re: wicket-dojo project (Should I change project name?)

2011-03-13 Thread Martin Grigorov
Hi,

On Sun, Mar 13, 2011 at 9:04 PM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hi Martin,
>
> Yes I knew about this but I thought it was obsolete. I tried to use some
> time ago but it didn't worked. Also was a little bit difficult to
> implement.


> But I will take a reload to see if something can be commited/added.
> Maybe this project is not needed if now dojo of wicketstuff works!
>
> Actually it is in the same state... The project has some nice features -
like automatic download of Dojo distribution, easy way to declare Dojo
dependencies (dojo.require()'s),  All it need is a new maintainer.
I just committed a README file which contains a link to the last known
working example of wicketstuff-dojo-1.1
If you decide to give it a go then you may download this example and add it
as a subproject in dojo-parent.


> :D
>
> Thank you!!! I will keep an eye on it.
>
> Best regards,
>
>
>
>
>
> "No subestimes el poder de la gente estúpida en grupos grandes"
>
> El dom, 13-03-2011 a las 18:35 +0200, Martin Grigorov escribió:
> > Congratulations Gonzalo!
> >
> > Dojo is also my choice of JS library. I hope one day to use your project
> ;-)
> > Until then keep the good work and add more components.
> >
> > I understand you're trying to reuse the good parts of WiQuery (I'm not
> > saying there are bad parts) but I want to mention
> >
> https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/dojo-parentas
> > well. I'm not sure whether you know or not. This project has been done
> with
> > Dojo 0.4 and Wicket 1.(2|3) and then partially upgrated to Dojo 1.1 and
> > Wicket 1.(4|5).
> >
> > And yes - this mailing list is the right place for such announcements and
> > discussions!
> >
> > On Sun, Mar 13, 2011 at 4:01 PM, Gonzalo Aguilar Delgado <
> > gagui...@aguilardelgado.com> wrote:
> >
> > > Hi all,
> > >
> > > I started a new project to give support for dojo to the current wicket
> > > base 1.5.
> > >
> > > I don't know if it will reach much far but wanted to revamp the dojo
> > > support in wicket. I have not much time but will try to add widgets and
> > > more support when I need it in my projects.
> > >
> > > This is why I asked several times last week. I took as base excelent
> > > wiquery+wicket examples projects and refactored them do give it dojo
> > > ability. Looks nice! :-)
> > >
> > >
> > > At current time is fairly easy to implement new widgets. I just added
> > > two partially implemented with theme support included. A standard
> button
> > > and the editor. I have to cleanup the code but as you can see is easy
> to
> > > use and extend. It has wiquery comments inside. Should I remove it? But
> > > I want to give credits to the original authors...
> > >
> > >
> > > Please, any comments will be welcome.
> > >
> > >
> > > http://gitorious.org/wicket-dojo
> > >
> > >
> > >
> > > PS: Sorry If I should not say this here... Tell me and I will shut any
> > > comments about it but I think it will be useful for the wicket
> > > community.
> > >
> > >
> > >
> > > -
> > > 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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Stateless Wicket and Ajax

2011-03-13 Thread Serban Balamaci
Hello everybody.
It is indeed as Robert is saying. And after changing the code, it works
Component component = page.get(pageRelativeComponentPath);

// See {@link
//
BookmarkableListenerInterfaceRequestTarget#processEvents(RequestCycle)}
// We make have to try to look for the component twice, if we hit
the
// same condition.
if (component == null) {
page.prepareForRender(false);
component = page.get(pageRelativeComponentPath);
//Component no longer null


Looking at "BookmarkableListenerInterfaceRequestTarget#processEvents" we
find the comment:
"this is quite a hack to get components in repeater work. But it still can
fail if the repeater is a paging one or on every render it will generate new
index for the items..."

I was trying to implement a comment system for articles. The stateless ajax
buttons would be reply buttons for comments that can span multi levels. I
can't feel confident that the comment hierarchy will not change by the time
the user clicks reply. Currently I'm thinking of moving the reply as a
behaviour outside the repeater, and use JQuery to pass the comment id to
that behaviour so I can know to which comment the user is replying.


Thanks everybody.

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3352490.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



Re: DropDownChoices Removing "Choose One" after Ajax Call

2011-03-13 Thread Maarten Billemont
On 13 Mar 2011, at 10:18, tech7 wrote:
> 
> I have a dropdownchoice component on my page and according to some selections
> on my page, this component is updated by a ajax call.
> At the beginning it displays the choices without showing "Choose One" but
> after ajax call it displays "Choose One". I know this issue is coming from
> any of the choices are not selected right there but I don't know how to say
> the component choose first one as selected for not displaying "Choose One".

The component will select the item that your model provides.  If your model's 
object is not set, the component will not select anything.  It would be crazy 
to think that the component should have an element selected that wasn't 
actually the model's object.

So, if you want to select the first element, set your model's object to it.


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



Re: Large session store in target/work directory when running tests

2011-03-13 Thread Martin Grigorov
On Sat, Mar 12, 2011 at 2:29 AM, Alec Swan  wrote:

> Hello,
>
> I have a problem with my tests writing too much stuff in the session
> store located in target/work directory. This problem was discussed in
> this thread
> http://markmail.org/thread/aaa2ub2ltcuhpqub#query:wicketmockservlet%20file%20store+page:1+mid:p3gf5wq75qi64lsp+state:results
> .
>
> I followed the recommendation by overriding newSessionStore() as shown
> below, but still see a bunch of files created in work/target
> directory. What am I doing wrong?
>

What kind of files ?

>
> @Override
>  protected ISessionStore newSessionStore() {
>  return new HttpSessionStore(this);
>  }
>
> Thanks
>
> -
> 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