Re: Clearing Cache after Logout

2008-12-04 Thread vishy_sb

Thanks for the reply there Nino. I have set up a custom expired page and have
set the following in Application class 
getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);

Now the page expired is set to this page. But still on hitting the back
button I get back to the page. I tried  using the
SimplePageAuthorizationStrategy in my Application.init() method. The code
that put in there looks something like this

SimplePageAuthorizationStrategy authorizationStrategy = new
SimplePageAuthorizationStrategy(
LimitManagerPage.class, PageExpired.class)
{
protected boolean isAuthorized() {
// Authorize access based on user 
authentication in the session
if(((WebSession) 
Session.get()).isSessionInvalidated()){
return false;
} else {
return true;
}
}
};
 
getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);

But this doesn't provide the desired result as well. This doesn't even show
my custom PageExpired web page. Any ideas about why this is not working or
something else that I can do to get this to work.

Thanks in advance,
vishy


-- 
View this message in context: 
http://www.nabble.com/Clearing-Cache-after-Logout-tp20823965p20837005.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Clearing Cache after Logout

2008-12-03 Thread vishy_sb

Hi all,

I have a logout link that takes me to the login (Home) page. However when I
click the back button it brings me back  to the same page that I was on
(Although I am not able to do anything on this page as whenever I press some
button I get the error Page Expired) A better option would be to display
the Log in page itself even if the back button is pressed.  I am trying to
clear the cache so that the back button becomes disabled whenever the log
out button is pressed. The code for my logout button is below:

Link logout = new Link(logout){
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
session.invalidate();   

getRequestCycle().setRedirect(true);
setResponsePage(Index.class);
}
};

Any ideas how this could be resolved.

Thanks in advance,
vishy
-- 
View this message in context: 
http://www.nabble.com/Clearing-Cache-after-Logout-tp20823965p20823965.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Validation Question

2008-11-20 Thread vishy_sb

Works like a charm 

Thanks a lot

Cheers,
vishy

jWeekend wrote:
 
 Vishy,
 
 Add
 
 IConverter=Invalid Input
 
 to a properties file in, for example,  MyApplication.properties for your
 whole application or in MyPage.properties if you want this custom message
 on a particular page only ... etc, in the same package as the class with
 the same name.
 
 Regards - Cemal
  http://www.jWeekend.co.uk http://jWeekend.co.uk 
 
 
 vishy_sb wrote:
 
 Hi all,
 
 I am trying to get some validations to work using the FeedbackPanel. My
 form has a Textfield and I am trying to use a NumberValidator to check if
 it is in a given range. The code that I have used is :
 
 TextField pgLongLimit = new TextField(pgLongLimit, new PropertyModel(
  pglimit, longLimit));
  pgLongLimit.setRequired(false);
  pgLongLimit.setLabel(new Model(Long Limit));
  validator.addNumberRange(pgLongLimit, 0, 
 Integer.MAX_VALUE);
 
 My classname.properties file looks has following code:
 NumberValidator.range = ${label} should have a  positive integer value
 
 
 Now whenever I put in a negative input I get the correct error i.e Long
 Limit should have a  positive integer value.
 
 However if I put in a char value as an input (say 'a') then the error is
 a is not a valid int. I want to change this error to something like
 Invalid input. 
 
 Any ideas about how I can do that. I don't know which resource key I
 would have to use here.
 
 Thanks,
 vishy
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Validation-Question-tp20590141p20603101.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Check a checkbox when focus on a textbox

2008-11-20 Thread vishy_sb

Hi all, 

I have a textbox and a checkbox in a form on my web page. I would like to
automatically check the checkbox when the user starts to type something in
the textbox. I believe this can be done by using some javascript. I did some
research over the web and was able to find some code which is shown below.
However I was not able to get it to work.

HTML code:
input name=containText TYPE=text size = 32
onfocus=checker('contain') /
input type = checkbox name = contain /

Javascript code:
function checker(checkbox) {
var checkBox=document.form.contain; 
checkBox.checked = true;

}


Any help will be greatly appreciated.

Thanks a lot
Cheers,
vishy
-- 
View this message in context: 
http://www.nabble.com/Check-a-checkbox-when-focus-on-a-textbox-tp20603583p20603583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Validation Question

2008-11-19 Thread vishy_sb

Hi all,

I am trying to get some validations to work using the FeedbackPanel. My form
has a Textfield and I am trying to use a NumberValidator to check if it is
in a given range. The code that I have used is :

TextField pgLongLimit = new TextField(pgLongLimit, new PropertyModel(
pglimit, longLimit));
pgLongLimit.setRequired(false);
pgLongLimit.setLabel(new Model(Long Limit));
validator.addNumberRange(pgLongLimit, 0, 
Integer.MAX_VALUE);

My classname.properties file looks has following code:
NumberValidator.range = ${label} should have a  positive integer value


Now whenever I put in a negative input I get the correct error i.e Long
Limit should have a  positive integer value.

However if I put in a char value as an input (say 'a') then the error is a
is not a valid int. I want to change this error to something like Invalid
input. 

Any ideas about how I can do that. I don't know which resource key I would
have to use here.

Thanks,
vishy
-- 
View this message in context: 
http://www.nabble.com/Validation-Question-tp20590141p20590141.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Setting a button press on hitting the enter key from the keyboard

2008-11-13 Thread vishy_sb

I have a form inside a modal window. The form has a textfield field and a
button in it. I want to set the focus on the button when I enter something
in the textfield. I tried adding the following behaviour to the textfield
but it is not working. 

textfield.add(new AbstractBehavior(){

private static final long serialVersionUID = 1L;
   
@Override
public void onComponentTag(Component component, ComponentTag 
tag) {
tag.put(onkeydown,
if(event.keyCode==13){searchButton.click();return false;});
}
}); 

Also can someone suggest a way to hook up the button in the form with the
Enter key on the keyboard so that whenever I input something in the
textfield and hit the enter key the onClick() or onSubmit() event of the
button gets fired???
 
Any help will be greatly appreciated.

Thanks,
vishy
-- 
View this message in context: 
http://www.nabble.com/Setting-a-button-press-on-hitting-the-enter-key-from-the-keyboard-tp20488048p20488048.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Setting a button press on hitting the enter key from the keyboard

2008-11-13 Thread vishy_sb

Thanks for the reply Nino.

I was able to get it to work using the thread at
http://www.nabble.com/IE7-ignores-AjaxButton-onSubmit-when-I-use-the-keyboard-enter-key-td20234862.html#a20236544

Thanks for the help though,
vishy


Nino.Martinez wrote:
 
 Checkout the wicket input events project..:
 
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-stuff-contrib-input-events
 
 vishy_sb wrote:
 I have a form inside a modal window. The form has a textfield field and a
 button in it. I want to set the focus on the button when I enter
 something
 in the textfield. I tried adding the following behaviour to the textfield
 but it is not working. 

 textfield.add(new AbstractBehavior(){

  private static final long serialVersionUID = 1L;
 
  @Override
  public void onComponentTag(Component component, ComponentTag
 tag) {
  tag.put(onkeydown,
 if(event.keyCode==13){searchButton.click();return false;});
  }
  }); 

 Also can someone suggest a way to hook up the button in the form with the
 Enter key on the keyboard so that whenever I input something in the
 textfield and hit the enter key the onClick() or onSubmit() event of the
 button gets fired???
  
 Any help will be greatly appreciated.

 Thanks,
 vishy
   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Setting-a-button-press-on-hitting-the-enter-key-from-the-keyboard-tp20488048p20489286.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Disabling a TreeNode

2008-08-20 Thread vishy_sb

Hi all, 

I have a tree component on my page and each tree node has a check box and a
label. I am trying to disable the nodes that have been selected using the
checkbox. The event is fired by pressing a button. Any ideas about how this
could be done???

Thanks in advance,
vishy
-- 
View this message in context: 
http://www.nabble.com/Disabling-a-TreeNode-tp19075514p19075514.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Modal Window not displayed

2008-08-06 Thread vishy_sb

Hi All,

Kindly refer to the picture to see the page that I have.. the page has 2
panels. One has the Limit Editor and the other has the tree. Now when I hit
the apply button a confirmation window should come up as shown in the
picture below. 

http://www.nabble.com/file/p18856011/Modal_showing_up.jpeg 

However when I have the tree nodes expanded and then I press the apply
button the Modal window doesn't show up (Refer to the Image below) and when
I again collapse the nodes it again starts showing up. I don't understand
why this is happening. 

http://www.nabble.com/file/p18856011/Modal_not_showing_up.jpeg 

Has any one else faced this before. Kindly let me know if you have any ideas
what I should do. May be I am making a very basic mistake.


Thanks in advance,
vishy
-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-displayed-tp18856011p18856011.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal Window not displayed

2008-08-06 Thread vishy_sb

Anybody out there know anything about this.



vishy_sb wrote:
 
 Hi All,
 
 Kindly refer to the picture to see the page that I have.. the page has 2
 panels. One has the Limit Editor and the other has the tree. Now when I
 hit the apply button a confirmation window should come up as shown in the
 picture below. 
 
  http://www.nabble.com/file/p18856011/Modal_showing_up.jpeg 
 
 However when I have the tree nodes expanded and then I press the apply
 button the Modal window doesn't show up (Refer to the Image below) and
 when I again collapse the nodes it again starts showing up. I don't
 understand why this is happening. 
 
  http://www.nabble.com/file/p18856011/Modal_not_showing_up.jpeg 
 
 Has any one else faced this before. Kindly let me know if you have any
 ideas what I should do. May be I am making a very basic mistake.
 
 
 Thanks in advance,
 vishy
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-displayed-tp18856011p18858938.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Dynamically Making changes to Tree Node

2008-08-06 Thread vishy_sb

Hey Matej,

I have been able to implement the tree with the solution that you provided
and I am using the separate panels for each node. However I have a new error
that has come up. Can you please look at this thread whenever you have some
time that I have posted here:

http://www.nabble.com/Modal-Window-not-displayed-td18856011.html 

Thanks,
vishy



Matej Knopp-2 wrote:
 
 You have to use different panel for each Tree item (depending on the
 tree node for that item). If you use BaseTree, implement the
 #newNodeComponent method accordingly. You can look at LinkTree or
 LabelTree for an example of how the implementation can look like.
 
 Or you can use LinkTree, override newNodeComponent like this
 
   @Override
   protected Component newNodeComponent(String id, IModel model)
   {
   return new LinkIconPanel(id, model, LinkTree.this)
   {
   private static final long serialVersionUID = 1L;
 
   @Override
   protected void onNodeLinkClicked(Object node, BaseTree 
 tree,
 AjaxRequestTarget target)
   {
   super.onNodeLinkClicked(node, tree, target);
   LinkTree.this.onNodeLinkClicked(node, tree, 
 target);
   }
 
   @Override
   protected Component newContentComponent(String 
 componentId,
 BaseTree tree, IModel model)
   {
   /* HERE CREATE YOUR OWN PANEL DEPENDING ON THE 
 TREE NODE. YOU CAN GET
THE TREE NODE FOR THIS ROW FROM
 model.getObject() */
   }
   };
   }
 
 
 -Matej
 
 On Fri, Aug 1, 2008 at 1:29 AM, vishy_sb [EMAIL PROTECTED]
 wrote:

 http://www.nabble.com/file/p18765641/treeview.jpeg

 Hi All,

 As shown in the Image I have a checkbox tree which has nodes that have
 different components. Each node of the tree has a checkbox, label, a
 panel
 which has the 3 TextAreas and another panel which has a listview. In
 order
 to get the tree to look like what is shown in the image, I had to set the
 visibility of these components across different levels of the Tree which
 means that all these components are present at all the nodes but they are
 not visible everywhere. Also on top of the tree is another panel(Top
 Panel)
 from where values are submitted on pressing the apply button. Now what I
 wanted to achieve in this interface was to apply the limits entered in
 the
 Top Panel to the nodes which are checked (i.e. to the ListView under the
 checked node). This seems to be a real complex interface to me but there
 has
 to be a way to get this to work. The main problem that I am having is
 that
 how do I get to the ListView (or ListViews) to which I am trying to make
 the
 changes. I might be sounding a little confusing here but I am ready to
 explain the whole interface in even more detail.

 Please let me know if anyone has any ideas or even a suggestion to
 implement
 this.

 Also is there a way to add different components to the different nodes in
 the same Tree??


 Kindly let me.

 Thanks in advance,
 vishy
 --
 View this message in context:
 http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18765641.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18859160.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Dynamically Making changes to Tree Node

2008-08-04 Thread vishy_sb

Hi there, 

Well it seems that the tree is not working again...
Here is the code: 
Inside the Tree I am overriding the newNodeComponentMethod() like this:

//Java Code

@Override
protected Component newNodeComponent(String id, IModel model) {
Component nodeComp = null;
int level = ((DefaultMutableTreeNode) 
model.getObject()).getLevel();
if (level == 1) {

nodeComp = new ExchangeNodePanel(id, model,
LimitViewerCheckBoxTree.this);


}
if (level == 2) {

nodeComp = new LimitViewerCheckBoxIconPanel(id, model,
LimitViewerCheckBoxTree.this, 
this.limitViewerForm) {
private static final long serialVersionUID = 1L;

protected void onNodeCheckUpdated(TreeNode node,
LimitViewerCheckBoxTree tree, 
AjaxRequestTarget target) {
super.onNodeCheckUpdated(node, tree, 
target);

LimitViewerCheckBoxTree.this.onNodeCheckUpdated(node, tree,
target);
}
};
}
if (level == 3) {
try {
nodeComp = new InstrumentLimitViewerPanel(id, 
this.limitViewerForm);
} catch (Exception e) {
e.printStackTrace();
}
}
return nodeComp;
}

and then then the ExchangeNodePanel code is given below:


//Java code
public class ExchangeNodePanel extends LabelIconPanel {

private static Logger logger =
Logger.getLogger(ExchangeNodePanel.class.getName());

public ExchangeNodePanel(String id, IModel model,LimitViewerCheckBoxTree
tree) {
super(id, model, tree);

}

@Override
protected Component newContentComponent(String componentId, 
BaseTree tree, IModel model){
{

return new Label(exchangeName);

};
}

However the value of the label is not displayed and it is always empty. But
when I define the ExchangeNodePanel class as shown below it works:

public class ExchangeNodePanel extends LabelIconPanel {

private static Logger logger =
Logger.getLogger(ExchangeNodePanel.class.getName());

public ExchangeNodePanel(String id, IModel model,LimitViewerCheckBoxTree
tree) {
super(id, model, tree);

}
protected void addComponents(final IModel model, final BaseTree tree) {
Component exchangeName = newContentComponent(exchangeName, tree, 
model);
add(exchangeName);
}
}

Any idea why this is happening.

Thanks in advance,
vishy
-- 
View this message in context: 
http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18814983.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Dynamically Making changes to Tree Node

2008-08-02 Thread vishy_sb

Thanks for that man... well I was able to get something to work from
that.however I will give a full throttle try tomorrow...will be heading
towards the forums again incase i get any problems

vishy


Korbinian Bachl - privat wrote:
 
 He is a core dev - just listen to him :P
 
 ok, simple treeNode would be:
 
 wicket:panel
   IM A NODE
   div wicket:id=content-/div
 /wicket:pane
 
 and Java:
 
 class TreeNode extends Panel {
 
   public TreeNode(String id, AnyOtherPossibleThingsYouNeed o) {
   
   if(IWantADeeperNodeFromHere) {
   add(new TreeNode(content));
   }
   else {
   add(TheContenYouWantPanel(content));
   }
   }
 
 }
 
 
 as long as your IWantDeeperNodeFromHere is true you get a tree based 
 upon this:
 
 IM A NODE
 div
   IM A NODE
   div
   IM A NODE
   div
  TheContentYouWant
   /div
   /div
 /div
 
 (case of 3 Nodes you get 3 stacked divs - place whatever you like; 
 Wicket is all about OO so inheriting itself and recursive calls are no 
 problem at all.
 
 Best,
 
 Korbinian
 
 vishy_sb schrieb:
 I am sorry that I have been really bothering you here but I just need to
 get
 this working asap.
 
 so from your reply are you suggesting that I should have a tree structure
 like this:
 
 Panel1
  --Panel2
  --Panel3
 
 with an HTML markup like:
 
 body
  wicket-panel
  div wicket:id=tree/div
 /wicket-panel
 /body
 
 But when I am going to add the components to the tree, don't you think it
 would look for the those panels in the mark up. So how do I put the
 panels
 in the mark up??? Will something like this work:
 
 body
  wicket-panel
  div wicket:id=tree/div
  div wicket:id=Panel1/div
  
  div wicket:id=Panel2/div
 
  div wicket:id=Panel3/div
 /wicket-panel
 /body
 
 
 vishy
 
 
 
 Matej Knopp-2 wrote:
 You need to use panels. Every panel can have different markup. So you
 will have a panel for every node type.

 -Matej

 On Fri, Aug 1, 2008 at 11:03 PM, vishy_sb [EMAIL PROTECTED]
 wrote:
 Any ideas about how to get this working



 vishy_sb wrote:
 Thanks for the quick reply Matej.

 Well in my implementation I am using a CheckBoxTree example discussed
 in
 the forum already
 (http://www.nabble.com/Checkbox-tree-component-td13433102.html#a13439520).
 and I am adding all the components in the addcomponents() method in
 the
 CheckBoxIconPanel class. However since the HTML mark up that I can
 have
 will always remain the same so I am not able to use different
 component
 for different nodes. The code is shown below:

 Java Code for the CheckBoxIconPanel class
 protected void addComponents(final IModel model, final BaseTree tree)
 {
   final LimitViewerCheckBoxTree cbTree =
 (LimitViewerCheckBoxTree) tree;
   LimitViewerCheckBoxTree.ICheckCallback callback = new
 LimitViewerCheckBoxTree.ICheckCallback() {
   private static final long serialVersionUID = 1L;

   public void onUpdate(AjaxRequestTarget target) {
   onNodeCheckUpdated((TreeNode)
 model.getObject(), cbTree, target);
   }
   };

   IModel dataModel = cbTree.newCheckBoxModel((TreeNode)
 model.getObject());
   int level = (Integer)
 ((DefaultMutableTreeNode)model.getObject()).getLevel();

   if(level == 1){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,
 limitInputPanel
 ,limitViewerForm);
   add(instrumentLimitViewerPanel);
   instrumentLimitViewerPanel.setVisible(false);

   }
   if(level == 2){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);

   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel

Re: Add different component for treenode

2008-08-02 Thread vishy_sb

Nevermind I was able to get it to work

vishy

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 with newNodeComponent in the BaseTree class i can specify a different
 component for my treenode, but this is the same for all node. Is it
 possible
 setting different treenode component for added a different type of node in
 my tree?
 
 something like this:
 
 protected Component newNodeComponent(String id, IModel model)
 {
 if( node type a)
return new component_a(id, model, tree);
else if
return new component_b(id, model, tree);
else
return new component_c(id, model, tree);
 }
 
 is it possible?
 
 thk
 
 

-- 
View this message in context: 
http://www.nabble.com/Add-different-component-for-treenode-tp16332161p18786985.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Refreshing a form inside a Modal Window

2008-08-02 Thread vishy_sb

Can you point me to an example or explain a little more about this

Thanks 
Vishy

Martijn Dashorst wrote:
 
 iirc using a page instead of a panel works better and has less
 bugs/quirks.
 
 Martijn
 
 On Fri, Aug 1, 2008 at 10:22 AM, steviezz [EMAIL PROTECTED]
 wrote:

 As you can see from some of my own topics, I'm no Wicket expert.

 I did have the same problem, and solved it by simply setting the content
 for
 the ModalWindow panel inside the onClick of the AjaxLink that triggers
 it.
 So, each time you invoke the ModalWindow, it has new content.

 Something like:

add(new AjaxLink(showModal) {
public void onClick(AjaxRequestTarget target) {

// set or reset modal content here
modal.setContent(new
 ModalPanel(modal.getContentId()));

modal.show(target);
}
});

 Of course, there may be a better way.

 Steve



 vishy_sb wrote:

 The Modal Window contains a Panel. The picture shows how the window
 looks
 like when I try to search some thing the results are populated in the
 List
 as shown. All the rows which are selected will be added to another list
 on
 the main page when the apply button is pressed.

  http://www.nabble.com/file/p18766249/modalwindow.jpeg

 Now if I want to try to perform another search the Modal window still
 shows the previous list.

 /// Java code for onSubmit() for the apply button (AjaxFallBackButton) 
 is
 shown below

 applyButton = new AjaxFallbackButton(applyButton, form) {


   @Override
   protected void onSubmit(AjaxRequestTarget target,
 Form fom) {
   for(int i = 0; iaccountLimitList.size();
 i++){
   ClearingAccountLimit accLimit =
 (ClearingAccountLimit)accountLimitList.get(i);
   if(accLimit.isActive()){
  
 selectedInstruments.add(accLimit);

   }

   }
   onCancel(target);
   }

   };
   form.add(applyButton);

 Let me know if you need some more info.

 Thanks in advance
 vishy


 Matej Knopp-2 wrote:

 You need to show some code.

 -Matej

 On Fri, Aug 1, 2008 at 1:33 AM, vishy_sb [EMAIL PROTECTED]
 wrote:

 Is there anyone who has any clue about how this has to be
 done???




 vishy_sb wrote:

 Hi all,

 I have Modal Window which contains a panel. Inside the panel I am
 trying
 to perform a search and the results of the search are populating
 inside
 a
 ListView. There is an apply button which applies the list on the main
 page
 and closes the modal window. However when I want to do another search
 and
 bring up the Modal window the previous List is still present in it. I
 think that when the Modal window is closed it just becomes invisible
 and
 is not closing actually and thats why this is happening. But I was
 just
 wondering if there is a way so as to refresh the (search)form or the
 panel
 whenever it is loaded inside the Modal window.

 Any kind of help will be appreciated.

 Thanks,
 vishy


 --
 View this message in context:
 http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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






 --
 View this message in context:
 http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18770147.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18786997.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: CheckBox handling with Ajax.

2008-08-02 Thread vishy_sb

Yes the code that you are putting in is for an onUpdate() method which means
that whenever the state of the checkbox gets changed only then the code will
be executed. So if you check it, something should happen and when you
uncheck it then again something should happen.

Also did u try to use the setOutputMarkupPlaceholdertag to true. I had a
similar issue like you and I was able to get it to work with that.

Vishy

vishy_sb wrote:
 
 Well you need to put the component (say component) which you want to make
 invisible into target and then set
 component.setOutputMarkupPlaceholderTag(true).
 
 Let me know if that works. 
 
 vishy
  
 
 rit wrote:
 
 I have strange situation while handling Ajax on check box.
 
 I have a scenario , On click of check box i need to hide one component
 and on uncheck i need to show the component back . when i select the
 check box my Ajax fires and component hide , but when i unselect the
 check box , my ajax doesn't fires . 
 
 Please help me . 
 
 my code is :
 
 Object obj = this.get(e_joint_cover);
  if (obj instanceof MCheckbox) {
  final MCheckbox eJointCover = 
 (MCheckbox)obj;
  eJointCover.add(new 
 AjaxFormComponentUpdatingBehavior(onclick) {
  private static final long 
 serialVersionUID = 1L;
  protected void 
 onUpdate(AjaxRequestTarget target) { 
 
 if (jointCoverValue.equalsIgnoreCase(false)){  
 
  
 //ServiceUtility.setPanelVisible(component, true);
  
 LpiComponent.setVisible(true);
  }else{
  
 //ServiceUtility.setPanelVisible(component, false);
  
 LpiComponent.setVisible(false);
  }   
  
 target.addComponent(container.get(lpi_insured_two_details_comp));
 
 
 }
  }); 
  }
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/CheckBox-handling-with-Ajax.-tp18781515p18790177.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Refreshing a form inside a Modal Window

2008-08-01 Thread vishy_sb

You mean to say that inside a modal window I should be using a Page instead
of a panel 

Also can you point me an example or a thread where that is being discussed.

Thanks,
vishy 



Martijn Dashorst wrote:
 
 iirc using a page instead of a panel works better and has less
 bugs/quirks.
 
 Martijn
 
 On Fri, Aug 1, 2008 at 10:22 AM, steviezz [EMAIL PROTECTED]
 wrote:

 As you can see from some of my own topics, I'm no Wicket expert.

 I did have the same problem, and solved it by simply setting the content
 for
 the ModalWindow panel inside the onClick of the AjaxLink that triggers
 it.
 So, each time you invoke the ModalWindow, it has new content.

 Something like:

add(new AjaxLink(showModal) {
public void onClick(AjaxRequestTarget target) {

// set or reset modal content here
modal.setContent(new
 ModalPanel(modal.getContentId()));

modal.show(target);
}
});

 Of course, there may be a better way.

 Steve



 vishy_sb wrote:

 The Modal Window contains a Panel. The picture shows how the window
 looks
 like when I try to search some thing the results are populated in the
 List
 as shown. All the rows which are selected will be added to another list
 on
 the main page when the apply button is pressed.

  http://www.nabble.com/file/p18766249/modalwindow.jpeg

 Now if I want to try to perform another search the Modal window still
 shows the previous list.

 /// Java code for onSubmit() for the apply button (AjaxFallBackButton) 
 is
 shown below

 applyButton = new AjaxFallbackButton(applyButton, form) {


   @Override
   protected void onSubmit(AjaxRequestTarget target,
 Form fom) {
   for(int i = 0; iaccountLimitList.size();
 i++){
   ClearingAccountLimit accLimit =
 (ClearingAccountLimit)accountLimitList.get(i);
   if(accLimit.isActive()){
  
 selectedInstruments.add(accLimit);

   }

   }
   onCancel(target);
   }

   };
   form.add(applyButton);

 Let me know if you need some more info.

 Thanks in advance
 vishy


 Matej Knopp-2 wrote:

 You need to show some code.

 -Matej

 On Fri, Aug 1, 2008 at 1:33 AM, vishy_sb [EMAIL PROTECTED]
 wrote:

 Is there anyone who has any clue about how this has to be
 done???




 vishy_sb wrote:

 Hi all,

 I have Modal Window which contains a panel. Inside the panel I am
 trying
 to perform a search and the results of the search are populating
 inside
 a
 ListView. There is an apply button which applies the list on the main
 page
 and closes the modal window. However when I want to do another search
 and
 bring up the Modal window the previous List is still present in it. I
 think that when the Modal window is closed it just becomes invisible
 and
 is not closing actually and thats why this is happening. But I was
 just
 wondering if there is a way so as to refresh the (search)form or the
 panel
 whenever it is loaded inside the Modal window.

 Any kind of help will be appreciated.

 Thanks,
 vishy


 --
 View this message in context:
 http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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






 --
 View this message in context:
 http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18770147.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18774834.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Dynamically Making changes to Tree Node

2008-08-01 Thread vishy_sb

Any ideas about how to get this working



vishy_sb wrote:
 
 Thanks for the quick reply Matej. 
 
 Well in my implementation I am using a CheckBoxTree example discussed in
 the forum already
 (http://www.nabble.com/Checkbox-tree-component-td13433102.html#a13439520).
 and I am adding all the components in the addcomponents() method in the
 CheckBoxIconPanel class. However since the HTML mark up that I can have
 will always remain the same so I am not able to use different component
 for different nodes. The code is shown below:
 
 Java Code for the CheckBoxIconPanel class
 protected void addComponents(final IModel model, final BaseTree tree) {
   final LimitViewerCheckBoxTree cbTree = 
 (LimitViewerCheckBoxTree) tree;
   LimitViewerCheckBoxTree.ICheckCallback callback = new
 LimitViewerCheckBoxTree.ICheckCallback() {
   private static final long serialVersionUID = 1L;
 
   public void onUpdate(AjaxRequestTarget target) {
   onNodeCheckUpdated((TreeNode) 
 model.getObject(), cbTree, target);
   }
   };
 
   IModel dataModel = cbTree.newCheckBoxModel((TreeNode)
 model.getObject());
   int level = (Integer)
 ((DefaultMutableTreeNode)model.getObject()).getLevel();
   
   if(level == 1){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel, 
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component = newContentComponent(content, 
 tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);
   
   InstrumentLimitViewerPanel instrumentLimitViewerPanel = 
 new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel, limitInputPanel
 ,limitViewerForm);
   add(instrumentLimitViewerPanel);
   instrumentLimitViewerPanel.setVisible(false);
   
   }
   if(level == 2){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel, 
 callback);
   
   add(cb);
   Component component = newContentComponent(content, 
 tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
 
   InstrumentLimitViewerPanel instrumentLimitViewerPanel = 
 new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
   instrumentLimitViewerPanel.setVisible(false);
   
   }
   if(level == 3){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel, 
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component = newContentComponent(content, 
 tree, model);
   add(component);
   component.setVisible(false);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);
   
 InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
   } catch (Exception e) {
   e.printStackTrace();
   }   
   }
   }
 
 // HTML code 
 
 wicket:panel
 div
 table class=icon-panel
   tr
   td class=contentinput  type=checkbox 
 wicket:id=checkbox//td
   td/td
   tddiv style=margin:10px 0 0 30px wicket:id=limitPanel
   /div/td
   /tr
 
 /table
 /div
 div wicket:id=instrumentLimitViewerPanel/div
 /wicket:panel
 
 So I was wondering if it is possible to add different node components if I
 want to use the CheckBoxIconPanel or id what you suggested the only way to
 get this working...
 
 
 Thanks in advance,
 vishy
 
 Matej Knopp-2 wrote:
 
 You have to use different panel for each Tree item (depending on the
 tree node for that item). If you use BaseTree, implement the
 #newNodeComponent method accordingly. You can look at LinkTree or
 LabelTree for an example of how the implementation can look like.
 
 Or you can use LinkTree, override newNodeComponent like

Re: Dynamically Making changes to Tree Node

2008-08-01 Thread vishy_sb

I am sorry that I have been really bothering you here but I just need to get
this working asap.

so from your reply are you suggesting that I should have a tree structure
like this:

Panel1
 --Panel2
 --Panel3

with an HTML markup like:

body
 wicket-panel
 div wicket:id=tree/div
/wicket-panel
/body

But when I am going to add the components to the tree, don't you think it
would look for the those panels in the mark up. So how do I put the panels
in the mark up??? Will something like this work:

body
 wicket-panel
 div wicket:id=tree/div
 div wicket:id=Panel1/div
 
 div wicket:id=Panel2/div

 div wicket:id=Panel3/div
/wicket-panel
/body


vishy



Matej Knopp-2 wrote:
 
 You need to use panels. Every panel can have different markup. So you
 will have a panel for every node type.
 
 -Matej
 
 On Fri, Aug 1, 2008 at 11:03 PM, vishy_sb [EMAIL PROTECTED]
 wrote:

 Any ideas about how to get this working



 vishy_sb wrote:

 Thanks for the quick reply Matej.

 Well in my implementation I am using a CheckBoxTree example discussed in
 the forum already
 (http://www.nabble.com/Checkbox-tree-component-td13433102.html#a13439520).
 and I am adding all the components in the addcomponents() method in the
 CheckBoxIconPanel class. However since the HTML mark up that I can have
 will always remain the same so I am not able to use different component
 for different nodes. The code is shown below:

 Java Code for the CheckBoxIconPanel class
 protected void addComponents(final IModel model, final BaseTree tree) {
   final LimitViewerCheckBoxTree cbTree =
 (LimitViewerCheckBoxTree) tree;
   LimitViewerCheckBoxTree.ICheckCallback callback = new
 LimitViewerCheckBoxTree.ICheckCallback() {
   private static final long serialVersionUID = 1L;

   public void onUpdate(AjaxRequestTarget target) {
   onNodeCheckUpdated((TreeNode)
 model.getObject(), cbTree, target);
   }
   };

   IModel dataModel = cbTree.newCheckBoxModel((TreeNode)
 model.getObject());
   int level = (Integer)
 ((DefaultMutableTreeNode)model.getObject()).getLevel();

   if(level == 1){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel, limitInputPanel
 ,limitViewerForm);
   add(instrumentLimitViewerPanel);
   instrumentLimitViewerPanel.setVisible(false);

   }
   if(level == 2){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);

   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
  
 instrumentLimitViewerPanel.setVisible(false);

   }
   if(level == 3){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   component.setVisible(false);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);

 InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
   } catch (Exception e) {
   e.printStackTrace();
   }
   }
   }

 // HTML code

 wicket:panel
 div
 table class=icon-panel
   tr
   td class

Re: Dynamically Making changes to Tree Node

2008-08-01 Thread vishy_sb

I am sorry that I have been really bothering you here but I just need to get
this working asap.

so from your reply are you suggesting that I should have a tree structure
like this:

Panel1
 --Panel2
 --Panel3

with an HTML markup like:

body
 wicket-panel
 div wicket:id=tree/div
/wicket-panel
/body

But when I am going to add the components to the tree, don't you think it
would look for the those panels in the mark up. So how do I put the panels
in the mark up??? Will something like this work:

body
 wicket-panel
 div wicket:id=tree/div
 div wicket:id=Panel1/div
 
 div wicket:id=Panel2/div

 div wicket:id=Panel3/div
/wicket-panel
/body


vishy



Matej Knopp-2 wrote:
 
 You need to use panels. Every panel can have different markup. So you
 will have a panel for every node type.
 
 -Matej
 
 On Fri, Aug 1, 2008 at 11:03 PM, vishy_sb [EMAIL PROTECTED]
 wrote:

 Any ideas about how to get this working



 vishy_sb wrote:

 Thanks for the quick reply Matej.

 Well in my implementation I am using a CheckBoxTree example discussed in
 the forum already
 (http://www.nabble.com/Checkbox-tree-component-td13433102.html#a13439520).
 and I am adding all the components in the addcomponents() method in the
 CheckBoxIconPanel class. However since the HTML mark up that I can have
 will always remain the same so I am not able to use different component
 for different nodes. The code is shown below:

 Java Code for the CheckBoxIconPanel class
 protected void addComponents(final IModel model, final BaseTree tree) {
   final LimitViewerCheckBoxTree cbTree =
 (LimitViewerCheckBoxTree) tree;
   LimitViewerCheckBoxTree.ICheckCallback callback = new
 LimitViewerCheckBoxTree.ICheckCallback() {
   private static final long serialVersionUID = 1L;

   public void onUpdate(AjaxRequestTarget target) {
   onNodeCheckUpdated((TreeNode)
 model.getObject(), cbTree, target);
   }
   };

   IModel dataModel = cbTree.newCheckBoxModel((TreeNode)
 model.getObject());
   int level = (Integer)
 ((DefaultMutableTreeNode)model.getObject()).getLevel();

   if(level == 1){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel, limitInputPanel
 ,limitViewerForm);
   add(instrumentLimitViewerPanel);
   instrumentLimitViewerPanel.setVisible(false);

   }
   if(level == 2){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);

   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);

   InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
  
 instrumentLimitViewerPanel.setVisible(false);

   }
   if(level == 3){
   MarkupContainer cb = null;
   cb = cbTree.newCheckBox(checkbox, dataModel,
 callback);
   ((CheckBox) cb).setVisible(false);
   add(cb);
   Component component =
 newContentComponent(content, tree, model);
   add(component);
   component.setVisible(false);
   limitPanel = new LimitPanel(limitPanel);
   add(limitPanel);
   limitPanel.setVisible(false);

 InstrumentLimitViewerPanel
 instrumentLimitViewerPanel = new
 InstrumentLimitViewerPanel(instrumentLimitViewerPanel,limitInputPanel,
 limitViewerForm);
   add(instrumentLimitViewerPanel);
   } catch (Exception e) {
   e.printStackTrace();
   }
   }
   }

 // HTML code

 wicket:panel
 div
 table class=icon-panel
   tr
   td class

Re: Add different component for treenode

2008-08-01 Thread vishy_sb

Hi [EMAIL PROTECTED],

I am trying to get the same thing working here and was just wondering if you
were able to get it to work. if you did can you provide some help on you did
it. Also when I try to write the newNodeComponent() method just as you have
used below I get an exception that the method should return a value of type
component.

Any kind of help will be highly appreciated.

Thanks,
Vishy


[EMAIL PROTECTED] wrote:
 
 Hi,
 
 with newNodeComponent in the BaseTree class i can specify a different
 component for my treenode, but this is the same for all node. Is it
 possible
 setting different treenode component for added a different type of node in
 my tree?
 
 something like this:
 
 protected Component newNodeComponent(String id, IModel model)
 {
 if( node type a)
return new component_a(id, model, tree);
else if
return new component_b(id, model, tree);
else
return new component_c(id, model, tree);
 }
 
 is it possible?
 
 thk
 
 

-- 
View this message in context: 
http://www.nabble.com/Add-different-component-for-treenode-tp16332161p18784879.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Dynamically Making changes to Tree Node

2008-07-31 Thread vishy_sb

http://www.nabble.com/file/p18765641/treeview.jpeg 

Hi All, 

As shown in the Image I have a checkbox tree which has nodes that have
different components. Each node of the tree has a checkbox, label, a panel
which has the 3 TextAreas and another panel which has a listview. In order
to get the tree to look like what is shown in the image, I had to set the
visibility of these components across different levels of the Tree which
means that all these components are present at all the nodes but they are
not visible everywhere. Also on top of the tree is another panel(Top Panel)
from where values are submitted on pressing the apply button. Now what I
wanted to achieve in this interface was to apply the limits entered in the
Top Panel to the nodes which are checked (i.e. to the ListView under the
checked node). This seems to be a real complex interface to me but there has
to be a way to get this to work. The main problem that I am having is that
how do I get to the ListView (or ListViews) to which I am trying to make the
changes. I might be sounding a little confusing here but I am ready to
explain the whole interface in even more detail. 

Please let me know if anyone has any ideas or even a suggestion to implement
this. 

Also is there a way to add different components to the different nodes in
the same Tree??


Kindly let me. 

Thanks in advance,
vishy
-- 
View this message in context: 
http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18765641.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Refreshing a form inside a Modal Window

2008-07-31 Thread vishy_sb

Is there anyone who has any clue about how this has to be done???




vishy_sb wrote:
 
 Hi all,
 
 I have Modal Window which contains a panel. Inside the panel I am trying
 to perform a search and the results of the search are populating inside a
 ListView. There is an apply button which applies the list on the main page
 and closes the modal window. However when I want to do another search and
 bring up the Modal window the previous List is still present in it. I
 think that when the Modal window is closed it just becomes invisible and
 is not closing actually and thats why this is happening. But I was just
 wondering if there is a way so as to refresh the (search)form or the panel
 whenever it is loaded inside the Modal window.
 
 Any kind of help will be appreciated.
 
 Thanks, 
 vishy
 

-- 
View this message in context: 
http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Refreshing a form inside a Modal Window

2008-07-31 Thread vishy_sb

The Modal Window contains a Panel. The picture shows how the window looks
like when I try to search some thing the results are populated in the List
as shown. All the rows which are selected will be added to another list on
the main page when the apply button is pressed.

http://www.nabble.com/file/p18766249/modalwindow.jpeg 

Now if I want to try to perform another search the Modal window still shows
the previous list. 

/// Java code for onSubmit() for the apply button (AjaxFallBackButton)  is
shown below

applyButton = new AjaxFallbackButton(applyButton, form) {


@Override
protected void onSubmit(AjaxRequestTarget target, Form 
fom) {
for(int i = 0; iaccountLimitList.size(); i++){
ClearingAccountLimit accLimit =
(ClearingAccountLimit)accountLimitList.get(i);
if(accLimit.isActive()){

selectedInstruments.add(accLimit);

}

}
onCancel(target);
}

};
form.add(applyButton);

Let me know if you need some more info.

Thanks in advance
vishy


Matej Knopp-2 wrote:
 
 You need to show some code.
 
 -Matej
 
 On Fri, Aug 1, 2008 at 1:33 AM, vishy_sb [EMAIL PROTECTED]
 wrote:

 Is there anyone who has any clue about how this has to be done???




 vishy_sb wrote:

 Hi all,

 I have Modal Window which contains a panel. Inside the panel I am trying
 to perform a search and the results of the search are populating inside
 a
 ListView. There is an apply button which applies the list on the main
 page
 and closes the modal window. However when I want to do another search
 and
 bring up the Modal window the previous List is still present in it. I
 think that when the Modal window is closed it just becomes invisible and
 is not closing actually and thats why this is happening. But I was just
 wondering if there is a way so as to refresh the (search)form or the
 panel
 whenever it is loaded inside the Modal window.

 Any kind of help will be appreciated.

 Thanks,
 vishy


 --
 View this message in context:
 http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18766249.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Refreshing a form inside a Modal Window

2008-07-30 Thread vishy_sb

Hi all,

I have Modal Window which contains a panel. Inside the panel I am trying to
perform a search and the results of the search are populating inside a
ListView. There is an apply button which applies the list on the main page
and closes the modal window. However when I want to do another search and
bring up the Modal window the previous List is still present in it. I think
that when the Modal window is closed it just becomes invisible and is not
closing actually and thats why this is happening. But I was just wondering
if there is a way so as to refresh the (search)form or the panel whenever it
is loaded inside the Modal window.

Any kind of help will be appreciated.

Thanks, 
vishy
-- 
View this message in context: 
http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18745307.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox tree component

2008-07-07 Thread vishy_sb

Hey Doug,

I was able to get the check boxes to work. Thanks for your help on that.
However there is another problem that I am not able to get to work.

I have created another panel with a checkbox tree in it and i want that
panel to show only when I check one of the child nodes in my main checkbox
tree. i.e. I have Panel1 and Panel2 for a page both having a checkbox tree
component in them say checkboxtree1 and checkboxtree2 respectively. I want
the Panel2 to show up (along with the tree) only when a node of the
checkboxtree1 is selected. I tried to add the panel dynamically in the
onNodeCheckUpdated() method of the main panel but it doesn't work like that. 

Any ideas about how i can get this to work.

Regards,
vishy_sb


Doug Leeper wrote:
 
 If the tree is pre-loaded, it is easier.  When the checkbox is selected,
 iterate through the children nodes and set its state to selected.
 
 The dynamically loaded is alot trickier...as you would have to load the
 tree from the selected node and then iterate and set the children notes to
 selected.
 
 Are you sure you want to select the children nodes or is it the parent
 nodes you want to select?
 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-tree-component-tp13433102p18326913.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox tree component

2008-06-26 Thread vishy_sb

Hey Doug,

I am fairly new to wicket. I am trying to use the checkbox tree component
and it seems to be working well. However I would like to check or uncheck
all the child nodes if the parent node is selected(i.e. if the check box in
front of the parent node is checked or unchecked). Kindly let me know how
can I implement that.

Thanks,
vishy_sb


Doug Leeper wrote:
 
 Ok here it is.  I have also included my use of it.  While it won't compile
 for you...you will at least see how I have used it.
 
  http://www.nabble.com/file/p13439520/CheckBoxIconPanel.html
 CheckBoxIconPanel.html 
  http://www.nabble.com/file/p13439520/CheckBoxIconPanel.java
 CheckBoxIconPanel.java 
  http://www.nabble.com/file/p13439520/CheckBoxTree.java CheckBoxTree.java 
 
 My use of CheckBoxTree...
 
  http://www.nabble.com/file/p13439520/ProductCategoriesPanel.html
 ProductCategoriesPanel.html 
  http://www.nabble.com/file/p13439520/ProductCategoriesPanel.java
 ProductCategoriesPanel.java 
 
 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-tree-component-tp13433102p18145468.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox tree component

2008-06-26 Thread vishy_sb

Well currently I am testing the tree using a model which creates the entire
tree up front... however for the final implementation I would be building
the child nodes dynamically  hence I guess I would be using both of
them

Thanks for the quick reply


Doug Leeper wrote:
 
 It depends.
 
 Are you building the entire tree up front or are you building the child
 nodes dynamically (i.e. when the parent node is selected/expanded)?
 

-- 
View this message in context: 
http://www.nabble.com/Checkbox-tree-component-tp13433102p18147660.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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