Re: Wizard clear all formfields

2012-05-16 Thread jensiator
Ended up with this:
public class ClearFormComponentWizardStep extends WizardStep {

public ClearFormComponentWizardStep(String pTitleMessageKey) {
this(pTitleMessageKey, new ModelString());
}

public ClearFormComponentWizardStep(String pTitleMessageKey, IModel?
extends Serializable pModel) {
super(pTitleMessageKey, pModel);
}

@Override
public Component getView(String pId, Component pParent, IWizard 
pWizard) {
WebMarkupContainer view = (WebMarkupContainer) 
super.getView(pId, pParent,
pWizard);
if(isTimeToClear()) {
clearAllFormComponent(view);
}
return view;
}

/**
 * Can be overriden for changing the clearAllForm behavior
 * 
 * @param pView
 */
protected void clearAllFormComponent(WebMarkupContainer pView) {
pView.visitChildren(FormComponent.class, new
Component.IVisitorFormComponentlt;?() {
@Override
public Object component(FormComponent? 
pFormComponent) {
pFormComponent.clearInput();
return Component.IVisitor.CONTINUE_TRAVERSAL;
}
});
}

/**
 * Override this if any other parameter would affect
clearAllFormComponentCode
 * 
 * @return
 */
protected boolean isTimeToClear() {
return true;
}

}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-clear-all-formfields-tp4634057p4641106.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wizard clear all formfields

2012-05-15 Thread jensiator
Hi everyone. 
I got a problem. Anyone ever had a first step contain for example a dropdown
that will load default data to the other formcomponents in the wizard?
The dropdown has got a ajaxformcomponentupdatingbehavior. We call our server
in the ajax request and update a lot of properties in the model object. The
model object shared between all of the pages. 
If you show step2 it will show the correct default values. 
If you then go back to step1 again and change the dropdown, step2 will not
show the changes. This I  because I need to clear the input of the
formcomponents in step2. Is there any way to clear all formcomponents for
all steps in a wizard. The problem is that only one step at the time is
active.  
Is Overriding onBefore render on every single step the only way? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-clear-all-formfields-tp4634057.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wizard clear all formfields

2012-05-15 Thread jensiator
Yes you are correct. I forgot to mention that I have already tried it. It
does not work because Step2 formcomponents is not a part of the wizard form
when step1 is. 
I think its done here in Wizard class
public void onActiveStepChanged(IWizardStep newStep)
{
 form.replace(newStep.getView(VIEW_ID, this, this));
 form.replace(newStep.getHeader(HEADER_ID, this, this));
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-clear-all-formfields-tp4634057p4634120.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wizard clear all formfields

2012-05-15 Thread jensiator
Good Idea. I will try it. The only drawback is that it will be done
everytime. Even if I go back to step1 and don't do anything. But I might be
able to live with that 
Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-clear-all-formfields-tp4634057p4634157.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread jensiator
What about if I say that its only wicket applications? Can we narrow it down
even more then?
In both apps have a link to each other so the end user can toggle between
them. If these link's are external links. How could you send/share the
username password between den in a secure way? Https of course but I don't
have a clue when it comes to coding. Never worked with this. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4623142.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: refresh page from an AjaxLink or OnChangeAjaxBehavior

2012-05-10 Thread jensiator
Do you really need to call this?
setResponse(currentPage.getClass(), currentPage.getPageParameters()); 

If its just some components on the same page that will be affected by the
dropdown change, the above solution feels unnecessary. If you use ajax or
javascript the page don't need to be updated in a ordinary. request 

You could just update the component/components on the page that my be
affected by the dropdown change. You can do this by adding these components
to the AjaxRequestTarget.
If you add a AjaxFormComponentUpdatingBehavior on the dropdown, and a model
to the page, you would even update the model with the dropdown value. Any
components that you have added to the AjaxRequestTarget would then render.
In these affected components you can either override onComponentTag or
--TagBody to change it rendered values. I prefer to give the components a
specialized model. 
in wicket 1.5 you can do it even decoupled. 

If I not completely off target I can give you some code examples..



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/refresh-page-from-an-AjaxLink-or-OnChangeAjaxBehavior-tp4614698p4623193.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Field with OnChangeAjaxBehavior Not updating.

2012-05-10 Thread jensiator
In the AjaxLink you change the model and I think your model becomes out of
sync with the formcomponent.  I think the formcomponent don't know which
value it should use. The one the end user typed or the model that has
changed. Sometimes it helps to think about when you want the model to be
update. I personally thinks one should try to update the models as little as
possibly with ajax. I think the most web users expect the data to be updated
when the form is submitted. Not on events like unblur and onchange. But you
can't always avoid it. 
One way of doing it could be to let the Ajaxlink only update the text value
in the textfield. The textfield will not be set to the model until you
submit. You would need to introduce a ordinary form submit button.
And you would need to divide the Textfields model from what the AjaxLink is
changing. 
You will always need to add the textfields to you AjaxRequestTarget art.
But as I see it you got two choices here. 
1. In the Ajaxlink onclick you do your db work and set some property in the
model. The textfield is not binded to the same property. Instead you
override the Textfields onComponentTag method and
pTag.put(value,fromDBWith.toString()). ( toString is not enough you should
use a converter her, Look below )
2.  I would probably try to put the dbcall in the onComponentTag of the
textfield. The reason for this is because it would be great to have the
textfield component in charge for what it will display. If you got
cooworkes, would they look in the AjaxLink if the Textfield was not working
as expected? You would need to do some checks if the AjaxLink have been
clicked then I guess. 

Anyone else got something on this? It depends a little from case to case. I
have created a Behavior for this instead of overriding oncomponenttag.

And about
 @Override public C IConverterC getConverter(ClassC ctype) {
if (BigDecimal.class.isAssignableFrom(ctype)) { 
MoneyConverter mc = new MoneyConverter(false, false); 

I suggest you change the default BigdecimalConverter on application level
instead. in wicket 1.4. you override newConverterLocator in the Application. 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Field-with-OnChangeAjaxBehavior-Not-updating-tp4608156p4623294.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread jensiator
Thanks you everyone. A thank you Arjun for you detailed thoughts. I will see
what CAS can do together with our restservices. The wicket applications is
two 'clients' that talks with the same server through rest.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4625265.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Single sign on (SSO) for two WicketApplication

2012-05-09 Thread jensiator
Anyone got some experience on this? 
1. Maybe using the tomcat built in SSO for two applications?
2. Could one add a filter/Servlet that handles it for the two Wicket
Applications?
3. Some products that anyone have good experience with?
I have google on this but have not found any good 'how to' or tutorial. Any
good links? 
Jens

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket 1.5 and jbpm spring configuration

2012-05-03 Thread jensiator
I got a weird problem. 
I'm changing to wicket 1.5. In some places we use Jbpm. And I use
wicket-spring. I have not setup the Jbpm myself but when we used wicket 1.4
the wicket application had a memory usage about 70 mb(taskManager). After
switching to wicket 1.5 the memory goes up to 300mb. In applicationContext I
can remove following lines and the memory drops to 100 which is ok I guess. 
I just don't understand why wicket 1.5 can have anything to do with it.
Maybe some changes in my a application during porting to wicket 1.5 could be
the reason. So I  tried with a dummy wicket application. Just empty with out
any request listeners or specialized session. Still the memory increase is
there. 
Anyone knows any pitfalls with above code and wicket. Or any changes with
wicket 1.5 and spring?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-jbpm-spring-configuration-tp4607670.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.5 and jbpm spring configuration

2012-05-03 Thread jensiator
I'm sorry 
I will need to describe it better. 
The Jbpm is at this point out of my reach. No doubt it has been implemented
badly (by others) and I will look into it when I got time. The question is
why this jbpm project is affecting wicket 1.5 more than wicket 1.4. Remember
that I switch to an empty wicket application to rule out any mistake from
myself (except in following config). So I will start with showing my config.
Im using maven for dependencies
*in web.xml.* I add spring constextlistener, hibernate strategy and my
standard wicket config. 


I use wicket-spring to inject dao's in my components
*in Application init*

But I have ruled out this because the mem problems still remain if I use a
empty standard wicket app. Just defining a start page. I just test to start
the application
*applicationContext*
My hibernate knowledge is weak so I have tried to use standard stuff


That's about it. What is pulling up the memory? Is it data being stored in
the session? Data from a badly written JBPM layer? How can I investigate it.
TaskManager is not enough. Any tools out there? Or any good hook up point in
wicket to debug? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-jbpm-spring-configuration-tp4607670p4607775.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.5 and jbpm spring configuration

2012-05-03 Thread jensiator
It's a bank system so I cannot give you any quickstarts. The 'suites' would
jump on me with nail boots. But there is no JBPM code at all I have mocked
it. Its enough to start and empty Wicket application. Thats why I can only
refer to the config.  I'm working in eclipse and I will try Eclipse Memory
Analysis Tool. I will need to get some more meat on the bones before I can
ask any good questions to you guys. Thanks

public class TestApp extends WebApplication {

@Override
public Class? extends Page getHomePage() {
return StartPage.class;
}   
}

with this config. 

in web.xml. I add spring constextlistener, hibernate strategy and my
standard wicket config.

.
listener  
   
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  
/listener
...
filter
  filter-nameopensessioninview/filter-name
 
filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
/filter
 
filter
 filter-namedemofilter/filter-name
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
 init-param
  param-nameapplicationClassName/param-name
param-valuecom.idealinvent.demobank.DemobankApplication/param-value
 /init-param
/filter
.


I use wicket-spring to inject dao's in my components
in Application init

getComponentInstantiationListeners().add(new SpringComponentInjector(this));

But I have ruled out this because the mem problems still remain if I use a
empty standard wicket app. Just defining a start page. I just test to start
the application
applicationContext
My hibernate knowledge is weak so I have tried to use standard stuff

...
  dao bean defs 

bean id=persistenceProperties

class=org.springframework.beans.factory.config.PropertiesFactoryBean
property name=fileEncoding value=UTF-8 /
property name=properties
props
prop
key=hibernate.dialectorg.hibernate.dialect.MySQL5InnoDBDialect/prop
prop key=hibernate.show_sqltrue/prop
prop key=hibernate.format_sqlfalse/prop
prop 
key=hibernate.use_sql_commentsfalse/prop
prop 
key=hibernate.validator.apply_to_ddlfalse/prop
prop 
key=hibernate.validator.autoregister_listenerfalse/prop
/props
/property
/bean

bean id=sessionFactory

class=org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=dataSource ref=branchviewDataSource /
property name=hibernateProperties 
ref=persistenceProperties /
property name=mappingLocations
list
valueclasspath:Domains.hbm.xml/value
/list
/property
property name=configLocation
valueclasspath:hibernate_workflows.cfg.xml/value
/property
/bean










--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-jbpm-spring-configuration-tp4607670p4607806.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.5 and jbpm spring configuration

2012-05-03 Thread jensiator
worth mentioning. I'm using Spring 3.0.6.RELEASE. And the JBPM is old jbpm 3. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-jbpm-spring-configuration-tp4607670p4607871.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Migration to wicket 1.5 and properties.xml files

2012-05-01 Thread jensiator
This seems to be working. I'm will just using for a couple of days. Until I
have been able to check all the other changes. Then in one chunk I will
replace all the xml files when I have confirmed that the application is
behaving well.

In init of application

and 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migration-to-wicket-1-5-and-properties-xml-files-tp4597473p4600499.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Migration to wicket 1.5 and properties.xml files

2012-04-30 Thread jensiator
thank you. Ill look into it

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migration-to-wicket-1-5-and-properties-xml-files-tp4597473p466.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Migration to wicket 1.5 and properties.xml files

2012-04-29 Thread jensiator
Hi everyone. 
I'm late out with migration. And I have a problem. We got a big system using
wicket. 
The .xml change to .properties.xml could be painful. I could just rename all
xml files so I can reach the pages to check if some migration features has
been successful. But the check on the migration might take some time and
this is a big project. I would like to be at update with the rest of the
code on the project and I have bad experience with SVN and renamed files. Is
it anyway to make wicket 1.5 load the old *.xml property files? Only
temporarily.  
Jens

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migration-to-wicket-1-5-and-properties-xml-files-tp4597473.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Any news on 1.5 - mapping different error pages for specific errors

2012-04-26 Thread jensiator
I will try to contribute

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Any-news-on-1-5-mapping-different-error-pages-for-specific-errors-tp3602151p4588983.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Any news on 1.5 - mapping different error pages for specific errors

2012-04-25 Thread jensiator
I Think is something like: 
public IRequestHandler onException(RequestCycle pCycle, Exception
pException) {
if(pException instanceof SomeException) {
 return new RenderPageRequestHandler(new PageProvider(new
SomeSpecialOwnErrorPage()));
}
}

From my peek in the super class. Have not tested it. Please correct me if
I'm wrong. 
Let us all try to give each other code example in these discussion instead
of referring to sourcecode. Have anyone looked at competing languages like
Csharp. They got a lot of example codes i MSDN. Lets do the same!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Any-news-on-1-5-mapping-different-error-pages-for-specific-errors-tp3602151p4585856.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: TextField submit via Ajax

2011-02-07 Thread jensiator

Thanks. I have been looking for this for s long. Thank again. 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TextField-submit-via-Ajax-tp3002094p3264367.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: jquery ui dialog and ajax component updating

2010-12-16 Thread jensiator

Thanks. Now I got it working. 
I got a panel that contains an test ajaxlink and a dialog(also in a panel). 
My problem was that when the outer panel got ajax updated, then the
dialogpanel could not find the javascript in the headerpart. And if I added
the javascript in pResponse.renderOnDomReadyJavascript I got the multiple
dialog divs. This code solves that problem. Thanks for the 'destroy' hint 
In my dialog panel:
@Override
public void renderHead(IHeaderResponse pResponse) {
pResponse.renderJavascript($('#+Dialog.this.getMarkupId(true)+').dialog('destroy').remove();,
null);
pResponse.renderOnDomReadyJavascript($(function() {$(
'#+Dialog.this.getMarkupId(true)+' ).dialog({autoOpen:
false,width:'auto',height:'auto',resizable: false});}));


}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jquery-ui-dialog-and-ajax-component-updating-tp1857058p3090654.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: jquery ui dialog and ajax component updating

2010-12-16 Thread jensiator

Even better
IRequestTarget target = RequestCycle.get().getRequestTarget();
 if(target instanceof AjaxRequestTarget) {

pResponse.renderJavascript($('#+Dialog.this.getMarkupId(true)+').dialog('destroy').remove();,
null);
 }
pResponse.renderOnDomReadyJavascript($(function() {$( '# +
Dialog.this.getMarkupId(true)
+ ' ).dialog({autoOpen: 
false,width:'auto',height:'auto',resizable:
false});}));
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jquery-ui-dialog-and-ajax-component-updating-tp1857058p3090717.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: jquery ui dialog and ajax component updating

2010-12-12 Thread jensiator

Did you solve this problem? Im having the same problem.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jquery-ui-dialog-and-ajax-component-updating-tp1857058p3085030.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Different xml property filename for the markup and java

2009-06-05 Thread jensiator

That is what I missed! That must be the solution. Thanks Igor
Jens
-- 
View this message in context: 
http://www.nabble.com/Different-xml-property-filename-for-the-markup-and-java-tp23847329p23885796.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Different xml property filename for the markup and java

2009-06-04 Thread jensiator

Thanks for the suggestions everone!
Jens

-- 
View this message in context: 
http://www.nabble.com/Different-xml-property-filename-for-the-markup-and-java-tp23847329p23864326.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Different xml property filename for the markup and java

2009-06-04 Thread jensiator

But still...
Everything I read says that wicket searches for property files on class
hierarchy and nesting.
And that a good thing of cource. 
But...
Lets say that I would like to have one big xml property file for every
functionality package (that our customers might want to buy). Most of the
pages in that package is built up of different panels but they share a lot
of properties. 
I cant use the MyApplication.xml because its in the core package. But I got
two base webpages in the core webapplication package(that contains the
Application class). One webpage for basic layout where I'm using
wicket:child. And one webpage that I using in modalwindows. Im willing to
extend them for the func. package but I dont want to duplicate all the
properties in these to pages propertyfiles. In my case I cant see how the
wicket class hierarchy and nesting could help me. 

But I dont understand what you meen with package-wide property files. I know
two ways of hooking up on property files in wicket. 
1. Nesting and hierarchy 
2. getResourceSettings().addStringResourceLoader in the Application.init

I cant use number 2 because Its in the core package

Jens


there are always package-wide property files support in wicket...

-igor

-- 
View this message in context: 
http://www.nabble.com/Different-xml-property-filename-for-the-markup-and-java-tp23847329p23865653.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxResponse with control characters is not validated

2009-05-08 Thread jensiator

done!


igor.vaynberg wrote:
 
 open a jira issue and add a quickstart please.
 
 -igor
 
 On Thu, May 7, 2009 at 4:12 AM, Jens Alenius jens.alen...@megasol.se
 wrote:
 Hi.
 Found something that might be a wicket ajax bug.
 This code wont work in Firefox and we believe that its the Ajax xml
 response
 that is invalid.
 The control characters is not properly escaped. Ex: \u0014 is written
 as
 0014 in the xml Ajax Response but should be #0014.
 See: http://www.w3.org/TR/REC-xml/#dt-charref.

 This code wont work in firefox

 Markup:
 ...
 div wicket:id=testValue/div
   form wicket:id=testform
   div wicket:id=testSubmit class=submitbuttonSubmit/div
 /form
 ...


       Java:
      
       final Label testLabel = new Label(testValue,themodel);
       testLabel.setOutputMarkupId(true);
       add(testLabel);
       FormString testForm = new FormString(testform);
       testForm.add(new AjaxButton(testSubmit){

           @Override
           protected void onSubmit(AjaxRequestTarget pTarget, Form?
 pForm)
 {
               themodel.setObject(\u0014);
                             pTarget.addComponent(testLabel);
           }                       });
       add(testForm);
       ...

 Jens Alenius


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


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

-- 
View this message in context: 
http://www.nabble.com/AjaxResponse-with-control-characters-is-not-validated-tp23424575p23442249.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice with ChoiceRender problem

2009-05-06 Thread jensiator

But still. In this case the map is constant. What when the values is fetched
from db. Are you going to call tha db every time you want to get the
displayname? 
Jens
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-with-ChoiceRender-problem-tp23374394p23401547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice with ChoiceRender problem

2009-05-05 Thread jensiator

Try adding a selectoption in you 'backingbean'. The Dropdown choice want to
'bind' it self to the same type of property in the model as in the List that
you fill it with. If you use the generics on the dropdown it will be much
clearer. 
Jens Alenius



Juha Palomäki wrote:
 
 I think the exception org.apache.wicket.WicketRuntimeException: No
 get method defined for class: class java.lang.String expression: id
 means that Wicket is looking for the getId() method from String, not
 from your own SelectOption.
 
 Br,
 Juha
 
 On Tue, May 5, 2009 at 4:48 AM, Phillip Rhodes prho...@rhoderunner.com
 wrote:
 It's of type String

 Thanks

 On May 4, 2009, at 3:23 PM, James Carman wrote:

 The handicapAccess property is of type?

 On Mon, May 4, 2009 at 2:29 PM, Phillip Rhodes
 spamsu...@rhoderunner.com wrote:

 Hi everyone,
 Sorry for posting this problem but I have been stuck for far too many
 hours on this.  Using wicket 1.4  Appreciate any help on this very very
 much.

 I have a pojo object called address that has a property of
 handicapAccess
 I am trying to bind this property to a dropdown list with 3 choices
 (formated as name/value)
 Yes/Y
 No/N
 Unknown/U

 If I use the constructor of ChoiceRenderer(String displayExpression),
 No
 error, but my property is bound as
 com.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd
 If I use the constructor of ChoiceRenderer(java.lang.String
 displayExpression, java.lang.String idExpression), I get an error
 org.apache.wicket.WicketRuntimeException: No get method defined for
 class:
 class java.lang.String expression: id
 Although my SelectOption class has getId/setId


 ListSelectOption options = new ArrayListSelectOption();
 options.add(new SelectOption(Yes, Y));
 options.add(new SelectOption(No, N));
 options.add(new SelectOption(Unknown, U));

 //org.apache.wicket.WicketRuntimeException: No get method defined for
 class: class java.lang.String expression: id
 ChoiceRenderer choiceRenderer = new ChoiceRenderer(name,id);

 //this choice render gives it a
 //
 handicapAccesscom.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd/handicapAccess
 //ChoiceRenderer choiceRenderer = new ChoiceRenderer(name);
 PropertyModel model = new PropertyModel(address, handicapAccess);

 DropDownChoice ddc = new DropDownChoice(dropDownChoice,
 model,options,choiceRenderer);


 //Here's my SelectOption
 public class SelectOption implements Serializable {
       /**
        *
        */
       private static final long serialVersionUID = 1L;
       private String name;
       private String id;

       public SelectOption(String name, String id) {
               this.name = name;
               this.id = id;
       }

       public String getName() {
               return name;
       }

       public void setName(String name) {
               this.name = name;
       }

       public String getId() {
               return id;
       }

       public void setId(String id) {
               this.id = id;
       }

 }






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



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



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


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

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-with-ChoiceRender-problem-tp23374394p23385127.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to append JavaScript to a link?

2009-05-05 Thread jensiator

I would not use javascript direct.  Use wickets Ajax components instead. 
I would use a AjaxLink and a wicket Modal Window. The modal window would
then contain the message
and Ok and Cancel button. 


Jens 




HHB wrote:
 
 Hey,
 The last cell in a data table is a link (that is contained in a form) that
 will
 delete the row.
 How to append JavaScript code that will display a confirmation dialog?
 Thanks for help and time.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-append-JavaScript-to-a-link--tp23387242p23387452.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice with ChoiceRender problem

2009-05-05 Thread jensiator

Why dont you let handicapaccess be of the type SelectOption. 
It will contain the getId and getName. So you can get the Y or Yes if you
want to. 
You could ever rename selectoption to HandicapAccessBean to make it clearer.  
I have created a dropdownchoice that maps to an UUID in the Model instead of
the DropDownChoice generic type and I can say I like it. 
Lets say that your working on a wizard. On the last confirm page you dont
want to show Y as the selected handicappaccess. You want to show 'Yes'. That
is easiest done by letting the model have the SelectOption as a member!
Jens


 

rhodebump wrote:
 
 I want to display Yes to the user in the dropdown.  If the user selects
 Yes, I want address.handicapAccess string property to be set to Y
 
 Do you still think a map-based rendererer is the way to go?
 Thank you.
 
 -Original Message-
 From: James Carman jcar...@carmanconsulting.com
 Sent: Tuesday, May 5, 2009 7:05am
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice with ChoiceRender problem
 
 So, you want the codes to be the values?  Why not use a map-based
 renderer as opposed to creating a whole new class?
 
 On Mon, May 4, 2009 at 9:48 PM, Phillip Rhodes prho...@rhoderunner.com
 wrote:
 It's of type String

 Thanks

 On May 4, 2009, at 3:23 PM, James Carman wrote:

 The handicapAccess property is of type?

 On Mon, May 4, 2009 at 2:29 PM, Phillip Rhodes
 spamsu...@rhoderunner.com wrote:

 Hi everyone,
 Sorry for posting this problem but I have been stuck for far too many
 hours on this.  Using wicket 1.4  Appreciate any help on this very very
 much.

 I have a pojo object called address that has a property of
 handicapAccess
 I am trying to bind this property to a dropdown list with 3 choices
 (formated as name/value)
 Yes/Y
 No/N
 Unknown/U

 If I use the constructor of ChoiceRenderer(String displayExpression),
 No
 error, but my property is bound as
 com.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd
 If I use the constructor of ChoiceRenderer(java.lang.String
 displayExpression, java.lang.String idExpression), I get an error
 org.apache.wicket.WicketRuntimeException: No get method defined for
 class:
 class java.lang.String expression: id
 Although my SelectOption class has getId/setId


 ListSelectOption options = new ArrayListSelectOption();
 options.add(new SelectOption(Yes, Y));
 options.add(new SelectOption(No, N));
 options.add(new SelectOption(Unknown, U));

 //org.apache.wicket.WicketRuntimeException: No get method defined for
 class: class java.lang.String expression: id
 ChoiceRenderer choiceRenderer = new ChoiceRenderer(name,id);

 //this choice render gives it a
 //
 handicapAccesscom.reffects.dmi.admin.wicket.address.detail.selectopt...@9aa8fd/handicapAccess
 //ChoiceRenderer choiceRenderer = new ChoiceRenderer(name);
 PropertyModel model = new PropertyModel(address, handicapAccess);

 DropDownChoice ddc = new DropDownChoice(dropDownChoice,
 model,options,choiceRenderer);


 //Here's my SelectOption
 public class SelectOption implements Serializable {
       /**
        *
        */
       private static final long serialVersionUID = 1L;
       private String name;
       private String id;

       public SelectOption(String name, String id) {
               this.name = name;
               this.id = id;
       }

       public String getName() {
               return name;
       }

       public void setName(String name) {
               this.name = name;
       }

       public String getId() {
               return id;
       }

       public void setId(String id) {
               this.id = id;
       }

 }






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



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



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


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

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-with-ChoiceRender-problem-tp23374394p23389037.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: Global resources

2009-03-18 Thread jensiator

Thanks Igor 
That really help me getting started.  I'm able to use
BundleStringResourceLoader but it only loads property files. Do I have to
write my own StringResourceLoader for xml file propertyfile?
Jens Alenius

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


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



Global resources

2009-03-16 Thread jensiator

Hi
Im suspecting that there is a very easy solution for my problem this time. 
I got to define som global string resources. I allready have a
MyApplication.xml where I store them. Our application is going to be big so
I need a way to splitt the properties in differents xml files in the future.
Example: We want to localize enums. We will have alot of enums and I dont
want to have them in MyApplication.xml. So how can I load an extra
EnumNames.xml? 

IMPORTENT: I dont want to create an empty EnumNames.class to load the
resource. I dont want to add dummy classes just for adding global resources.
Jens
-- 
View this message in context: 
http://www.nabble.com/Global-resources-tp22536340p22536340.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal Window inside a wizardstep

2009-03-12 Thread jensiator

I stoped using panels as content in the modal window. Then the problem went
away. Now I only use PageCreator when working with modalwindows. Theres is
as well a problem with datetime pickers in modalwindows when using panels,
so I guess pages is best in modals. 
Jens
-- 
View this message in context: 
http://www.nabble.com/Modal-Window-inside-a-wizardstep-tp22181084p22471237.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: modal window with iframe - ajax refresh on parent page

2009-03-06 Thread jensiator

Hi geke
Have you solved your problem? I also have a ModalWindow with my own defined
callbacks that wont update the parent page components. I'm using pagecreator
to add the content of the ModalWindow. When I add a Panel to the ModalWindow
through setContent It works.
Jens
-- 
View this message in context: 
http://www.nabble.com/modal-window-with-iframe---ajax-refresh-on-parent-page-tp17816849p22369478.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Callbacks with abstract method in ModalWindow

2009-03-05 Thread jensiator

Hi. Im having a problem with the modalwindow again. It's probably my code so
I'll try to explain what I doing.

I have a Panel that I want to reuse. It's a panel with a form where you can
update som data. Because it will be used by different pages with Ajax
Behavior I want a to add 
a callback when the Panel form is commited.  

So the Panels form contains a AjaxButton where I can handle the onSubmit
method. The Panel is abstract with the abstract method
onFinished(AjaxRequestTarget target). 
Looks something like this:

public abstract class CallBackPanel extends Panel {
  public CallBackPanel(String id) {
...
add(form);
AjaxButton saveButton = new AjaxButton(savebutton, form) {
  //Also override onError

@Override
protected void onSubmit(AjaxRequestTarget pTarget,
org.apache.wicket.markup.html.form.Form? pForm) {
   ... 
   onFinished(pTarget);
}

}
form.add(saveButton);
//also adds a cancel button 
...
  }

  protected abstract void onFinished(AjaxRequestTarget pTarget);
}

I got some problems with this Panel. If I add it as a Panel in a ModalWindow
with the setContent method the callback method 'onFinished' is able to
update the 
components in the page that use the it. 
But if I add the panel to a Page and then use the ModelWindow.setPageCreator
method the callback method 'onFinished' wont update the components. 
Ex (in my page that uses the CallBackPanel):

...
public Page createPage() {
ModalContentPage mcp = new 
ModalContentPage();
mcp.add(new CallBackPanel(thepanel){
@Override
  protected void onFinished(AjaxRequestTarget pTarget){
modalWindow.close(pTarget);
pTarget.addComponent(myPageComponentThatNeedsUpdating);
//myPageComponentThatNeedsUpdating is set to final
  }
  );
return mcp;
}
...

The method inFinished is running but myPageComponentThatNeedsUpdating is not
updated. 

Should I avoid doing solution like abstract CallBackPanel when morking with
modalwindows?

Or is it something with the AjaxRequestTarget that I missed? 

Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Callbacks-with-abstract-method-in-ModalWindow-tp22349647p22349647.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Callbacks with abstract method in ModalWindow

2009-03-05 Thread jensiator

It might have something to do with which Page the AjaxRequestTarget belongs
to. The AjaxRequestTarget from the Ajaxbutton in the CallBackPanel belong to
ModalContentPage. Not the Page that Uses the ModalWindow. AnyOne have a
explanation?
Jens

-- 
View this message in context: 
http://www.nabble.com/Callbacks-with-abstract-method-in-ModalWindow-tp22349647p22351024.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal Window inside a wizardstep

2009-02-25 Thread jensiator

I'm getting the background submit on both IE7 and Firefox 3.0.6. I'll try to
change the wizardbuttons to ajaxbuttons and see if this problem will
disappear. I think it has something to do with the default form behavior
with the enter key. Still I would like someone to confirm this behavior. (It
might just be me forgetting something..)
Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Modal-Window-inside-a-wizardstep-tp22181084p22198128.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: how to avoid value set to null if value of textfield gets deleted

2009-02-25 Thread jensiator

My experience is that null values a nice to use. What if you have a optional
email field? When the user starts to write something the email validation
kicks in. I think a lot of wickets validators uses Null in that case. And I
have used that i JSP/Struts programming to. I think its better to handle the
null values when you later use the model to do something. 

Jens Alenius



-- 
View this message in context: 
http://www.nabble.com/how-to-avoid-value-set-to-null-if-value-of-textfield-gets-deleted-tp22198221p22198642.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Modal Window inside a wizardstep

2009-02-24 Thread jensiator

Hi.
 I got a modal window with a form(a search function). The modal window is
opened from a wizard step that uses non ajax submitbuttons. When I press the
enter key inside my modal search form, the underlying wizard step submits.
Happens even when the AjaxButton is in focus in the modal window. Is there
anyway to suppress the key down event in the underlying wizard form?
Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Modal-Window-inside-a-wizardstep-tp22181084p22181084.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Latest snapshot and CSSPackageResource.getHeaderContribution

2009-02-12 Thread jensiator

Hi
After my post with the private wizardmodel inside wizardstep I decided to
change to the latest snapshot instead of using rc2. Suddenly IE wont display
my markup correct. But Firefox does.The corrupted design in IE is a typical
stylesheet error. 
I noticed that HeaderContributor.forCss is now depricated and its body has
changed. It now calls CSSPackageResource.getHeaderContribution direct. I'm
adding all my stylesheet links in this way. I dont hardcode them inte to
base page markup header. 
I went back to rc1 and then everything looks fine. Back to snapshot the
design is corrupted. 
Has something changed in the way that the css resources loads?
Jens
-- 
View this message in context: 
http://www.nabble.com/Latest-snapshot-and-CSSPackageResource.getHeaderContribution-tp21973733p21973733.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Latest snapshot and CSSPackageResource.getHeaderContribution

2009-02-12 Thread jensiator

Found what was causing the problem. The latest snapshot seems to add a
comment before the doctype tag. IE cant handle that.
Example form my code for my LoginPage.

!-- Page Class net.megasol.corniche.net.core.pages.login.Login --
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

What is adding the comment. Im not
Jens
-- 
View this message in context: 
http://www.nabble.com/Latest-snapshot-and-CSSPackageResource.getHeaderContribution-tp21973733p21991661.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Latest snapshot and CSSPackageResource.getHeaderContribution

2009-02-12 Thread jensiator

Of course! Thanks!

-- 
View this message in context: 
http://www.nabble.com/Latest-snapshot-and-CSSPackageResource.getHeaderContribution-tp21973733p21991737.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



private wizardModel field in WizardStep

2009-02-10 Thread jensiator

Hi
I would like to get the wizardmodel in a class that extends from WizardStep.
The WizardStep contains the wizardmodel put it not accessable from the
extended class.  Does anyone know why? I can get hold of the wizardmodel if
I override onInit(Wizardmodel) in my WizardStep and add it as a member. But
should I? Is there a reason why the wizardmodel is private inside of the
wizardstep? 

Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/private-wizardModel-field-in-WizardStep-tp21932325p21932325.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Bugs in wicket

2008-11-17 Thread jensiator

Cant find a bug number.  Heres the url.
http://wicketstuff.org/jira/browse/WSCAL-4
Jens


Please can you give us the bug number (Wicket-) so we can vote for this
bug and follow it?

Regards.


jensiator wrote:
 
 I've reported it to wicket JIRA.
 Jens
 
 
 TahitianGabriel wrote:
 
 Yes it seems to have a bug with datepicker in ModalWindows with IE7
 (works with firefox 3).
 In file calendar-min.js line : this.oDomContainer.innerHTML=B.join(\n)
 I think that innerHTML property is readonly in IE7.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20537047.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: Getting Panel body content

2008-11-17 Thread jensiator

Yes that is what I have done and after your comments I'll keep on doing that. 
The panel is a ConfirmButton. It contains a AjaxLink and a ModalWindow. When
pressing the button the modal will popup and ask for a confirmation and then
a the buttonpanel's abstract method onconfirmation will fire. The panels
constuctor is somethig like this: 
ConfirmButtonPanel(String pId,String pButtonLabelResourceKey,String
pModalTitleKey,String pModalMessageKey,DialogButtons.OKCANCEL). 

It works well but is it possible to do something like this only extending
AjaxLink? Because of the modalwindow I need to add a div
id=mymodalwindow/ in the markup somewhere and AjaxLink dont have any
markup beacuse its a component. Is it possibly to dynamically add a div with
wicket:id in the markupstream?
Jens Alenius


igor.vaynberg wrote:
 
 instead of wicket:message add a label and whatever model you want.
 that gives you full control over the text.
 
 -igor
 
 On Mon, Nov 17, 2008 at 1:34 AM, jensiator [EMAIL PROTECTED]
 wrote:

 Hi
 I've created a Panel that I would like to act as a AjaxLink in the
 markup. I
 would like to be able to add a wicket:message tag in the body content
 of
 the panel and get hold of it in the panel java code before the body
 content
 is replaced. Can this be done?
 Jens
 --
 View this message in context:
 http://www.nabble.com/Getting-Panel-body-content-tp20536289p20536289.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/Getting-Panel-body-content-tp20536289p20554735.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: Bugs in wicket

2008-11-17 Thread jensiator

oops. Missed that... 
I'll post there as well
Jens


TahitianGabriel wrote:
 
 OK, thank you.
 I was looking for it in the  wicket jira (not wicketstuff) :
 http://issues.apache.org/jira/browse/WICKET.
 
 I guess it's the right place to post it anyway...
 
 
 
 jensiator wrote:
 
 Cant find a bug number.  Heres the url.
 http://wicketstuff.org/jira/browse/WSCAL-4
 Jens
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20554803.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: Bugs in wicket

2008-11-10 Thread jensiator

I've reported it to wicket JIRA.
Jens


Yes it seems to have a bug with datepicker in ModalWindows with IE7 (works
with firefox 3).
In file calendar-min.js line : this.oDomContainer.innerHTML=B.join(\n)
I think that innerHTML property is readonly in IE7.

-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20416689.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]



Bugs in wicket

2008-11-07 Thread jensiator

Hi
I have noticied something in wicket-datetime that might be a bug.
(DatePicker in a ModalWindow with IE7)
Where can I registrate unknown Issues and check existing Issues in the
wicket framework?
Jens
-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20377171.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: DateField throwing runtime error in IE only

2008-11-06 Thread jensiator

I got the same problem. And I dont want to change the contentpanel to a page
content in the modal. 
Does anyone got a solution for this?
Jens


Michael Mehrle wrote:
 
 I have a DateField inside a modal and when clicking on the date icon
 it's throwing a 'unknown runtime error' in IE's JavaScript console.
 Works in Safari and Firefox.
 
  
 
 Is this a commonly known problem?
 
  
 
 Michael
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DateField-throwing-runtime-error-in-IE-only-tp17379574p20358801.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: DropDownChoices where Model is different from Data

2008-11-03 Thread jensiator

Tanks Nino. Just checking if I was out in the blue. I'll try to do something
with my chained model. 
Jens


Nino.Martinez wrote:
 
 Hi
 
 since it's java development, the only limit are your mind (now all your 
 ruby guys dont hit me).. As you write yourself just create a 
 choicerenderer, then choicerenderer itself can decide howto display data..
 
 And yes if you chain stuff and implement your own model etc you can do 
 it all your own way..
 
 jensiator wrote:
 Hi. 
 I have a form model containing a idKey that is supposed to be selected
 from
 a dropdownchoice. Does anyone know if its possible have a complex data
 type
 in the dropdownchoice when the model is only a idKey? The dropdownchoice
 wants to set the complex data type in the form model. 
 For example in a dropdownconstructor:
 public MyDropDown(String pId,PropertyModelUUID pModel){
 super(pId,new LoadableDetachableModelMyClass(){

protected ListMyClass load() 
{
return requestClasses();
}

 })
 setChoiceRenderer(new ChoiceRendererMyclass(displayName, idKey));

 would It be possible to link the pModel in another model (SpecialModel)
 to
 accomplish this? Like: setModel(new SpecialModel(pModel));

   
 
 -- 
 -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/DropDownChoices-where-Model-is-different-from-Data-tp20300450p20301347.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]



DropDownChoices where Model is different from Data

2008-11-03 Thread jensiator

Hi. 
I have a form model containing a idKey that is supposed to be selected from
a dropdownchoice. Does anyone know if its possible have a complex data type
in the dropdownchoice when the model is only a idKey? The dropdownchoice
wants to set the complex data type in the form model. 
For example in a dropdownconstructor:
public MyDropDown(String pId,PropertyModelUUID pModel){
super(pId,new LoadableDetachableModelMyClass(){

   protected ListMyClass load() 
   {
   return requestClasses();
   }

})
setChoiceRenderer(new ChoiceRendererMyclass(displayName, idKey));

would It be possible to link the pModel in another model (SpecialModel) to
accomplish this? Like: setModel(new SpecialModel(pModel));

-- 
View this message in context: 
http://www.nabble.com/DropDownChoices-where-Model-is-different-from-Data-tp20300450p20300450.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]



Wizard with CompoundPropertyModel

2008-10-17 Thread jensiator

Hi everyone
Time for a new question. This time its about the wizard component. I have
already done a couple of wizards and they work well. I have looked at the
example in wicket and of course I have changed it a little bit. I dont want
the steps do be static private classes so in my solution I send in the Model
that contains the BackingBean in the constructor of the wizardSteps. And it
works. Put in one case I Noticed that all the WizardSteps uses the same
backingbean, so I started to think about using a compoundpropertymodel that
I set to the Wizard in its constuctor. Something like this:
public MywizardConstuctor(String id){
   super(id);
   CompoundPropertyModelBackingBean formModel = new
CompoundPropertyModelBackingBean(new BackingBean());
setDefaultModel(formModel);
WizardModel wizardmodel = new WizardModel();
wizardmodel.add(new WizardStep1());
wizardmodel.add(new WizardStep2());
init(wizardmodel);
}
Okey, in the WizardSteps constuctors I want to bind some TextFields to the
right property. Like this:
public WizardStep1(){
   TextField firstnameTF = new TextFieldString(firstName);
}
and it works well. BUT, this binding forces me to use the same markupid as
the backingbean property. Could be dangerous when different developers work
on the code. Someone might fail to notice this. I personly like when use the
propertmodel parameter in the TextField because it realy shows what your
doing. 
TextField firstnameTF = new TextFieldString(firstName,new
PropertyModelString(getDefaultModel(), nestedobj.firstname));
But I cant make it work! The former TextField code works, but the one with
getDeafultModel() doesnt. The defaultModel is null. I tryid to
findParent(Wizard.class).getDefaultModel() but it failes, probably because
the Step has not been added to the WizardModel yet.
Can anyone explain to me why 'new TextFieldString(firstName)' works?
Jens Alenius


-- 
View this message in context: 
http://www.nabble.com/Wizard-with-CompoundPropertyModel-tp20029043p20029043.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: Wizard with CompoundPropertyModel

2008-10-17 Thread jensiator

Hi Mattias
I have a solution where I sending the a ordenary Model into the WizardStep
constuctors and it work well. 
I thought that the CompoundPropertyModel should nest itself down the
children so you didn't have to send it down the chain. 
I think that in your case, you could change the CompoundPropertyModel to a
Model and it work to.
Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Wizard-with-CompoundPropertyModel-tp20029043p20032204.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: WebPage constructor

2008-10-15 Thread jensiator

Thanks Johan 
So that means that if you would like to fetch data every time the page is
shown you would need to call the database in the onrender method. I'm not
using a repeater, only labels to display the data.(With a repeater I could
use the populatemethods that runs during onrender). Or might there be a
smart model for this. I tried extending PropertyModel overriding getObject
but as I suspected it was called every time a label wanted to get a property
from the modelobject. e.g. 5 labels for 5 properties on the modelobject
would end upp with 5 calls to the db.
Jens Alenius

So if I would like to display database data some amount of labels everytime
the p


Only when you have a bookmarkable url (or home page) and you press
refresh in the browser you will get a new page.

The url you refresh points to an existing page instance and that one
is just rendered again, so no page construction is being done then


-- 
View this message in context: 
http://www.nabble.com/WebPage-constructor-tp19977659p19988260.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: WebPage constructor

2008-10-15 Thread jensiator

Thanks Mårten and Johan. Now I know what to do. Sometime you just need to
discuss issues in wicket because there is not so many bestpractise
aricticles. Like in the Struts Framework. But it will change in time...
Jens

-- 
View this message in context: 
http://www.nabble.com/WebPage-constructor-tp19977659p19988724.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: WebPage constructor

2008-10-15 Thread jensiator

Oh and to you that has read this thread looking for code examples. Here is my
code for doing this. (Hope it's the right way of doing it)
There is no form or repeater in the page. It only shows a persons data from
the database. Even when hitting refresh in browser.
In page constructor public MyConstuctor(UUID pSelectePersonIdKey)

PersonDetachedModel personModel=new
PersonMainDetachedModel(pSelectedPersonIdKey);
add(new Label(numberLabel, new PropertyModel(personModel,
personNumber)));
add(new Label(firstnameLabel, new PropertyModel(personModel,
firstName)));
.

PersonDetachedModel extends LoadableDetachableModelPerson. It holds the
personIdkey as a member. 
In the load method you fetch the data from db,webservice, rest whatever.

Jens Alenius

-- 
View this message in context: 
http://www.nabble.com/WebPage-constructor-tp19977659p19989810.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]



WebPage constructor

2008-10-14 Thread jensiator

Hi
I have a page that extends webpage, when I hit the browsers refresh button
the constuctor wont run. It only runs when I press the PageLink that point
to it. The constructor has a UUID as input parameter ( MyWebPage(UUID id) ).
Is it suppossed to be like that (working with onrender instead at a
refresh). I've been searching the web for something about what to expect of
the constuctor invokation but I cant find anything about it.  Please point
me to an basic article about it if there is on. 
Jens
-- 
View this message in context: 
http://www.nabble.com/WebPage-constructor-tp19977659p19977659.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: Serializing model. DetachedModel or not

2008-10-08 Thread jensiator

There it was!!!
If found it with your hint. I was holding in to the reference.
Thank you.
Jens Alenius



igor.vaynberg wrote:
 
 if wicket tries to serialize the object you are trying to hold on to a
 reference of it outside the ldm somewhere in your code. eg
 
 object o=ldm.getobject();
 add(new label(o, o));
 
 -igor
 
 On Tue, Oct 7, 2008 at 12:21 AM, jensiator [EMAIL PROTECTED]
 wrote:

 Thanks Igor
 In my code I started with with a LDM initialized with the modelobject
 itself. But it if the modelobject dont implement serializable I get
 serialize exception for the modelobject(e.g. contact). My assumption is
 that
 the modelobject is being serialized to the session. I thought that the
 LDM
 is a model you use when you dont want to serialize the model to the
 session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels).
 But in the end,as jwcarman wrote, wicket handles the session with disc
 writing so it probably no problem. But if its so that the LDM is
 serializing
 the modelobject in session when you initialize the LDM with it, could I
 not
 just use a basic Model instead?
 Jens Alenius

 --
 View this message in context:
 http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19852478.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/Serializing-model.-DetachedModel-or-not-tp19833559p19879431.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: Serializing model. DetachedModel or not

2008-10-07 Thread jensiator

Thanks Igor
In my code I started with with a LDM initialized with the modelobject
itself. But it if the modelobject dont implement serializable I get
serialize exception for the modelobject(e.g. contact). My assumption is that
the modelobject is being serialized to the session. I thought that the LDM
is a model you use when you dont want to serialize the model to the
session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels).
 
But in the end,as jwcarman wrote, wicket handles the session with disc
writing so it probably no problem. But if its so that the LDM is serializing
the modelobject in session when you initialize the LDM with it, could I not
just use a basic Model instead?
Jens Alenius

-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19852478.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: Serializing model. DetachedModel or not

2008-10-07 Thread jensiator

Hello Edmund.
Nice to have someone in the same timezone!
Thanks for your reply. I'll try to set the modelobject member in the LDM to
transient and see if it solves the serializing exception(even if you don't
recommend it). Just want to try it out. 

If I understand you correctly you only keep a serialized identifier as a
member in the subclass of the LDM and then use the load method to populate
the modelobject. Have you been working with the SortableDataProvider?
Because I still have not figured out how one should combine the above
discussed LDM load method with the iterator method in the SDP. Do you call
the database in the LDM load method to get the data for the model. If so, do
you also call the database in the SDP.iterator method to get the data
collection for the current page? Because it seems to me that in that case
I'm getting the modelobject data twice from the database.

Jens Alenius
 

-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19853480.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]



Serializing model. DetachedModel or not

2008-10-06 Thread jensiator

Hello
Im working on a Pageable dataview using SortableDataProvider  and I have
trouble to find out how It should be done regarding memory use versus
database requests. I've looked on the repeaters live action and read the
model chapter in wicket in action. 

1. If I dont use the loadabledetachableModel I need to implement
Serializable in my modelobject corrensponding to a row in the dataview.
Wicket wants to serialize the modelobject to the session. What will/might
happen to the webapplication memory if I choose this approach? How long will
the data be stored in the session? 

2. All the examples I have seen regarding the loadable approach seems to be
calling the db a little to much. When implementing the SortableDataProvider
iterator method, all examples call the db for the data to be shown in the
current page. Then the model extending LoadableDetachableModel will load (in
load method) the Models data again from some kind of identifier. It seems to
be that were loading all data twice. Is this how it should be done?

Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19833559.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: Serializing model. DetachedModel or not

2008-10-06 Thread jensiator

Hi Igor
If the sortabledataprovider calls the db to get the window of data, and the
detached model (set in the dataproviders model method) calls the db in the
load method to get the data from a private transient id. Will not the
database be called twice for every record/row in the dataset? The sortable
example in wicket live action seems to do
that(http://www.wicketstuff.org/wicket13/repeater/). Or am I getting it all
wrong?
Jens Alenius

-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19843071.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]



WebPage error when throwing RestartResponseException in onBeforeRender

2008-09-02 Thread jensiator

Hello everyone.
Im trying to redirect the user to another page in OnBeforeRender. I works
but I get a wierd error in the tomcat console. Here it follows:
ERROR - WebPage- You probably forgot to add a body or
header tag to your markup since no Header Container was.

But when I check on the source of the page I can see the header and body.
Here my code in onbeforerender. (The code in onbeforerender i there to
prevent the user to use the backbutton in a wizard)

protected void onBeforeRender()
{
   super.onBeforeRender();
   if(!mActiveStepPerformed  !getForm().hasError())
 {
getRequestCycle().setRedirect(true);
throw new RestartResponseException(getBackButtonRedirect());
 }
 mActiveStepPerformed = false;
}

The wizard panel is in a WebMarkupContainer that has
isTransparentResolver(){return true};. I saw something about this error
message and isTransparentResolver. But I didnt get it. 
Can anyone exlpain?
Jens Alenius

-- 
View this message in context: 
http://www.nabble.com/WebPage-error-when-throwing-RestartResponseException-in-onBeforeRender-tp19268671p19268671.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: Please comment the Branding Link idea

2008-08-12 Thread jensiator

Last comment from me. If anyone is interessed. Wicket:link is not suitible to
use because then you cant use dynamic pageParameters. In my final version I
registert all branded pages during deployment. Adds them as a global to in a
HashMap in MyApplication class. Navlink only check if there is a registrated
brand of this target page. I have one brand/war so I always call it
*_override.class


public class NavLink extends PageLinkVoid
{
public NavLink(String s, Class? extends Page pClass)
{
super(s, GetBrandedClass(pClass));
}

@SuppressWarnings({unchecked})
private static Class? extends Page GetBrandedClass(Class? extends 
Page
pClass)
{
MyApplication app = (MyApplication) Application.get();
if(app.getBranded().containsKey(pClass.getName()))
return app.getBranded().get(pClass.getName());

return pClass;
}
}
-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18939733.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]



Please comment the Branding Link idea

2008-07-30 Thread jensiator

This idea dont need a propertyfile! But I want to repeat that I'm using a jar
that the branded webapplication depends on. The jar is the core
functionallity that all brands depends on. As you see in the replace Im
keeping the package structure in the webapplication(on overrided
component/pages). Beside the WhateverName_brand.class I also have a
WhateverName_bran.html markupfile and css if it needed. I wonder if it might
be some memory/performance problem in this 'spike'. If the branded version
does not exist it will keep on throwing the exception. 

public class NavLink extends PageLink {
public NavLink(String s, Class pClass) {

super(s, GetBrandedClass(pClass));
}

private static Class GetBrandedClass(Class pClass) {
String simpleName = pClass.getSimpleName();
String name = pClass.getName().replace(simpleName, simpleName + _
+ Session.get().getStyle());

try {
return
Thread.currentThread().getContextClassLoader().loadClass(name);
} catch (ClassNotFoundException e) {
e.printStackTrace();  //Should be logged
}
return pClass; //returns the core version
}
}
I still need to try the wicket:link idea from above. Then you only brand the
markup file and change wicket:link. But I need to check out if absolute
paths in the markup will be nice. 


-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18735873.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: Branding a PageLink target Page

2008-07-28 Thread jensiator

I dont think wicket:link would work. Because I need to create my own class
(Navlink). I guess that the wicket framework adds a Link (or PageLink)
automaticly for you. But if you work on the sourcecode it might work.
Changing the code behind wicket:link. If its possible
Jens


greeklinux wrote:
 
 Hello,
 
 for me it would be important to know where to look if I see the Navlink
 code.
 When I know where to find the property file with the navigation roules
 then it
 is ok.
 
 Cant you use the wicket:link tag? then you have to change only the html
 instead of the java part.
 
 greetings
 
 
 jensiator wrote:
 
 Thank you for the feedback. 
 Okey, I have a NavLink.class that extends PageLink. 
 The keys in the property file is the full class name. If the property
 file don't contain the class name key, NavLink will just call the
 PageLink constuctor with the the class name as usual. If the property
 file contains the classname key it will call the super constructor
 (PageLink) with the value set in the propertyfile. And the value can be
 another page target class. The drawback is that its hard for other
 developers to understand which page the NavLink is realy targeting!
 
 I wonder if its possible to do something like MyTargetClass_BRAND.class?
 Have to think about that!
 
 Jens
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18688733.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: Branding a PageLink target Page

2008-07-11 Thread jensiator

Hi greeklinux
Yes. The branding of links means that I want to dynamicaly configure the
PageLink Target for a customer? 
-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18397492.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: Branding a PageLink target Page

2008-07-11 Thread jensiator

Thank you for the feedback. 
Okey, I have a NavLink.class that extends PageLink. 
The keys in the property file is the full class name. If the property file
don't contain the class name key, NavLink will just call the PageLink
constuctor with the the class name as usual. If the property file contains
the classname key it will call the super constructor (PageLink) with the
value set in the propertyfile. And the value can be another page target
class. The drawback is that its hard for other developers to understand
which page the NavLink is realy targeting!

I wonder if its possible to do something like MyTargetClass_BRAND.class?
Have to think about that!

Jens

-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18403071.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]



Branding a PageLink target Page

2008-07-10 Thread jensiator

Hi
Does anyone know if its possible to brand the target/response page for a
PageLink in wicket?

I have a core jar with all the base classes. I then have a war project
that depends on the core jar (using Maven2 + Idea). There will be a war for
every customer. Im able to brand everything I want to brand except a
PageLink / Link target. 
I know that I can brand the hole page that holds the link but I dont think
thats a good solution. I'v found to reasons for that:
1. I add the PageLinks in the Page java class constuctor. And I can't change
the Page java class in the core lib(it will change for all the other
brands). Very dangerous to add it again in the branded war(duplicated
reference).  
2. Even if 1. worked I dont want to brand the hole page because I'll get a
lot of duplicate code. Might be big even if I use wicket: extend.  

I found to possible solutions.
1. I have written a PageLink that takes a string resource key. Example:
linkToOptionPage. The value/target in the PageLink is then read from a
property file. I then brand the property file instead.(a little bit like
struts/JSF navigation rules) 
2.I might be able to use dependecy injection in Spring and change the hole
TargetPage class to the specific customers targetpage. But is it worth the
overhead?

Or is it possible that wicket have som built in support for this? I have not
found anything. Please comment my suggestions or inform me if there is
another way?
Jens Alenius
-- 
View this message in context: 
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18382006.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: Sortable Paging DataView inside a tabpanel and backbutton

2008-06-03 Thread jensiator

Hi Scott
I realized that you cant compare to UUID with '==' in Java. You need to
compare the as if(UUID1.equals(UUID2)). I been working to much in csharp,
where you compare two Guid as this: if(Guid1==Guid2)
Just a stupid mistake
Jens


Scott Swank wrote:
 
 Sorry to jump in at the last minute, but what does you need equals on
 UUID in Java mean?
 
 - Scott
 
 
 On Fri, May 30, 2008 at 5:47 AM, jensiator [EMAIL PROTECTED]
 wrote:

 Okey. Found a bug in my code forget everything. Wicket components is
 working fine, no problem in constructors. Use to CSharp and forgot that
 you
 need equals on UUID in Java. I've spent two days on this. Silly me
 blaming
 wicket
 Jens
 --
 View this message in context:
 http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17558104.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/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17618120.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: Sortable Paging DataView inside a tabpanel and backbutton

2008-05-30 Thread jensiator

Thanks Igor. I had to break down the problem by reverting to wickets own
tabbedpanel and dataview(I have done my own components).  I still faced the
same problem untill I found out that I could not send in the idkey(that I
use in the iterator method when getting data from db) through the constuctor
of the tabpage panel. I do not fully understand why, but I guess it has
something to do with serialization. Should I avoid sending parameters except
the id in my panels?
Jens Alenius


igor.vaynberg wrote:
 
 so you use no-store headers and force the page to reload on
 backbutton? because usually when you press back you get the cached
 version the browser keeps around.
 
 -igor
 
 On Thu, May 29, 2008 at 5:11 AM, jensiator [EMAIL PROTECTED]
 wrote:

 okey.. Has anyone done this. I have a DataView that uses a
 SortableDataProvider so that the dataview can be paged and sortable. The
 dataview is contained in a tabpanel in a TabbedPanel(no Ajax). When I
 select
 the dataview tabpanel I see the rows. I then select another tab and then
 press backbutton. My grid shows again but it has no rows. The
 SortableProvider.iterator methods runs with value count=0.
 Im not setting any Model in the tabpanel with the Dataview, instead Im
 sending in a UUID  as a constructor parameter in the Panel. I do a Db
 call
 in my implementation of SortableProvider.iterator to get the collection
 for
 the UUID.
 Does anyone have any idea of what could be wrong?
 --
 View this message in context:
 http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17534314.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/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17554997.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: Sortable Paging DataView inside a tabpanel and backbutton

2008-05-30 Thread jensiator

Okey. Found a bug in my code forget everything. Wicket components is
working fine, no problem in constructors. Use to CSharp and forgot that you
need equals on UUID in Java. I've spent two days on this. Silly me blaming
wicket
Jens
-- 
View this message in context: 
http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17558104.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]



Sortable Paging DataView inside a tabpanel and backbutton

2008-05-29 Thread jensiator

okey.. Has anyone done this. I have a DataView that uses a
SortableDataProvider so that the dataview can be paged and sortable. The
dataview is contained in a tabpanel in a TabbedPanel(no Ajax). When I select
the dataview tabpanel I see the rows. I then select another tab and then
press backbutton. My grid shows again but it has no rows. The
SortableProvider.iterator methods runs with value count=0. 
Im not setting any Model in the tabpanel with the Dataview, instead Im
sending in a UUID  as a constructor parameter in the Panel. I do a Db call
in my implementation of SortableProvider.iterator to get the collection for
the UUID.
Does anyone have any idea of what could be wrong?  
-- 
View this message in context: 
http://www.nabble.com/Sortable-Paging-DataView-inside-a-tabpanel-and-backbutton-tp17534314p17534314.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]