Wicketeer Available for Hire...

2009-05-31 Thread James Carman
All,

It looks like my current client engagement is winding down here soon.
So, it looks like I'm "on the market."  If anyone knows of any
Wicket-related work located near Cincinnati, OH USA or that could be
done off-site, I would be interested in hearing about it.  Please
reply "off-list."

Thank you,

James Carman

p.s. I hope sending these type of emails on here isn't considered rude
or anything.

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



Re: Wicket Quickstart vs WIA eclipse projects: why so different?

2009-05-31 Thread James Carman
Is there a way through the maven eclipse plugin to set properties like
that for a project?

On Sat, May 30, 2009 at 11:35 PM, David Brown
 wrote:
> Hello Igor, thanks - that did the trick. Regards, David.
>
>
>
> - Original Message -
> From: "Igor Vaynberg" 
> To: users@wicket.apache.org
> Sent: Saturday, May 30, 2009 4:13:37 PM GMT -06:00 US/Canada Central
> Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different?
>
> window/preferences/compiler/building - remove *.html from output
> folder/filtered resources
>
> -igor
>
> On Sat, May 30, 2009 at 2:09 PM, David Brown
>  wrote:
>> Hello Luther, thanks for the informative and speedy reply. I'm going to take 
>> things one-step-at-a-time. So far, Igor is right about running the 
>> Start.class (as found in the test-classes directory). The only issue now is 
>> the Eclipse bug-a-boo about not copying the .HTML files along with the 
>> .CLASS files. See RuntimeException included below. As soon as I learn how to 
>> turn off the filter I will try your way if this fails. Yes, I am basically 
>> looking for anyway of speeding up the: edit, build, deploy cycle. Directly 
>> deploying .WAR files is OK once but since I'm trying to develop something 
>> for work I'm running out of time quickly. Thanks and regards, David.
>>
>>
>>
>> - Original Message -
>> From: "Luther Baker" 
>> To: users@wicket.apache.org
>> Sent: Saturday, May 30, 2009 9:36:55 AM GMT -06:00 US/Canada Central
>> Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different?
>>
>> For what its worth, I run a few Wicket 1.4x projects as within
>> Eclipse/m2plugin and pages, etc refresh just fine. I use the Run/Debug
>> Configurations and create a Maven application and then select the jetty
>> plugin, correct workspace and jetty:run command.
>>
>> There are also Jetty options you can include directly in the POM file that
>> define how and when Jetty should regularly will scan the deployed files ...
>> restarting Jetty if changes detected.
>>
>> What I've described is too different mechanisms for picking up changes ...
>> is that what you're asking for?
>>
>> -Luther
>>
>>
>>
>> On Sat, May 30, 2009 at 7:53 AM, Ben Tilford  wrote:
>>
>>> Something that may be worth trying is mvn jetty:run-exploded
>>>
>>> On Fri, May 29, 2009 at 6:10 PM, Igor Vaynberg >> >wrote:
>>>
>>> > like i said, the best way is to right click the Start class and do run
>>> > as java application. you can, of course, do it any other way you like
>>> > - including installing jetty eclipse launcher plugin.
>>> >
>>> > -igor
>>> >
>>> > On Fri, May 29, 2009 at 3:17 PM, David Brown
>>> >  wrote:
>>> > > Hello Igor, thanks for the reply. Can I just ignore the QuickStart
>>> > embedded jetty and install jetty on Eclipse then do a run-as without any
>>> > issues? Please advise, David.
>>> > >
>>> > >
>>> > > - Original Message -
>>> > > From: "Igor Vaynberg" 
>>> > > To: users@wicket.apache.org
>>> > > Cc: "david" 
>>> > > Sent: Friday, May 29, 2009 4:51:02 PM GMT -06:00 US/Canada Central
>>> > > Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so
>>> different?
>>> > >
>>> > > why dont you just start the project from eclipse directly using the
>>> > > Start class, that way you get debug and hotswap - which should be the
>>> > > real "student's dream" :)
>>> > >
>>> > > -igor
>>> > >
>>> > > On Fri, May 29, 2009 at 2:53 PM, David Brown
>>> > >  wrote:
>>> > >> Hello Martin, Jeremy, dev, gurus, users and mortals. I have just
>>> > finished ch. 13 of the WIA.pdf. I have followed closely the reading using
>>> > the wicket-in-action eclipse project. I have the wicket-in-action running
>>> > under the: mvn jetty:run. The wicket-in-action project is redeployed
>>> every
>>> > 60 seconds (a student's dream). After finishing the 13th chapter I
>>> decided
>>> > to leave the nest for the 1.4rc QuickStart. The new QuickStart project
>>> > expanded and imported into the Eclipse workspace no-problemo. The mystery
>>> is
>>> > what am I doing wrong to get the automatic 60 second re-deploy. As it
>>> stands
>>> > now I have to kill jetty, mvn package and then restart jetty (mvn
>>> > jetty:run). I have pasted in the:
>>> > >>
>>> > >>
>>> > >> **
>>> > >> 
>>> > >>    configuration
>>> > >>    development
>>> > >> 
>>> > >> **
>>> > >>
>>> > >> from the wicket-in-action web.xml but no change. The Windows cmd
>>> console
>>> > shows the usual Wicket WARNING: running in development mode. I plan to
>>> use
>>> > the wicket-in-action almost verbatim including the Hibernate DAO for my
>>> > current gig. It is probably only a few weeks before they start holding my
>>> > feet to the fire.
>>> > >>
>>> > >> Please advise, David.
>>> > >>
>>> > >> -
>>> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > >> For additional commands, e-mail: users-h...@wicket.apache.o

Re: Disabling component again with AjaxCheckBox

2009-05-31 Thread Steve Swinsburg
Call doUpdateConfirmButton() when the page first loads so you can set  
it up initially, then again when the checkbox is clicked as you  
already do.



cheers,
Steve


On 31/05/2009, at 7:40 AM, Rick Gruber-Riemer wrote:


Hi

I have a checkbox which must be checked for the user to be able to  
submit
(accept terms). I want the related submit button to be enabled only,  
when

the checkbox is checked. This works fine when the button initially is
disabled, then the checkbox is checked by the user (I followed
http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-td20911338.html#a20911338) 
.
However, when the user then unchecks the checkbox again, the button  
does not

get disabled again :-(

Any suggestions?

   
   
   wicket:id="acceptCB"

id="acceptCB" />
   [Accept
delete]
   
   
   

==

   /** Whether or not the conditions for deletion are accepted. Acts  
as

IModel for the checkbox */
   private boolean accepted = false;

   /** The confirm button */
   Button confirmBTN = null;

   /** The accept check box */
   CheckBox acceptCB = null;

   public AccountDeletePage() {
   add(new FeedbackPanel("feedback"));
   Form form = new Form("form");
   add(form);
   confirmBTN = new Button("confirmBtn") {
   @Override
   public void onSubmit() {
   doDelete();
   }
   };
   confirmBTN.setEnabled(false);
   confirmBTN.setOutputMarkupId(true); //not sure why this is  
needed

   form.add(confirmBTN);
   //CheckBox acceptCB = new CheckBox("acceptCB", new
PropertyModel(this, "accepted"));
   acceptCB = new AjaxCheckBox("acceptCB",new PropertyModel(this,
"accepted")) {
   @Override protected void onUpdate(AjaxRequestTarget arg0) {
   doUpdateConfirmButton();
   if(arg0 != null) {
   arg0.addComponent(confirmBTN);
   }
   }
   };
   acceptCB.setRequired(true);
   form.add(new  
FormComponentFeedbackBorder("border").add(acceptCB));

   }

   /**
* Updates the enabled state of the delete button depending on
acceptance
*/
   private final void doUpdateConfirmButton() {
   boolean enabled = acceptCB.isEnabled();
   confirmBTN.setEnabled(enabled);
   }




smime.p7s
Description: S/MIME cryptographic signature


Re: CheckBox and Form submit question

2009-05-31 Thread joeinazusa

You solution recommendation would seem to work for me.  

would you add the JS in wicket? How?

Thanks!

joe.


Johan Compagner wrote:
> 
> I would do that in javascriot itself, why having a round trip to fill
> 1 set of data to some fields. Just do that in some javascript that you
> attach to the checkbox onclick handler
> 
> On 1/16/08, Doug Leeper  wrote:
>>
>> I have both a Contact Address and a Billing Address object displayed in a
>> Form.
>>
>> I also have a CheckBox that, when checked, is to copy the Contact Address
>> field values into the Billing Address.
>>
>> What is the best way to do this?
>>
>> I have tried several methods ( CheckBox with a
>> FormComponentUpdatingBehavior
>> and an AjaxCheckBox ) but the values that are entered into the Contact
>> Address fields are not being updated to the model.
>>
>> I basically want a submit without form validation.  Is this possible?
>>
>> Thanks in advance
>> - Doug
>> --
>> View this message in context:
>> http://www.nabble.com/CheckBox-and-Form-submit-question-tp14894939p14894939.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CheckBox-and-Form-submit-question-tp14894939p23803943.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 show checkboxes in two column

2009-05-31 Thread Fernando Wermus
Simon,
 I was wondering the same but instead of building one myself I was
wondering why wicket doesn't have a tile component for
instance.

On Sat, May 30, 2009 at 11:58 PM, gaoxm  wrote:

> Hello,
>
> Does anyone know how to show a group of check boxes or radio boxes in two
> columns and align them vertically, for example, as shown in attached
> picture? I can render them one by one in HTML using table. However, I have
> several such kinds of list, and some of them may be changed later. So I
> wonder if it is possible to show a dynamic list (the options are retrieved
> from database) as a group of check boxes in two column.
>
> Many thanks.
> --Simon
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: how to show checkboxes in two column

2009-05-31 Thread Igor Vaynberg
you can wrap a checkgroup, gridview, and check components into a
formcomponentpanel to build a reusable list with x number of columns.

-igor

On Sat, May 30, 2009 at 11:58 PM, gaoxm  wrote:
> Hello,
>
> Does anyone know how to show a group of check boxes or radio boxes in two
> columns and align them vertically, for example, as shown in attached
> picture? I can render them one by one in HTML using table. However, I have
> several such kinds of list, and some of them may be changed later. So I
> wonder if it is possible to show a dynamic list (the options are retrieved
> from database) as a group of check boxes in two column.
>
> Many thanks.
> --Simon
>
>
> -
> 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: Wicketeer Available for Hire...

2009-05-31 Thread Martin Makundi
Hi James!

We'd need help fixin few wicket bugs...

1. https://issues.apache.org/jira/browse/WICKET-2261
2. https://issues.apache.org/jira/browse/WICKET-2274

What would you suggest?


**
Martin

2009/5/31 James Carman :
> All,
>
> It looks like my current client engagement is winding down here soon.
> So, it looks like I'm "on the market."  If anyone knows of any
> Wicket-related work located near Cincinnati, OH USA or that could be
> done off-site, I would be interested in hearing about it.  Please
> reply "off-list."
>
> Thank you,
>
> James Carman
>
> p.s. I hope sending these type of emails on here isn't considered rude
> or anything.
>
> -
> 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



Does Link work with browser BACK button?

2009-05-31 Thread Luther Baker
For this example, I have a 'blog' like front page. On this page are several
posts that each, have an associated category and multiple tags.

I am in the prototype/design phase right now (simply hard coding the posts
and corresponding references in the Java class).

*Use Case 1:
*1. visit the front page and click on a 'category' link (correctly takes me
to the 'CategoryPage').
2. from the 'CategoryPage', click on the 'Home' link (correctly takes me
back to the front page).
3. from font page, click on any of the three 'category' links (correctly
takes me to the 'CategoryPage').

*Use Case 2:
*1. visit the front page and click on a 'category' link (correctly takes me
to the 'CategoryPage').
2. from the 'CategoryPage', click *BACK BUTTON in the browser*
3. from font page, click on any of the three 'category' links (crash!)

Page Expired

The page you requested has expired.

Return to home page 


Thanks,

-Luther



*Code*

*Relevant markup:
*

Wicket and Legos
[web frameworks]: wicket

Wicket makes things so easy.
Make a change and you can see all the obvious things break.
Its much more like putting together a lego set.
Things just fit into place.

2009/05/26 Luther Baker


*and the Java:
*
public HomePage()
{
super(new ResourceModel("head-title"));

Category category = new Category();
category.setName("web-frameworks");
addCategoryLink("a-category-1", category);
addCategoryLink("a-category-2", category);

category = new Category();
category.setName("mac-desktop");
addCategoryLink("a-category-3", category);
}

private void addCategoryLink(final String key, final Category category)
{
final Link link = new Link(key)
{
private static final long serialVersionUID = 1L;

@Override
public void onClick()
{
final CategoryPage categoryPage = new
CategoryPage(category);
setResponsePage(categoryPage);
}
};
add(link);
}


Re: Does Link work with browser BACK button?

2009-05-31 Thread joeinazusa

Yes it does.

Sounds like to you need to implement serializable in your class.


public class YourClass extends WebPage implements Serializable {



luther.baker wrote:
> 
> For this example, I have a 'blog' like front page. On this page are
> several
> posts that each, have an associated category and multiple tags.
> 
> I am in the prototype/design phase right now (simply hard coding the posts
> and corresponding references in the Java class).
> 
> *Use Case 1:
> *1. visit the front page and click on a 'category' link (correctly takes
> me
> to the 'CategoryPage').
> 2. from the 'CategoryPage', click on the 'Home' link (correctly takes me
> back to the front page).
> 3. from font page, click on any of the three 'category' links (correctly
> takes me to the 'CategoryPage').
> 
> *Use Case 2:
> *1. visit the front page and click on a 'category' link (correctly takes
> me
> to the 'CategoryPage').
> 2. from the 'CategoryPage', click *BACK BUTTON in the browser*
> 3. from font page, click on any of the three 'category' links (crash!)
> 
> Page Expired
> 
> The page you requested has expired.
> 
> Return to home page 
> 
> 
> Thanks,
> 
> -Luther
> 
> 
> 
> *Code*
> 
> *Relevant markup:
> *
> 
> Wicket and Legos
>  # [web frameworks] :
> wicket
> 
> Wicket makes things so easy.
> Make a change and you can see all the obvious things
> break.
> Its much more like putting together a lego set.
> Things just fit into place.
> 
> 2009/05/26 Luther Baker
> 
> 
> *and the Java:
> *
> public HomePage()
> {
> super(new ResourceModel("head-title"));
> 
> Category category = new Category();
> category.setName("web-frameworks");
> addCategoryLink("a-category-1", category);
> addCategoryLink("a-category-2", category);
> 
> category = new Category();
> category.setName("mac-desktop");
> addCategoryLink("a-category-3", category);
> }
> 
> private void addCategoryLink(final String key, final Category
> category)
> {
> final Link link = new Link(key)
> {
> private static final long serialVersionUID = 1L;
> 
> @Override
> public void onClick()
> {
> final CategoryPage categoryPage = new
> CategoryPage(category);
> setResponsePage(categoryPage);
> }
> };
> add(link);
> }
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Does-Link-work-with-browser-BACK-button--tp23804447p23804483.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: Does Link work with browser BACK button?

2009-05-31 Thread Igor Vaynberg
agreed it sounds like a serialization error, check your logs. webpage
is already serializable so no need to do it there. something else you
are holding a reference to must not be serializable.

-igor

On Sun, May 31, 2009 at 9:11 AM, joeinazusa  wrote:
>
> Yes it does.
>
> Sounds like to you need to implement serializable in your class.
>
>
> public class YourClass extends WebPage implements Serializable {
>
>
>
> luther.baker wrote:
>>
>> For this example, I have a 'blog' like front page. On this page are
>> several
>> posts that each, have an associated category and multiple tags.
>>
>> I am in the prototype/design phase right now (simply hard coding the posts
>> and corresponding references in the Java class).
>>
>> *Use Case 1:
>> *1. visit the front page and click on a 'category' link (correctly takes
>> me
>> to the 'CategoryPage').
>> 2. from the 'CategoryPage', click on the 'Home' link (correctly takes me
>> back to the front page).
>> 3. from font page, click on any of the three 'category' links (correctly
>> takes me to the 'CategoryPage').
>>
>> *Use Case 2:
>> *1. visit the front page and click on a 'category' link (correctly takes
>> me
>> to the 'CategoryPage').
>> 2. from the 'CategoryPage', click *BACK BUTTON in the browser*
>> 3. from font page, click on any of the three 'category' links (crash!)
>>
>> Page Expired
>>
>> The page you requested has expired.
>>
>> Return to home page 
>>
>>
>> Thanks,
>>
>> -Luther
>>
>>
>>
>> *Code*
>>
>> *Relevant markup:
>> *
>>         
>>             Wicket and Legos
>>              # [web frameworks] :
>> wicket
>>             
>>                 Wicket makes things so easy.
>>                 Make a change and you can see all the obvious things
>> break.
>>                 Its much more like putting together a lego set.
>>                 Things just fit into place.
>>             
>>             2009/05/26 Luther Baker
>>         
>>
>> *and the Java:
>> *
>>     public HomePage()
>>     {
>>         super(new ResourceModel("head-title"));
>>
>>         Category category = new Category();
>>         category.setName("web-frameworks");
>>         addCategoryLink("a-category-1", category);
>>         addCategoryLink("a-category-2", category);
>>
>>         category = new Category();
>>         category.setName("mac-desktop");
>>         addCategoryLink("a-category-3", category);
>>     }
>>
>>     private void addCategoryLink(final String key, final Category
>> category)
>>     {
>>         final Link link = new Link(key)
>>         {
>>             private static final long serialVersionUID = 1L;
>>
>>             @Override
>>             public void onClick()
>>             {
>>                 final CategoryPage categoryPage = new
>> CategoryPage(category);
>>                 setResponsePage(categoryPage);
>>             }
>>         };
>>         add(link);
>>     }
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Does-Link-work-with-browser-BACK-button--tp23804447p23804483.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: Does Link work with browser BACK button?

2009-05-31 Thread Luther Baker
Ah - thanks both of you. Category was still pretty much a POJO


 @Entity
 public class Category
 {


*This fixed it:*


@Entity
public class Category implements Serializable
{
private static final long serialVersionUID = 1L;



Thanks,

-Luther




On Sun, May 31, 2009 at 11:20 AM, Igor Vaynberg wrote:

> agreed it sounds like a serialization error, check your logs. webpage
> is already serializable so no need to do it there. something else you
> are holding a reference to must not be serializable.
>
> -igor
>
> On Sun, May 31, 2009 at 9:11 AM, joeinazusa  wrote:
> >
> > Yes it does.
> >
> > Sounds like to you need to implement serializable in your class.
> >
> >
> > public class YourClass extends WebPage implements Serializable {
> >
> >
> >
> > luther.baker wrote:
> >>
> >> For this example, I have a 'blog' like front page. On this page are
> >> several
> >> posts that each, have an associated category and multiple tags.
> >>
> >> I am in the prototype/design phase right now (simply hard coding the
> posts
> >> and corresponding references in the Java class).
> >>
> >> *Use Case 1:
> >> *1. visit the front page and click on a 'category' link (correctly takes
> >> me
> >> to the 'CategoryPage').
> >> 2. from the 'CategoryPage', click on the 'Home' link (correctly takes me
> >> back to the front page).
> >> 3. from font page, click on any of the three 'category' links (correctly
> >> takes me to the 'CategoryPage').
> >>
> >> *Use Case 2:
> >> *1. visit the front page and click on a 'category' link (correctly takes
> >> me
> >> to the 'CategoryPage').
> >> 2. from the 'CategoryPage', click *BACK BUTTON in the browser*
> >> 3. from font page, click on any of the three 'category' links (crash!)
> >>
> >> Page Expired
> >>
> >> The page you requested has expired.
> >>
> >> Return to home page 
> >>
> >>
> >> Thanks,
> >>
> >> -Luther
> >>
> >>
> >>
> >> *Code*
> >>
> >> *Relevant markup:
> >> *
> >> 
> >> Wicket and Legos
> >>  # [web frameworks] :
> >> wicket
> >> 
> >> Wicket makes things so easy.
> >> Make a change and you can see all the obvious things
> >> break.
> >> Its much more like putting together a lego set.
> >> Things just fit into place.
> >> 
> >> 2009/05/26 Luther Baker
> >> 
> >>
> >> *and the Java:
> >> *
> >> public HomePage()
> >> {
> >> super(new ResourceModel("head-title"));
> >>
> >> Category category = new Category();
> >> category.setName("web-frameworks");
> >> addCategoryLink("a-category-1", category);
> >> addCategoryLink("a-category-2", category);
> >>
> >> category = new Category();
> >> category.setName("mac-desktop");
> >> addCategoryLink("a-category-3", category);
> >> }
> >>
> >> private void addCategoryLink(final String key, final Category
> >> category)
> >> {
> >> final Link link = new Link(key)
> >> {
> >> private static final long serialVersionUID = 1L;
> >>
> >> @Override
> >> public void onClick()
> >> {
> >> final CategoryPage categoryPage = new
> >> CategoryPage(category);
> >> setResponsePage(categoryPage);
> >> }
> >> };
> >> add(link);
> >> }
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/Does-Link-work-with-browser-BACK-button--tp23804447p23804483.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: Disabling component again with AjaxCheckBox

2009-05-31 Thread Rick Gruber-Riemer
Hi

Thank you for your answer.

Unfortunately this did not solve the problem. In the meantime I found out,
that the onUpdate method is only called when the checkbox is checked, but
not when the checkbox is removed (i.e. check, uncheck, check, uncheck
results in two invocations of onUpdate). This does not sound correct to me,
but I am not sure.

2009/5/31 Steve Swinsburg 

> Call doUpdateConfirmButton() when the page first loads so you can set it up
> initially, then again when the checkbox is clicked as you already do.
>
>
> cheers,
> Steve
>
>
>
> On 31/05/2009, at 7:40 AM, Rick Gruber-Riemer wrote:
>
>  Hi
>>
>> I have a checkbox which must be checked for the user to be able to submit
>> (accept terms). I want the related submit button to be enabled only, when
>> the checkbox is checked. This works fine when the button initially is
>> disabled, then the checkbox is checked by the user (I followed
>>
>> http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-td20911338.html#a20911338
>> ).
>> However, when the user then unchecks the checkbox again, the button does
>> not
>> get disabled again :-(
>>
>> Any suggestions?
>>
>>   
>>   
>>   > id="acceptCB" />
>>   [Accept
>> delete]
>>   
>>   > wicket:id="confirmBtn" wicket:message="value:confirmBtn"/>
>>   
>>
>> ==
>>
>>   /** Whether or not the conditions for deletion are accepted. Acts as
>> IModel for the checkbox */
>>   private boolean accepted = false;
>>
>>   /** The confirm button */
>>   Button confirmBTN = null;
>>
>>   /** The accept check box */
>>   CheckBox acceptCB = null;
>>
>>   public AccountDeletePage() {
>>   add(new FeedbackPanel("feedback"));
>>   Form form = new Form("form");
>>   add(form);
>>   confirmBTN = new Button("confirmBtn") {
>>   @Override
>>   public void onSubmit() {
>>   doDelete();
>>   }
>>   };
>>   confirmBTN.setEnabled(false);
>>   confirmBTN.setOutputMarkupId(true); //not sure why this is needed
>>   form.add(confirmBTN);
>>   //CheckBox acceptCB = new CheckBox("acceptCB", new
>> PropertyModel(this, "accepted"));
>>   acceptCB = new AjaxCheckBox("acceptCB",new PropertyModel(this,
>> "accepted")) {
>>   @Override protected void onUpdate(AjaxRequestTarget arg0) {
>>   doUpdateConfirmButton();
>>   if(arg0 != null) {
>>   arg0.addComponent(confirmBTN);
>>   }
>>   }
>>   };
>>   acceptCB.setRequired(true);
>>   form.add(new FormComponentFeedbackBorder("border").add(acceptCB));
>>   }
>>
>>   /**
>>* Updates the enabled state of the delete button depending on
>> acceptance
>>*/
>>   private final void doUpdateConfirmButton() {
>>   boolean enabled = acceptCB.isEnabled();
>>   confirmBTN.setEnabled(enabled);
>>   }
>>
>
>


Wicket + RSS

2009-05-31 Thread Fernando Wermus
Hi all,

 I am looking to publish some RSS into a wicket site. I thought to have
a look at wicket-stuff rome, but I couldn't get it. I am using it with
wicket 1.3.6


wicket-snaps
http://wicketstuff.org/maven/repository

true


true


+

  org.wicketstuff
  wicketstuff-rome
  1.3-SNAPSHOT



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Spring Autowired and @SpringBean

2009-05-31 Thread Luther Baker
I'm working on a project with Spring/Wicket integration.

I have most of the Spring autowire stuff working ...

My @Repository(s) are successfully autowires to my @Service(s). In SpringMVC
speak then, the @Service would autowire to the *...@controller*. But of course,
I am using wicket, not Spring MVC. Per the wicket/spring doc
page,
which describes the *...@springbean* annotation, as opposed to the 
*...@controller
* annotation, in my pages. Unfortunately, I get an error and the stack trace
includes:

Caused by: java.lang.IllegalStateException: bean of type
[org.effectiveprogramming.effprog.service.PostService] not found

Is this expected? Before deep diving I'm curious to confirm that
spring-wicket integration is definitely supposed to work with Spring
autowiring. Thoughts?

Thanks.

-Luther




@Repository
public class PostDaoImpl extends PostDao
{
...
}



@Service
public class PostServiceImpl implements PostService
{
...
@Autowired
public void setPostDao(final PostDao postDao)
{
this.postDao = postDao;
}
}



public class HomePage extends BasicLayout
{
@SpringBean
private PostService postService;


Re: Wicket + RSS

2009-05-31 Thread nino martinez wael
It's here 
http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-rome/1.3-SNAPSHOT/

So shouldnt be a problem.. Are you looking publish rss with wicket or
wicket to consume rss and show it on a page? wicketstuff rome will let
you do both afaik...

2009/5/31 Fernando Wermus :
> Hi all,
>
>     I am looking to publish some RSS into a wicket site. I thought to have
> a look at wicket-stuff rome, but I couldn't get it. I am using it with
> wicket 1.3.6
>
>        
>            wicket-snaps
>            http://wicketstuff.org/maven/repository
>            
>                true
>            
>            
>                true
>            
>        
> +
>        
>              org.wicketstuff
>              wicketstuff-rome
>              1.3-SNAPSHOT
>        
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



Re: Wicket + RSS

2009-05-31 Thread Fernando Wermus
Nino,
 So I have to install it locally...

ps: I am looking just to publish rss right now.

thanks

On Sun, May 31, 2009 at 1:15 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> It's here
> http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-rome/1.3-SNAPSHOT/
>
> So shouldnt be a problem.. Are you looking publish rss with wicket or
> wicket to consume rss and show it on a page? wicketstuff rome will let
> you do both afaik...
>
> 2009/5/31 Fernando Wermus :
> > Hi all,
> >
> > I am looking to publish some RSS into a wicket site. I thought to
> have
> > a look at wicket-stuff rome, but I couldn't get it. I am using it with
> > wicket 1.3.6
> >
> >
> >wicket-snaps
> >http://wicketstuff.org/maven/repository
> >
> >true
> >
> >
> >true
> >
> >
> > +
> >
> >  org.wicketstuff
> >  wicketstuff-rome
> >  1.3-SNAPSHOT
> >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket + RSS

2009-05-31 Thread Fernando Wermus
Nino,
I got this error running a simple code. It couldn read rss from Code
Poet!


On Sun, May 31, 2009 at 1:27 PM, Fernando Wermus
wrote:

> Nino,
>  So I have to install it locally...
>
> ps: I am looking just to publish rss right now.
>
> thanks
>
>
> On Sun, May 31, 2009 at 1:15 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> It's here
>> http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-rome/1.3-SNAPSHOT/
>>
>> So shouldnt be a problem.. Are you looking publish rss with wicket or
>> wicket to consume rss and show it on a page? wicketstuff rome will let
>> you do both afaik...
>>
>> 2009/5/31 Fernando Wermus :
>> > Hi all,
>> >
>> > I am looking to publish some RSS into a wicket site. I thought to
>> have
>> > a look at wicket-stuff rome, but I couldn't get it. I am using it with
>> > wicket 1.3.6
>> >
>> >
>> >wicket-snaps
>> >http://wicketstuff.org/maven/repository
>> >
>> >true
>> >
>> >
>> >true
>> >
>> >
>> > +
>> >
>> >  org.wicketstuff
>> >  wicketstuff-rome
>> >  1.3-SNAPSHOT
>> >
>> >
>> >
>> > --
>> > Fernando Wermus.
>> >
>> > www.linkedin.com/in/fernandowermus
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket + RSS

2009-05-31 Thread Fernando Wermus
java.lang.RuntimeException: Unable to parse feed:
http://feeds.feedburner.com/code_poet
 at org.wicketstuff.rome.SyndEntryListModel.load(SyndEntryListModel.java:31)
 at 
org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:114)
 at org.apache.wicket.Component.getModelObject(Component.java:1565)
 at 
org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:217)
 at 
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
 at 
org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
 at org.apache.wicket.Component.beforeRender(Component.java:1041)
 at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
 at org.apache.wicket.Component.beforeRender(Component.java:1041)
 at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
 at 
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
 at org.apache.wicket.Component.beforeRender(Component.java:1041)
 at 
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
 at org.apache.wicket.Page.onBeforeRender(Page.java:1458)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
 at org.apache.wicket.Component.beforeRender(Component.java:1041)
 at org.apache.wicket.Component.prepareForRender(Component.java:2167)
 at org.apache.wicket.Page.renderPage(Page.java:892)
 at 
org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:163)
 at 
org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1226)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1297)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1399)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:529)
 at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)



On Sun, May 31, 2009 at 1:37 PM, Fernando Wermus
wrote:

> Nino,
> I got this error running a simple code. It couldn read rss from Code
> Poet!
>
>
>
> On Sun, May 31, 2009 at 1:27 PM, Fernando Wermus <
> fernando.wer...@gmail.com> wrote:
>
>> Nino,
>>  So I have to install it locally...
>>
>> ps: I am looking just to publish rss right now.
>>
>> thanks
>>
>>
>> On Sun, May 31, 2009 at 1:15 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>>> It's here
>>> http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-rome/1.3-SNAPSHOT/
>>>
>>> So shouldnt be a problem.. Are you looking publish rss with wicket or
>>> wicket to consume rss and show it on a page? wicketstuff rome will let
>>> you do both afaik...
>>>
>>> 2009/5/31 Fernando Wermus :
>>> > Hi all,
>>> >
>>> > I am looking to publish some RSS into a wicket site. I thought to
>>> have
>>> > a look at wicket-stuff rome, but I couldn't get it. I am using it with
>>> > wicket 1.3.6
>>> >
>>> >
>>> >wicket-snaps
>>> >http://wicketstuff.org/maven/repository
>>> >
>>> >true
>>> >
>>> >
>>> >true
>>> >
>>> >
>>> > +
>>> >
>>> >  org.wicketstuff
>>> >  wicketstuff-rome
>>> >  1.3-SNAPSHOT
>>> >
>>> >
>>> >
>>> > --
>>> > Fernando Wermus.
>>> >
>>> > www.linkedin.com/in/fernandowermus
>>> >
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Fernando Wermus.
>>
>> www.linkedin.com/in/fernandowermus
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket + RSS

2009-05-31 Thread Fernando Wermus
It is solved. Thanks!

On Sun, May 31, 2009 at 1:37 PM, Fernando Wermus
wrote:

> java.lang.RuntimeException: Unable to parse feed: 
> http://feeds.feedburner.com/code_poet
>  at 
> org.wicketstuff.rome.SyndEntryListModel.load(SyndEntryListModel.java:31)
>
>  at 
> org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:114)
>  at org.apache.wicket.Component.getModelObject(Component.java:1565)
>  at 
> org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:217)
>
>  at 
> org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>  at 
> org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
>  at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
>
>  at org.apache.wicket.Component.beforeRender(Component.java:1041)
>  at 
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
>  at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
>
>  at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
>  at org.apache.wicket.Component.beforeRender(Component.java:1041)
>  at 
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
>
>  at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
>  at 
> org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205)
>  at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
>
>  at org.apache.wicket.Component.beforeRender(Component.java:1041)
>  at 
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1590)
>  at org.apache.wicket.Component.onBeforeRender(Component.java:3727)
>
>  at org.apache.wicket.Page.onBeforeRender(Page.java:1458)
>  at org.apache.wicket.Component.internalBeforeRender(Component.java:1009)
>  at org.apache.wicket.Component.beforeRender(Component.java:1041)
>  at org.apache.wicket.Component.prepareForRender(Component.java:2167)
>
>  at org.apache.wicket.Page.renderPage(Page.java:892)
>  at 
> org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:163)
>  at 
> org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
>
>  at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
>  at 
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1226)
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1297)
>
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1399)
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:529)
>  at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
>
>
>
> On Sun, May 31, 2009 at 1:37 PM, Fernando Wermus <
> fernando.wer...@gmail.com> wrote:
>
>> Nino,
>> I got this error running a simple code. It couldn read rss from Code
>> Poet!
>>
>>
>>
>> On Sun, May 31, 2009 at 1:27 PM, Fernando Wermus <
>> fernando.wer...@gmail.com> wrote:
>>
>>> Nino,
>>>  So I have to install it locally...
>>>
>>> ps: I am looking just to publish rss right now.
>>>
>>> thanks
>>>
>>>
>>> On Sun, May 31, 2009 at 1:15 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
 It's here
 http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-rome/1.3-SNAPSHOT/

 So shouldnt be a problem.. Are you looking publish rss with wicket or
 wicket to consume rss and show it on a page? wicketstuff rome will let
 you do both afaik...

 2009/5/31 Fernando Wermus :
 > Hi all,
 >
 > I am looking to publish some RSS into a wicket site. I thought to
 have
 > a look at wicket-stuff rome, but I couldn't get it. I am using it with
 > wicket 1.3.6
 >
 >
 >wicket-snaps
 >http://wicketstuff.org/maven/repository
 >
 >true
 >
 >
 >true
 >
 >
 > +
 >
 >  org.wicketstuff
 >  wicketstuff-rome
 >  1.3-SNAPSHOT
 >
 >
 >
 > --
 > Fernando Wermus.
 >
 > www.linkedin.com/in/fernandowermus
 >

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


>>>
>>>
>>> --
>>> Fernando Wermus.
>>>
>>> www.linkedin.com/in/fernandowermus
>>>
>>
>>
>>
>> --
>> Fernando Wermus.
>>
>> www.linkedin.com/in/fernandowermus
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Disabling component again with AjaxCheckBox

2009-05-31 Thread Igor Vaynberg
is your checkbox required? any validation errors? see if onerror() is
called instead of onupdate()

-igor

On Sun, May 31, 2009 at 11:04 AM, Rick Gruber-Riemer  wrote:
> Hi
>
> Thank you for your answer.
>
> Unfortunately this did not solve the problem. In the meantime I found out,
> that the onUpdate method is only called when the checkbox is checked, but
> not when the checkbox is removed (i.e. check, uncheck, check, uncheck
> results in two invocations of onUpdate). This does not sound correct to me,
> but I am not sure.
>
> 2009/5/31 Steve Swinsburg 
>
>> Call doUpdateConfirmButton() when the page first loads so you can set it up
>> initially, then again when the checkbox is clicked as you already do.
>>
>>
>> cheers,
>> Steve
>>
>>
>>
>> On 31/05/2009, at 7:40 AM, Rick Gruber-Riemer wrote:
>>
>>  Hi
>>>
>>> I have a checkbox which must be checked for the user to be able to submit
>>> (accept terms). I want the related submit button to be enabled only, when
>>> the checkbox is checked. This works fine when the button initially is
>>> disabled, then the checkbox is checked by the user (I followed
>>>
>>> http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-td20911338.html#a20911338
>>> ).
>>> However, when the user then unchecks the checkbox again, the button does
>>> not
>>> get disabled again :-(
>>>
>>> Any suggestions?
>>>
>>>   
>>>   
>>>       >> id="acceptCB" />
>>>       [Accept
>>> delete]
>>>       
>>>       >> wicket:id="confirmBtn" wicket:message="value:confirmBtn"/>
>>>   
>>>
>>> ==
>>>
>>>   /** Whether or not the conditions for deletion are accepted. Acts as
>>> IModel for the checkbox */
>>>   private boolean accepted = false;
>>>
>>>   /** The confirm button */
>>>   Button confirmBTN = null;
>>>
>>>   /** The accept check box */
>>>   CheckBox acceptCB = null;
>>>
>>>   public AccountDeletePage() {
>>>       add(new FeedbackPanel("feedback"));
>>>       Form form = new Form("form");
>>>       add(form);
>>>       confirmBTN = new Button("confirmBtn") {
>>>           @Override
>>>           public void onSubmit() {
>>>               doDelete();
>>>           }
>>>       };
>>>       confirmBTN.setEnabled(false);
>>>       confirmBTN.setOutputMarkupId(true); //not sure why this is needed
>>>       form.add(confirmBTN);
>>>       //CheckBox acceptCB = new CheckBox("acceptCB", new
>>> PropertyModel(this, "accepted"));
>>>       acceptCB = new AjaxCheckBox("acceptCB",new PropertyModel(this,
>>> "accepted")) {
>>>           @Override protected void onUpdate(AjaxRequestTarget arg0) {
>>>               doUpdateConfirmButton();
>>>               if(arg0 != null) {
>>>                   arg0.addComponent(confirmBTN);
>>>               }
>>>           }
>>>       };
>>>       acceptCB.setRequired(true);
>>>       form.add(new FormComponentFeedbackBorder("border").add(acceptCB));
>>>   }
>>>
>>>   /**
>>>    * Updates the enabled state of the delete button depending on
>>> acceptance
>>>    */
>>>   private final void doUpdateConfirmButton() {
>>>       boolean enabled = acceptCB.isEnabled();
>>>       confirmBTN.setEnabled(enabled);
>>>   }
>>>
>>
>>
>

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



Re: Spring Autowired and @SpringBean

2009-05-31 Thread Igor Vaynberg
have you read the wicket spring wiki page? you have to install the
spring component injector for this to work.

-igor

On Sun, May 31, 2009 at 1:15 PM, Luther Baker  wrote:
> I'm working on a project with Spring/Wicket integration.
>
> I have most of the Spring autowire stuff working ...
>
> My @Repository(s) are successfully autowires to my @Service(s). In SpringMVC
> speak then, the @Service would autowire to the *...@controller*. But of 
> course,
> I am using wicket, not Spring MVC. Per the wicket/spring doc
> page,
> which describes the *...@springbean* annotation, as opposed to the 
> *...@controller
> * annotation, in my pages. Unfortunately, I get an error and the stack trace
> includes:
>
> Caused by: java.lang.IllegalStateException: bean of type
> [org.effectiveprogramming.effprog.service.PostService] not found
>
> Is this expected? Before deep diving I'm curious to confirm that
> spring-wicket integration is definitely supposed to work with Spring
> autowiring. Thoughts?
>
> Thanks.
>
> -Luther
>
>
> 
>
> @Repository
> public class PostDaoImpl extends PostDao
> {
> ...
> }
>
> 
>
> @Service
> public class PostServiceImpl implements PostService
> {
> ...
>   �...@autowired
>    public void setPostDao(final PostDao postDao)
>    {
>        this.postDao = postDao;
>    }
> }
>
> 
>
> public class HomePage extends BasicLayout
> {
>   �...@springbean
>    private PostService postService;
>

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



Re: Spring Autowired and @SpringBean

2009-05-31 Thread Luther Baker
I'm using the following from the wicket spring page:


public class MainApplication extends WebApplication
{
/**
 * @see org.apache.wicket.protocol.http.WebApplication#init()
 */
@Override
protected void init()
{
super.init();

// http://cwiki.apache.org/WICKET/spring.html
final SpringComponentInjector spring = new
SpringComponentInjector(this);
addComponentInstantiationListener(spring);
}


and spring indeed is wiring up the daos and services. The @Service beans are
correctly receieving their @Respository dependencies. It is just the wicket
page '@SpringBean' annotation don't seem to be able to fine the beans
annotated with @Service.

Is it possible that @Autowire doesn't work with @SpringBean and that I need
to explicitly list dependencies in a config file?

-Luther




On Sun, May 31, 2009 at 3:55 PM, Igor Vaynberg wrote:

> have you read the wicket spring wiki page? you have to install the
> spring component injector for this to work.
>
> -igor
>
> On Sun, May 31, 2009 at 1:15 PM, Luther Baker 
> wrote:
> > I'm working on a project with Spring/Wicket integration.
> >
> > I have most of the Spring autowire stuff working ...
> >
> > My @Repository(s) are successfully autowires to my @Service(s). In
> SpringMVC
> > speak then, the @Service would autowire to the *...@controller*. But of
> course,
> > I am using wicket, not Spring MVC. Per the wicket/spring doc
> > page,
> > which describes the *...@springbean* annotation, as opposed to the
> *...@controller
> > * annotation, in my pages. Unfortunately, I get an error and the stack
> trace
> > includes:
> >
> > Caused by: java.lang.IllegalStateException: bean of type
> > [org.effectiveprogramming.effprog.service.PostService] not found
> >
> > Is this expected? Before deep diving I'm curious to confirm that
> > spring-wicket integration is definitely supposed to work with Spring
> > autowiring. Thoughts?
> >
> > Thanks.
> >
> > -Luther
> >
> >
> > 
> >
> > @Repository
> > public class PostDaoImpl extends PostDao
> > {
> > ...
> > }
> >
> > 
> >
> > @Service
> > public class PostServiceImpl implements PostService
> > {
> > ...
> >@Autowired
> >public void setPostDao(final PostDao postDao)
> >{
> >this.postDao = postDao;
> >}
> > }
> >
> > 
> >
> > public class HomePage extends BasicLayout
> > {
> >@SpringBean
> >private PostService postService;
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Copy Form Fields

2009-05-31 Thread hill180
I have looked through the archives and there were a couple references  
to this question but no examples and I was hoping for some help.


I have a form with Address One and Address Two,

I have a link that I just want to copy the data over.  I am thinking  
it should use Javascript, but I am new to wicket and not sure how to  
implement.


The textfields are a compound property model which is hitting a  
hibernate POJO.



private static class AddressPanel extends Panel
  {

public AddressPanel(String id, Form f,final AssociateDB a)
{
  super(id);
	  final TextField myAddress1 = new TextField("Address1"); //  
First Address

  add(myAddress1);
   	final TextField myAddress2 = new  
TextField("Address2"); // First Address

 myAddress2.setOutputMarkupId(true);
add(myAddress2);


Link link = new Link("copyAddress"){
@Override
//TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF  
DATA

public void onClick() {

}

};



add(link);
}

  };

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



Re: Spring Autowired and @SpringBean

2009-05-31 Thread Igor Vaynberg
wicket is looking for these beans in the spring context. if spring is
not putting those beans there then it will be a problem.

-igor

On Sun, May 31, 2009 at 2:19 PM, Luther Baker  wrote:
> I'm using the following from the wicket spring page:
>
>
> public class MainApplication extends WebApplication
> {
>    /**
>     * @see org.apache.wicket.protocol.http.WebApplication#init()
>     */
>   �...@override
>    protected void init()
>    {
>        super.init();
>
>        // http://cwiki.apache.org/WICKET/spring.html
>        final SpringComponentInjector spring = new
> SpringComponentInjector(this);
>        addComponentInstantiationListener(spring);
>    }
>
>
> and spring indeed is wiring up the daos and services. The @Service beans are
> correctly receieving their @Respository dependencies. It is just the wicket
> page '@SpringBean' annotation don't seem to be able to fine the beans
> annotated with @Service.
>
> Is it possible that @Autowire doesn't work with @SpringBean and that I need
> to explicitly list dependencies in a config file?
>
> -Luther
>
>
>
>
> On Sun, May 31, 2009 at 3:55 PM, Igor Vaynberg wrote:
>
>> have you read the wicket spring wiki page? you have to install the
>> spring component injector for this to work.
>>
>> -igor
>>
>> On Sun, May 31, 2009 at 1:15 PM, Luther Baker 
>> wrote:
>> > I'm working on a project with Spring/Wicket integration.
>> >
>> > I have most of the Spring autowire stuff working ...
>> >
>> > My @Repository(s) are successfully autowires to my @Service(s). In
>> SpringMVC
>> > speak then, the @Service would autowire to the *...@controller*. But of
>> course,
>> > I am using wicket, not Spring MVC. Per the wicket/spring doc
>> > page,
>> > which describes the *...@springbean* annotation, as opposed to the
>> *...@controller
>> > * annotation, in my pages. Unfortunately, I get an error and the stack
>> trace
>> > includes:
>> >
>> > Caused by: java.lang.IllegalStateException: bean of type
>> > [org.effectiveprogramming.effprog.service.PostService] not found
>> >
>> > Is this expected? Before deep diving I'm curious to confirm that
>> > spring-wicket integration is definitely supposed to work with Spring
>> > autowiring. Thoughts?
>> >
>> > Thanks.
>> >
>> > -Luther
>> >
>> >
>> > 
>> >
>> > @Repository
>> > public class PostDaoImpl extends PostDao
>> > {
>> > ...
>> > }
>> >
>> > 
>> >
>> > @Service
>> > public class PostServiceImpl implements PostService
>> > {
>> > ...
>> >   �...@autowired
>> >    public void setPostDao(final PostDao postDao)
>> >    {
>> >        this.postDao = postDao;
>> >    }
>> > }
>> >
>> > 
>> >
>> > public class HomePage extends BasicLayout
>> > {
>> >   �...@springbean
>> >    private PostService postService;
>> >
>>
>> -
>> 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: Example of ModalWindow misleading

2009-05-31 Thread Live Nono
done : https://issues.apache.org/jira/browse/WICKET-2295

nono

2009/5/28, Igor Vaynberg :
> yes
>
>
>  -igor
>
>
>  On Thu, May 28, 2009 at 3:09 AM, Live Nono  wrote:
>  > Should I open a jira for this ?
>  >
>  >
>  >
>  > 2009/5/21 Matej Knopp :
>  >> I think modal window example could be fixed by using
>  >> getPageReference() to pass page reference between pages instead of
>  >> page instance.
>  >>
>  >> -Matej
>  >>
>  >> On Wed, May 20, 2009 at 10:29 PM, Martin Makundi
>  >>  wrote:
>   http://www.wicket-library.com/wicket-examples/ajax/modal-window.1 is
>   pretty misleading : passing components between components/page is
>   quite broken as can be seen in the past discussion on the mailing list
>   (serialization issue can arise and makes both sides using different
>   references of the same object "logically speaking").
>  >>>
>  >>> True.
>  >>>
>  >>> I have found that the only safe way to pass references is via
>  >>> getSession().xxx so now all my (not all, but generally relevant ones)
>  >>> models are in session instead of being page-scoped. Not heavy models
>  >>> but selection models such that indicate what the user is operating on.
>  >>>
>  >>> However. Instead of changing the documentation, I would rather change
>  >>> the implementation such that the serialization would not break.
>  >>>
>  >>> The same offect, however, occurs if you have some other kind of pop-up
>  >>> window it would be nice to be able to continue using the
>  >>> underlying page in sync with the pop-up.
>  >>>
>  >>>
>  >>>
>  >>> **
>  >>> Martin
>  >>>
>  
>   However, as it is in the example, I first used it considering that it
>   should be ok to do so.
>  
>   Could it be changed in some way ?
>  
>   On the bigger picture, I guess it raises again the issue of the
>   "recommended" way of communicating between the page and the modal
>   window, which currently doesn't exist (session, database...??).
>   However, this example is currently completely misleading, so even so
>   comments to explicit the issue would be welcomed.
>  
>   thanks again
>   nono
>  
>   -
>   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
>
>

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



Wicket QuickStart app failing at TestHomePage (testRenderMyPage)

2009-05-31 Thread David Brown
Hello Wicketeers, I had QuickStart app running OK out-of-the-box. Then, I tried 
to create a couple of Panels (from WIA) for a couple of links that basically 
swap the text on the same page. Now, the project will not build because of Test 
errors (not failures). The particulars follow. In the mean time I will start 
with a fresh QuickStart project. If anyone has any ideas, rants-or-raves please 
advise, David.

OS: Windows XP
IDE: Ganymede
Wicket: 1.4rc
JDK: 1.5_15
Maven: 2.0.9


---
Test set: com.sexingtechnologies.TestHomePage
---
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.984 sec <<< 
FAILURE!
testRenderMyPage(com.sexingtechnologies.TestHomePage)  Time elapsed: 0.906 sec  
<<< ERROR!
org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited 
markup not found. Component class: com.sexingtechnologies.HomePage Enable debug 
messages for org.apache.wicket.util.resource.Resource to get a list of all 
filenames tried.

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



how to avoid concurrent clic/submit on ajax links ?

2009-05-31 Thread Live Nono
hi

when trying to push my ajax app to its limits, I spotted that I'm able
to send 2 ajax requests but only have the display of the first one. Is
there a way to avoid this kind of double clic ?

to be precise, the pattern I use to reproduce easily this point is the
following :
- I click on a link having a warning (added through an
AttributeModifier adding a confirm)
- when the pop up is displayed, I put my cursor above another ajax link
- i then press "enter" on my keyboard to have the pop up removed and,
almost at the same time, clic with my mouse on the link I'm above
- on  the then rendered page, the displayed html doesn't take fully in
account the result of my "return" key pressed (I've marked deleted an
element of a tree : the element detail panel shows well "deleted" but
the tree isn't showing it... as is the case usually).

is there something to be done ?

thanks in advance
nono

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



wicket ajax best practices ?

2009-05-31 Thread Live Nono
hi

I've been quite heavily using ajax lately and, at the beginning, it
appears to break often, getting "page not found 404" and others
"channel busy - postponing". I'm mainly using modal windows, ajax
links and ajax validating/submit behaviors.

Recently, searching through the mailing list, I found that adding the
doctype helped a lot. Precisely, I added :
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

Going further, I added the encoding on the first line :


Then I used the w3c html validators to remove all the potential issues
(found a few br lacking the closing /).

I've now the feeling that it breaks less, but still I'm not sure I did
all my best.

So, at the end of the day, when using ajax in wicket, are they some
good practices to follow ? What could I do to lower as far as possible
all these 'page not found 404" and others "channel busy" on actions
which 95% of the time work ?

thanks in advance
nono

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



Re: how to avoid concurrent clic/submit on ajax links ?

2009-05-31 Thread greeklinux

Hello,

maybe you can get inspiration from here:
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/
 

regards


LiveNono wrote:
> 
> hi
> 
> when trying to push my ajax app to its limits, I spotted that I'm able
> to send 2 ajax requests but only have the display of the first one. Is
> there a way to avoid this kind of double clic ?
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-avoid-concurrent-clic-submit-on-ajax-links---tp23807789p23807986.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



Notifications

2009-05-31 Thread Null kühl
Hi all,

  I was doing a small social application using wicket, and i would like
to provide the user with a list of notifications once he logs in, how ever i
would like to display them to the user in a way that is .. notifying:) more
like that of facebook floating notifications, any ideas .. ?

Also is there some sorta wicket component that would be able to float on a
web page and gets dismissed when the user closes it or so, having the
ability to call a certain method or so when closed.

Regards,
Null Kuhl


How to hyperlink the validation or error messages to the respective fields on a large form

2009-05-31 Thread Deepesh Mathur
How to hyperlink the validation or error messages to the respective fields
on a large form ?
Like for example we have validation error for a field x on a form then
clicking on the message should take to the respective field.

Thanks and Regards
Deepesh


Elphas url svn fails to checkout

2009-05-31 Thread Fernando Wermus
Hi all,
I was trying to use Elphas project, but the url is not working. Does
anyone could provide a good one?

Thanks in advance!

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Elphas url svn fails to checkout

2009-05-31 Thread Fernando Wermus
This is the correct one: http://elephas.googlecode.com/svn/trunk/

On Sun, May 31, 2009 at 7:09 PM, Fernando Wermus
wrote:

> Hi all,
> I was trying to use Elphas project, but the url is not working. Does
> anyone could provide a good one?
>
> Thanks in advance!
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: unit test of AjaxLazyLoadPanel and ModalWindow

2009-05-31 Thread Igor Vaynberg
maybe you should paste it into a jira issue so we can commit it into code.

-igor

On Thu, May 28, 2009 at 7:36 PM, Antony Stubbs  wrote:
>
> And here's a nicer version to add to your library:
>
>
>    /**
>     * Triggers an {...@link AjaxLazyLoadPanel} to fetch it's contents.
>     *
>     * @param wc the {...@link WicketTester} to execute the behaviour ( 
> {...@link
> WicketTester#executeBehavior} ).
>     * @param container contains the {...@link AjaxLazyLoadPanel} to trigger
>     */
>    private void executeAjaxLazyLoadPanel(final WicketTester wc, Panel
> container) {
>        container.visitChildren( AjaxLazyLoadPanel.class, new
> IVisitor() {
>
>           �...@override
>            public Object component(AjaxLazyLoadPanel component) {
>                List behaviors = component.getBehaviors();
>                // get the AbstractAjaxBehaviour which is responsible for
>                // getting the contents of the lazy panel
>                AbstractAjaxBehavior b = (AbstractAjaxBehavior)
> behaviors.get( 0 );
>                // tell wicket tester to execute it :)
>                wc.executeBehavior( b );
>                // continue with visitation rights, or not, i don't care
>                return CONTINUE_TRAVERSAL;
>            }
>        } );
>    }
>
>
> Antony Stubbs wrote:
>>
>> And boom! Thanks for the  inspiration Frank!
>>
>>         final WicketTester wc = constructBasicPanel();
>>         wc.debugComponentTrees();
>>         wc.dumpPage();
>> // delicious is the constructed panel, which contains a
>> AjaxLazyLoadPanel...
>> // visit it's children, looking for the AjaxLazyLoadPanel
>>         delicious.visitChildren( AjaxLazyLoadPanel.class, new
>> IVisitor(){
>>
>>             @Override
>>             public Object component(AjaxLazyLoadPanel component) {
>> // get the AbstractAjaxBehaviour which is responsible for getting the
>> contents of the lazy panel
>>                 List behaviors = component.getBehaviors();
>>                 final AbstractAjaxBehavior b;
>>                 b = (AbstractAjaxBehavior) behaviors.get( 0 );
>> // tell wicket tester to execute it :)
>>                 wc.executeBehavior( b );
>> // continue with visitation rights, or not, i don't care
>>                 return null;
>>             }} );
>>
>>         wc.debugComponentTrees();
>>         wc.dumpPage();
>> // and volah, your lazy panel is now replaced with the contents :)
>>         wc.assertComponent(
>> "panel:lazy:content:repeaterContainer:bookmarks:1", Item.class );
>>         wc.assertInvisible( "panel:lazy:content:noBookmarks" );
>>
>> Let me know what you think or if you have any improvements!
>>
>>
>> Antony Stubbs wrote:
>>>
>>> Thanks for the info Frank. Any tips on how to do so?
>>>
>>>
>>> Frank Bille wrote:

 On Thu, Apr 24, 2008 at 8:10 PM, qk  wrote:
>  1. after the page was rendered using WicketTester.startPage(), the
> "real"
>  content (the one that returned by getLazyLoadComponent()) was not
> loaded by
>  default. I always got an empty panel. Is there a way that I can have
> the
>  "real" content rendered?

 Wicket tester doesn't parse javascript, so it can't execute the ajax
 callback. You have to do that yourself.

 Frank

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



>>>
>>>
>>
>>
>
>
> -
> ___
>
> http://stubbisms.wordpress.com http://stubbisms.wordpress.com
> --
> View this message in context: 
> http://www.nabble.com/unit-test-of-AjaxLazyLoadPanel-and-ModalWindow-tp16851306p23773356.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



Long content

2009-05-31 Thread Luther Baker
I'm working on an application something akin to blog posts. A 'Post' has a
title, date, tags, a category ... and *content*.

For most of the 'smaller' properties in a 'Post', I use a Label as the
component and that works just fine - but for much larger datasets, say,
"content", I feel odd using something called 'Label'.

Is there a more precise Wicket Component for, what could amount to hundreds
of words or lines? (see below)

(By the way, kudos on the DateLabel and everything else in wicket-date
project - I just came across that ...)

Thanks,

-Luther


final Post post = postService.findPostById(postId);
final IModel postModel = new
CompoundPropertyModel(post);
final WebMarkupContainer outer = new WebMarkupContainer("post",
postModel);
outer.add(new Label("title"));
outer.add(new BookmarkablePageLink("category",
CategoryPage.class));
*outer.add(new Label("content"));*
outer.add(new DateLabel("publishedOn", new StyleDateConverter("M-",
true)));
add(outer);


Re: Spring Autowired and @SpringBean

2009-05-31 Thread Vasu Srinivasan
Have you tried like this:
@SpringBean(name = "xServiceImpl") XService xservice;



On Sun, May 31, 2009 at 5:03 PM, Igor Vaynberg wrote:

> wicket is looking for these beans in the spring context. if spring is
> not putting those beans there then it will be a problem.
>
> -igor
>
> On Sun, May 31, 2009 at 2:19 PM, Luther Baker 
> wrote:
> > I'm using the following from the wicket spring page:
> >
> >
> > public class MainApplication extends WebApplication
> > {
> >/**
> > * @see org.apache.wicket.protocol.http.WebApplication#init()
> > */
> >@Override
> >protected void init()
> >{
> >super.init();
> >
> >// http://cwiki.apache.org/WICKET/spring.html
> >final SpringComponentInjector spring = new
> > SpringComponentInjector(this);
> >addComponentInstantiationListener(spring);
> >}
> >
> >
> > and spring indeed is wiring up the daos and services. The @Service beans
> are
> > correctly receieving their @Respository dependencies. It is just the
> wicket
> > page '@SpringBean' annotation don't seem to be able to fine the beans
> > annotated with @Service.
> >
> > Is it possible that @Autowire doesn't work with @SpringBean and that I
> need
> > to explicitly list dependencies in a config file?
> >
> > -Luther
> >
> >
> >
> >
> > On Sun, May 31, 2009 at 3:55 PM, Igor Vaynberg  >wrote:
> >
> >> have you read the wicket spring wiki page? you have to install the
> >> spring component injector for this to work.
> >>
> >> -igor
> >>
> >> On Sun, May 31, 2009 at 1:15 PM, Luther Baker 
> >> wrote:
> >> > I'm working on a project with Spring/Wicket integration.
> >> >
> >> > I have most of the Spring autowire stuff working ...
> >> >
> >> > My @Repository(s) are successfully autowires to my @Service(s). In
> >> SpringMVC
> >> > speak then, the @Service would autowire to the *...@controller*. But of
> >> course,
> >> > I am using wicket, not Spring MVC. Per the wicket/spring doc
> >> > page,
> >> > which describes the *...@springbean* annotation, as opposed to the
> >> *...@controller
> >> > * annotation, in my pages. Unfortunately, I get an error and the stack
> >> trace
> >> > includes:
> >> >
> >> > Caused by: java.lang.IllegalStateException: bean of type
> >> > [org.effectiveprogramming.effprog.service.PostService] not found
> >> >
> >> > Is this expected? Before deep diving I'm curious to confirm that
> >> > spring-wicket integration is definitely supposed to work with Spring
> >> > autowiring. Thoughts?
> >> >
> >> > Thanks.
> >> >
> >> > -Luther
> >> >
> >> >
> >> > 
> >> >
> >> > @Repository
> >> > public class PostDaoImpl extends PostDao
> >> > {
> >> > ...
> >> > }
> >> >
> >> > 
> >> >
> >> > @Service
> >> > public class PostServiceImpl implements PostService
> >> > {
> >> > ...
> >> >@Autowired
> >> >public void setPostDao(final PostDao postDao)
> >> >{
> >> >this.postDao = postDao;
> >> >}
> >> > }
> >> >
> >> > 
> >> >
> >> > public class HomePage extends BasicLayout
> >> > {
> >> >@SpringBean
> >> >private PostService postService;
> >> >
> >>
> >> -
> >> 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
>
>


-- 
Regards,
Vasu Srinivasan


Re: Long content

2009-05-31 Thread Vasu Srinivasan
How about MultiLineLabel ?

On Sun, May 31, 2009 at 10:43 PM, Luther Baker wrote:

> I'm working on an application something akin to blog posts. A 'Post' has a
> title, date, tags, a category ... and *content*.
>
> For most of the 'smaller' properties in a 'Post', I use a Label as the
> component and that works just fine - but for much larger datasets, say,
> "content", I feel odd using something called 'Label'.
>
> Is there a more precise Wicket Component for, what could amount to hundreds
> of words or lines? (see below)
>
> (By the way, kudos on the DateLabel and everything else in wicket-date
> project - I just came across that ...)
>
> Thanks,
>
> -Luther
>
>
>final Post post = postService.findPostById(postId);
>final IModel postModel = new
> CompoundPropertyModel(post);
>final WebMarkupContainer outer = new WebMarkupContainer("post",
> postModel);
>outer.add(new Label("title"));
>outer.add(new BookmarkablePageLink("category",
> CategoryPage.class));
> *outer.add(new Label("content"));*
>outer.add(new DateLabel("publishedOn", new StyleDateConverter("M-",
> true)));
>add(outer);
>



-- 
Regards,
Vasu Srinivasan


Re: Long content

2009-05-31 Thread Luther Baker
Ah, thanks for the suggestion Vasu.

I looked at this component and don't think I'm looking to have '\n' replaced
or 's and 's automatically generated.

In my case, most cases, "Post" content might include some paragraphs,
blockquotes, pictures and a few more paragraphs. After a blog entry, there
might be a few comments - maybe someone will post some code examples ... so
Post.content and Post.comments[n] might just be somewhat long
strings/database fields.

For what it's worth, *Label* works just fine in my little mock up - but
again, Post.content doesn't really *feel* like a Label so it gave me room
for pause.

Thanks for the quick response Vasu.

-Luther



On Sun, May 31, 2009 at 10:49 PM, Vasu Srinivasan  wrote:

> How about MultiLineLabel ?
>
> On Sun, May 31, 2009 at 10:43 PM, Luther Baker  >wrote:
>
> > I'm working on an application something akin to blog posts. A 'Post' has
> a
> > title, date, tags, a category ... and *content*.
> >
> > For most of the 'smaller' properties in a 'Post', I use a Label as the
> > component and that works just fine - but for much larger datasets, say,
> > "content", I feel odd using something called 'Label'.
> >
> > Is there a more precise Wicket Component for, what could amount to
> hundreds
> > of words or lines? (see below)
> >
> > (By the way, kudos on the DateLabel and everything else in wicket-date
> > project - I just came across that ...)
> >
> > Thanks,
> >
> > -Luther
> >
> >
> >final Post post = postService.findPostById(postId);
> >final IModel postModel = new
> > CompoundPropertyModel(post);
> >final WebMarkupContainer outer = new WebMarkupContainer("post",
> > postModel);
> >outer.add(new Label("title"));
> >outer.add(new BookmarkablePageLink("category",
> > CategoryPage.class));
> > *outer.add(new Label("content"));*
> >outer.add(new DateLabel("publishedOn", new
> StyleDateConverter("M-",
> > true)));
> >add(outer);
> >
>
>
>
> --
> Regards,
> Vasu Srinivasan
>


Re: Spring Autowired and @SpringBean

2009-05-31 Thread Luther Baker
Thanks for the suggestion Vasu. I tried this in my 'Service' class:

@Service(value = "logServiceImpl")
public class LogServiceImpl implements LogService
{
...

and this in my page:

public class Home extends BasicLayout
{
@SpringBean(name = "logServiceImpl")
private LogService logService;
...

as well as

public class Home extends BasicLayout
{
@SpringBean
private LogService logService;

I even changed the type in the destination classes to LogServiceImpl and no
luck.

I'm afraid the @Autowire stuff in Spring doesn't work seem to work with
@SpringBean.

Again, thanks for the suggestion. I'm thinking to go back to Guice and
manage transactions without Spring.

-Luther



Depending on what I'm testing, errors look like:

org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'logServiceImpl' is defined
 at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)
 at 
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
 at 
org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:358)
 at 
org.springframework.context.support.AbstractApplicationContext.isSingleton(AbstractApplicationContext.java:896)
 at 
org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator.java:135)
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:92)
 at org.apache.wicket.injection.Injector.inject(Injector.java:108)

or

java.lang.IllegalStateException: bean of type
[com.fuzzybearings.fuzzy.service.LogService] not found
 at 
org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass(SpringBeanLocator.java:109)
 at 
org.apache.wicket.spring.SpringBeanLocator.getBeanName(SpringBeanLocator.java:195)
 at 
org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator.java:135)
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:92)
 at org.apache.wicket.injection.Injector.inject(Injector.java:108)

or

java.lang.IllegalStateException: bean of type
[com.fuzzybearings.fuzzy.service.LogServiceImpl] not found
 at 
org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass(SpringBeanLocator.java:109)
 at 
org.apache.wicket.spring.SpringBeanLocator.getBeanName(SpringBeanLocator.java:195)
 at 
org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator.java:135)
 at 
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:92)
 at org.apache.wicket.injection.Injector.inject(Injector.java:108)






On Sun, May 31, 2009 at 10:47 PM, Vasu Srinivasan  wrote:

> Have you tried like this:
> @SpringBean(name = "xServiceImpl") XService xservice;
>
>
>
> On Sun, May 31, 2009 at 5:03 PM, Igor Vaynberg  >wrote:
>
> > wicket is looking for these beans in the spring context. if spring is
> > not putting those beans there then it will be a problem.
> >
> > -igor
> >
> > On Sun, May 31, 2009 at 2:19 PM, Luther Baker 
> > wrote:
> > > I'm using the following from the wicket spring page:
> > >
> > >
> > > public class MainApplication extends WebApplication
> > > {
> > >/**
> > > * @see org.apache.wicket.protocol.http.WebApplication#init()
> > > */
> > >@Override
> > >protected void init()
> > >{
> > >super.init();
> > >
> > >// http://cwiki.apache.org/WICKET/spring.html
> > >final SpringComponentInjector spring = new
> > > SpringComponentInjector(this);
> > >addComponentInstantiationListener(spring);
> > >}
> > >
> > >
> > > and spring indeed is wiring up the daos and services. The @Service
> beans
> > are
> > > correctly receieving their @Respository dependencies. It is just the
> > wicket
> > > page '@SpringBean' annotation don't seem to be able to fine the beans
> > > annotated with @Service.
> > >
> > > Is it possible that @Autowire doesn't work with @SpringBean and that I
> > need
> > > to explicitly list dependencies in a config file?
> > >
> > > -Luther
> > >
> > >
> > >
> > >
> > > On Sun, May 31, 2009 at 3:55 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com
> > >wrote:
> > >
> > >> have you read the wicket spring wiki page? you have to install the
> > >> spring component injector for this to work.
> > >>
> > >> -igor
> > >>
> > >> On Sun, May 31, 2009 at 1:15 PM, Luther Baker 
> > >> wrote:
> > >> > I'm working on a project with Spring/Wicket integration.
> > >> >
> > >> > I have most of the Spring autowire stuff working ...
> > >> >
> > >> > My @Repository(s) are successfully autowires to my @Service(s). In
> > >> SpringMVC
> > >> > speak then, the @Service would autowire to the *...@controller*. But of
> > >> course,
> > >> > I am using wicket, not Spring MVC. Pe

elphas: Error occurred during initialization of VM agent library failed to init: instrument

2009-05-31 Thread Fernando Wermus
I am trying to run Elphas, but I got the following message:

Error opening zip file:
Error occurred during initialization of VM
agent library failed to init: instrument

The -javaagent PATH is correct. But it still throws the error shown above.

Thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Cancelling pending Ajax requests

2009-05-31 Thread JohannesK

Does this solution actually work though? I tried it and I don't see any
behaviour I wouldn't get from just the throttle delay. Is there something I
need to change in this to use it? Possibly the channel names?


Antti Mattila wrote:
> 
> Problem:
> I want to validate input as user types it, but validation takes a long
> time
> on the server. When validation result for the first input is returned,
> user
> might have caused several more input events to be validated. These
> validation requests are pending execution on Wicket Ajax Channel. At this
> point I'm only interested in validating the latest input, but before this
> happens, all pending validation requests are processed. This is
> unnecessary
> and takes a lot of time so I want to cancel all the pending requests.
> 
> Solution:
> I did this by using named Channel and clearing all pending requests before
> requesting the latest validation. I couldn't find a solution for this
> problem, so I'm posting it here. Hopefully this might help someone else
> and
> please give me some feedback if this solution was not a good one.
> 
> Thanks,
> Antti Mattila
> 
> Here's the code:
> 
> public class ClearPendingAjaxRequests extends AjaxCallDecorator {
> private final String clearPendingRequestsScript;
> 
> public ClearPendingAjaxRequests(final String channel) {
> clearPendingRequestsScript = "if (typeof
> Wicket.channelManager.channels['" + channel + "'] != 'undefined')
> Wicket.channelManager.channels['" + channel + "'].callbacks = new
> Array();";
> }
> 
> @Override
> public CharSequence decorateScript(final CharSequence script) {
> return clearPendingRequestsScript + script;
> }
> }
> 
> public class UsersInputFieldOnChangeAjaxBehavior extends
> AjaxFormComponentUpdatingBehavior {
> public UsersInputFieldOnChangeAjaxBehavior() {
> super("onkeyup");
> setThrottleDelay(Duration.milliseconds(500));
> }
> 
> @Override
> protected IAjaxCallDecorator getAjaxCallDecorator() {
> return new ClearPendingAjaxRequests(getChannelName());
> }
> 
> @Override
> protected String getChannelName() {
> return "ChannelForValidatingThisSpecificInput";
> }
> 
> @Override
> protected void onUpdate(final AjaxRequestTarget target) {
> // Validate user's input, this takes a long time.
> // Update UI.
> }
> }
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cancelling-pending-Ajax-requests-tp23523655p23810657.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