using AutoCompleteTextField with wicket 1.4-rc1

2009-01-06 Thread Jason Novotny


Hi,

   I saw the example of the autocomplete textfield at 
http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1 and 
I'm trying to use it. Problem is it doesn't look like it responds at all 
when I start typing in the textfield. I see that the rendered input 
field does not have a onchange attribute added like the example does. 
Does anyone know what I'm missing? Here is my html and java below?



form wicket:id=form1
   Country: input type=text wicket:id=ac 
size=50/

   /form

and my java (same as the example)

FormVoid form = new FormVoid(form1);
   add(form);

   form.add(new AutoCompleteTextFieldString(ac, new 
ModelString())

   {
   protected IteratorString getChoices(String input)
   {
   if (Strings.isEmpty(input))
   {
   return Collections.EMPTY_LIST.iterator();
   }

   ListString choices = new ArrayListString(10);

   Locale[] locales = Locale.getAvailableLocales();

   for (int i = 0; i  locales.length; i++)
   {
   final Locale locale = locales[i];
   final String country = locale.getDisplayCountry();

   if 
(country.toUpperCase().startsWith(input.toUpperCase()))

   {
   choices.add(country);
   if (choices.size() == 10)
   {
   break;
   }
   }
   }

   return choices.iterator();
   }
   });
   }

Thanks a bunch, Jason


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



Re: using AutoCompleteTextField with wicket 1.4-rc1

2009-01-07 Thread Jason Novotny


I found my problem-- mootools javascript and wicket ajax components 
don't play nicely :-(


Jason Novotny wrote:


Hi,

   I saw the example of the autocomplete textfield at 
http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1 and 
I'm trying to use it. Problem is it doesn't look like it responds at 
all when I start typing in the textfield. I see that the rendered 
input field does not have a onchange attribute added like the example 
does. Does anyone know what I'm missing? Here is my html and java below?



form wicket:id=form1
   Country: input type=text wicket:id=ac 
size=50/

   /form

and my java (same as the example)

FormVoid form = new FormVoid(form1);
   add(form);

   form.add(new AutoCompleteTextFieldString(ac, new 
ModelString())

   {
   protected IteratorString getChoices(String input)
   {
   if (Strings.isEmpty(input))
   {
   return Collections.EMPTY_LIST.iterator();
   }

   ListString choices = new ArrayListString(10);

   Locale[] locales = Locale.getAvailableLocales();

   for (int i = 0; i  locales.length; i++)
   {
   final Locale locale = locales[i];
   final String country = locale.getDisplayCountry();

   if 
(country.toUpperCase().startsWith(input.toUpperCase()))

   {
   choices.add(country);
   if (choices.size() == 10)
   {
   break;
   }
   }
   }

   return choices.iterator();
   }
   });
   }

Thanks a bunch, Jason


-
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



ajax navigation toolbars not updating when rows are added to initially empty table

2009-08-22 Thread Jason Novotny

Hi,
  
   In a nutshell, I have a table that starts off empty and rows are 
added to it dynamically. So I have a DataTable inside of a 
WebMarkupContainer where setOutputMarkupId(true) and in the ajax 
callback I do a target.addComponent(markupContainer). So far so good and 
the table does update with new table rows. However, the paging toolbar 
on the bottom never gets displayed. So if I set the rowsPerPage to 3 and 
enter a 4th item, the row basically disappears. The code knows not to 
display a 4th row, but it doesn't display the navigation toolbar either. 
If I refresh the entire page, then the complete table with navigator 
suddenly appears.  It feels as if setOutputMarkupPlaceholderTag was 
never set to true deep in the bowels of the datatable/toolbar code since 
once it starts out as invisible it never has a chance to become visible. 
Does anyone have any ideas if this is a bug or I'm just missing 
something. FYI, I'm using wicket 1.4.0 just released.


   Thanks, Jason

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



a DataTable header that allows selection of # items per page?

2009-08-23 Thread Jason Novotny

Hi,

   I've been a happy user of the AjaxNavigationToolbar to display which 
page is being displayed with arrows for paging, however is there a 
Toolbar that provides a dropdown to allow a user to select the number of 
items per page? Just asking before I attempt to write one ;-)


   Thanks, Jason

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



why is getHomePage called multiple times?

2009-08-31 Thread Jason Novotny


Hi,

   My home page takes longer to load than expected and after placing a 
log line in getHomePage#MyWicketApplication I see that it's being called 
3 times:


Connected to server
gethome page
called me!
gethome page
called me!
gethome page
called me!

   Is there sort of a LoadableDetachableModel equivalent for pages, so 
they are just instantiated one per request cycle?


   Thanks, Jason

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



Re: why is getHomePage called multiple times?

2009-08-31 Thread Jason Novotny


Hi Nick,

   I tried with the simplest page:

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:wicket=http://www.w3.org/1999/xhtml;

head
/head
body
hello wicket
/body
/html

The good news is that it only happens after loading the app for the 
first time-- after an additional request is made to the home page, it's 
instantiated only once.


   Cheers, Jason

Nick Heudecker wrote:

Any chance you have empty image src attributes in your home page?

On Mon, Aug 31, 2009 at 9:19 PM, Jason Novotny jason.novo...@gmail.comwrote:

  

Hi,

  My home page takes longer to load than expected and after placing a log
line in getHomePage#MyWicketApplication I see that it's being called 3
times:

Connected to server
gethome page
called me!
gethome page
called me!
gethome page
called me!

  Is there sort of a LoadableDetachableModel equivalent for pages, so they
are just instantiated one per request cycle?

  Thanks, Jason

-
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



adding ajaxindicator to dropdownchoice

2009-09-24 Thread Jason Novotny


Hi,

   I have a DropDownChoice that triggers an ajax event to occur using 
the  AjaxFormComponentUpdatingBehavior. Since the event takes a little 
while to complete, I'd like to display  an ajaxindicator similar to an 
IndicatingAjaxButton next to it... how can this be done?


   Thanks, Jason

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



Re: adding ajaxindicator to dropdownchoice

2009-09-24 Thread Jason Novotny


   Thanks! That got me in the right direction-- I basically copied 
IndicatingAjaxLink and made a IndicatingDropDownChoice below... seems 
like it would be good to have as part of the default widget set...


public class IndicatingDropDownChoiceT extends DropDownChoiceT 
implements IAjaxIndicatorAware {


   private final AjaxIndicatorAppender indicatorAppender = new 
AjaxIndicatorAppender();
  
   public IndicatingDropDownChoice(final String id) {

   super(id);
   add(indicatorAppender);
   }

   /**
* @see 
org.apache.wicket.markup.html.form.AbstractChoice#AbstractChoice(String, 
java.util.List)

*/
   public IndicatingDropDownChoice(final String id, final List? 
extends T choices)

   {
   super(id, choices);
   add(indicatorAppender);
   }

   /**
* @see 
org.apache.wicket.ajax.IAjaxIndicatorAware#getAjaxIndicatorMarkupId()

*/
   public String getAjaxIndicatorMarkupId()
   {
   return indicatorAppender.getMarkupId();
   }
}


Peter Thomas wrote:

On Thu, Sep 24, 2009 at 11:40 AM, Jason Novotny jason.novo...@gmail.comwrote:

  

Hi,

  I have a DropDownChoice that triggers an ajax event to occur using the
 AjaxFormComponentUpdatingBehavior. Since the event takes a little while to
complete, I'd like to display  an ajaxindicator similar to an
IndicatingAjaxButton next to it... how can this be done?




Have a look at this code, line #137 and #159

http://code.google.com/p/perfbench/source/browse/trunk/perfbench/wicket-jpa/src/main/java/wicketjpa/wicket/MainPage.java#137

In the HTML, use something like:

img id=spinner src=img/spinner.gif style=display:none/

You can also use an Image component and get the markupId generated by wicket
instead of hardcoding spinner etc.  Hope this helps.

- Peter.



  

  Thanks, Jason

-
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



usage of select and optgroup

2009-10-06 Thread Jason Novotny


Hi,

   I see there is a select component that offers optgroup element 
support-- does anyone have a simple example of usage HTML and Java? I 
couldn't find anything on wicketstuff or the wiki...


   Thanks! Jason

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



using wicket ajax to add components containing javascript

2009-10-23 Thread Jason Novotny


Hi,

   I'm using AjaxLinks all over the place to refresh a container that 
contains custom components that themselves also use javascript. So what 
happens is  when I do target.add(myCustomComponent) that the javascript 
is not really in the page, its in the rendered markup so it often just 
doesn't work. Has anyone else had this problem or knows of a way to deal 
with it? Maybe I should put all the components javascript  as an include 
at the top, but I was hoping to keep it self-contained with the 
component itself for maximum reusability.


   Thanks, Jason

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



Re: How to write HTML directly

2009-10-26 Thread Jason Novotny


Try changing

add(new Label(output,h1Hello/h1)).setEscapeModelStrings(false);

to

Label label = new Label(output,h1Hello/h1);
label.setEscapeModelStrings(false);
add(label);

Jason

NiJK wrote:


igor.vaynberg wrote:
  

Also, despite the setEscapeModelString(false), all the HTML is escaped.
  

that is pretty weird. i just tried and it worked fine for me...
-igor




Igor,

Thanks for the info about setStripWicketTags(true).

Something as simple as 
add(new Label(output,h1Hello/h1)).setEscapeModelStrings(false);

is rendering as
lt;h1gt;Hellolt;/h1gt;

I take it you're not seeing the same?
  



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



jquery ui dialog and ajax component updating

2009-10-27 Thread Jason Novotny


Hi,

   I'm not sure if this is a jquery or wicket problem I'm having. I am 
using wicket ajax to update (replace) a panel component with a link


AjaxLink link = new AjaxLink(link) {
   public void onClick(AjaxRequestTarget target) {
   summaryDialog.displaySummary(my summary, target);
   }
   };

that when clicked will display the summary dialog that contains a Jquery 
dialog component I created called SummaryDialog that looks like this:


wicket:panel

   script type=text/javascript
   $.ui.dialog.defaults.bgiframe = true;
   $(function() {
   $(#summaryDialog).dialog({ draggable: true, resizable: 
false, autoOpen: false, height: 400, width: 800 }).toggle();

   });

   /script

   div id=summaryDialog title=Summary
   span wicket:id=label/span
   /div

/wicket:panel

and the java code is simply:

public class SummaryDialog extends Panel {

   Label label;
   ModelString labelModel = new ModelString();

   public SummaryDialog(String id) {
   super(id);
   label = new Label(label, labelModel);
   label.setVisible(false);
   label.setOutputMarkupId(true);
   label.setOutputMarkupPlaceholderTag(true);
   add(label);
   }

   public void displaySummary(String summary, AjaxRequestTarget target) {
   label.setVisible(true);
   labelModel.setObject(summary);
   target.addComponent(label);
   target.appendJavascript($(\#summaryDialog\).dialog('open');); 
   target.appendJavascript($(\#summaryDialog\).dialog('option', 
'title', ' + summary+  Summary'););


   }


It all works fine and I notice that at the bottom of the generated HTML, 
Jquery has added this to the DOM:


div aria-labelledby=ui-dialog-title-summaryDialog role=dialog 
tabindex=-1 class=ui-dialog ui-widget ui-widget-content 
ui-corner-all  ui-draggable style=overflow: hidden; display: none; 
position: absolute; z-index: 1000; outline-color: -moz-use-text-color; 
outline-style: none; outline-width: 0px;div style=-moz-user-select: 
none; unselectable=on class=ui-dialog-titlebar ui-widget-header 
ui-corner-all ui-helper-clearfixspan style=-moz-user-select: none; 
unselectable=on id=ui-dialog-title-summaryDialog 
class=ui-dialog-titleMy summary Summary/spana 
style=-moz-user-select: none; unselectable=on role=button 
class=ui-dialog-titlebar-close ui-corner-all href=#span 
style=-moz-user-select: none; unselectable=on class=ui-icon 
ui-icon-closethickclose/span/a/divdiv class=ui-dialog-content 
ui-widget-content id=summaryDialog


   span id=label1e2My Summary/span
/div/div

The problem is when I do something that updates the original panel in 
Ajax, it never removes the generated DOM so it results in two of these


div aria-labelledby id=summaryDialog
   span id=label1e2My Summary/span
/div/div
div aria-labelledby ... id=summaryDialog
   span id=label1e2My New Summary/span
/div/div

which causes it to no longer work since there are two elements with the 
same id in the generated DOM.


Has anyone encountered anything like this before? I could change my 
AjaxLinks to normal Link to perform a whole page refresh to get rid of 
jquery's generated DOM but I'd rather not if I could find a workaround.



   Thanks, Jason

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



Re: Wicket HTML before graphics design with CSS ...

2009-10-28 Thread Jason Novotny


   My best experiences have been when the designer has full reign to do 
what they need on the CSS/HTML front on a blank canvas-- obviously after 
doing wireframes with something like OmniGraffle, Balsamiq or Fireworks. 
It helps if they add things like static error messages or a highlighted 
tab so the wicket developer gets a sense of when they will probably do 
some kind of onComponentTag override to change a class or HTML 
attribute, etc. Things that screw up designers IMO are repeaters... it's 
hard sometimes for them to know to what degree the layout structure is 
created on the server side. For instance I really like the DataBrowser 
component where it provides pagination, sorting, zebra stripes, etc, but 
the designer just sees a table wicket:id=sometable and thats it. 
Obviously they can still style it but the entire structure is hidden 
from them. OTOH ListViews and others expose more structure to the 
designer which makes them feel closer to home. It's all a tradeoff 
really. The biggest rule I give is to just know that any tag with 
wicket:id in it means that behavior to some extent is controlled on the 
server side so beware. I like this model as a developer since I really 
enjoy taking a nice looking static page and making it come alive, as 
opposed to my own crappy HTML since I can't design worth beans. I've 
also found subtleties where you really want the design up front, one 
concrete example was a tabbed pane. In one case the styles were applied

as

ul
li class=selectedaone/a/li
...
/ul

or another as

ul
li
a class=...one/a
/li

These are subtleties that the designer can change on the fly rather 
easily, but in wicket it makes a huge difference. I wouldn't want to 
force the decision on the designer, this should be their choice.


But this is just my 2 cents

   Jason

Igor Vaynberg wrote:

really? because we have quiet the opposite experience.

we take a wireframe prototype, build it, and have the designer go in
afterwards and pretty it up. with only a couple of hours of
wicket-related training the designers know what to touch and what not
to touch.

-igor

On Tue, Oct 27, 2009 at 9:15 PM, John Armstrong siber...@siberian.org wrote:
  

Its amazing what designers can screw up :)

Design can have a huge impact on code. This peaceful co-existence can
really only occur if you let the designers go first. If you start with
wicket you will either A) tell your designers to go to h*ll daily or
B) spend hours and hours re-factoring to meet their 'whims'.

The separation of html/code is wonderful in wicket and a key reason I
use it and advocate for it but its no substitute for good planning and
a 'design first' mentality.

John-

On Tue, Oct 27, 2009 at 8:18 PM, Dave B d...@davebolton.net wrote:



While my Wicket usage is very basic at the stage, one of the
attractive parts is the code and logic is completely separate to the
layout.  So your designers can do all the fine tuning and magic
without screwing up your work.

Cheers,
Dave
  

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





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

  



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



Re: Wicket and JQuery

2009-10-28 Thread Jason Novotny


   Bingo!! I've been hitting this wall, and pulling my hair out-- in 
fact I may ditch jQuery for this very reason since I can't find a 
suitable workaround :-(


Martin Makundi wrote:

... and expect trouble with ajaxifying jquery plugins that skin html
components. They will not work properly if you replace your components
via ajax - or at least you might have to work hard on it.

**
Marin

2009/10/27 Jeremy Thomerson jer...@wickettraining.com:
  

I'd suggest only using jQuery for the UI effects and let Wicket do the AJAX.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller 
jeffrey.schnel...@envisa.com wrote:



I am trying to determine how to use Wicket and JQuery.  I would prefer
not using wiQuery or similar.  I would like to just include the jQuery
libraries in my html and then use jQuery as javascript and not wrap
everything in java on the server side to generate the client code.



How would one go about doing this?  I assume the basic jQuery
functionality is straight forward.  However how would you implement
jQuery code that uses Ajax to communicate back to the server using
Wicket on the server?  Or would the recommendation be to let Wicket
handle the Ajax communication and only use jQuery for the UI components
such as Lightbox, Greybox, apple like sliders, etc.



Any ideas?



Thanks.






  


-
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



open modal window w/o ajax resolved?

2009-10-31 Thread Jason Novotny


Hi,

   I was trying to figure out how to display wicketmodal once a page is 
created-- this has been a popular issue

http://issues.apache.org/jira/browse/WICKET-12

It seems just a week ago it has been marked resolved in  wicket 1.4.4, 
can someone tell me what the fix is or what I need to do in my code, 
asuming I've grabbed the v. 1.4..4 of this file?


Also, is it possible to have a non-modal wicketmodal? If I want to use 
this component as a normal dialog, or is there a better component?


   Thanks, Jason


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



autocomplete text field with dropdown style functionality

2009-11-05 Thread Jason Novotny

Hi,

   I'm using the autocomplete text field with great success. However, 
I'm looking for a way where a user can start to move down the list and 
once they are at the last choice, it will continue to pull new items 
back from the server. If this seems confusing let me explain with my 
use-case:


   I have a State autocomplete textfield. Initially they enter C 
and get all the states that start with C. As they go down the list and 
say first California is highlighted and then Colorado and then 
Connecticut I would like the list to display Delaware (possibly even a 
few more like Florida and Georgia) as the next entries available even 
though a C was entered into the text field. It seems I would need to 
know that the last option was selected as a trigger to make a call to 
display more items from the server. Does anyone have any idea how to do 
this?


   Thanks, Jason


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



setting PageExpiredErrorPage not working

2009-11-15 Thread Jason Novotny


Hi,

   I'm using Wicket-1.4.3 and just trying to set the expired page to my 
home page in my Application class like so:


   IApplicationSettings settings = getApplicationSettings();
   settings.setPageExpiredErrorPage(getHomePage());

In addition, I'm using the HttpsRequestCycleProcessor in production and  
I see that I still get stack traces like these if for instance a user 
comes back to the page after the session expires and clicks on an AjaxLink


org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered 
page in session [pagemap=null,componentPath=20:header:logout,versionNumber=0]
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:197)
at 
org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)


   What can I do to handle these exceptions cleanly?

   Thanks, Jason

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



how to override wicket DataTable.html

2009-11-25 Thread Jason Novotny


Hi,

   I want to add a css class to the tbody that is part of 
DataTable.html that looks like:


wicket:panel
thead wicket:id=topToolbars
   wicket:container wicket:id=toolbar/wicket:container
/thead
tfoot wicket:id=bottomToolbars
   wicket:container wicket:id=toolbar/wicket:container
/tfoot
tbody
   tr wicket:id=rows
   td wicket:id=cells
   span wicket:id=cell[cell]/span
   /td
   /tr
/tbody
/wicket:panel

where none exists already? What is the easiest way to do this w/o 
modifying core wicket code that I would have to maintain?


Thanks, Jason

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



how to display a BookmarkableLink so it can't be clicked

2009-03-30 Thread Jason Novotny


Hi,

I have a case where if some condition is met I don't want a link to be 
clickable... but I want it to display the link text (so overriding 
isVisible() is not an option). Any ideas on the most elegant approach?


Thanks, Jason

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



changing style of ajax link

2009-04-17 Thread Jason Novotny


Hi,

I have code to create an ajax link and I want it to dynamically adjust 
its css class when clicked. This doesn't work since I don't think the 
onComponentTag is being called.


final AjaxLink link = new AjaxLink(navlink) {
   @Override
   public void onClick(AjaxRequestTarget target) {

 
   }


   public void onComponentTag(ComponentTag tag) {
   super.onComponentTag(tag);
   if (foo == 77) {
  tag.put(class, secondaryCurrent);
   }
   }

   };

Any help is greatly appreciated!

Thanks, Jason

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



how to not display RepeaterView

2009-04-21 Thread Jason Novotny


Hi,

I have some markup I wish to repeat like so:

...

h3a href=#span wicket:id=workoutCategoryBlah Blah 
Blah/span/a/h3
  
div wicket:id=activeGroup

   p
   ol wicket:id=workoutList class=workoutList
   li wicket:id=itemspan 
wicket:id=labelstrongWorkout Name./strong/span/li

   /ol
   /p
/div


...

So I wrapped the whole thing inside a div wicket:id=container like so:

div wicket:id=container
   h3a href=#span wicket:id=workoutCategoryBlah Blah 
Blah/span/a/h3
  
   div wicket:id=activeGroup
    
   /div

/div

and use a RepeatingView rv = new RepeatingView(container);

This works fine except the resulting HTML still contains the outer div 
to appear which causes the markup to break since it relies on Jquery to 
attach some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you 
don't want to display the span tag but doesn't work here. Does anyone 
have any idea of how to not display the RepeatingView markup of div tags?


Thanks a bunch. Jason



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



Re: how to not display RepeaterView

2009-04-22 Thread Jason Novotny


Igor, Jeremy,

Just want to say thanks for your constant support on the mailing list! 
This is a huge part of why I've become a wicket enthusiast. Keep up the 
great work!


   Cheers, Jason

Igor Vaynberg wrote:

no need, just attach it to a wicket:container

[wicket:container][h3]..[/h3][div]..[/div][/wicket:container]

alternatively you can attach it to any tag and call setrenderbodyonly
on the component that is direct child of repeatingview

-igor

On Tue, Apr 21, 2009 at 5:48 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
  

Sorry - poor formatting in my client made it hard to notice the closing H3.

Looking at RV code - it really doesn't seem to work for this.  I'd suggest
opening a JIRA and then adjusting your jquery script to expect the div.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:35 PM, Jason Novotny novo...@gridsphere.orgwrote:



Ah but the h3 doesn't wrap the whole thing (or does it need to?) Basically
I'm trying to repeat the following structure:

h3some stuff/h3
divsome div/div

h3more stuff/h3
divmore div/div

h3more more stuff/h3
divmore more div/div

Thanks Jeremy!


Jeremy Thomerson wrote:

  

Why don't you just make your outermost tag the repeater (it looks like an
H3
in your example)?

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:24 PM, Jason Novotny novo...@gridsphere.org


wrote:
  




Hi,

I have some markup I wish to repeat like so:

...

h3a href=#span wicket:id=workoutCategoryBlah Blah
Blah/span/a/h3
div wicket:id=activeGroup
 p
 ol wicket:id=workoutList class=workoutList
 li wicket:id=itemspan wicket:id=labelstrongWorkout
Name./strong/span/li
 /ol
 /p
/div


...

So I wrapped the whole thing inside a div wicket:id=container like
so:

div wicket:id=container
 h3a href=#span wicket:id=workoutCategoryBlah Blah
Blah/span/a/h3
   div wicket:id=activeGroup
    /div
/div

and use a RepeatingView rv = new RepeatingView(container);

This works fine except the resulting HTML still contains the outer div to
appear which causes the markup to break since it relies on Jquery to
attach
some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you
don't want to display the span tag but doesn't work here. Does anyone
have
any idea of how to not display the RepeatingView markup of div tags?

Thanks a bunch. Jason



-
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



simple example of RadioGroup

2009-04-23 Thread Jason Novotny


Hi,

   Somehow I seem to have problems if I want to do individual radio 
buttons in my HTML and it looks like I need to use RadioGroup. Here is 
the example HTML and I'm trying to figure out how to wicket-ize it... 
the model just needs to be a boolean since I have only two values.


pinput wicket:id=option type=radio value= Click here for 
option one/p
   p class=bottomOptioninput name= type=radio 
value= Click here for option two/p



Thanks, Jason


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



mouse over table cells and dialog popup with ajaxlinks

2010-09-17 Thread Jason Novotny

 Hi,

I have a fairly complex use-case scenario: I want a dialog to popup 
when a hover event occurs within a table cell. The dialog will provide 
a couple of links (ideally AjaxLink) that should trigger a wicket ajax 
event.


I can imagine maybe creating the dialogs all on the client so there 
is no need to hit the server when the mouse hovers over the table cell 
(seems that ajax would be no good in any case since the latency would be 
high when hovering over potentially many cells within the table anyhow). 
But then the issue is how to create the AjaxLink in the javascript that 
constructs the dialog on the client?


Any ideas are greatly appreciated!

Thanks, Jason

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



Re: mouse over table cells and dialog popup with ajaxlinks

2010-09-18 Thread Jason Novotny


Thanks!

My real concern isn't so much the creation of the dialog/tooltip 
but how do I create a wicket appropriate link in that dialog/tooltip in 
order to edit the item that is contained in the table cell?


Thanks again, Jason

On 9/18/10 8:08 AM, Ernesto Reinaldo Barreiro wrote:

Jason,

I do a similar thing for one of my applications. I have a table and
when the user hovers the mouse over some button on each row then I
show a dialog with more details about the row. What I do is having a
hidden div next to the table and make it appear, its contents updated
via AJAX, with the help of a jquery plugin: I use plugin shown in [1]
in combination with grid shown at [2]. For other use cases, when
dialog contents are very heavy I use a ModalWindow triggered by an
onclick.

Maybe I could strip my code of the business logic and post it
somewhere so that you could use or adapt it.

Regards,

Ernesto

1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.ToolTipPage
2-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.TablePage

On Sat, Sep 18, 2010 at 2:13 AM, Jason Novotnyjason.novo...@gmail.com  wrote:

  Hi,

I have a fairly complex use-case scenario: I want a dialog to popup when
a hover event occurs within a table cell. The dialog will provide a couple
of links (ideally AjaxLink) that should trigger a wicket ajax event.

I can imagine maybe creating the dialogs all on the client so there is no
need to hit the server when the mouse hovers over the table cell (seems that
ajax would be no good in any case since the latency would be high when
hovering over potentially many cells within the table anyhow). But then the
issue is how to create the AjaxLink in the javascript that constructs the
dialog on the client?

Any ideas are greatly appreciated!

Thanks, Jason

-
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



mouse over table cells and dialog popup with ajaxlinks

2010-09-20 Thread Jason Novotny


Hi,

I have a fairly complex use-case scenario: I want a dialog to popup 
when a hover event occurs within a table cell. The dialog will provide 
a couple of links (ideally AjaxLink) that should trigger a wicket ajax 
event.


I can imagine maybe creating the dialogs all on the client so there 
is no need to hit the server when the mouse hovers over the table cell 
(seems that ajax would be no good in any case since the latency would be 
high when hovering over potentially many cells within the table anyhow). 
But then the issue is how to create the AjaxLink in the javascript that 
constructs the dialog on the client?


Any ideas are greatly appreciated!

Thanks, Jason


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



wicketAjaxGet and wicket 1.5 and StalePage exceptions

2011-11-10 Thread Jason Novotny


Hi,

Recently converting an app from wicket 1.4.18 to wicket 1.5.2 and 
am now seeing stack traces like the following:


org.apache.wicket.request.mapper.StalePageException
at 
org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
at 
org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
at 
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)


I've tracked it down to a wicketAjaxGet request invoked on the client 
that looks something like this:


var wcall = wicketAjaxGet(url + args, function() { }, function() { });

url looks something like: 'myBuildings?52-1.IBehaviorListener.2-' which 
I create from AbstractDefaultAjaxBehavior.getCallbackUrl().toString()


It seems the problem has to do with page versioning not matching the 
page on the server.


Is there a workaround or another way to code this up? Let me know if I 
can provide any additional information.


Thanks, Jason



adding wicket generated link to javascript

2014-09-03 Thread Jason Novotny

Hi,

My designer gave me code where HTML is created in javascript as part of 
a jquery dataTable:


script
$(document).ready(function() {
$('#datatable').dataTable( {

$('.clientinvoices .dropholder').html('div 
class=opener/div*button class=btn type=resetCancel 
Order/button*');

..
/script


And I need that button to be a wicket button, is there a way to pass it 
a generated link, etc? What would be the best way to deal with this?


Thanks, Jason



jquery DataTable + wicket Cannot bind a listener

2014-10-24 Thread Jason Novotny

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of 
the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': 'topdoc-filterholdeript',
language: {info: _START_-_END_ of _TOTAL_},
aaSorting: [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains AjaxLinks, 
I get an error from my wicket debug window with the following: 
Wicket.Ajax: Cannot bind a listener for event click on element 
elementId because the element is not in the DOM


The thing is the links seem to actually work on the first page, but when 
I click - to go to the next page the links don't work. Has anyone 
experienced this before or have any idea how I can debug this?


Thanks, Jason


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



Re: jquery DataTable + wicket Cannot bind a listener

2014-10-24 Thread Jason Novotny


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head 
of the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': 'topdoc-filterholdeript',
language: {info: _START_-_END_ of _TOTAL_},
aaSorting: [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains 
AjaxLinks, I get an error from my wicket debug window with the 
following: Wicket.Ajax: Cannot bind a listener for event click on 
element elementId because the element is not in the DOM


The thing is the links seem to actually work on the first page, but 
when I click - to go to the next page the links don't work. Has 
anyone experienced this before or have any idea how I can debug this?


Thanks, Jason




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



Re: jquery DataTable + wicket Cannot bind a listener

2014-10-25 Thread Jason Novotny


I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination. 
This means the AjaxLinks in my listview generate wicket javascript like:


Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-0-detailsLink,e:click,c:detailsLinkff});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-1-detailsLink,e:click,c:detailsLink100});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-2-detailsLink,e:click,c:detailsLink101});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-executedTransactionPanel-executedListView-3-detailsLink,e:click,c:detailsLink102});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page 
so I get the wicket debug error  Wicket.Ajax: Cannot bind a listener 
for event click on element elementId because the element is not in 
the DOM


Now when I hit the link for next page of the table, the DOM has been 
updated to reflect the rows, but the javascript events need to be added 
again and so the links are broken.


Is there any good way to do this?

Thanks, Jason

On 10/24/14, 1:24 PM, Jason Novotny wrote:


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head 
of the page, I initiate the DataTable:


$(function () {
$('.datatable_executed').dataTable({
'lengthChange': false,
'dom': 'topdoc-filterholdeript',
language: {info: _START_-_END_ of _TOTAL_},
aaSorting: [],
'iDisplayLength': 12
});
});

It all looks good, however because one of my columns contains 
AjaxLinks, I get an error from my wicket debug window with the 
following: Wicket.Ajax: Cannot bind a listener for event click on 
element elementId because the element is not in the DOM


The thing is the links seem to actually work on the first page, but 
when I click - to go to the next page the links don't work. Has 
anyone experienced this before or have any idea how I can debug this?


Thanks, Jason







Re: jquery DataTable + wicket Cannot bind a listener

2014-10-27 Thread Jason Novotny


Hi Martin,

Thanks for the help-- I've reached out to them, the js appears pretty 
complex

http://cdn.datatables.net/1.10.3/js/jquery.dataTables.js


They indicate that listeners need to be added according to:
http://www.datatables.net/examples/advanced_init/events_live.html

Is there any kind of mode in wicket possibly that would preserve the 
listeners in this way?


Thanks, Jason

On 10/26/14, 11:40 PM, Martin Grigorov wrote:

Hi,

Try with Ajax loading of the new pages.

I am not sure how DataTables removes and re-adds the rows later. It should
use jQuery's clone(true, true) to preserve the event bindings. Ask in their
forums.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Oct 26, 2014 at 12:46 AM, Jason Novotny jason.novo...@gmail.com
wrote:


I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination.
This means the AjaxLinks in my listview generate wicket javascript like:

Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-0-detailsLink,e:click,c:
detailsLinkff});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-1-detailsLink,e:click,c:
detailsLink100});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-2-detailsLink,e:click,c:
detailsLink101});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-3-detailsLink,e:click,c:
detailsLink102});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page so
I get the wicket debug error  Wicket.Ajax: Cannot bind a listener for
event click on element elementId because the element is not in the DOM

Now when I hit the link for next page of the table, the DOM has been
updated to reflect the rows, but the javascript events need to be added
again and so the links are broken.

Is there any good way to do this?

Thanks, Jason


On 10/24/14, 1:24 PM, Jason Novotny wrote:


I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:


Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of
the page, I initiate the DataTable:

$(function () {
 $('.datatable_executed').dataTable({
 'lengthChange': false,
 'dom': 'topdoc-filterholdeript',
 language: {info: _START_-_END_ of _TOTAL_},
 aaSorting: [],
 'iDisplayLength': 12
 });
 });

It all looks good, however because one of my columns contains AjaxLinks,
I get an error from my wicket debug window with the following:
Wicket.Ajax: Cannot bind a listener for event click on element
elementId because the element is not in the DOM

The thing is the links seem to actually work on the first page, but when
I click - to go to the next page the links don't work. Has anyone
experienced this before or have any idea how I can debug this?

Thanks, Jason





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



Re: jquery DataTable + wicket Cannot bind a listener

2014-10-28 Thread Jason Novotny


Hi Martin,

Are there examples? What about this simple piece of code...

WebMarkupContainer tbody = new WebMarkupContainer(tbody);
tbody.add(new AjaxEventBehavior(onclick) {
@Override
protected void onEvent(AjaxRequestTarget target) {

}

protected void updateAjaxAttributes(AjaxRequestAttributes 
attributes) {

super.updateAjaxAttributes(attributes);
attributes.setChildSelector(td);
// TODO what do i do here?
}
});


Thanks, Jason

On 10/28/14, 1:10 AM, Martin Grigorov wrote:

Hi,

You should read about JavaScript event delegation. This is what they
recommend.

Wicket has basic support for this
with org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setChildSelector.
I.e. you can register an Ajax behavior on the table or tbody and use
childSelector to listen for events only on specific children, e.g. 'tr',
'td', 'td div', etc.

This is more lightweight than using Wicket's built-in AjaxLink, but it is
also a bit more complex for you as an application developer.

Good luck!


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Oct 27, 2014 at 8:37 PM, Jason Novotny jason.novo...@gmail.com
wrote:


Hi Martin,

Thanks for the help-- I've reached out to them, the js appears pretty
complex
http://cdn.datatables.net/1.10.3/js/jquery.dataTables.js


They indicate that listeners need to be added according to:
http://www.datatables.net/examples/advanced_init/events_live.html

Is there any kind of mode in wicket possibly that would preserve the
listeners in this way?

Thanks, Jason


On 10/26/14, 11:40 PM, Martin Grigorov wrote:


Hi,

Try with Ajax loading of the new pages.

I am not sure how DataTables removes and re-adds the rows later. It should
use jQuery's clone(true, true) to preserve the event bindings. Ask in
their
forums.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Oct 26, 2014 at 12:46 AM, Jason Novotny jason.novo...@gmail.com
wrote:

  I've managed to figure out the cause of the problem but no solution.

jquery datatables removes DOM elements when configured for pagination.
This means the AjaxLinks in my listview generate wicket javascript like:

Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-0-
detailsLink,e:click,c:
detailsLinkff});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-1-
detailsLink,e:click,c:
detailsLink100});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-2-
detailsLink,e:click,c:
detailsLink101});;
Wicket.Ajax.ajax({u:./executed?7-1.IBehaviorListener.0-container-
executedTransactionPanel-executedListView-3-
detailsLink,e:click,c:
detailsLink102});;
...


If the table has 2 pages, it removes the DOM elements from the 2nd page
so
I get the wicket debug error  Wicket.Ajax: Cannot bind a listener for
event click on element elementId because the element is not in the
DOM

Now when I hit the link for next page of the table, the DOM has been
updated to reflect the rows, but the javascript events need to be added
again and so the links are broken.

Is there any good way to do this?

Thanks, Jason


On 10/24/14, 1:24 PM, Jason Novotny wrote:

  I should add I'm using Wicket 6.17.

Thanks, Jason

On 10/24/14, 10:47 AM, Jason Novotny wrote:

  Hi,

I'm using latest jquery DataTable with a ListView and in wicket:head of
the page, I initiate the DataTable:

$(function () {
  $('.datatable_executed').dataTable({
  'lengthChange': false,
  'dom': 'topdoc-filterholdeript',
  language: {info: _START_-_END_ of _TOTAL_},
  aaSorting: [],
  'iDisplayLength': 12
  });
  });

It all looks good, however because one of my columns contains
AjaxLinks,
I get an error from my wicket debug window with the following:
Wicket.Ajax: Cannot bind a listener for event click on element
elementId because the element is not in the DOM

The thing is the links seem to actually work on the first page, but
when
I click - to go to the next page the links don't work. Has anyone
experienced this before or have any idea how I can debug this?

Thanks, Jason




-
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



wicket6 + sso and redirects

2014-11-03 Thread Jason Novotny

Hi,

I'm adding support to my application use SSO outbound from my webapp to 
an Identity provider (IP) to authenticate a user from my webapp to an 
external web application.


I have SSO code and the steps involved on my page are:

1. send redirect to

https://www.3rdparty.com?authnReqRedirectUrl=myurl

where myurl is a wicket page e.g. /sso

2. Now the wicket page at /sso should receive a SAMLRequest parameter, 
which is then used to create a SAMLResponse


3. The SAMLResponse should be posted back to the 3rd party thru a form:

form wicket:id=form method=post action=third party url
input wicket:id=samlresponse type=hidden/
input type=submit value=Submit/
/form

I believe the form can be auto-submitted thru javascript:

script type=text/javascript
window.onload = function () {
document.forms[0].submit();
}
/script

And then the user should land on the 3rdparty web application.

So basically my question is how do I do step 1, I'm using wicket6 and tried:

add(new AjaxLinkVoid(test) {
@Override
public void onClick(AjaxRequestTarget target) {
throw new 
RedirectToUrlException(https://thirdparty.com?authnReqRedirectUrl=https://mysite.com/sso;);

}
});


But seems that it doesn't return to my wicket page mounted at /sso. Am I 
doing this right?


Thanks, Jason



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



wicket + jsessionid and 302 issues

2014-11-12 Thread Jason Novotny

Hi wicketeers,

I was hoping to get rid of the jsessionid that appears in the 
browsewr bar when running my wicket app under Tomcat 7, and I added the 
following to web.xml:


session-config
session-timeout30/session-timeout
tracking-modeCOOKIE/tracking-mode
/session-config

However, now in production we get all these 302 redirects which are 
causing an infinite recursion. What is the best way to handle this? I 
also found a wiki page 
https://cwiki.apache.org/confluence/display/WICKET/SEO+-+Search+Engine+Optimization 
but wasn't sure if this also applied to using Wicket 6.


Thanks, Jason

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



Re: wicket + jsessionid and 302 issues

2014-11-12 Thread Jason Novotny

Hi,

I figured more detailed config info would be helpful. I want my 
production app to be accessible via https only. The connection is SSL to 
our Apache load balancer which is then http to our Tomcat7 instance.

The Tomcat 7 connector is default:

 Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /

Just not sure how to config the web.xml or if my tomcat config needs 
changing.


Thanks, Jason

On 11/12/14, 1:40 PM, Jason Novotny wrote:

Hi wicketeers,

I was hoping to get rid of the jsessionid that appears in the 
browsewr bar when running my wicket app under Tomcat 7, and I added 
the following to web.xml:


session-config
session-timeout30/session-timeout
tracking-modeCOOKIE/tracking-mode
/session-config

However, now in production we get all these 302 redirects which are 
causing an infinite recursion. What is the best way to handle this? I 
also found a wiki page 
https://cwiki.apache.org/confluence/display/WICKET/SEO+-+Search+Engine+Optimization 
but wasn't sure if this also applied to using Wicket 6.


Thanks, Jason



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



ajax events and manipulating DOM

2014-11-14 Thread Jason Novotny

Hi,

I'm using jquery datatables which allows customization of table header 
by creating html in javascript via dom attribute which creates a div :


$('#datatable').dataTable({

dom: 'topdropholderpostponebtnsholdeript',
language: {
info: _START_-_END_ of _TOTAL_,
search: 
},
aaSorting: [],
aoColumnDefs: [
{'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
],
'iDisplayLength': 12
});
$('.btns').html('buttonclass=btn btn-primarytype=buttonSend/button');


However I need these buttons to be server-side actions.

My naive solution was to create additional wicket links on the page:

div  class=actionbuttons
button  wicket:id=cancelclass=cancel-order-btn 
btntype=buttonCancel/button
button  wicket:id=sendclass=btn btn-primarytype=buttonSend/button
/div

and then at the top of my page:

script  type=text/javascript
$(function() {
updateDataTable();  
});
/script

where I have

function updateDataTable() {

$('#datatable').dataTable({

dom: 'topdropholderpostponebtnsholdeript',
language: {
info: _START_-_END_ of _TOTAL_,
search: 
},
aaSorting: [],
aoColumnDefs: [
{'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
],
'iDisplayLength': 12
});

var html = $('.actionbuttons').html();

$('.btns').html(html);
$('.actionbuttons').remove();

}
}

However, the send button when clicked needs to refresh the panel with an 
updated data table. So I have:


add(newAjaxSubmitLink(send) {
@Override
protected voidonSubmit(AjaxRequestTarget target, Form? form) {
container.addOrReplace(createDataTable());
target.add(container);
target.appendJavaScript(updateDataTable());

}
});


Now this works the first time when the page loads. It removes the DOM 
section with wicket-ized links to the DOM section of the datatable. 
Clicking send results in an updated table. However, when I click 
send again, although the display looks good and it has replaced the 
DOM, the links seem to have no events associated and it doesn't do 
anything. I wonder if a disconnect is going on with the wicket event 
registration...


Is there a better way to do this, or am I missing something?

Thanks, Jason







Re: ajax events and manipulating DOM

2014-11-14 Thread Jason Novotny


Ok, to answer my own question, it was a jquery/javascript issue. Instead 
of removing dom, the approach that works is to use appendTo instead:


$('.actionbuttons').appendTo('.btns');

Jason

On 11/14/14, 6:13 PM, Jason Novotny wrote:

Hi,

I'm using jquery datatables which allows customization of table header 
by creating html in javascript via dom attribute which creates a div :


$('#datatable').dataTable({

 dom: 'topdropholderpostponebtnsholdeript',
 language: {
 info: _START_-_END_ of _TOTAL_,
 search: 
 },
 aaSorting: [],
 aoColumnDefs: [
 {'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
 ],
 'iDisplayLength': 12
 });
$('.btns').html('buttonclass=btn btn-primarytype=buttonSend/button');

However I need these buttons to be server-side actions.

My naive solution was to create additional wicket links on the page:

div  class=actionbuttons
 button  wicket:id=cancelclass=cancel-order-btn 
btntype=buttonCancel/button
 button  wicket:id=sendclass=btn btn-primarytype=buttonSend/button

/div
and then at the top of my page:

script  type=text/javascript
 $(function() {
updateDataTable();  
 });
/script
where I have

function updateDataTable() {
$('#datatable').dataTable({

 dom: 'topdropholderpostponebtnsholdeript',
 language: {
 info: _START_-_END_ of _TOTAL_,
 search: 
 },
 aaSorting: [],
 aoColumnDefs: [
 {'bSortable': false, 'aTargets': [ 0, 4, 7 ] }
 ],
 'iDisplayLength': 12
 });

 var html = $('.actionbuttons').html();

 $('.btns').html(html);
 $('.actionbuttons').remove();
}
}

However, the send button when clicked needs to refresh the panel with 
an updated data table. So I have:


add(newAjaxSubmitLink(send) {
 @Override
 protected voidonSubmit(AjaxRequestTarget target, Form? form) {
 container.addOrReplace(createDataTable());
target.add(container);
target.appendJavaScript(updateDataTable());

}
});

Now this works the first time when the page loads. It removes the DOM 
section with wicket-ized links to the DOM section of the datatable. 
Clicking send results in an updated table. However, when I click 
send again, although the display looks good and it has replaced the 
DOM, the links seem to have no events associated and it doesn't do 
anything. I wonder if a disconnect is going on with the wicket event 
registration...


Is there a better way to do this, or am I missing something?

Thanks, Jason









wicket + JSON web tokens

2015-07-28 Thread Jason Novotny

Hi,

Has anyone done any work with Wicket and JSON web tokens http://jwt.io/? 
I'm interested in getting away from server-side session management if 
possible.


Thanks, Jason

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



Re: wicket creating tons of sessions

2015-07-26 Thread Jason Novotny


Thanks Martin,

Turned out to be some weird misconfiguration with my intellij+tomcat dev 
environment.


Jason

On 7/26/15 4:03 AM, Martin Grigorov wrote:

Hi,

Register a
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
and print the stacktrace in #sessionCreated(). This way you will see where
HttpServletRequest#getSession(true) is being called.
For some reason your web container doesn't recognize old session ids and
creates new sessions.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sun, Jul 26, 2015 at 6:16 AM, Jason Novotny jason.novo...@gmail.com
wrote:


Hi,

In deploying my wicket 6.2 application I noticed sessions are getting
created like crazy-- I'm using Tomcat and the manager application and after
only a minute, there are over 6000 sessions(!) and oddly I only navigated
to the page once(!). Any ideas on where I can debug this to determine where
these sessions keep getting created?

Thanks, Jason



-
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



distributed session handling with redis

2015-07-26 Thread Jason Novotny

Hi,

I googled and found a discussion on using redis to handle sessions, and 
someone also came up with a project 
https://github.com/baholladay/WicketRedisSession.


Based on the thread 
http://mail-archives.apache.org/mod_mbox/wicket-dev/201502.mbox/%3c54e4cfee.80...@gmail.com%3E 
I wound up using spring-session with redis as per 
http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession.html


I see I would also need to modify the page manager provider-- is it 
sufficient to add the following, or is there more to do?


setPageManagerProvider(newDefaultPageManagerProvider(this) {
protectedIDataStore newDataStore() {
return 
newHttpSessionDataStore(getPageManagerContext(),newPageNumberEvictionStrategy(20));
}
});

Thanks, Jason




wicket creating tons of sessions

2015-07-25 Thread Jason Novotny

Hi,

In deploying my wicket 6.2 application I noticed sessions are getting 
created like crazy-- I'm using Tomcat and the manager application and 
after only a minute, there are over 6000 sessions(!) and oddly I only 
navigated to the page once(!). Any ideas on where I can debug this to 
determine where these sessions keep getting created?


Thanks, Jason


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

wicket-annotations and page mounting

2015-07-10 Thread Jason Novotny

Hi,

I'm using wicket-annotations and I've added:

newAnnotatedMountScanner().scanPackage(com.foo.web.pages).mount(this);

in my Application class.

My page classes all have:

@MountPath(value =summary)

However, I want to adjust the pages to not use query parameters like account=5 
and use / like account/5 instead.

Is there a way to set this across the app, just like scanPackage, or do I have 
to set this on each page in my application?

I'm using latest Wicket 6.

Thanks, Jason