[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: sritter  XML
Profile for sritter -> Messages posted by sritter [5]
Author Message
That was quick, thanks Björn.

Too bad anyway, I will find a workaround
Hello,

I have implemented drag&drop functionality in a tree, it works but with one restriction: I can't drop an item e.g. from the very bottom of the tree to the top of the tree as soon as I need to scroll, because there seems to be no "auto scroll" mechanism in the fixgrid.

I found the "scrollbydraganddrop" attribute in the scrollpane, so I figured I could just put the fixgrid inside the scrollpane, disable scrolling on fixgrid side (noscrollmode=true) and let the scrollpane handle the scrolling part.
But now the tree nodes won't open when I toggle them.

Maybe there is a better way in doing this and I would be very happy if someone could point out, where I'm wrong.

Thanks a lot.

Kind Regards
Steffen

PS:
I just realized as soon as I disable the "noscrollmode" on the Fixgrid, the toggle works but then again I don't have the scrollpane handle my scrolling
Hi Community,

I'm adding a dynamic amount of items to the paintarea Component.
Now I'm trying to delete items via a popup menu entry.

My attempt is adding a separate Popup Menu to each item:

Code:
 POPUPMENUNode popup = new POPUPMENUNode();
 		MENUITEMNode popupitem = new MENUITEMNode();
 		popupitem.setText("Datenpunkt löschen");
 		popupitem.setActionListener(expression.replace("}",".onDeleteItem}"));
 		popup.setId("POPUPITEM"+shape.i_index);
 


Problem here is the last line, there is no "setId" Method in the POPUPMENUNode. Am I using the wrong component for that?

Is there another way to accomplish this?

Thanks.

Steffen

ok, fixed this problem by adding dynamic content to the paintarea and
adding the paintareaItems to the dynamic content.
Hi community,

I seem to have a problem with the paintarea component.

What I'm trying to accomplish is, adding PAINTAREAPANEITEMComponentTag
to the paintarea from within my program. This works so far.
Then I'm serializing my Objects to XML for later restoring the state.

When I'm re-opening my page and initialize it with the previous objects,
the PAINTAREAPANEITEMs won't show until I call the "update" method again.
The update method is basically the one from the demo workplace and is called after the initialization in the constructor.

Code:
 
 private void updateDesignArea()
     {
         if (m_designArea == null) return;
         m_designArea.getChildren().clear();
         for (int i=0; i<m_shapeInstances.size(); i++)
         {
             String expression = "#{wp.DemoShape.shapeInstances["+i+"]}";
             expression = getOwningDispatcher().updateExpression(expression);
             PAINTAREAITEMComponentTag pit = new PAINTAREAITEMComponentTag();
             pit.setBgpaint(expression.replace("}",".bgpaint}"));
             pit.setBounds(expression.replace("}",".bounds}"));
             pit.setDragsend("shapeinstance:"+i);
             pit.setDropreceive("shapeinstance");
             pit.setActionListener(expression.replace("}",".onInstanceAction}"));
             pit.setInvokeevent("click");
             pit.setResizingenabled("true");
             m_designArea.getChildren().add(pit.createBaseComponent());
         }
         for (int i=0; i<m_lineInstances.size(); i++)
         {
             String expression = "#{wp.DemoShape.lineInstances["+i+"]}";
             expression = getOwningDispatcher().updateExpression(expression);
             PAINTAREALINEITEMComponentTag pilt = new PAINTAREALINEITEMComponentTag();
             pilt.setBounds(expression.replace("}",".bounds}"));
             pilt.setLinecolor("#808080");
             m_designArea.getChildren().add(pilt.createBaseComponent());
         }
 


So when I call this method in the constructor after I added my items to the instances list, it won't show the items. But if I call it again, once the page is completely initialized (i.e. via a button) the items will be rendered just fine.

I already tried calling the method via the beanprocessing but none of the phases seem to solve the problem.

I hope this is not too confusing.
Looking forward to any comments.

Kind regards
Steffen
 
Profile for sritter -> Messages posted by sritter [5]
Go to:   
Powered by JForum 2.1.6 © JForum Team