Re: [OT] wicket users around the world

2008-12-27 Thread Swaroop Belur
Bengaluru (formerly Bangalore) , India

Used it for 1.5 yrs on a project

-swaroop belur



On Fri, Dec 12, 2008 at 12:27 AM, francisco treacy 
francisco.tre...@gmail.com wrote:

 to know a little bit more of our great (and vast) community, i was
 just wondering if you're keen on sharing where you come from and/or
 where you work with wicket...

 for instance, here argentinian/belgian working with wicket in antibes,
 france

 francisco

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




Re: PagingNavigator with custom images

2007-10-26 Thread Swaroop Belur
Probably shud raise an RFE for this.

-swaroop

On 10/26/07, Dipu Seminlal [EMAIL PROTECTED] wrote:

 What i did was had a dummy extension of the Paging Navigator and Provided
 Markup
 for the extension and used it where ever needed.

 So that you can modify the markup as you want it.

 Regards
 Dipu


 On 10/26/07, Swaroop Belur [EMAIL PROTECTED] wrote:
 
  It looks like you will have to copy that markup(PagingNavigator.html)
 and
  replace the default ones
  by ur images.Right now they are directly embedded in markup as  (lt;)
  for
  eg.
 
  -swaroop
 
  On 10/26/07, BatiB80 [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   is it possible to use the PagingNavigator with own images to jump to
 the
   first/previous/next/last record. The defaultimplementation use '' or
  ''
   or '' or '' which looks not very nice.
  
   Many thanks for you help,
   Sebastian
   --
   View this message in context:
  
 
 http://www.nabble.com/PagingNavigator-with-custom-images-tf4695835.html#a13422772
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 



Re: PagingNavigator with custom images

2007-10-26 Thread Swaroop Belur
It looks like you will have to copy that markup(PagingNavigator.html) and
replace the default ones
by ur images.Right now they are directly embedded in markup as  (lt;) for
eg.

-swaroop

On 10/26/07, BatiB80 [EMAIL PROTECTED] wrote:


 Hi,

 is it possible to use the PagingNavigator with own images to jump to the
 first/previous/next/last record. The defaultimplementation use '' or ''
 or '' or '' which looks not very nice.

 Many thanks for you help,
 Sebastian
 --
 View this message in context:
 http://www.nabble.com/PagingNavigator-with-custom-images-tf4695835.html#a13422772
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Load Image from another server

2007-10-26 Thread Swaroop Belur
 is it possible to load an image which is located on another server

try using ExternalLink for this.

add(new ExternalLink(el,full path,External Image));
-swaroop


On 10/26/07, BatiB80 [EMAIL PROTECTED] wrote:


 Hi,

 is it possible to load an image which is located on another server. In my
 Page-Class I like to do somethink like this:

 add(new Image(myImage, new
 SomeKindOfWebReference(http://www.sample.com/sampleImage.gif;)));

 Can this be provided by the framework or do I have to create my own
 WebResource-Implementation which reads the picture in the
 getResourceStream()-Method???

 Many thanks for you help
 Sebastian
 --
 View this message in context:
 http://www.nabble.com/Load-Image-from-another-server-tf4695833.html#a13422770
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Confirmation message after form submit

2007-10-25 Thread Swaroop Belur
Do it like this:

In js file

function yourconfirmationjsfunction( urltogotoonok , urltogotooncancel) {


var retValue =  confirm( Are you sure );
if(retValue == false){
 window.location.href=urltogotooncancel;
}

 window.location.href=urltogotoonok ;
}

In java file... construct these 2 urls using RequestCylce.get().urlFor
methods to ur
behaviors for example.

Then call this js function using these 2 urls

-swaroop



On 10/25/07, Federico Fanton [EMAIL PROTECTED] wrote:

 Hi everyone!
 I have a form with a submit button, and I need to implement a sequence
 like this:
 - user presses the button
 - form submit
 - server-side validation of submitted data
 - popup with confirmation message (like javascript confirm() )
 - if user presses yes, call Java method X
 - if user presses no, call Java method Y

 Is this possible?
 Many thanks for your time!


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




Re: Refreshing components with new data w/o altering the backing model

2007-10-24 Thread Swaroop Belur
Igor,

Regarding the stated problem:

As we know ,the formcomponent's getValue method returns value from the model
for the component when rendering if raw input is equal to no raw input
constant. So basically the problem is that component's model should
not be updated until the user submits the form containing the zip field
here.
So  looks like holding on to the raw input until the form is actually
submitted
should do the trick. Do you think its a good idea to hold on to the raw
input
by not calling clearInput in ajaxformcomponentupdatingbehavior.
It may be cleared in process() call of form if valid.

The only problem seems to be distinguishing incorrect input
from correct input. May be in this case, it will be upto user
to render any error label or feedback in that case.

I understand this may go against fundamental way wicket works..
i.e to pull only from models if data is correct. But the scenario
described above means that user doesnt want to update any transient
data (- as user may keep changing zip field many times for example) ,
in models - so therefore pick up from component instead of model
when rendering EXCEPT after submit when rendering the same page
again.

-swaroop




On 10/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 dont know if you need that, just add javascript to the ajax target to
 set the values on the fields..

 -igor


 On 10/23/07, Matej Knopp [EMAIL PROTECTED] wrote:
  I think what you could try (though it would be a nasty hack :) ) is to
  set rawInput property on FormComponent. However, you'll need some
  introspection to do that, as it is private and we don't plan to
  provide an accessor for it :)
 
  -Matej
 
  On 10/23/07, karthik Guru [EMAIL PROTECTED] wrote:
   I have a form like this -
  
   Name:  [.]
   Zip:  [.]
   City: [.]
   State:   [.]
  
   [Save]
  
   On filling the zip i want to auto populate the city and state. I can
 attach
   a AjaxFormComponentUpdatingBehavior to the zip field and do this. But
 I
   don't want to update the zip model, so i plan to have my version of
   AjaxFormComponentUpdatingBehavior and 'not' update the model. I can
 possibly
   get the user entered value from the convertedInput.
  
   But I don't want to want to update the city and the state model either
 to
   auto-populate the fields.
  
   Basically I want to hold off on the model updates until somebody
 clicks the
   save button.
  
   Can i set the converted input on a component and get it to refresh
 through
   Ajax?
   I know that I can do this through javascript ($(fieldId).value =
 ''blah
   blah')and add it to AjaxTarget. But i was wondering if i can just work
 with
   components (do setConvertedInput / something) and then add it to
 Ajaxtarget
   and make it work?
  
   -- karthik --
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: Ajax Bug when using CryptedUrlWebRequestCodingStrategy ???

2007-10-24 Thread Swaroop Belur
FYI

http://www.nabble.com/Wicket-Beta4-and-Ajax-Links-tf4616750.html



On 10/24/07, marcus dickerhof [EMAIL PROTECTED] wrote:

 Sorry I forgot to send some additional infos:
 I use Wicket 1.3 Beta 4
 The code looks like this

 Radio r = new Radio(radioCompany, new Model( company.getCompanyid() ));
 r.add(new AjaxEventBehavior(onclick){

 protected void onEvent(AjaxRequestTarget target) {
final PartnerBasePage myPage = (PartnerBasePage)getPage();
 myPage.companyInfo.modelChanging();
 myPage.companyInfo.setCompany(company);
 target.addComponent(myPage.companyInfo);
 myPage.selectedPartner = company.getCompanyid();
 myPage.companyInfo.modelChanged();
 }

 });


 Thanks!
 Marcus






 2007/10/24, marcus dickerhof [EMAIL PROTECTED]:
 
  Hi, my webapp works fine as long as I do not obfuscate the urls using
  CryptedUrlWebRequestCodingStrategy.
  When I use it, Ajax will not work. For instance when I want to update a
  panel on my page,
  the Ajax Response XML will be displayed instead
 
  ?xml version=1.0 encoding=UTF-8 ?
  - ajax-response
  + component id=companyinfo38
  - ![CDATA[
  span wicket:id=companyinfo id=companyinfo38
  ...
  ]]
  /component
  /ajax-response
 
  What am I doing wrong? Is this a bug?
 
  Thanks a lot in advance
  Marcus
 



Re: Changing selection in RadioChoice

2007-10-23 Thread Swaroop Belur
have a look at  AjaxFormChoiceComponentUpdatingBehavior

-swaroop

On 10/23/07, wheleph [EMAIL PROTECTED] wrote:


 Hello everyone!

 I need to capture changing selection in RadioChoice component. Of course I
 could override wantOnSelectionChangedNotifications() and
 onSelectionChanged(java.lang.Object newSelection) methods. But in this
 case
 page reloading occurs which is not desired (because other fields get
 reset).
 I'd like to use Ajax here but simply adding AjaxFormSubmitBehavior to
 RadioChoice component doesn't work.

 Any other ideas?

 wheleph
 --
 View this message in context:
 http://www.nabble.com/Changing-selection-in-RadioChoice-tf4675928.html#a13359614
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Basic question - checkboxes

2007-10-23 Thread Swaroop Belur
Have a look at AbstractCheckBoxModel . Will give u good idea.
Override select() to do ur stuff. For example store the table
rowmodel identifier in the model to to do some stuff for that row.



On 10/23/07, Neil B. Cohen [EMAIL PROTECTED] wrote:

 Still experimenting with the framework. I've managed to load data from a
 database and display it in a table on a page. Now I'd like to add a
 column of checkboxes, and do something to the selected rows when I press
 a button on the page. Can someone point me at some documentation or
 sample code that shows the best way to do that? I think I know how to
 get the checkboxes onto the screen, but I'm not sure how to

 a) Figure out which ones are checked
 b) Access the data in the corresponding row of the table...

 I'm sure this is basic stuff - any help appreciated...

 thanks very much,

 nbc


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




Re: dummy question, how to set wicket in Deloyment mode?

2007-10-23 Thread Swaroop Belur
Put this in ur web.xml

context-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
/context-param


On 10/23/07, raybristol [EMAIL PROTECTED] wrote:


 dummy question, how to set wicket in Deloyment mode? There is a
 Application#getConfigurationType() but I expect something like
 Application#setConfigurationType() which does not exist so I thing I must
 miss something here...

 Many thanks
 --
 View this message in context:
 http://www.nabble.com/dummy-question%2C-how-to-set-wicket-in-Deloyment-mode--tf4677449.html#a13364304
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Custom rendering

2007-10-16 Thread Swaroop Belur
I think you just have to toggle the operation (url ) and model object for
label
based on user is null or not.
Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){

  public Object getObject(){

  User u = ...;
  if(u==null){

return in order to sign in please click;
  }
 else{
 return hello   u.get_name();

  }

 }
});

Similarly for link. just change the action in onClick for example

-swaroop


On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote:

 Hello,

 I was wondering if it is possible to do custom rendering in wicket.

 What i need is something like a panel in which
 - if the user is not logged in, there will be a text with in order to
 sign
 in please click Sign in and then the link and
 - if the user is logged in, the same text component would show hello
 user, please click Sign out in order to logout and then the link.

 The point is having an anchor with different text and different target
 through code - one panel, not having two very similar panels.

 I didn't manage to get this custom functionality by having a
 wicket:id=..span wicked:id=..//a.

 Thank you.



Re: HOWTO - update models in chain (push or pull)

2007-10-12 Thread Swaroop Belur
 I have a category which i can select in a tree. The category contains a
field url which points to an image. This image will be displayed on
panel2. If i click on the category howto refresh the url on panel2?

tried Something like this:

DefaultMutableTreeNode selectednode = 
Object urobject = selectednode.getUserObject()

Assume u have category id stored in this object,
Then just add the other panel to ajaxrequesttarget.
While building that panel, you can pass this id to fetch
url

-swaroop


On 10/12/07, Per Newgro [EMAIL PROTECTED] wrote:

  You have both panels using the same data, i.e. the same model or
  parent model?
 Every component has its own model. The model changes of Panel1 have to be
 reflected in model2 and Panel2 itself.
 I have a category which i can select in a tree. The category contains a
 field url which points to an image. This image will be displayed on
 panel2. If i click on the category howto refresh the url on panel2?

  As for the UI itself, then when the page is re-displayed, both panels
  will update with the new values automatically. If you're using AJAX to
  do the updating, you'd have to explicitly add both panels to the redraw
  'target' to have them refresh, but on a normal request, the whole page
  will get rewritten anyway.
 Thats the problem. With all my trys i refreshed the models, but the new
 data were not displayed. Because of this i would like to get the wicket way.

 Tanks
 Per
 --
 Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
 Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

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




Re: Model update with Link

2007-10-11 Thread Swaroop Belur
 My question is: is it normal wicket loads the page again when a link is
pressed?

- Yes - It renders the page after finishing ur onclick

 and if so, is there a way to update my model first?

Use submitlink  instead of Link if u want to show the new values

-swaroop



On 10/11/07, Mattijs Hoitink [EMAIL PROTECTED] wrote:

 hi,

 i'm just starting to use wicket and i have a question regarding updating
 a model when a link is pressed. I will explain my situation.

 I have a normal form, with a model attached to it and a button to submit
 it. There is also a link in the form who's only purpose is to enable or
 disable a field.
 The problem is, when i  press the link to disable the field, all my data
 from the other fields is lost. It seems like wicket is loading a new
 form when i presse the link, because all the old data from the model is
 presented.

 My question is: is it normal wicket loads the page again when a link is
 pressed? and if so, is there a way to update my model first?

 --
 Mattijs Hoitink
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500


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




Re: Empty ListChoice

2007-10-10 Thread Swaroop Belur
Try this:

List choices;

if(empty_condition){
  choices = new ArrayList();
}
else{
  choices = 
}

DropDownChoice d = new DropDownChoice(drop, new
PropertyModel(this,drop), choices) {

protected void onComponentTagBody(final MarkupStream
markupStream, final ComponentTag openTag)
{
  Object list =getChoices();
  if(list instanceof List){
  int size = ((List)list).size();
  if(size  0){
  super.onComponentTagBody
(markupStream,openTag);
  }
  else{
  replaceComponentTagBody(markupStream, openTag,
new AppendingStringBuffer());

  }
  }
  else{
  super.onComponentTagBody(markupStream,openTag);
  }
}

};


-swaroop


On 10/11/07, Matt Jensen [EMAIL PROTECTED] wrote:


 Is there any way to get a ListChoice to render as empty (no options)
 when its choice model is empty?  By default, Choose One appears.  If I
 set nullValid to true, an empty item appears which is still selectable.
 I would like to have the list come up completely empty if the choice
 model is empty, and I'd like to do it without creating a new component
 (though obviously I will do that if it is what is needed.)

 --Matt


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




Re: AjaxFormChoiceComponentUpdatingBehavior doesn´t get event

2007-10-09 Thread Swaroop Belur
Try putting it on the radios instead of radio group .

-swaroop



On 10/9/07, SantiagoA [EMAIL PROTECTED] wrote:


 I added an AjaxFormChoiceComponentUpdatingBehavior to my radioGroup.
 I thought it would handle the event, when a RadioButton is clicked.
 But when i click on a RadioButton the onUpdate-method is never reached.

 my Code:

final RadioGroup radioGroup = new RadioGroup(group, new
 PropertyModel(this, selectedCode));
radioGroup.add(new AjaxFormChoiceComponentUpdatingBehavior(){
private static final long serialVersionUID = -5356375735369681460L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
selectedCode = (Code)getModelObject();
target.addComponent(targetComponent);
}
});

 Is my expectation wrong?
 Am i using the wrong ajax behavior?

 I tried also with AjaxFormComponentUpdatingBehavior and AjaxEventBehavior
 but it didn´t work either.
 I´m using wicket1.3.0beta3 and ajax-updates are working on
 input-components.



 --
 View this message in context:
 http://www.nabble.com/AjaxFormChoiceComponentUpdatingBehavior-doesn%C2%B4t-get-event-tf4594788.html#a13117508
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




--


Re: popup window using wicket

2007-10-09 Thread Swaroop Belur
Normally In wicket , the data that gets shown in ui components  gets pulled
from the
models of the components.

One way of doing ur reqt:
After submitting the form containing the textfield ,just get its model value
and use that value as
a page parameter for example to render the base page again.
window.opener.location = url containing the parameter

Or just send out  javascript from ajax behavior attached to textfield


-swaroop




On 10/9/07, boyinamadhavi [EMAIL PROTECTED] wrote:


 Hi,
 please help me
 i have one popup window. That popup window contains one text field.
 how to get value from popup window to main window using apache wicket.

 thanks in advance
 madhavi
 --
 View this message in context:
 http://www.nabble.com/popup-window-using-wicket-tf4594547.html#a13116633
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Threading wicket

2007-10-04 Thread swaroop belur


If i understand correctly , I think clock example does not work for you 
because your first ajax request - to handle the files - has to first finish. 
Until that finishes the self updating behavior which is a separate ajax
request 
will not fire. So prob  you will have to do ur file stuff in a separate
thread.
But  mind u- that thread may not have references to stuff like
ur session,application objects- they might be null. So you will have to
first get
the reqd stuff (any dependecies- say something from ur service layer for
example)
and then start the thread. 

I was able to update a simple label to the current file number being handled
for 
example. For this i did the file stuff in a separate thread.


-swaroop





Ví­t Rozkovec wrote:
 
 Hallo,
 how can I force from a middle of the loop, which may run up to few 
 minutes to update a component's value?
 I am manipulating a lot of files and I would like to let the user know 
 how much of the processing is already done.
 I would like to start processing the files when user reaches certain 
 page and on this same page I want to display statistics of the process.
 As an example I tried to use a Clock from your ajax example, but I 
 cannot manage it to update during running of the loop. I thought of 
 achieving it somehow with threads, is this right direction?
 What is the correct way to do it?
 
 Thank you.
 
 Vitek
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Threading-wicket-tf4566130.html#a13034201
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: custom icons on LinkTree nodes?

2007-10-03 Thread swaroop belur


If you are referring to open/close images
Try this in ur LinkTree class impl:

protected Component newNodeComponent(String id, IModel model)
{
return new LinkIconPanel(id, model, LinkTree.this)
{
private static final long serialVersionUID = 1L;

protected void onNodeLinkClicked(TreeNode node, 
BaseTree tree,
AjaxRequestTarget target)
{
super.onNodeLinkClicked(node, tree, target);
LinkTree.this.onNodeLinkClicked(node, tree, 
target);
}

@Override
protected ResourceReference 
getResourceFolderOpen(TreeNode node) {
// return ur own resource ref impl for ur 
custom open image
// On per node basis, just use the above
node ref to do ur stuff 
}

   protected ResourceReference
getResourceFolderClosed(TreeNode node)
   {
// return ur own resource ref impl for ur 
custom close image
   }
protected ResourceReference
getResourceItemLeaf(TreeNode node)
{
// return ur own resource ref impl for ur 
custom leaf image
}
};
}


-swaroop


wfaler wrote:
 
 Hi,
 I'm using a LinkTree to display a tree-structure with links in a sidebar.
 What do I have to do to get it to display custom icons (on a per
 node-basis) in the tree?
 
 Help would be very much appreciated.
 
 / Wille
 

-- 
View this message in context: 
http://www.nabble.com/custom-icons-on-LinkTree-nodes--tf4560283.html#a13014455
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Adding a Link for a Whole ListItem

2007-10-03 Thread swaroop belur


Look up how requesttargets work in wicket. In particular
look up ListenerInterfaceRequestTarget for this use case.
It just knows how to call ur component(link for example)
in ur page object. Call will land in onLinkClicked.

-swaroop






Christopher Gardner-2 wrote:
 
 Thank you.  I got this to work.  Now I'm wondering how the
 ILinkListener gets registered to pick up the event.  Does anything
 that happens to implement that interface automatically get registered?
 
 On 10/3/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Yes, but odds are you already had to do that, to override populateItem().

 Martijn

 On 10/3/07, Christopher Gardner [EMAIL PROTECTED] wrote:
  Do you also have to subclass ListView (overriding newItem()) to create
  an object of the ListItem subclass?
 
  On 10/3/07, Maurice Marrink [EMAIL PROTECTED] wrote:
   Yes you can, The trick is to extend ListItem and have it implement
   ILinkListener you can then add the onclick behavior through an
   attributemodifier or override oncomponenttag. To prevent having to
   make a subclass per page you should make the onLinkClicked method in
   your listitem redirect to a method in your listview.
  
   I could show you our code but it is cluttered with non relevant code,
   and the above really says it all.
  
   Maurice
  
   On 10/3/07, Christopher Gardner [EMAIL PROTECTED] wrote:
With a ListView is there a way to actually create a Link component
that encompasses the whole ListItem, such that when you click
 anywhere
on a row the onClick event is fired?  I know you can do this with
 Ajax
support, but I'm curious if you can do this using the traditional
 way,
i.e., with a full page refresh.  I don't want to add a click here
button to my row.
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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


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

-- 
View this message in context: 
http://www.nabble.com/Adding-a-Link-for-a-Whole-ListItem-tf4561727.html#a13032210
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom label for number and currency formatting?

2007-10-03 Thread swaroop belur


Do this

double x= 8.3;

Label dbl = new Label(dbllbl,+x){

@Override
protected void onComponentTagBody(final MarkupStream 
markupStream, final
ComponentTag openTag)
{
Object val = 
getConverter().convert(getModelObjectAsString(),
Double.class);
final NumberFormat nf = 
NumberFormat.getCurrencyInstance();
String newval = nf.format(val);
replaceComponentTagBody(markupStream, openTag, 
newval);
}

};

If you want to vary the locale on some cond, just use the method
 getCurrencyInstance(Locale inLocale) in NumberFormat class

-swaroop


tauren wrote:
 
 Does such a thing exist?  I thought it did, but can't find it now.
 
 Basically, I want a Label that allows me to format floats/doubles as
 currency.  I don't need i18n built in (for different currencies,
 etc.), just take double x=8.3 and output $8.30.
 
 Any pointers are appreciated!  Thanks.
 
 Tauren
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Custom-label-for-number-and-currency-formatting--tf4564849.html#a13032472
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Prompting a User to Save When Leaving a Page

2007-10-02 Thread swaroop belur


Have a look at this blog
http://www.jroller.com/karthikg/entry/modelling_client_side_form_modifications#comments

Basically state of the form onload is compared to that of beforeonunload.
Just understand the concept and modify accordingly. Here the author tries to 
add a behavior to form's page in bind method of behavior. Not sure- but the
page
may be null at this point if form is not yet attched to page. Just modify
accd.

-swaroop



JulianS wrote:
 
 I'd like to know if there is a way to prompt a user to save when leaving a
 page using Wicket 1.2.6. I need to display a confirmation message only if
 the form has been dirtied. 
 
 There is a javascript-only solution 
 http://www.4guysfromrolla.com/webtech/100604-1.shtml here . It's kind of
 ugly because you have to generate custom javascript for every form. Is
 there a more elegant way with Wicket? 
 
 I know that Wicket 1.3 has the onBeforeUnload hook, but I am using 1.2.6
 and cannot upgrade at the moment.
 
 Any ideas are appreciated.
 
 

-- 
View this message in context: 
http://www.nabble.com/Prompting-a-User-to-Save-When-Leaving-a-Page-tf4549589.html#a12993136
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Onclick and ondblclick on same element

2007-10-01 Thread swaroop belur

Hi

Try this out . This may surely not be the best way to do it.
Here when u dbl click, the single click event still occurs...but i am using
a variable to detect whether dbl click event happened before or not.
In that case, i simply return after toggling back.


Click Test 

code
WebMarkupContainer click = new WebMarkupContainer(click);
click.setOutputMarkupId(true);
AjaxEventBehavior b1 = new AjaxEventBehavior(onclick){

@Override
protected void onEvent(AjaxRequestTarget target) {
if(dblclickevent){
dblclickevent = false;
return;
}
target.appendJavascript(alert('onclick 
occurred'););
dblclickevent = false;
}

};

b1.setThrottleDelay(Duration.valueOf(1000)); // Make sure
dbl click happens before onclick

click.add(b1);

AjaxEventBehavior b2 = new AjaxEventBehavior(ondblclick){

@Override
protected void onEvent(AjaxRequestTarget target) {
target.appendJavascript(alert('ondblclick 
occurred'););
dblclickevent = true;
}


};
click.add(b2);
add(click);
/code

-swaroop


Federico Fanton wrote:
 
 On Fri, 28 Sep 2007 16:43:05 +0200
 Federico Fanton [EMAIL PROTECTED] wrote:
 
 My problem is that when I double click on the row three events are fired:
 two onclick and one ondblclick.. Is this normal? Is there a way to
 isolate the last event and ignore the first two?
 
 I googled some more, and found that usually the workaround is to set a
 timeout for the onclick function, so that if ondblclick gets fired before
 the timeout, it cancels the onclick and goes on about its business.. Is
 there a Wicket behavior that works this way, perhaps? ^__^; I could extend
 AbstractAjaxTimerBehavior maybe..
 
 Many thanks for your time!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Onclick-and-ondblclick-on-same-element-tf4534962.html#a12975648
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: retrieve a text file's content from C drive and display in table listing

2007-09-27 Thread Swaroop Belur
Hi

If u see the interface IDataProvider , it is my no means explicitly
coupled to the database. Basically all it expects u to do is implement
it in such a way so it that what is the result for the current page
and what kind of model you want to store the data in session .
i.e in model(Object) method .

So basically just implement ur own logic to get the result, if u r
paginating,
for that page as u wud do with database query.

Size - just the number of files in directory.

model - some object so that u can get back the details for the file e.g for
a.txt
...Typically one would store a primary key as a field in ur custom
detachable model.
You can store filename here..so that u can re create the row details.

class myobject {

String filename;
String title;
String ipaddress;
String user;

// get  methods
// set methods
}


class mymodel extends loadabledetachablemodel{

String filename;

mymodel(){
  super(myobject);
  this.filename = myibject.filename;
}
object load(){
//   build ur  myobject here
}


}


On 9/26/07, kenixwong [EMAIL PROTECTED] wrote:


 hi, anybody have the idea...

 my problem here is i want to retrieve few .txt file from one directory.
 And
 all the content i store in the arraylist in order to display in table
 structure.

 The transitional way, once u retrieve the content, normally we will insert
 into database and then retrieve from database for displaying in html.

 right now i wish to skip for insert into database. Mean once my program
 scan
 the directory to get the .txt file's content and then direct display it as
 table view. is taht possible to do in such way ?


 for example:
 txt content

 a.txt
 -
 title = abc
 Ipaddress = 192.122.0.331
 user = alex


 b.txt
 -
 title = 123
 Ipaddress = 192.122.0.3313
 user = mary

 a.txt
 -
 title = fgd
 Ipaddress = 192.122.0.344
 user = kent


 table view (html)

 filename | title  | Ipaddress| user
 ---
 a.txt | abc  | 192.122.0.331 | alex
 b.txt | 123  | 192.122.0.333 | mary
 c.txt | fgd   | 192.122.0.344 | kent





 --
 View this message in context:
 http://www.nabble.com/retrieve-a-text-file%27s-content-from-C-drive-and-display-in-table-listing-tf4521905.html#a12899446
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Formless DropDownChoice selected value is null

2007-09-23 Thread Swaroop Belur
You should use ajaxformcomponentupdatingbehavior instead of
AjaxEventBehavior . I think AjaxEventBehavior just triggers the server
side call and does not update model

-swaroop


On 9/23/07, bebetu [EMAIL PROTECTED] wrote:


 Hi,
 I have a DropDownChoice in a WizardStep component (Wicket 1.3 beta 3) and
 I
 want to read the selected value then update a text label based on
 selection
 as well as disable the Next button if the user hasn't made a selection.
 First of all I cannot get the selected value when I run the code below,
 the
 selectedChoice variable is always null.
 Secondly, how to ajaxify the Next wizard button based on the selection?
 What am I doing wrong?

 final ValueMap choiceMap = new ValueMap();
 final PropertyModel ddcModel = new PropertyModel(choiceMap,
 selectedOption);
 final DropDownChoice ddChoice = new DropDownChoice(choiceId, ddcModel,
 someOptionList);
 ddChoice.add(new AjaxEventBehavior(onchange) {
@Override
protected void onEvent(AjaxRequestTarget target) {
   Object selectedChoice =
 choiceMap.get(selectedOption);

}
 });

 Thanks!
 florin





Re: LinkTree lazy loading possible?

2007-09-21 Thread swaroop belur


Initially when building the tree , just add a single child node to each 
first level of nodes u show
You can mark this node as a indicator node or a busy node - this will
allow the + sign to come
up for the actual node. When u click on the + sign , representing the actual
node , just
remove the busy/ indicator node after all the actual children have been
added ...(also just check if the indicator  node is the only child - this
way u will avoid another database hit for the second open click
for the same node.)





pixotec wrote:
 
 I want to use LinkTree to represent a very very large hierarchy (the
 loading of the whole thing is expensive...).
 Is there an AJAX way of loading the children of a node just when clicking
 on the plus-icon for expanding?
 
 

-- 
View this message in context: 
http://www.nabble.com/LinkTree-lazy-loading-possible--tf4493231.html#a12814930
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Page expiration

2007-09-20 Thread Swaroop Belur
We are facing the same problem here - but its only with jetty and not with
tomcat.
After a re login everything seems to work fine. Its only the first time.
(i guess the resource was loaded the next time.) The problem
however does not occur with tomcat.

-swaroop

On 9/20/07, Holda, Dariusz [EMAIL PROTECTED] wrote:


 I don't have but from time to time I'm getting this error:
 ERROR
 Unable to render resource stream
 jar:file:/vendor/Wicket_ext/1.2.6/wicket-extensions-1.2.6.jar!/wicket/ex
 tensions/markup/html/datepicker/style/aqua/menuarrow.gifwicket.WicketRun
 timeException: Unable to render resource stream
 jar:file:/vendor/Wicket_ext/1.2.6/wicket-extensions-1.2.6.jar!/wicket/ex
 tensions/markup/html/datepicker/style/aqua/menuarrow.gif 

 Could this be the cause of the problem?

 Thx,
 Dariusz

 -Original Message-
 From: Dipu Seminlal [mailto:[EMAIL PROTECTED]
 Sent: 20 September 2007 13:03
 To: users@wicket.apache.org
 Subject: Re: Page expiration

 Hi,

 Can you please check if you have any img tags in your html with empty
 src
 attributes ?

 Regards
 Dipu

 On 9/20/07, Holda, Dariusz [EMAIL PROTECTED] wrote:
 
 
  Hi,
  I've came across a strange behaviour. I'm running Wicket app on Jetty
  server and most of the times it's working fine but from time to time
 I'm
  getting Page expired message even if user is actively using the app.
  Unfortunately it's not happening on the same events. Sometimes it's
  after pressing 'Save' after choosing a date in DatePicker, sometimes
  it's happening after clicking on a different tab after editing a
  textfield.
  Anyone has an idea what may be the cause of this problem?
  I'm using wicket-1.2.6 and each of the editable fields has an Ajax
  behaviour.
 
  Thx,
  Dariusz
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - -
  - - - - - - -
 
  This message is intended only for the personal and confidential use of
 the
  designated recipient(s) named above.  If you are not the intended
 recipient
  of this message you are hereby notified that any review,
 dissemination,
  distribution or copying of this message is strictly prohibited.  This
  communication is for information purposes only and should not be
 regarded as
  an offer to sell or as a solicitation of an offer to buy any financial
  product, an official confirmation of any transaction, or as an
 official
  statement of Lehman Brothers.  Email transmission cannot be guaranteed
 to be
  secure or error-free.  Therefore, we do not represent that this
 information
  is complete or accurate and it should not be relied upon as such.  All
  information is subject to change without notice.
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - - - - - - -

 This message is intended only for the personal and confidential use of the
 designated recipient(s) named above.  If you are not the intended recipient
 of this message you are hereby notified that any review, dissemination,
 distribution or copying of this message is strictly prohibited.  This
 communication is for information purposes only and should not be regarded as
 an offer to sell or as a solicitation of an offer to buy any financial
 product, an official confirmation of any transaction, or as an official
 statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
 secure or error-free.  Therefore, we do not represent that this information
 is complete or accurate and it should not be relied upon as such.  All
 information is subject to change without notice.




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




Requests being dispatched in an infinite loop

2007-09-10 Thread swaroop belur

Hi all

Wicket version 1.2.4

I have this piece of code which is apparently causing wicket to send the
requests in an infinite loop


code

This code is present in a class called EditConfig. When I click on the link
basically 
all it does is to refresh the page by creating a new instance of page.


 new Link(refresh) {

@Override
public void onClick() {
setResponsePage(EditConfig.class);
}

}
/code

Apparently setResponsePage(EditConfig.class) causes the request target to be
a bookmarkable one
and the setting on respond method is to redirect the browser to the url
generated by the target-
which then again causes the event  method to be processed - i.e in this case
page object to be created
again 

Why would wicket want to  keep redirecting . If after the page object has
been created , i thought it would render the page as is.

Am i missing something over here?

thanks
swaroop belur
-- 
View this message in context: 
http://www.nabble.com/Requests-being-dispatched-in-an-infinite-loop-tf4420388.html#a12608388
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: best practice for a header component with links defined by the page

2007-09-02 Thread Swaroop Belur
 Recently I had to go back to doing a couple of Swing screens and all
those inner classes and model objects were a breeze...

+1

I have done a lot of swing coding before and for the past 6 months in
wicket. I can definitely say this-
Although  wicket has a lot of swing like programming style in it, wicket is
SO MUCH more easier
to work with .It just hit me yesterday when i was again writing a couple of
swing classes... Wicket has def improved the way I write Object oriented
code.

-swaroop


Re: How to integrate wicket frame work with spring

2007-08-30 Thread Swaroop Belur
  property name=contactDao ref=contactDao/

Have u defined contactDao in your xml file
Basically there should be a definition in your xml  file corresponding to
contactDao i.e contactDao should point to a class in ur classpath

-swaroop belur


Re: tabbedpanel and bookmarkable links

2007-08-27 Thread Swaroop Belur
Oops a typo


 .In that link you will have to override newUrl method to return what u
want.

Read as

.In that link you will have to override getURLmethod to return what u want.

-swaroop

On 8/28/07, Swaroop Belur [EMAIL PROTECTED] wrote:


 Link i think calls  getUrl method to get its url to invoke.
 So probabley you will have to override newLink method in tab panel
 to return ur custom link component .In that link you will have to override

 newUrl method to return what u want.

 -swaroop





 On 8/28/07, wired [EMAIL PROTECTED] wrote:
 
 
  (version 1.2.6)
 
  Does anyone have any quick workaround to making the link in each tab of
  a
  TabbedPanel bookmarkable?
 
  Many thanks.
  --
  View this message in context:
  http://www.nabble.com/tabbedpanel-and-bookmarkable-links-tf4337745.html#a12355907
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --




-- 

Regards
Swaroop Belur
http://sbelur.wordpress.com/
http://jdec.sourceforge.net/


Re: wicket vs tapestry ?

2007-08-22 Thread Swaroop Belur
Hi

I have been using wicket for quite some time now. Prior to this I worked
on  tapestry for a short time . (In fact i  implemented the same pages
which i did in tapestry in wicket also)

I may not be able to give you the right answer but i can definitely say this

the learning curve in tapestry is quite high . Wicket is very easy to learn
and especially easy to write ur own components

But there is one important point i want to share. Whenever u choose a
framework, it is
very important to check how good the support is in the forums. That is
biggest difference
for me. Because even if framework is good, u r bound to run into issues.
Just check out the wicket forum. The response time for a question is very
less.
Sometimes u will have  more than one response. Thats makes a very BIG
difference - atleast for me



-swaroop


Expanding a tree node conditionally

2007-08-22 Thread swaroop belur

Hi all

I am using  wicket.markup.html.tree.Tree of wicket version 1.2.4 to build my
tree.
I basically would like to run thru the nodes and if the value of node
statisifes a condition,
I would like to expand that node.

I am not sure which method will work for me. Also i am aware of the children
of those nodes
which need to be conditionally expanded.  

Any suggestions

-swaroop belur
-- 
View this message in context: 
http://www.nabble.com/Expanding-a-tree-node-conditionally-tf4311813.html#a12275348
Sent from the Wicket - User mailing list archive at Nabble.com.


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