Just to make clear. I'm not talking about the browser showing a 404 hitting the app. Look in your Jetty log. Make sure that the resource requests are valid & not getting a 404 instead (you might have the wrong paths set up).
On Sat, Apr 25, 2009 at 4:16 AM, grigoregeorge < [email protected]> wrote: > > > No, the program work fine.......but it don't diplay the image. The > program compile ........... > On 25 Apr, 09:20, Vitali Lovich <[email protected]> wrote: > > Read the first line of the response. are you getting a 404? > > > > On Sat, Apr 25, 2009 at 12:39 AM, grigoregeorge < > > > > [email protected]> wrote: > > > > > The main requirement of this application si to display 2 images, the > > > bigest image is the background of the small image, the image is on > > > each other > > > > > On 24 Apr, 22:18, Vitali Lovich <[email protected]> wrote: > > > > Check the Jetty log. Are you getting a 404 on the resource request? > > > > > > Also, I dunno why you are doing what you are doing with DockPanel, > but in > > > > any case it's probably wrong. Every time you add a widget it'll > append > > > > "-parent" to each child. So after 3 adds, the 1st child added will > have > > > > > > class-parent-parent-parent. > > > > > > Also, that's a potential performance problem. Why aren't you setting > the > > > > classname explicitly outside of dock panel. Or create a separate > class > > > with > > > > a dedicated method that'll properly set the style name as you want > once, > > > > after all children have been added. > > > > > > Or if you want a more automatic approach, something like > > > > > > private boolean invalidated = false; > > > > void add(Widget w, Constraints c) { > > > > super.add(w, c); > > > > invalidated = true; > > > > DeferredCommand.addCommand(new Command() { > > > > public void execute() { > > > > if (invalidated) { > > > > invalidated = false; > > > > // refresh style names > > > > } > > > > }); > > > > > > } > > > > > > or even better create 1 timer & schedule it on every addition, > thereby > > > > bypassing invalidate & the need to create a deferred command. > > > > > > On Fri, Apr 24, 2009 at 2:39 PM, grigoregeorge < > > > > > > [email protected]> wrote: > > > > > > > Hello. I have a problem with my application. Why don't display all > the > > > > > 2 image in the Web Application Starter Project???? > > > > > > > import java.util.Iterator; > > > > > import com.google.gwt.core.client.EntryPoint; > > > > > import com.google.gwt.user.client.DOM; > > > > > import com.google.gwt.user.client.ui.DockPanel; > > > > > import com.google.gwt.user.client.ui.RootPanel; > > > > > import com.google.gwt.user.client.ui.VerticalPanel; > > > > > import com.google.gwt.user.client.ui.Widget; > > > > > > > public class Test implements EntryPoint { > > > > > > > private VerticalPanel northPanel=new VerticalPanel(); > > > > > private VerticalPanel northPanelBackground=new > VerticalPanel(); > > > > > > > private DockPanel thePanel=new DockPanel(){ > > > > > public void add(Widget widget, DockLayoutConstant > > > > > direction){ > > > > > super.add(widget,direction); > > > > > Iterator it=getChildren().iterator(); > > > > > while(it.hasNext()){ > > > > > widget=(Widget) it.next(); > > > > > com.google.gwt.user.client.Element > > > > > cell=DOM.getParent > > > > > (widget.getElement()); > > > > > DOM.setElementProperty(cell, > > > "className", > > > > > widget.getStylePrimaryName()+"-parent"); > > > > > } > > > > > } > > > > > }; > > > > > > > public void onModuleLoad() { > > > > > > > northPanel.setSize("100%", "100%"); > > > > > northPanel.setStylePrimaryName("north"); > > > > > > > thePanel.setSize("100%", "100%"); > > > > > thePanel.add(northPanel,DockPanel.NORTH); > > > > > RootPanel.get().add(thePanel); > > > > > > > } > > > > > } > > > > > > > .north { > > > > > background-image:url('banner.jpg'); > > > > > background-repeat:no-repeat; > > > > > height:100%; > > > > > } > > > > > .north-parent { > > > > > background-image:url('bg.jpg'); > > > > > background-repeat:repeat-x; > > > > > height:150px; > > > > > } > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
