Re: Wicket-1.3-beta2 validation (conversion) bug?

2007-08-15 Thread Alex Objelean


I found a quick fix for my issue: instead of disabling the Textfield, I make
it readonly... still wondering why the change has been made in the convert()
method.


Matej Knopp-2 wrote:
 
 At this point I don't know why the check was removed, but i suppose
 there was a reason for it. I'm not sure whether we should support the
 state when client and server are out of sync.
 
 -Matej
 
 On 8/14/07, Alex Objelean [EMAIL PROTECTED] wrote:

 This means that the component enable state must be always in sync with
 the
 client side state? Shouldn't it be set automatically as not enabled after
 the submit occurs? On the other hand, the same code worked great on the
 wicket-1.2.x branch..

 Please help!



 Matej Knopp-2 wrote:
 
  I'm not sure if it's bug in wicket. So your input is disabled, but
  the TextField component is not? That's not good, you need to disable
  the TextField too in that case.
 
  -Matej
 
  On 8/14/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  After migrating from wicket-1.2.6 to wicket-1.3.0-beta2 I had the
  following
  problem:
 
  application throws ConversionException when trying to convert a null
  value
  of the Textfield wich is disabled on the clientside.
 
  I've take a look on the convert() method of the FormComponent class
 and
  noticed the difference from the 1.2.x branch which may cause the
 issue:
 
  This snippet of code is from 1.3.0-beta2
  [CODE]
  if (typeName == null) {
//string conversion code
  } else {
//type conversion code
  }
  [/CODE]
 
  This snippet of code is from 1.2.6
  [CODE]
  if (type == null) {
//string conversion code
  } else if (!Strings.isEmpty(getInput())) {
//type conversion code
  }
  [/CODE]
 
  As you can see, in the 1.3.0-beta2 version, the conversion does not
 check
  if
  the getInput() is an empty string before performing type conversion. I
  wonder if it is a bug, or it is something that I missed?
 
  Thank you!
  Alex
  --
  View this message in context:
 
 http://www.nabble.com/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12140062
  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/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12141596
 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/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12157292
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Ajax refresh of DefaultDataTable in wicket-phonebook

2007-08-15 Thread Tauren Mills
For some reason when I do an ajax refresh of the DefaultDataTable in
wicket-phonebook, the FilterToolbar disappears.  I see it in the Ajax
Debugger, but it doesn't display on the screen.  This is only
happening in FF, not IE (only tested on WinXP).

I cannot see any difference between the html that is rendered when the
page is loaded vs. when the ajax refresh happens.  But FF decides to
not render the FilterToolbar after the ajax refresh, while IE does
render it.

I'm wondering if FF has issues with invalid HTML?  The FilterToolbar
puts a form around a tr/tr and adds a span inside the form, but
outside the tr/tr.  However, I don't understand why it would only
have a problem after the ajax render and not the original page render.

Here are the only code changes to ListContactsPage::

public ListContactsPage() {
addCreateLink();
IColumn[] columns = createColumns();
// set up data provider
ContactsDataProvider dataProvider = new ContactsDataProvider(dao);
// create the data table
final DefaultDataTable users = new DefaultDataTable(users, Arrays
.asList(columns), dataProvider, 10);
users.addTopToolbar(new FilterToolbar(users, dataProvider));
users.setOutputMarkupId(true);
add(users);

add(new AjaxLink(refresh) {
@Override
public void onClick(AjaxRequestTarget target)
{
target.addComponent(users);
}
});
}

And add this to the markup:

a href=# wicket:id=refreshRefresh/a

Note that this is a simple case to illustrate the problem.  In my
case, I'm using ModalWindows to edit the data, and on window close,
the data table is refreshed.

Any idea what is causing this?  Is it the invalid markup?  Any
thoughts on a solution?

Thanks,
Tauren

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



Using non-string parameters in HibernateContactFinderQueryBuilder

2007-08-15 Thread Tauren Mills
I have a data table based on wicket-phonebook, but have added an
additional column that contains non-string data.  In the database, the
value is an int, but the application maps that to a string using a
custom enumeration type with a converter to handle all this.

The table display, editing, and so forth of the data table works fine.
 And I have the FilterToolbar showing a choice list of the possible
values in the enumeration.  When one of the values is selected, the
rows with that value are displayed.

The problem is that HibernateContactFinderQueryBuilder assumes all
filter parameters are strings.  So I've hacked it to work by letting
the int get converted to a string:

private void addEnumCondition(StringBuilder hql,
Enumeration enumeration, String name) {
if (enumeration != null) {
hql.append(and target.);
hql.append(name);
hql.append( = ? );
parameters.add(+enumeration.getValue());
types.add(Hibernate.STRING);
}
}

Obviously, this isn't very elegant.  But I'm unclear on what would be
a better approach.  I tried to use a ListObject instead of
ListString, but then I ran into other exceptions and didn't dig into
them deeper.

Plus, I'm having problems with the filter choice not persisting the
last selected value like it does for the Last Name column.  It always
goes back to Choose one..., even if the table is filtered with a
value from the enumeration.  And selecting the blank row in the choice
list results in no data rather than all data.

I guess I'm looking for some suggestions or ideas if anyone has any.

Thanks,
Tauren

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



Strange bug in Wicket-1.3.0-beta2

2007-08-15 Thread Alex Objelean

I've got randomly an exception when clicking on the table row which has an
AjaxEventBehavior assigned.
Below is the stacktrace. Any ideas?

[10:34:27.875] ERROR [http-8080-Processor1] RequestCycle - component
body:panel:actionListContainer:actionList:form:actionList:14 not found on
page ro.isdc.centerparcs.dpa.ui.page.DPADashboardPage[id = 0], listener
interface = [RequestListenerInterface name=IBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
org.apache.wicket.WicketRuntimeException: component
body:panel:actionListContainer:actionList:form:actionList:14 not found on
page ro.isdc.centerparcs.dpa.ui.page.DPADashboardPage[id = 0], listener
interface = [RequestListenerInterface name=IBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1090)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at 
org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
-- 
View this message in context: 
http://www.nabble.com/Strange-bug-in-Wicket-1.3.0-beta2-tf4271646.html#a12157866
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: setResponsePage redirects to wrong url

2007-08-15 Thread Andrew Klochkov
Al Maw wrote:
 Andrew Klochkov wrote:
 Andrew Klochkov wrote:
 When I do setResponsePage(MyHomePage.class) IE tries to show me
 my.site.com/./ url and gets 404 response. Firefox just shows
 my.site.com without any troubles.

 I'm using wicket 1.3-beta2 and WicketFilter mapped to /*.

 Is it a known bug? Is there a workaround?
   
 I managed to reproduce it in a quickstart project so I'm sure it's a
 bug.
 BTW it's being reproduced under tomcat only, jetty works fine. My tomcat
 version is 5.5.17.


 Please can you submit this to JIRA?

https://issues.apache.org/jira/browse/WICKET-847

-- 
Andrew Klochkov


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



updateing a component on AjaxTabbedPanel

2007-08-15 Thread fhagen
Hi there, 

i am very new to wicket an got some problems while using a tree and a 
AjaxTabbedPanel.

I want to update a simple label component at an AjaxTabbedPanel after the 
user click something at the tree.

Here is my code:
public class ConfirmPage extends WebPage{
public ConfirmPage()
{
super();
//user is a simple POJO
User user = new User(test,test);
 
//Elements for the Tree
ListConsUnit consUnits = new ArrayListConsUnit();
consUnits.add(new ConsUnit(Single));
consUnits.add(new ConsUnit(General));
consUnits.add(new ConsUnit());
 
//simple label at the webpage
label = new Label(luname,user.getUsername());
add(label);

//create the tree
TreeModel tm = MyBaseTree.createTreeModel(consUnits);
tree = new MyTree(tree,tm);
add(tree);
tree.getTreeState().collapseAll();
 

   //create the tabs like the sample app
tabs.add(new AbstractTab(new Model(first tab))
{
public Panel getPanel(String panelId)
{
return new MyPanel(panelId);
}
});
 
tabs.add(new AbstractTab(new Model(second tab))
{
public Panel getPanel(String panelId)
{
return new MyPanel2(panelId);
}
});
 
tabs.add(new AbstractTab(new Model(third tab))
{
public Panel getPanel(String panelId)
{
return new MyPanel3(panelId);
}
});
tpanel = new AjaxTabbedPanel(tabs, tabs); 
add(tpanel);
add(new StyleSheetReference(pageCSS, getClass(), 
css/style.css));
}

Here is now the code from the tree:

public class MyTree extends LinkTree{

public MyTree(String arg0, TreeModel arg1) {
super(arg0, arg1);
}
 
 
protected void onNodeLinkClicked(javax.swing.tree.TreeNode node, 
BaseTree tree, AjaxRequestTarget target)
{
 
//update the label on ConfimPage
Label label = new Label(luname,node.toString());
label.setOutputMarkupId(true);
page.addOrReplace(label);
target.addComponent(label);

//how to update AjaxTabbedPanel???
}
}

Here the code from MyPanel:

public class MyPanel extends Panel{
 
private Label label;
 
public MyPanel(String id) {
super(id);
 
label = new Label(test, Text);
label.setOutputMarkupId(true);
this.add(label);
 
} 
}

The label at ConfirmPage is updated via Ajax if the user selects something 
from the tree, but not the label at the AjaxTabbedPanel.
If the user selects something from the tree the label at MyPanel should be 
updated with the value of the tree node.
How do i do this?

With kind regards
Fabian Hagen

SN AG
Klingenderstr. 5
D 33100 Paderborn

voice +49 5251/1581- 862
fax   +49 5251/1581-71
eMail [EMAIL PROTECTED]
web   http://www.s-und-n.de

Vorstand
Klaus Beverungen
Josef Tillmann 

Vorsitzender des Aufsichtsrates
Heinz-Dieter Wendorff

Handelsregister
Amtsgericht Paderborn HRB 3270 

Re: updateing a component on AjaxTabbedPanel

2007-08-15 Thread [EMAIL PROTECTED]
The ajax tabbed panel should be an instance variable. Then you can use
target.addComponent(tabbedPanel).

2007/8/15, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Hi there,

 i am very new to wicket an got some problems while using a tree and a
 AjaxTabbedPanel.

 I want to update a simple label component at an AjaxTabbedPanel after the
 user click something at the tree.

 Here is my code:
 public class ConfirmPage extends WebPage{
 public ConfirmPage()
 {
 super();
 //user is a simple POJO
 User user = new User(test,test);

 //Elements for the Tree
 ListConsUnit consUnits = new ArrayListConsUnit();
 consUnits.add(new ConsUnit(Single));
 consUnits.add(new ConsUnit(General));
 consUnits.add(new ConsUnit());

 //simple label at the webpage
 label = new Label(luname,user.getUsername());
 add(label);

 //create the tree
 TreeModel tm = MyBaseTree.createTreeModel(consUnits);
 tree = new MyTree(tree,tm);
 add(tree);
 tree.getTreeState().collapseAll();


//create the tabs like the sample app
 tabs.add(new AbstractTab(new Model(first tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(second tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel2(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(third tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel3(panelId);
 }
 });
 tpanel = new AjaxTabbedPanel(tabs, tabs);
 add(tpanel);
 add(new StyleSheetReference(pageCSS, getClass(),
 css/style.css));
 }

 Here is now the code from the tree:

 public class MyTree extends LinkTree{

 public MyTree(String arg0, TreeModel arg1) {
 super(arg0, arg1);
 }


 protected void onNodeLinkClicked(javax.swing.tree.TreeNode node,
 BaseTree tree, AjaxRequestTarget target)
 {

 //update the label on ConfimPage
 Label label = new Label(luname,node.toString());
 label.setOutputMarkupId(true);
 page.addOrReplace(label);
 target.addComponent(label);

 //how to update AjaxTabbedPanel???
 }
 }

 Here the code from MyPanel:

 public class MyPanel extends Panel{

 private Label label;

 public MyPanel(String id) {
 super(id);

 label = new Label(test, Text);
 label.setOutputMarkupId(true);
 this.add(label);

 }
 }

 The label at ConfirmPage is updated via Ajax if the user selects something
 from the tree, but not the label at the AjaxTabbedPanel.
 If the user selects something from the tree the label at MyPanel should be
 updated with the value of the tree node.
 How do i do this?

 With kind regards
 Fabian Hagen

 SN AG
 Klingenderstr. 5
 D 33100 Paderborn

 voice +49 5251/1581- 862
 fax   +49 5251/1581-71
 eMail [EMAIL PROTECTED]
 web   http://www.s-und-n.de

 Vorstand
 Klaus Beverungen
 Josef Tillmann

 Vorsitzender des Aufsichtsrates
 Heinz-Dieter Wendorff

 Handelsregister
 Amtsgericht Paderborn HRB 3270

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



Re: How to replace panelA with panelB using AjaxLink in panelA

2007-08-15 Thread landtuna

Tauren Mills wrote:

   add(new AjaxLink(createLink) {
   @Override
   public void onClick(AjaxRequestTarget target) {
   Panel panel = new ContactEditPanel(panel,
   new Model(new Contact()));
   panel.setOutputMarkupId(true);
   getParent().replaceWith(panel);
   target.addComponent(panel);
   }
   });

 What is the proper way to replace the containing panel from a 
 control within that panel? I found similar questions posted on 
 this list, but I haven't got any of those solutions to work for me.

I think you just need to do target.addComponent(getParent()) instead.  If
the parent contains too much (like the whole page), then put your Panel
inside another Panel, a Fragment, or a div tied to a WebMarkupContainer.
-- 
View this message in context: 
http://www.nabble.com/How-to-replace-panelA-with-panelB-using-AjaxLink-in-panelA-tf4259660.html#a12161515
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Dynamic Markup?

2007-08-15 Thread Brian Gorman
I am writing an open source Wiki component for Wicket..

http://sourceforge.net/projects/wicketwiki

I've recently started it so it is still in the development process.

I want to make it work completely off of AJAX in order for the component to
be completely autonomous without effecting the other components it could be
grouped with inside an application.

Right now, all it does is allow you to edit/render a single wiki page with
no interwiki links.  I accomplish this by simply just using a Label and not
escaping the HTML that is rendered from my wiki engine.  The problem is that
if I want interwiki links I'm going to have to be able to dynamically create
and add AjaxLinks from the rendered HTML markup coming out of the wiki
engine.

I need a way that I can create my own Markup file/stream/whatever and have
my custom component use that dynamic markup instead of searching for a valid
.html file in the classpath.

Does anyone know what I should look into?

Brian Gorman


Antwort: Re: updateing a component on AjaxTabbedPanel

2007-08-15 Thread fhagen
Well ok.
I tried it this way:

public class MyTree extends LinkTree{

public MyTree(String arg0, TreeModel arg1) {
super(arg0, arg1);
}
 
 
protected void onNodeLinkClicked(javax.swing.tree.TreeNode node, 
BaseTree tree, AjaxRequestTarget target)
{
 
Label label = new Label(luname,node.toString());
label.setOutputMarkupId(true);
page.addOrReplace(label);

ConfirmPage page = (ConfirmPage)tree.getWebPage();
AjaxTabbedPanel tpanel = page.getTpanel();
 
MyPanel panel = (MyPanel)tpanel.get(panel);
Label label2 = new Label(test,TestText);
label2.setOutputMarkupId(true);
panel.addOrReplace(label2);
 
target.addComponent(label);
target.addComponent(label2);
}
}

It works so far, but is this really the right way?

How do I access the MyPanel which is included in the AjaxTabbedPanel?
I don't think that MyPanel panel = (MyPanel)tpanel.get(panel);  is the 
best way.

Any suggestions?

Fabian






[EMAIL PROTECTED] [EMAIL PROTECTED] 
15.08.2007 09:53
Bitte antworten an
users@wicket.apache.org


An
users@wicket.apache.org
Kopie

Thema
Re: updateing a component on AjaxTabbedPanel






The ajax tabbed panel should be an instance variable. Then you can use
target.addComponent(tabbedPanel).

2007/8/15, [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Hi there,

 i am very new to wicket an got some problems while using a tree and a
 AjaxTabbedPanel.

 I want to update a simple label component at an AjaxTabbedPanel after 
the
 user click something at the tree.

 Here is my code:
 public class ConfirmPage extends WebPage{
 public ConfirmPage()
 {
 super();
 //user is a simple POJO
 User user = new User(test,test);

 //Elements for the Tree
 ListConsUnit consUnits = new ArrayListConsUnit();
 consUnits.add(new ConsUnit(Single));
 consUnits.add(new ConsUnit(General));
 consUnits.add(new ConsUnit());

 //simple label at the webpage
 label = new Label(luname,user.getUsername());
 add(label);

 //create the tree
 TreeModel tm = MyBaseTree.createTreeModel(consUnits);
 tree = new MyTree(tree,tm);
 add(tree);
 tree.getTreeState().collapseAll();


//create the tabs like the sample app
 tabs.add(new AbstractTab(new Model(first tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(second tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel2(panelId);
 }
 });

 tabs.add(new AbstractTab(new Model(third tab))
 {
 public Panel getPanel(String panelId)
 {
 return new MyPanel3(panelId);
 }
 });
 tpanel = new AjaxTabbedPanel(tabs, tabs);
 add(tpanel);
 add(new StyleSheetReference(pageCSS, getClass(),
 css/style.css));
 }

 Here is now the code from the tree:

 public class MyTree extends LinkTree{

 public MyTree(String arg0, TreeModel arg1) {
 super(arg0, arg1);
 }


 protected void onNodeLinkClicked(javax.swing.tree.TreeNode node,
 BaseTree tree, AjaxRequestTarget target)
 {

 //update the label on ConfimPage
 Label label = new Label(luname,node.toString());
 label.setOutputMarkupId(true);
 page.addOrReplace(label);
 target.addComponent(label);

 //how to update AjaxTabbedPanel???
 }
 }

 Here the code from MyPanel:

 public class MyPanel extends Panel{

 private Label label;

 public MyPanel(String id) {
 super(id);

 label = new Label(test, Text);
 label.setOutputMarkupId(true);
 this.add(label);

 }
 }

 The label at ConfirmPage is updated via Ajax if the user selects 
something
 from the tree, but not the label at the AjaxTabbedPanel.
 If the user selects something from the tree the label at MyPanel should 
be
 updated with the value of the tree node.
 How do i do this?

 With kind regards
 Fabian Hagen

 SN AG
 Klingenderstr. 5
 D 33100 Paderborn

 voice +49 5251/1581- 862
 fax   +49 5251/1581-71
 eMail [EMAIL PROTECTED]
 web   http://www.s-und-n.de

 Vorstand
 Klaus Beverungen
 Josef Tillmann

 Vorsitzender des Aufsichtsrates
 Heinz-Dieter Wendorff

 Handelsregister
 Amtsgericht Paderborn HRB 3270


wicket-703

2007-08-15 Thread Andrew Klochkov
I reported the bug more that a month ago and attached a patch. But it's
still open :-( Is someone going to fix it at all?
The bug is here https://issues.apache.org/jira/browse/WICKET-703

-- 
Andrew Klochkov


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



Re: image overlays, what's the best solution ?

2007-08-15 Thread Antoine Angénieux
Okay, I found a solution based uniquely based on ResourceReference for 
both the original icon and the decorators to be applied.


If anyone's interested, let me know it and I'll post some code.

Cheers,

Antoine.

Antoine Angénieux a écrit :

Hi guys,

I've been using Wickets for over 6 months now and absolutely love it!

I'm developping on Wicket 1.3 beta 2 and was looking for the best 
solution to provide some kind of composite ResourceReference...


What I want to achieve is building complex icons by superposing them on 
top of each others (imagine an icon in a tree that could be decorated by 
an error mark and / or a signed, rejected mark or whatever you can come 
up with).


Furthermore, I'd like the resulting image to be accesible by an URL that 
does not require bookmarkability...


My source icon to be decorated is available as a Wicket 
ResourceReference.


One way I found interesting was to build this on top of 
RenderedDynamicImageResource and do the overlaying in the 
render(Graphics2D graphics) method, but I could not find a reliable 
method to wrap the data from my source icon ResourceReference into 
either a comprehensive byte array for the awt Toolkit to build an 
image, or more simply directly an awt Image from the 
resource.getResourceStream().getInputStream().


Ideas anyone ?

Cheers,

Antoine.


-
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]



Fwd: Wickest way to format a label before render

2007-08-15 Thread Francisco Diaz Trepat - gmail
sorry sent to the wrong address.

-- Forwarded message --
From: Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
Date: Aug 15, 2007 12:02 PM
Subject: Wickest way to format a label before render
To: [EMAIL PROTECTED]

Hi, I have the dumbest request from our functional team.

A label that holds the result of a calculation must invert the positive
negative sign (- +), with that the color, and add a percentage symbol.

So, basically I have to change the display model value and based on the
model value itself.

onBeforeRender?

I had some difficulties,

thanks,

f(t)


Re: Fwd: Wickest way to format a label before render

2007-08-15 Thread Thijs

Why not use the onComponentTag?

Francisco Diaz Trepat - gmail wrote:

sorry sent to the wrong address.

-- Forwarded message --
From: Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
Date: Aug 15, 2007 12:02 PM
Subject: Wickest way to format a label before render
To: [EMAIL PROTECTED]

Hi, I have the dumbest request from our functional team.

A label that holds the result of a calculation must invert the positive
negative sign (- +), with that the color, and add a percentage symbol.

So, basically I have to change the display model value and based on the
model value itself.

onBeforeRender?

I had some difficulties,

thanks,

f(t)

  



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



Re: Fwd: Wickest way to format a label before render

2007-08-15 Thread Thijs

Sorry
onComponentTagBody

protected void onComponentTagBody(final MarkupStream markupStream, final 
ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, 
doYourStuffWithTheModel(getModelObject()));

}

And you can probably add a SimpleAttributeModifier to add a class 
element to add a css property.

see
http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-*tag*.html 
http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html 



Put this al in a custom component and you have what you want...

Francisco Diaz Trepat - gmail wrote:

Sounds good. I thought about it too.

as the subject suggest, would that be the wickets way?

would that be the more nit way from a wicket perspective?

f(t)


On 8/15/07, Thijs [EMAIL PROTECTED] wrote:
  

Why not use the onComponentTag?

Francisco Diaz Trepat - gmail wrote:


sorry sent to the wrong address.

-- Forwarded message --
From: Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
Date: Aug 15, 2007 12:02 PM
Subject: Wickest way to format a label before render
To: [EMAIL PROTECTED]

Hi, I have the dumbest request from our functional team.

A label that holds the result of a calculation must invert the positive
negative sign (- +), with that the color, and add a percentage symbol.

So, basically I have to change the display model value and based on the
model value itself.

onBeforeRender?

I had some difficulties,

thanks,

f(t)


  

-
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: Caching the context path

2007-08-15 Thread Igor Vaynberg
so what exactly are you doing? obviously you cant really share an app across
actual contexts because they are supposed to be isolated.

so what do you do? you have a single application object, but you map two
filters with two different paths and share the single instance of
application object via custom applicationfactory?

-igor


On 8/15/07, David Leangen [EMAIL PROTECTED] wrote:


 Hmmm...

 Very nasty things are happening in my forms. Because it's not resolving
 the URLs properly, wicket thinks that my pages are expired.

 Does this mean that I have no choice but to re-instantiate a new wicket
 for each context?


 In other words, is what I'm trying to do too much to ask of wicket
 without some major changes?

 Or is there a relatively simple way I could get this to work?





 On Wed, 2007-08-15 at 12:57 +0900, David Leangen wrote:
  I'm attempting to mount one instance of wicket on more than one context
  path. However, something is not working as I expect it to from within
  Wicket, due to some kind of caching going on.
 
 
  Essentially, I have my servlet container setup so that both of the
  following get routed to the same instance of wicket:
 
www.example.com/cxt1/
www.example.com/cxt2/
 
  On the first run, both work as expected.
 
  If I try to access directly either one of:
 
www.example.com/cxt1/somePage
www.example.com/cxt2/somePage
 
  also no problem.
 
  However, if I first access cxt1, then later try to access:
 
www.example.com/cxt2{/}
 
  Wicket is forwarding me back to:
 
www.example.com/cxt1
 
  And vice-versa when I first access cxt2 and later try to access cxt1
  without a path.
 
  Also, none of my links are working as expected. Once cxt1 is cached, all
  my links now point to that context, which messes up what I'm trying to
  do.
 
 
  Is this a bug? If so, where should I look to fix this?
 
 
  Thanks!
  David
 
 
 
 
  -
  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: Problem with IE6 and Wicket DropDownChoice using AjaxSelfUpdatingBehavior

2007-08-15 Thread Daryl K

That works fine it only happens on my site.

I am assuming you mean this example  
http://www.wicket-library.com/wicket-examples/ajax/choice.1



igor.vaynberg wrote:
 
 can you get the ajax wicket-example with two linked dropdowns to error out
 on one of your pcs?
 
 -igor
 
 
 On 8/15/07, Daryl K [EMAIL PROTECTED] wrote:


 I am experiencing a problem with IE6 using Wicket
 AjaxSelfUpdatingBehavior
 on
 two DropDownChoice components. When one choice is select in a drop down
 list
 the other on updates with choices based on what the user selected from
 the
 first box.

 My problem is for some of are users who run IE6 they receive a JavaScript
 error object expected when they try to select a choice using the
 DropDownChoice components. When this error happens the
 AjaxSelfUpdatingBehavior fails and the DropDownChoice components are
 empty.

 This problem is intermittent and does it not affect everyone. I have two
 PC
 in my office both running the exact same version of IE6 one PC has this
 problem the other does not. I have Firefox and Netscape on both PC's and
 they work fine on both.

 Has anyone every heard of a problem like this with IE6 and Wicket before?

 I am running Version 6.0.2900.2180.xpsp_sp2_gdr.0702272254CO on Windows
 XP
 Professional with SP2

 I am using Wicket version 1.2.6 running on Weblogic 8

 Attached are the files for the components that throw the JavaScript
 error.
 http://www.nabble.com/file/p12163099/CatRsnPanel.html CatRsnPanel.html
 http://www.nabble.com/file/p12163099/CatRsnPanel.java CatRsnPanel.java
 --
 View this message in context:
 http://www.nabble.com/Problem-with-IE6-and-Wicket-DropDownChoice-using-AjaxSelfUpdatingBehavior-tf4273458.html#a12163099
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-IE6-and-Wicket-DropDownChoice-using-AjaxSelfUpdatingBehavior-tf4273458.html#a12165146
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: Caching the context path

2007-08-15 Thread Eelco Hillenius
 Is this a bug? If so, where should I look to fix this?

Wicket 1.2 was gready in determining and using the path. I think what
you want should work with Wicket 1.3. Didn't test it yet though.

Eelco

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



Re: setSerializeSessionAttributes in wicket-1.3.0-beta2

2007-08-15 Thread Eelco Hillenius
 Eelco, the ISessionStore interface has a lot of methods.. can you give me an
 example of how to get rid of the serialization? It really slows down the
 application.

I can imagine those checks did cost something in 1.2, though with Wicket 1.3
and the way we use it with the session stores should be pretty well
optimized. I think the last time I looked, serializating and saving a
(pretty big) page took 1 or 2 miliseconds on my notebook. Are you sure
this is such a bottle neck? Maybe there is something else you weren't
aware of? Can you give us some numbers maybe?

Anyway, if you want to build a session store from scratch, you could
look at HttpSessionStore, copy most of it, but instead of storing in
the session, you you store it in a hashmap.

Eelco

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



How to get the html combo value in wicket?

2007-08-15 Thread Edi


Hi,

I have ordinary html combo,

select name=comboTxt
option value=oneOne/option
option value=twoTwo/option
/select

How can I get the html combo value using wicket.

if ordinary html text box input type=text name=txtbox means I can get
getRequest().getParameter(txtbox);

But In combo?
Please let me know.

Thanking You


-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-html-combo-value-in-wicket--tf4274630.html#a12166949
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: Wickest way to format a label before render

2007-08-15 Thread Francisco Diaz Trepat - gmail
done.

but

How about using your book? Come on... Are you intentionally building
momentum? kind of like Hollywood blockbusters? :-)

Are you enjoing our geeky intrigue?

Thats not right mister... /stephen_colbert

jaja

cheers,
f(t)


On 8/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  A label that holds the result of a calculation must invert the positive
  negative sign (- +), with that the color, and add a percentage symbol.
 
  So, basically I have to change the display model value and based on the
  model value itself.

 Like Thijs said. Or use a decorating model.

 Eelco

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




Re: wicket-703

2007-08-15 Thread Martin Funk

whilst you are at it:
https://issues.apache.org/jira/browse/WICKET-480

mf

Igor Vaynberg schrieb:

looks like it got missed when we scheduled thing for beta3 so it was off the
radar :( fixed now.

-igor


On 8/15/07, Andrew Klochkov [EMAIL PROTECTED] wrote:
  

I reported the bug more that a month ago and attached a patch. But it's
still open :-( Is someone going to fix it at all?
The bug is here https://issues.apache.org/jira/browse/WICKET-703

--
Andrew Klochkov


-
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: Wickest way to format a label before render

2007-08-15 Thread Eelco Hillenius
On 8/15/07, Francisco Diaz Trepat - gmail
[EMAIL PROTECTED] wrote:
 done.

 but

 How about using your book? Come on... Are you intentionally building
 momentum? kind of like Hollywood blockbusters? :-)

 Are you enjoing our geeky intrigue?

 Thats not right mister... /stephen_colbert

 jaja


Get your book now at http://manning.com/dashorst/. Two more chapters
are scheduled to be added this week, more in the next few weeks. And I
believe we say something about using models vs overriding
onComponentTag(Body) :)

Eelco

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



Re: wicket:child in a WebMarkupContainer

2007-08-15 Thread Gerolf Seitz
@ core-devs:

The solution that first came to mind was to override add(Component) in
 SuperComponent so that it would add the added component to myContainer
 instead of 'this'. Unforunately, the add method is final (why!?), so
 this can't be done.


the javadoc for MarkupContainer#add(Component) should be changed because
it's final, but it says

* Be careful when overriding this method, if not implemented properly it
* may lead to a java component hierarchy which no longer matches the
* template hierarchy, which in turn will lead to an error.

, when overriding is simply not possible at the moment.

gerolf


Re: Order-Items master detail page

2007-08-15 Thread Igor Vaynberg
you create a new instance of itemsDataProvider  but your listview never gets
that new instance, so its using the old one. instead you should change the
data that instance returns:

IDataProvider itemsDataProvider = new idataprovider() {

  count() { if (selected==null) return 0; else return selected.items.size();
}

 iterator() { if (selected==null) { return new EmptyIterator(); } else {
return selected.items.iterator(); }

}


-igor





On 8/15/07, Oleg Taranenko [EMAIL PROTECTED] wrote:

  Hi,


 I have the simplest use case, but i'm finally confused, please help.


 I have 2 DataViews with ListDataProvider.

 Left dataview shows Orders, right must show order items, when I click on
 the order number.




 I have simple list - Order List and Order Items List:

 Both created as DataView with ListDataProviders.

 List Provider for items depends on clicked ajax link.


 It seems that IDataProvider static bound to the markup? and cannot be
 changed


 How i can show order's item in the Items List by click on Ajax Link in
 Order Lis?


 I thought enough add


 - Markup --

HomePage.html


 html

 body



table cellspacing=0 cellpadding=2 border=1

tr wicket:id=orders

tdspan wicket:id=id[id]/span/td

tda wicket:id=alinkspan
 wicket:id=name[name]/span/a/td

/tr

/table


 div wicket:id=itemsWrap/div

 /body

 /html



 HomePage$ItemsPanel.html


 wicket:panel

table cellspacing=0 cellpadding=2 border=1

tr wicket:id=items

tdspan wicket:id=itemid[id]/span/td

tdspan wicket:id=itemname[name]/span/td

/tr

/table

 /wicket:panel


 -- Code --

HomePage.java:


 public class HomePage extends WebPage {



private Order selected;

IDataProvider itemsDataProvider = new ListDataProvider(
 Collections.emptyList());



private ItemsPanel itemsWrap;



public HomePage(final PageParameters parameters) {


 IDataProvider orderDataProvider = new ListDataProvider(
 Order.orderList);

 add (new DataView(orders, orderDataProvider) {


 @Override

protected void populateItem(Item item) {

Order order = (Order) item.getModelObject
 ();

item.add(new Label(id, order.getId
 ().toString()));

final AjaxLink link;

item.add(link = new AjaxLink(alink,new
 Model(order)) {


 @Override

public void
 onClick(AjaxRequestTarget target) {

counter1++;

selected = (Order)
 this.getModelObject();

  itemsDataProvider = new
 ListDataProvider(toList(selected.getItems()));



target.addComponent(c1);

itemsWrap.setVisible(true);

target.addComponent
 (itemsWrap);

}



});

link.add(new Label(name, order.getName
 ()));

}



 });

 add (itemsWrap = new ItemsPanel(itemsWrap));

 itemsWrap.setOutputMarkupId(true);

 itemsWrap.setVisible(true);


 }





 /***

  * Items Panel.

  ***/

public class ItemsPanel extends Panel {


 public ItemsPanel(String id) {

super(id);

add (new DataView(items, itemsDataProvider) {


 @Override

protected void populateItem(Item item) {

OrderItem orderItem = (OrderItem)
 item.getModelObject();

item.add(new Label(itemid,
 orderItem.getId().toString()));

item.add(new Label(itemname,
 orderItem.getOrderId().toString()));

}



});



}



}



public ListObject toList(Set? extends Object set) {

if (set == null) {

throw new NullPointerException(argument must not
 be null);

}

ListObject result = new ArrayListObject(set.size());

result.addAll(set);

return result;

}



 }


 It does not works, order items are not shown at all. :(


 It seems like itemsDataProvider is bound 

Re: Updates within Panels in datatable

2007-08-15 Thread salmas

I hadn't but I just tried it and no difference. The issue is that when I type
into the textfield the value of amount is not changed. Do you have any
idea why this would be? I do resue the textfield twice setting it invisible
once because if I don't add it to the second row I'll get an exception
because the markup expects an object with that wicket id. I only need it to
show along with the first choice in the radio group. Should I be doing this
panel differently?


igor.vaynberg wrote:
 
 did you call listview.setreuseitems(true)?
 -igor
 
 
 On 8/15/07, salmas [EMAIL PROTECTED] wrote:



 Hi Igor:

 Yes the button/Link works but it still does not solve my issue. I have a
 table where two of the columns have panels. One of the panels has a
 textField and a radio choice and the other panel has the submit button.
 When
 I hit submit I need the values in the textfield and in the choice. While
 the
 textfield has a propertymodel this model is never updated when I type in
 the
 field and I never get an updated value for it. I have tried

 ReuseIfModelsEqualStrategy strategy = new ReuseIfModelsEqualStrategy();
 table.setItemReuseStrategy(strategy);
 and making sure my model has equals and hashcode implemented properly and
 I
 have made sure that the table is not redrawn using the button/link combo
 so
 I am not sure why the panel with the textfield never sets a value when
 I
 type into the textfield?

 Below is the code for the ListView that I use to populate the textfield
 and
 choice in my panel. It contains the amountfield but when I edit the
 amount
 setAmount is never called when I type values in the textfield.

 class OptionsListView extends ListView {
 private String amount=0.00;

 public OptionsListView(java.lang.String id,
 java.util.List list) {
 super(id,list);
 }

 protected void populateItem(ListItem item)
 {
 TextField amountField = new TextField(amount,
 new
 PropertyModel(this,amount));
 Radio radio = new
 Radio(workflowFrame_radioPanel_radioOption,
 item.getModel());
 item.add(radio);

 if (item.getIndex() == 0) {
 choice.setModel(item.getModel());
 item.add(amountField);
 } else {
 amountField.setVisible(false);
 item.add(amountField);
 }

 Label label = (Label)(item.getModel
 ().getObject(this));
 item.add(label);
 System.out.println(amountField  + amountField.getValue
 ());
 }

 public String getAmount() {
 System.out.println(amount);
 return amount;
 }

 public void setAmount(String amount) {
 this.amount = amount;
 System.out.println(Setting amount  + amount);
 }
 };



 igor.vaynberg wrote:
 
  simply do this
 
  input type=button wicket:id=button value=foo/
 
  add(new Link(button) { onclick() {...}});
 
  Link is smart to figure out that it isnt attached to anchor tag and
 will
  generate an onclick attr.
 
  -igor
 
 
  On 8/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  It's been awhile since I posted to this thread but I have been out
 sick
  for about two weeks. I had a thread going titled Updates within
 Panels
  in
  datatable on the old list but I am posting to the new one so I don't
  think the older messages will show.
  Is there a way that I can have a button which has a java handler for
 an
  onclick event but does not submit the page (redraw the table) I
 believe
  that this would solve my problem. I cannot use the 1.3 beta since the
  company I am working for doesn't want to use that yet.
 
  Thanks
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Updates-within-Panels-in-datatable-tf4274165.html#a12170198
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Updates-within-Panels-in-datatable-tf4274165.html#a12170489
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to get HTML source code from a wicket page (was on old list)

2007-08-15 Thread oliver.henlich

Hi,

Still trying to get the HTML source from a wicket page. However, the
discussion was on the old user group and i don't think anyone is looking
there anymore so here is the post with the last state of things.

http://www.nabble.com/forum/ViewPost.jtp?post=12044817framed=y


Ideas?

Oliver
-- 
View this message in context: 
http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-%28was-on-old-list%29-tf4276165.html#a12171769
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: How to get HTML source code from a wicket page (was on old list)

2007-08-15 Thread oliver.henlich

yeah cheers igor

it was just that on the thread i linked to there seemed to be a direct way
of doing this and there were some hints that it should work on trunk or
beta2.




igor.vaynberg wrote:
 
 did you see the tip about running wickettester in a separate thread?
 
 -igor
 
 
 On 8/15/07, oliver.henlich [EMAIL PROTECTED] wrote:


 Hi,

 Still trying to get the HTML source from a wicket page. However, the
 discussion was on the old user group and i don't think anyone is looking
 there anymore so here is the post with the last state of things.

 http://www.nabble.com/forum/ViewPost.jtp?post=12044817framed=y


 Ideas?

 Oliver
 --
 View this message in context:
 http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-%28was-on-old-list%29-tf4276165.html#a12171769
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-%28was-on-old-list%29-tf4276165.html#a12172646
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: Wicket vs. ZK

2007-08-15 Thread Eelco Hillenius
 I searched the threads on this forum but didn't find any discussion on
 comparing Wicket with ZK (www.zkoss.org/), the #1 Ajax project on
 sourceforge.net now. I read a lot on both frameworks and they both seem nice
 from the feedback of the users. Since I am about to choose one web
 framework, I want to get some ideas of these questions here.

The main idea behind Wicket is to provide a plain old Java programming
model, and this is very different from declarative, DSL based
frameworks like ZK (though ZK has an 'advanced mode' where you can
write components using Java).

Most telling is maybe this quote: TY: Echo2 assumes UI designers are
Swing programmers, while ZK assumes many of them are not programmers.
, from ZK's creator in an interview you can find here:
http://blogs.pathf.com/agileajax/2006/06/an_interview_wi.html.

Wicket assumes that UI designers are *designers* (and not
half-programmers like ZK assumes) only dealing with laying out, and
that UI logic can best be coded in Java (by programmers obviously).
Wicket enforces a rigid separation of those concerns (presentation and
logic), not because we are born zealots, but because most of us have
gone through the experience of how easily you can pull your project in
the swamp by even allowing for minimal scripting. In that respect, ZK
is counter to what we stand for if you look at the database code here:
http://www.zkoss.org/doc/tutorial.dsp

Don't get me wrong, I think ZK has a couple of nice features. I'm not
crazy about XML, but choosing XUL makes sense from their perspective,
and the first part of their tutorial which builds up the lists
actually looks nice (though you could achieve the same by e.g. picking
up http://developer.yahoo.com/yui/datatable/ with whatever server side
framework you like).

 1. Design concern (Wicket vs. ZK)
 Both frameworks are thin-client and generate AJAX, the biggest difference is
 Wicket uses Java and HTML while ZK uses XUL or other scripting language.
 What's the advantage and disadvantage in both cases?

Advantage of HTML is that you can work with web designers  standard
tools for laying out and that you have very direct control of what
will be in your users' browsers. XUL might be nice if the framework
can decide to send it directly to the client if that supports it.

Note btw that Wicket is not an Ajax framework. It has - I believe -
excellent Ajax support, but you can build web applications without any
Ajax just fine.

 2. AJAX components (Wicket vs. ZK)
 From the demo websites, it seems ZK provided more AJAX components than
 Wicket. (As I haven't worked deeply with Wicket, it could be Wicket either
 provided more components or easy to write those components.) But I am
 wondering is it easy to use Wicket to implement features like drag and drop,
 date picker...

I think it is more relevant to first look at how easy it is to create
your own, and second look at exactly what components you need and
which are supported.

 3. Target application (Wicket)
 There is a trend to move from multi-page application to single-page
 application (or a few pages which much lesser than traditional page-based
 web application) using AJAX. As far as I know, Wicket is a component-based
 framework and very OO, which means the components could be well reused and
 maintained, but is it easy to build such single-page application? Would one
 or a few more page classes be very large?

Whatever you want. No, they wouldn't be large, as you would design
panels for sections of a single-page app, and add/ replace those
panels based on app logic.

 4. Integration (Wicket)
 How about using Wicket together with existing JSF application?

There are no such facilities atm, though if you google you should be
able to find a couple of examples of where people mixed JSP  Wicket.


Eelco

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



Re: How to get the html combo value in wicket?

2007-08-15 Thread Edi

any reply..



Edi wrote:
 
 
 Hi,
 
 I have ordinary html combo,
 
 select name=comboTxt
 option value=oneOne/option
 option value=twoTwo/option
 /select
 
 How can I get the html combo value using wicket.
 
 if ordinary html text box input type=text name=txtbox means I can
 get getRequest().getParameter(txtbox);
 
 But In combo?
 Please let me know.
 
 Thanking You
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-the-html-combo-value-in-wicket--tf4274630.html#a12175034
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: How to get the html combo value in wicket?

2007-08-15 Thread Igor Vaynberg
the final value is put into the model

-igor


On 8/15/07, Edi [EMAIL PROTECTED] wrote:


 any reply..



 Edi wrote:
 
 
  Hi,
 
  I have ordinary html combo,
 
  select name=comboTxt
  option value=oneOne/option
  option value=twoTwo/option
  /select
 
  How can I get the html combo value using wicket.
 
  if ordinary html text box input type=text name=txtbox means I can
  get getRequest().getParameter(txtbox);
 
  But In combo?
  Please let me know.
 
  Thanking You
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-get-the-html-combo-value-in-wicket--tf4274630.html#a12175034
 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: Wicket vs. ZK

2007-08-15 Thread Igor Vaynberg
On 8/15/07, juliez [EMAIL PROTECTED] wrote:


 First, thanks for the reply!

  2. AJAX components (Wicket vs. ZK)
 you do not implement features like drag and drop or datepicker in wicket,
 instead you wrap javascript libraries that implement those features with
 wicket components.

 I am actually confused at how many ways Wicket supports AJAX. The classes
 in
 wicket.ajax packages are used for AJAX behaviors. I supposed these classes
 are for common AJAX behaviors.


wicket has an excellent native ajax support. it allows you to perform
partial page renders where only one or more components on the page are
updated. see wicketstuff.org/wicket13 for examples under ajax. it also has
common ajax handlers - so you dont have to reinvent the wheel - such as form
component update, ajax form submit, self updating timers, etc.

It seems they are different from wrapping
 JavaScript - correct me if I am wrong.


javascript is not the same as ajax. take drag and drop - that has very
little to do with ajax except maybe for notification that x has been dropped
into y. take datepicker, that has no ajax in it at all, its just javascript
that draws a calendar and puts a selected date into a textfield.

Then my questions are
 1) what is the standard way to add AJAX with Wicket: first looking for
 existing components (including the components in WicketStuff), then if not
 found, wrap JavaScript?


if you have some ajax need that wicket doesnt natively provide and that is
existent in some 3rd party js lib then you can easily write wicket wrappers
for it. the nice thing about it is that you only have to do it once, and
from that point on you dont need to worry about javascript, just use your
java classes. for example there is wicketstuff-animator project that wraps
animator.js in a set of wicket components. you can add animations without
known the details of the animator.js lib.

2) I read the attached file and googled more for the instruction on how to
 wrap JavaScript. Found one here
 (http://cwiki.apache.org/WICKET/adding-dynamic-field-prompts-or-hints.html
 ).
 I am wondering if there are instructions on how to do it in a general way.


there is no general way, you simply write components that hook into the
javascript.

3. Target application (Wicket)
  like you say, wicket is component oriented. it doesnt really care how
 you
  build your app: many pages or a single page. at my day time job we have
 an
  app that is mostly a single page with a lot of component replacement.
  works
  just fine.

 Still not sure, if a page includes many replacement, how to keep the
 method/class short yet support those changes?


you dont define the combination of all possible replacements at the same
time. wicket is dynamic, at any point in time a component can replace itself
or other components with something else that was just instantiated. also
because components are encapsulated they can perform replacements inside
themselves as well. wicket is not page-centric.

-igor