Re: DCEVM and Hotswap agent support

2017-06-22 Thread mashleyttu
I'm evaluating HotSwapAgent as a replacement to JRebel which I've been using.
I'm definitely not asking anyone to troubleshoot a DCEVM/HotSwapAgent
exception, but I am curious if you have run into this exception. The hot
swap code changes seem to work, but every time I save a change this occurs.


HOTSWAP AGENT: 08:21:29.353 RELOAD
(org.hotswap.agent.plugin.jvm.AnonymousClassPatchPlugin) - Class
'com/foo/bar/formpanels/DashboardPanel' has been enhanced with anonymous
classes for hotswap.
HOTSWAP AGENT: 08:21:29.397 ERROR
(org.hotswap.agent.util.signature.ClassSignatureComparerHelper) - Error
reading siganture
org.hotswap.agent.javassist.NotFoundException:
com.foo.bar.components.listview.Abstract806ListView
at org.hotswap.agent.javassist.ClassPool.get(ClassPool.java:445)
at
org.hotswap.agent.javassist.bytecode.Descriptor.toCtClass(Descriptor.java:577)
at
org.hotswap.agent.javassist.bytecode.Descriptor.getReturnType(Descriptor.java:479)
at
org.hotswap.agent.javassist.CtBehavior.getReturnType0(CtBehavior.java:294)
at org.hotswap.agent.javassist.CtMethod.getReturnType(CtMethod.java:210)
at
org.hotswap.agent.util.signature.CtClassSignature.getMethodString(CtClassSignature.java:117)
at
org.hotswap.agent.util.signature.CtClassSignature.getValue(CtClassSignature.java:45)
at
org.hotswap.agent.util.signature.ClassSignatureComparerHelper.getCtClassSignature(ClassSignatureComparerHelper.java:21)
at
org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isDifferent(ClassSignatureComparerHelper.java:37)
at
org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isPoolClassDifferent(ClassSignatureComparerHelper.java:64)
at
org.hotswap.agent.plugin.spring.signature.ClassSignatureComparer.isPoolClassDifferent(ClassSignatureComparer.java:31)
at
org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.classChangeNeedsReload(SpringChangesAnalyzer.java:43)
at
org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.isReloadNeeded(SpringChangesAnalyzer.java:36)
at
org.hotswap.agent.plugin.spring.SpringPlugin$1.transform(SpringPlugin.java:80)
at
org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:177)
at 
sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at
sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)

Thanks,
Matt


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DCEVM-and-Hotswap-agent-support-tp4668576p4678128.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 @SpringBean - @Autowired properties not Initialized

2016-07-13 Thread mashleyttu
Okay, scratch this question. It's working. I was just looking at the Eclipse
debugger and saw all the @Autowired fields were null.

I failed to read this segment of the Javadoc: 

* A lazy init proxy waits until the first method invocation before it uses
the
 * {@link IProxyTargetLocator} to retrieve the object to which the method
invocation will be
 * forwarded.

When actually running the code with the @SpringBean everything works as
expected!

Thanks for your quick reply!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-SpringBean-Autowired-properties-not-Initialized-tp4675091p4675093.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 @SpringBean - @Autowired properties not Initialized

2016-07-13 Thread mashleyttu
Hi All,

When we include a property on our Page class with the @SpringBean annotation
it doesn't seem to initialized the @Autowired properties of the bean when
using the GCLib Proxy. If we set wrapInProxy to false as follows, wicket
skips the GCLib code and simply pulls the bean using Springs getBean method.

this.getComponentInstantiationListeners().add(new
SpringComponentInjector(this,AppCommon.getApplicationContext(),false));

This has the side effect of us having to mark all our @SpringBean properties
as transient and call Injector.get().inject(this); for all of our AJAX
calls. 

Shouldn't the GCLib proxy still pull the bean from the Spring context and
then wrap it in a proxy?

Note: We are still using an older version of Wicket 6.11. Maybe this has
been updated in future releases.

Thanks,
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-SpringBean-Autowired-properties-not-Initialized-tp4675091.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 6 Clustering - Component Not Found Exception

2016-02-21 Thread mashleyttu
Hi,

We are using Wicket 6.11 in production where we have the clustered servers.
It's in memory cache was set to 40 by default. 

I've verify that setting this to 0 fixes the issue! 

I apologize if this default has been changed in a later point release of
Wicket 6, but you really helped me have a better understanding of how Wicket
stores pages internally!

Once again, you have been an excellent help and I am thankful. If I run into
any further issues I'll let you know.

Thanks,
Matt


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673687.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 6 Clustering - Component Not Found Exception

2016-02-20 Thread mashleyttu
Hi,

This was also very helpful. A little more insight into our application: It
is a single page web app and we swap panels via ajax with the following
code:

myPanel.setOutputMarkupPlaceholderTag(true); //Newly constructed panel
pnlMain.replaceWith(myPanel); //Replace panel
pnlMain = myPanel; //Update reference in MainPage.java to new panel
target.add(myPanel); //Add to target for rendering

On the node where everything worked (node that ran the code above) we had
all the components on the page we are expecting.

On the node with the component not found exception (code above was not run
on this node) it had the previous panel that we were on.

Is the DefaultPageStore stored in the session? I'm thinking that is not
getting serialized by the tomcat memcached session manager. 

What would happen if we set cacheSize to 0?

* @param cacheSize
*the number of pages to cache in memory before passing them to
*{@link IDataStore#storeData(String, int, byte[])}

Thanks so much!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610p4673683.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 6 Clustering - Component Not Found Exception

2016-02-20 Thread mashleyttu
Hi Martin, 

Thank you for your quick reply. I had to wait for the weekend for further
testing. I added the timestamp attribute as you suggested but unfortunately
that didn't work. I also upgraded to the latest version of tomcat memcached
session manager (I posted on their forum as well), but no luck.

I've also turned on the following logging in Wicket. Is there any finer
logging I can enable?

log4j.logger.org.apache.wicket=TRACE
log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=TRACE
log4j.logger.org.apache.wicket.version=TRACE
log4j.logger.org.apache.wicket.RequestCycle=TRACE
de.javakaffee.web.msm.level=ALL

The logging you suggested adding did turn up something that is intriguing.
The page length in bytes is about 2k bytes smaller on the failed request
than the working request. Same page Id (0). Any thoughts on why that might
be?

Please see logs below:

*LOG - NODE 1 - Loaded the initial page - WORKED*
20-Feb-2016 09:47:15.262 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached Loading
session from memcached: E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:47:15.262 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.LockingStrategy.lock Locking session
E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:47:15.269 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.LockingStrategy.acquireLock Locked session
E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:47:15.269 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.LockingStrategy.lock Locked session
E24FAB17D7B8C7AD74186C659F219E9D
20-Feb-2016 09:47:15.274 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.JavaSerializationTranscoder.deserializeAttributes  
loading attribute 'Wicket:SessionUnbindingListener-wicket.Title1Crate' with
value
'org.apache.wicket.session.HttpSessionStore$SessionBindingListener@695de0f1'
20-Feb-2016 09:47:15.280 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.JavaSerializationTranscoder.deserializeAttributes  
loading attribute 'wicket:wicket.Title1Crate:page:store:memory' with value
'org.apache.wicket.pageStore.memory.PageTable@125b2442'
20-Feb-2016 09:47:15.280 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.JavaSerializationTranscoder.deserializeAttributes  
loading attribute 'wicket:wicket.Title1Crate:session' with value
'com._806technologies.title1cratecore.components.T1CSession@1da97278'
20-Feb-2016 09:47:15.280 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.JavaSerializationTranscoder.deserializeAttributes  
loading attribute 'wicket:wicket.Title1Crate:timestamp' with value 'Sat Feb
20 09:46:46 CST 2016'
20-Feb-2016 09:47:15.281 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.JavaSerializationTranscoder.deserializeAttributes  
loading attribute
'wicket:wicket.Title1Crate:wicket:persistentPageManagerData -
wicket.Title1Crate' with value
'org.apache.wicket.page.PageStoreManager$SessionEntry@5f9a337e'
20-Feb-2016 09:47:15.282 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached Found
session with id E24FAB17D7B8C7AD74186C659F219E9D
DEBUG - ServletWebRequest  - Calculating context relative path from:
context path '', filterPrefix '', uri '/wicket/page'
DEBUG - CompoundRequestMapper  - One compatible mapper found for URL
'wicket/page?0-1.IBehaviorListener.0-pnlMain-pnlUploaderPanel-cntFileUploader&wicket-ajax=true&wicket-ajax-baseurl=eCrate'
-> 'Mapper: org.apache.wicket.core.request.mapper.PageInstanceMapper; Score:
2147483647'
DEBUG - PageAccessSynchronizer - 'http-apr-443-exec-1' attempting to
acquire lock to page with id '0'
DEBUG - PageAccessSynchronizer - http-apr-443-exec-1 acquired lock to
page 0
INFO  - BlockTimer - getDataObject, t=4 milliseconds
WARN  - AmazonS3Client - No content length specified for stream
data.  Stream contents will be buffered in memory and could result in out of
memory errors.
INFO  - BlockTimer - getDataObject, t=2 milliseconds
INFO  - BlockTimer - getDataObject, t=9 milliseconds
DEBUG - Page   - ending request for page [Page class =
com._806technologies.title1crateweb.MainPage, id = 0, render count = 1],
request org.apache.wicket.protocol.http.servlet.ServletWebRequest@449d2f28
DEBUG - Page   - ending request for page [Page class =
com._806technologies.title1crateweb.MainPage, id = 0, render count = 1],
request org.apache.wicket.protocol.http.servlet.ServletWebRequest@449d2f28
*INFO  - 806HttpSessionDataStoreLog - StoreData session id:
E24FAB17D7B8C7AD74186C659F219E9D page id: 0 byte length: 7097*
INFO  - T806WebApplication - Writing Timestamp to session.
DEBUG - PageAccessSynchronizer - 'http-apr-443-exec-1' released lock to
page with id '0'
DEBUG - PageAccessSynchronizer - 'http-apr-443-exec-1' notifying blocked
threads
20-Feb-2016 09:47:16.335 FINE [http-apr-443-exec-1]
de.javakaffee.web.msm.BackupSessionService.backupSession Starting for
session id E24FAB17D7B8C7AD74186C65

Wicket 6 Clustering - Component Not Found Exception

2016-02-16 Thread mashleyttu
Hi Everyone, Over the weekend we clustered our Wicket 6 application in
AWS/Tomcat. Since AWS doesn't support multicasting we used an AWS Load
Balancer and the tomcat memcached-session-manager with sticky
sessions=false, sessionbackupasync=false and lockingmode=all. 

We changed our wicket configuration to the following:
@Override
public void init(){
super.init();
getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);

//Store previous Pages in HttpSession instead of on local disk 
for
clustering.
setPageManagerProvider(new DefaultPageManagerProvider(this){
@Override
protected IDataStore newDataStore() {
return new 
HttpSessionDataStore(getPageManagerContext(), new
PageNumberEvictionStrategy(100));
}
});

We are able to navigate from page-to-page (each request going to a different
node) without losing our session (user doesn't get logged out) and we aren't
receiving any page expired exceptions.

The component not found exception occurs every time there is an ajax call
that goes to a different node than the node that first rendered the page.

I know no one here is a tomcat memcached session manager expert, so my
question is: 

from a Wicket perspective is there anything else that needs to be configured
to ensure that everything is stored in the session?

Although, we can turn on sticky sessions, we really only want to do that is
a last resort.

Thanks for any advice that can be given!
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610.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 Atmosphere Clustering

2015-12-14 Thread mashleyttu
Hello, 

Has anyone had any luck clustering Wicket Atmosphere? We've setup a
Hazelcast broadcaster using this documentation (
https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere-for-the-Cloud

 
) in hopes that any node in our cluster could call EventBus.post, and it
would be broadcast to all nodes. The node that had the users websocket
connection would then send the server push.

However, it looks as though the EventBus.push is checking for the
broadcasters AtmosphereResources before doing the post. These seem to be
isolated per node. Our next approach was to use a Hazelcast topic to pushing
the AtmosphereResource to all other nodes when it was added on one node,
however AtmosphereResourceImpl.java is not serializable so it did not work.

We are currently running a slighting older version of Wicket 6.11 with the
Wicket-Atmosphere 6.18 maven package. We tried upgrading to some of the
wicket-experimental Atmosphere packages, but these seemed to cause all sorts
of errors with our current setup.

Any suggestions tutorial would be great.

Thanks,
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Clustering-tp4672976.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: Atmosphere - Reconnect after Disconnect

2015-06-10 Thread mashleyttu
Always great help out of this group! Invisible iFrame did the trick.
window.open caused popup warnings. The easiest solution is usually the best.

Thanks again! Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-Reconnect-after-Disconnect-tp4671118p4671130.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



Atmosphere - Reconnect after Disconnect

2015-06-09 Thread mashleyttu
Hi All, I asked an Atmosphere question a few days ago and have another one.

We are adding Atmosphere support to our application, and have added a
ResourceRegistrationListener to the EventBus so we can track and push
messages to users who request certain files. These files are generated on
the fly, and we don't want the user to have to wait for them to be created.

When the file has been created, we use the EventBus to push a success
message to the client who requested the file. The issue is the message has a
window.location.href = '/path/to/file.pdf' which is causing the page to
disconnect and the resourceUnregistered event to fire. This is causing
problems for future download request.

After the push message, I'm trying to have the client reconnect to the
server. I'm currently doing something like this:

public void reconnect(AjaxRequestTarget target, WebPage page) throws
JSONException{
JSONObject options = bus.getParameters().toJSON();
List lstAtmoBehaviors =
page.getBehaviors(AtmosphereBehavior.class);
if(CollectionUtils.isNotEmpty(lstAtmoBehaviors)){
options.put("url", page.urlFor(lstAtmoBehaviors.get(0),
IResourceListener.INTERFACE, new PageParameters()).toString());
}
//wait a quarter of a second for the download to fire before 
reconnecting
target.appendJavaScript("setTimeout(function(){jQuery('#" +
page.getMarkupId() + "').wicketAtmosphere("+options.toString()+");},250);");
}


This generates the same connection ajax call that the AtmosphereBehavior
renderHead method method generates. I've verified it calls the EventBus
resourceRegistered method. The uuid is unfortunately blank though.

Manually hitting the browser refresh button re-registers the page with the
uuid. 

Is there a fancy Wicket Atmosphere method to say "reconnect"? Or how do I
get Wicket to generate a UUID? Or a setting that says "reconnect"
automatically?

THanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Atmosphere-Reconnect-after-Disconnect-tp4671118.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 Atmosphere jQuery noConflict

2015-06-03 Thread mashleyttu
Sir, you are a gentleman and a scholar for your quick reply with links to
excellent examples. Thanks so much. You wicket folks think of a solutions
for everything. Love the architecture!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046p4671052.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 Atmosphere jQuery noConflict

2015-06-03 Thread mashleyttu
Our application uses jQuery.noConflict changing all references from $ to $j.
We are trying to integrate Wicket Atmosphere into our application, however,
are running into an issue where it is rendering a $ in an
OnDomReadyHeaderItem.forScript. This is of course causing javascript errors.

We have tracked it down to the renderHead method of AtmosphereBehavior. The
$ is hard coded in the javascript string.

Does anyone know if it is possible to extend AtmosphereBehavior and have
Wicket Atmosphere use our custom version? 

Or it is possible to extend OnDomReadyHeaderItem which would do a replace on
$( with $j( and have wicket use that globally?

Any thoughts on how to resolve this issue? Using Wicket Atmosphere .18 and
Wicket 6.11 currently.

Thanks,
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-jQuery-noConflict-tp4671046.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 Can't Find Component Error

2014-05-14 Thread mashleyttu
Hello All,

Maybe a couple times a week we get a wicket error stating: Unable to find
component with id "XZY" in . Found with similar names: "" when a user
submits one of our forms (we have lots, it has happened on different ones).
We have had a couple user tell us they were sent to our custom error page,
and had to re-complete the form. 

We are having a hard time re-producing this error. My thought is somehow our
page map is getting evicted, because I do not believe it has anything to do
with session timeout. We do not implement any MaxPageMap or custom eviction
strategies. We are using whatever the wicket default is. 

My other thought is on certain request we are getting serialization errors,
but I'm not seeing any in our tomcat logs.

Our site currently has anywhere from about 5 - 20 users on at any given
time. It is very small, and this only happens 2 or 3 times a week. My
concern is as we grown this will happen more often.

Any ideas on what could be occurring? This is an older wicket app built on
wicket 1.5.10. 

Thanks,
Matt

PS. We also get errors a few times a day telling us page number 0 or 1 or 4,
etc has expired. These always occur when there is no active session. My
guess is it could be a bot or something trying to access one of our sites
URLs. I'm less concerned about this error, but still curious.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Can-t-Find-Component-Error-tp4665810.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 Components as Class Members

2013-11-12 Thread mashleyttu
Thank you everyone for your replies.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Components-as-Class-Members-tp4662235p4662345.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 Components as Class Members

2013-11-08 Thread mashleyttu
Dumb question everyone,

I heard somewhere that it is bad to declare variables as final in Wicket
because they are treated as class members, and Wicket serializes the page
that would increase your session size.

Because of this I have not declared any components I add to my page as final
(or created class member variables for them), and if I need to access them
from an anonymous class I use the page.get("compId") method. This has made
my code very cumbersome and hard to read.

I got to thinking, since Wicket serializes all the components anyways, what
would it hurt to make a component final or a class member when declaring it?

It would sure make it easier to access later on. I really feel like an idiot
asking this question, just concerned about session size.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Components-as-Class-Members-tp4662235.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



Model Binding Issue

2012-09-25 Thread mashleyttu
Hi All,

I'm a little stumped here, and would like anyone's input to see what I am
doing wrong. I've created a new component that extends FormComponentPanel.
It contains a TextField component. When my form is submitted back to the
server, my model is not updated. :-( 

However, when I don't use this component, and I use a standard TextField
component my model is updated when my form is submitted back to the server.
I'm passing the model for my component into the TextField in my component,
so I'm not sure why it doesn't link back up on post back.

Here is my component (any comments on what I am doing wrong would be greatly
appreciated):


public class TextFieldPlaceHolder extends FormComponentPanel{

private TextField txtInput;

public TextFieldPlaceHolder(String id, IModel model, String
placeHolderText) throws Exception{
this(id,model,placeHolderText,false);
}

public TextFieldPlaceHolder(String id, IModel model, String
placeHolderText, boolean isRequired) throws Exception {
super(id, model);
try{
this.setType(String.class);
txtInput = new TextField("txtInput",model){

private static final long serialVersionUID = 1L;

protected void onComponentTag(ComponentTag tag){
super.onComponentTag(tag);
HashMap myAttrs =
TextFieldPlaceHolder.this.setOnComponentTagTextField();
if(myAttrs != null){
for(Map.Entry 
entry : myAttrs.entrySet()){
String key = 
entry.getKey();
String value = 
entry.getValue();

String attrValue = 
tag.getAttribute(key);
if(attrValue == null || 
attrValue.equals("")){
tag.put(key, 
value);
}else{
tag.put(key, 
attrValue+" "+value);
}
}
}
String okKeyUpFunctionText = 
"if(this.value !=
''){$j('#lbl_"+this.getMarkupId()+"').hide();}else{$j('#lbl_"+this.getMarkupId()+"').show();}";
tag.put("onkeyup",okKeyUpFunctionText);
}
};
txtInput.setOutputMarkupPlaceholderTag(true);
txtInput.setLabel(new 
DetachableStringModel(placeHolderText));
FormComponentLabel lblLabel = new
FormComponentLabel("lblLabel",txtInput){
private static final long serialVersionUID = 1L;

@SuppressWarnings("rawtypes")
protected void onComponentTag(ComponentTag tag){
super.onComponentTag(tag);
TextField txtInput = (TextField)
TextFieldPlaceHolder.this.get("txtInput");

tag.put("id","lbl_"+txtInput.getMarkupId());
}
};
Label lblText = new 
Label("lblText",txtInput.getLabel());
lblText.setRenderBodyOnly(true);
lblLabel.add(lblText);
add(new
RequiredFieldIndicator("reqFldInd",isRequired).setOutputMarkupPlaceholderTag(true));
add(lblLabel);
add(txtInput);
}catch(Exception e){
throw e;
}
}


Thanks! Matt



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Binding-Issue-tp4652337.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



AjaxFallbackDefaultDataTable Refresh Data Provider

2011-12-03 Thread mashleyttu
Hi,

I'm using an AjaxFallbackDefaultDataTable and I am trying to update the Data
Provider during an Ajax call back. A little more details is I have a
TextField with an AjaxFormComponentUpdatingBehavior("onkeyup") behavior
attached for filtering results in my AjaxFallbackDefaultDataTable. 

Long story short, is I do not know how to update the Data Provider for the
Table and have the filtered results displayed in the web browser. I've had
to settle on creating a new AjaxFallbackDefaultDataTable and use the
replaceWith function to display he results. Please see code below.

TextField txtIncidentFilter = (TextField)
IncidentListViewPanel.this.get("rowSearch:txtIncidentFilter");
String searchQuery = (String)
txtIncidentFilter.getDefaultModelObject();
WebMarkupContainer cntIncidentList = 
(WebMarkupContainer)
IncidentListViewPanel.this.get("cntIncidentList");
AjaxFallbackDefaultDataTable cmp = 
(AjaxFallbackDefaultDataTable)
cntIncidentList.get("tblIncidents");

myListParams.setQueryString("%"+Commons.nvl(searchQuery,"")+"%".toLowerCase());
AjaxFallbackDefaultDataTable 
newIncidentFilterResults = new
AjaxFallbackDefaultDataTable("tblIncidents",columns,new
SortableIncidentDataProvider("INCIDENT_TS",myListParams),rowCount);

cmp.replaceWith(newIncidentFilterResults);
cmp = newIncidentFilterResults;
cmp.setOutputMarkupId(true);
target.addComponent(cmp);
target.addComponent(cntIncidentList);

This works fine but I would think requires a lot of extra processing/memory
etc, where you should simply be able to update the dataprovider for the
component.

Does anyone know how to provide a new data provider for a
AjaxFallbackDefaultDataTable component?

Using wicket 1.4.15 in PROD.

Thanks,
Matt

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFallbackDefaultDataTable-Refresh-Data-Provider-tp4154899p4154899.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