[Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey

Hello,

The application I am working on uses i18n. Wicket has been great with this.
:)

Our base page that every other page extends from, does the following:

getSession().setLocale(((INLWebSession)getSession()).getCredentials((WebRequest)getRequest()).getPreferredLocale());

to set the current locale based on the users preference. The content of the
application is in an iframe. (The wicket pages are in the iframe) The
navigation, preferences elements, etc. are outside the iframe in what we
refer to as the wrapper. Changing the language is done through this wrapper.
When the display language is changed, we refresh the contents of the iframe
and it comes back in the new language.

HOWEVER

We have one page that uses TabbedPanel with two tabs. This page (and tabs)
correctly internationalizes based on the locale used when the page is
loaded. Changing the language in the wrapper does cause the page to refresh,
but not cause it to change languages.

Is there something special with tabs and TabbedPanel?

Another issue with the same page, we use the following constructors:

public ReviewPage(String ahId) {
   build(ahId, 0);
   }

public ReviewPage(String ahId, int tab) {
   build(ahId, tab);
   }

So, if no tab number is passed in it uses tab 0. From tab 1, there are
actions that update the underlying object and use:

setResponsePage(new ReviewPage(req.getReqId(), 1) );

to show the changes, effectively just calling it's self. This work just
fine.

However, from a different wicket page trying to have a link that uses the
setResponsePage(new ReviewPage(req.getReqId(), 1) ); causes a
NotSerializableException. Why / how does the same call cause two different
results?

Thanks for any insights.

-Shawn
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] TabbedPanel and i18n

2007-06-11 Thread Shawn Tumey

The spring service is what it is complaining about not being serializable.

private void build(final String ahId, final int tab) {

   List tabs=new ArrayList();

   tabs.add(new AbstractTab(new ResourceModel(common.summary)){

   private static final long serialVersionUID = 1L;

   public Panel getPanel(String panelId)
   {
   return new SummaryPanel(panelId, AHBasePage.getASM
().getRequest(ahId));
   }
   });  // this is tab 0 // getASM() is a spring service

   Credentials creds =
((INLWebSession)getSession()).getCredentials((WebRequest)getRequest());
   UserPrivileges userPrivs = creds.getPrivileges();
   if (userPrivs.hasPrivilege(
CredentialsConstants.PRIV_CATG_AUTOMATED_REQUESTS ,
CredentialsConstants.ACTION_PRIV_UPDATE)){
   tabs.add(new AbstractTab(new ResourceModel(common.details)) {

   private static final long serialVersionUID = 1L;

   public Panel getPanel(String panelId)
   {
   return new DetailPanel(panelId, AHBasePage.getASM
().getRequest(ahId));
   }

   }); // this is tab 1 // getASM() is a spring service
   }
   TabbedPanel tPanel = new TabbedPanel(tabs, tabs);
   tPanel.setOutputMarkupId(true);
   tPanel.setSelectedTab(tab);
   add(tPanel);


Thanks for the assistance,

-Shawn


On 6/11/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


how are you creating your itab/abstracttab objects? can we see that code?
mainly what model do you pass in for the title.

and what object does it say is not serializable?

-igor


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Submitting checkboxes from a datatable

2007-03-22 Thread Shawn Tumey

Hello,

I have a page that uses datatable with several custom column.

One of the columns implements a checkbox. The datatable is wrapped in a
form.

When the form is submitted, how do I capture what rows are checked?

The value passed back is simply on for the checkbox.

Any suggestions would be appreciated.

-Shawn
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Ajax Firefox issue

2007-02-20 Thread Shawn Tumey

Forgot - Wicket version 1.2.4

:)

On 2/20/07, Shawn Tumey [EMAIL PROTECTED] wrote:


Hello,

I have a form that changes depending on which radio button is selected.

By changes I mean a panel inside a markup container is replaced with a
different panel.

span wicket:id=typeWMC
  span wicket:id=typeOfSearch/span
/span

protected void onEvent(AjaxRequestTarget target) {
  if (!(typeWMC.get(typeOfSearch) instanceof SearchPanel)) {
 typeWMC.removeAll();
 typeWMC.add(new SearchPanel(typeOfSearch, schModel, requestMap,
myForm));
 target.addComponent(typeWMC);
  }
}

It works great in IE6.

In Firefox 2 the form content just keeps growing. Although what is passed
back via the ajax debug window is correct and does not grow.

Enabling or disabling Firebug has no affect.

Suggestions?

Thanks,

Shawn

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE on wicket:component

2007-02-14 Thread Shawn Tumey

[X] Delete this unimportant and generally unsupported feature

On 2/13/07, Jonathan Locke [EMAIL PROTECTED] wrote:




Our Wiki describes the wicket:component tag as follows:

wicket:component - Creates a Wicket component on the fly. Needs a class
attribute. Though this has been in wicket for a long time, it is still
kind
of an unsupported feature, as most of the core developers believe that
this
may lead to misuse of the framework. Before heavily relying on this
feature,
you might want to contact the user list to discuss alternative
strategies.

It's unclear to me that anyone is using this.  The utility is limited and
unimportant.  And for anyone creating tooling support for wicket, this
will
be a tripping point.  I can't see any good reason to keep this feature as
it
is a way to instantiate a component in the markup and might server as the
beginning of a bunch of requests to add component configuration or other
code logic where we should only have nice clean markup.

VOTE:

[ ] Delete this unimportant and generally unsupported feature
[ ] Keep wicket:component, but define its limits, document it on the
wiki
as fully supported and commit to supporting it in the future



--
View this message in context:
http://www.nabble.com/VOTE-on-wicket%3Acomponent-tf3221780.html#a8948008
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] dual listbox help

2007-02-08 Thread Shawn Tumey

Hello all,

Like the subject indicates I am trying to get a dual listbox to work.

More specifically, I have two ListMultipleChoice components (left and
right).

Each ListMultipleChoice has its own model.

Left has a leftChoicesList and a leftSelectedList.

Right has the same thing rightChoicesList and rightSelectedList.

Since the objects stored in the list are common between them, they both use
the same IChoiceRenderer.

To start with, Left is full of choices, and Right is empty.

There is a link between the two components for the user to trigger moving
selected items from Left to Right.

I can not get this portion to work. :(

It seems the link should be a AjaxSubmitLink  (or button)  however the
onSubmit will only get called if the form is valid.
I'm not interested if the form is valid, I only want to get what the user
has selected, remove it from the list of choices on the left
and add it to the list of choices on the right.

Any suggestion about the best way to go about doing this?

Thanks,

--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Form submit to modal window issues

2007-01-29 Thread Shawn Tumey

Thank you for the assistance Matej. I did not realize I had to explicitly do
the target.addComponent(myForm);

Everything is now working as desired.

Thanks again,

Shawn



On 1/27/07, Matej Knopp [EMAIL PROTECTED] wrote:


When the validation fails the onSubmit method is not called at all.
There's an onError method that is called in this case.

-Matej


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Form submit to modal window issues

2007-01-26 Thread Shawn Tumey

Hello,

I have a form that after validation needs to open a modal window. This modal
window basically acts as a very complex confirmation box. If the user
cancels out of the modal window, then they should be returned to the form.
However, if they submit / continue from the modal window, then the model the
form is based on gets forwarded to the next page.

I can not seem to trigger the modal window after the form validates.

Any help would be appreciated.

Regards,

--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Form submit to modal window issues

2007-01-26 Thread Shawn Tumey

Thank you Matej, I was aware of this, but I still don't see what I am doing
wrong. I believe I have included the relevant code.

With the below code the form does not display the feedback panel for
components that failed validation like it should. If all the fields
validate, the modalWindow is shown.

What am I missing?

The Wicket Ajax Debug tool shows the ajax request completing normally

input type=submit wicket:id=submit/


   final ModalWindow classification = new
ModalWindow(classification);
   classification.setPageMapName(classification);
   classification.setPageCreator(new ModalWindow.PageCreator()
   {
   public Page createPage()
   {
   return new ClassificationPage(reqModel);
   }
   });
   classification.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback()
   {
   public void onClose(AjaxRequestTarget target)
   {

   }
   });
   classification.setCloseButtonCallback(new
ModalWindow.CloseButtonCallback()
   {
   public boolean onCloseButtonClicked(AjaxRequestTarget target)
   {
   return true;
   }
   });

   final Form form = new Form(reqForm,formModel);
   form.setOutputMarkupId(true);
   form.add(classification);

form.add(new AjaxSubmitButton(submit, form) {
   protected void onSubmit(AjaxRequestTarget target, Form form) {
   classification.show(target);
   }
   });

---

On 1/26/07, Matej Knopp [EMAIL PROTECTED] wrote:


Hi

I'm not sure what exactly are you trying to accomplish. But in any case,
remember that the modal window is an ajax component, thus to display it
you need an ajax request.

So if you want to submit the form and open the ModalWindow afterwards,
you need to use AjaxSubmitButton or AjaxSubmitLink.

-Matej


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Form submit to modal window issues

2007-01-26 Thread Shawn Tumey

When validation should fail and the feedback panel should show up.

*INFO: *
Initiating Ajax POST request on
/inl/secure/app/page?wicket:interface=:0:panel:reqForm:submit:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=
0.393144868947922
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (69 characters)
*INFO: *
?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response
*INFO: *Response parsed. Now invoking steps...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...

When the modal windows is shown because validation passes.

*INFO: *
Initiating Ajax POST request on
/inl/secure/app/page?wicket:interface=:0:panel:reqForm:submit:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=
0.9417643576134753
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (1254 characters)
*INFO: *
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=panel_reqForm_classification ![CDATA[div
wicket:id=classification style=display:none
id=panel_reqForm_classificationwicket:panel

   div wicket:id=content id=panel_reqForm_classification_content
   /div
/wicket:panel/div]]/componentcomponent id=feedback

![CDATA[]]/componentevaluate![CDATA[var settings = new

Object();
settings.minWidth=200;
settings.minHeight=200;
settings.className=w_blue;
settings.width=600;
settings.height=400;
settings.resizable=true;
settings.src=/inl/secure/app/page?wicket:interface=classification:0::;
settings.iframeName=classification;
settings.cookieId=modal-window-11554571;
settings.mask=semi-transparent;
settings.onCloseButton
= function() { var
wcall=wicketAjaxGet('/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListenerwicket:behaviorId=0',
function() { }, function() { });return !wcall;};
settings.onClose
= function() { var
wcall=wicketAjaxGet('/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListenerwicket:behaviorId=1',
function() { }, function() { }); };
Wicket.Window.create(settings).show();
]]/evaluate/ajax-response
*INFO: *Response parsed. Now invoking steps...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...
*INFO: *Calling posponed function...

*INFO: *
Initiating Ajax GET request on
/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListenerwicket:behaviorId=0random=
0.08781822351433555
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (130 characters)
*INFO: *
?xml version=1.0 encoding=UTF-8?ajax-responseevaluate![CDATA[
Wicket.Window.get().close();]]/evaluate/ajax-response
*INFO: *Response parsed. Now invoking steps...
*INFO: *Chanel busy - postponing...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...
*INFO: *Calling posponed function...
*INFO: *
*INFO: *
Initiating Ajax GET request on
/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListenerwicket:behaviorId=1random=
0.9822901756880449
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (69 characters)
*INFO: *
?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response
*INFO: *Response parsed. Now invoking steps...
*INFO: *Response processed successfully.
*INFO: *Invoking post-call handler(s)...

Note - I'll be leaving work soon and may not be able to provide useful
responses until next week.

Thank you for your assistance

On 1/26/07, Matej Knopp [EMAIL PROTECTED] wrote:


One more thing. Can you please post also the content of javascript
console? And can is the onSubmit handler of AjaxSubmitButton really
called?

-Matej

Matej Knopp wrote:
 Nothing apparent. Can you post the markup too?

 Shawn Tumey wrote:
 Thank you Matej, I was aware of this, but I still don't see what I am
 doing wrong. I believe I have included the relevant code.

 With the below code the form does not display the feedback panel for
 components that failed validation like it should. If all the fields
 validate, the modalWindow is shown.

 What am I missing?

 The Wicket Ajax Debug tool shows the ajax request completing normally

 input type=submit wicket:id=submit/


 final ModalWindow classification = new
 ModalWindow(classification);
 classification.setPageMapName(classification);
 classification.setPageCreator(new ModalWindow.PageCreator()
 {
 public Page createPage()
 {
 return new ClassificationPage(reqModel);
 }
 });
 classification.setWindowClosedCallback(new
 ModalWindow.WindowClosedCallback()
 {
 public void onClose(AjaxRequestTarget target)
 {

 }
 });
 classification.setCloseButtonCallback(new
 ModalWindow.CloseButtonCallback()
 {
 public boolean onCloseButtonClicked(AjaxRequestTarget
target)
 {
 return true

[Wicket-user] update propertyModel value to null

2007-01-23 Thread Shawn Tumey

Hello,

textarea wicket:id=myString rows=10/textarea

FormComponent myStringComp = new TextArea(myString, new
PropertyModel(this, myString));
myStringComp.add(new AjaxFormComponentUpdatingBehavior(onchange){
   protected void onUpdate(AjaxRequestTarget target) {
  myString
  // do stuff
   }
});

Using ajax, almost everything seems to work. If I clear the textarea and tab
out, the String myString does not change to null or an empty string, it
retains the previous value.

What am I missing?

Thanks,

Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] update propertyModel value to null

2007-01-23 Thread Shawn Tumey

onblur has the same outcome as onchange.

Updates to myString that grow it, or shrink it work fine as long as there is
something in the textarea field. Clearing the field retains the previous
value.

BTW, this is using 1.2.4

any other ideas?

On of my coworkers suggested overloading the setMyString method.

To this end, I created:

public void setMyString() {
  this.myString = null;
}

this had no affect.

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


hmm can you try onblur instead of onchange, dont know if textarea supports
that event

-igor





--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] update propertyModel value to null

2007-01-23 Thread Shawn Tumey

Hello Erik,

The form element is there.

Hello Igor,

I will have check with our software architect before I can upgrade to the
1.3x branch. I am moving on to other functionality for the time being.

Thanks to both of you for your assistance.

Any other suggestions?

Regards,

On 1/23/07, Erik van Oosten [EMAIL PROTECTED] wrote:


Hi Shawn,

Could you check that you have a single, properly nested form element
in the html? I vaguely remember someone having problems with this.

 Erik.







--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] update propertyModel value to null

2007-01-23 Thread Shawn Tumey

The input is returning to the server as an empty string .

The field is required, so when the onEvent method checks
   protected final void onEvent(final AjaxRequestTarget target)
   {
   final FormComponent formComponent = getFormComponent();
   boolean callOnUpdate = true;

   try
   {
   formComponent.inputChanged();
   formComponent.validate();
   if (formComponent.hasErrorMessage())
   {
   formComponent.invalid();
   }
   else
   {
   formComponent.valid();
   formComponent.updateModel();
   }
   }
   catch (RuntimeException e)
   {
   callOnUpdate = false;
   onError(target, e);

   }

   if (callOnUpdate)
   {
   onUpdate(target);
   }

   }

the component is set as invalid and the model is not updated.

I am not concerned if the component is valid at this stage of the game, I
simply have other models I need to update based on what is (or is not) in
this component.

I understand what it is doing, but I believe it is a mistake to not update
the model. Especially since onUdate is still being called with the old
unupdated values.

my $.02

Regards,

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


use wicket's ajax debug console to see what the url request is
then set a breakpoint in AjaxFormComponentUpdatingBehavior.onEvent and
walk it, see why its not setting the value to null

-igor




--
Shawn Tumey
Cofounder
MT Web Productions LLC
www.mtwebproduction.com
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user