On 6/26/06, RĂ¼diger Schulz <[EMAIL PROTECTED]> wrote:

I'd be glad to provide some docs etc. for this subject in the next days.
What would be the best way for providing JavaDoc-Patches? Just changing
the latest file from SVN, and posting it here?

patches are the best way
 
Is there maybe a way to avoid this additional <span> inside <optgroup>
and just use the <optgroup> which then of course should not vanish? The
span will always be marked as invalid HTML in editors... I played with
setRenderBodyOnly(), but that didn't change anything no matter what.
Sure, there won't be always the relation 1 SelectOptions -> 1
<optgroup>, but still... ;-)

given current components i do not see a way to do it. what you can do is create a new component that is a panel that embeds the <span><option> markup and then attach that penel to a colgroup tag.

so your markup would look like this:
<select wicket:id="foo"><colgroup wicket:id="bar"></colgroup></select>

so basically what you would do is wrap the current SelectOptions component with a panel.


Also, thanks a lot for your explanation regarding model chaining. I
think I understand the problem now. I'm not yet sure how to go around
this everywhere, but I will now try to avoid Compound models where a
deeper chaining might be necessary. Maybe I'll manage to come up with an
example where I stumbled upon this where it was not possible to just use
the model bean, as there was just a (compound) model available.


yes, i can see how this can be confusing and unintuitive, unfortunately this is how compound models work.

actually in 2.0 this would work as expected because compound model would function like it does now only if assigned to a component, but that doesnt help you much...

as far as 1.2 goes we can fix this by making property model test if the property object is a compound model and then call getObject(null) which should return the underlying object and use that for property resolving. i actually think this is more "correct" behavior. the question is: is this fix too late to go into 1.x branch because there might be users who depend on this quorky behavior.

so what do other core committers think?

Index: D:/ws/wicket_1_2/src/java/wicket/model/AbstractPropertyModel.java
===================================================================
--- D:/ws/wicket_1_2/src/java/wicket/model/AbstractPropertyModel.java    (revision 6287)
+++ D:/ws/wicket_1_2/src/java/wicket/model/AbstractPropertyModel.java    (working copy)
@@ -75,7 +75,13 @@
     {
         if (nestedModel instanceof IModel)
         {
-            return ((IModel)nestedModel).getObject(component);
+            final IModel model=(IModel)nestedModel;
+            if (model instanceof ICompoundModel) {
+                return model.getObject (null);
+            } else {
+                return model.getObject(component);
+            }
+           
         }
         return nestedModel;
     }


-Igor

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

Reply via email to