This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onNavigation(NavigationEvent event) { | |
String nameToken = event.getRequest().getNameToken(); | |
getView().setActive(nameToken); | |
} | |
@Override | |
public void setActive(String nameToken) { | |
$("a", container).toggleClass(res.styles().menuActive(), false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table.addCellPreviewHandler(new CellPreviewEvent.Handler<Document>() { | |
@Override | |
public void onCellPreview(CellPreviewEvent<Document> event) { | |
if (BrowserEvents.MOUSEOVER.equals(event.getNativeEvent().getType())) { | |
overDocument = event.getValue(); | |
} | |
} | |
}); | |
table.addAttachHandler(new Handler() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Inject | |
public MessagePresenter(final EventBus eventBus, final MyView view, final PlaceManager manager) { | |
super(eventBus, view); | |
PlaceRequest request = new PlaceRequest("album").with("id", "12351232"); | |
InlineHyperlink hyperlink = new InlineHyperlink("album", manager.buildHistoryToken(request)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Integer fadeDelay = 250; | |
private Boolean blockFade = false; | |
private String lastDesc = ""; | |
/** | |
* {@link Function} that insure that we wait until every fade animation is | |
* finished before unblocking upcoming fade animation. | |
*/ | |
private Function fadeFunction = new Function() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void doPost(HttpServletRequest req, HttpServletResponse res) | |
throws ServletException, IOException { | |
PrintWriter out = res.getWriter(); | |
out.print("uploading files"); | |
FileService fileService = FileServiceFactory.getFileService(); | |
try { | |
ServletFileUpload upload = new ServletFileUpload(); | |
res.setContentType("text/plain"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Extracter { | |
public void extract(HttpServletRequest request) throws FileUploadException, IOException { | |
ServletFileUpload upload = new ServletFileUpload(); | |
FileItemIterator iterator = upload.getItemIterator(request); | |
while (iterator.hasNext()) { | |
FileItemStream item = iterator.next(); | |
if (!item.isFormField()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class web implements EntryPoint { | |
private final ClientGinjector ginjector = GWT.create(ClientGinjector.class); | |
@Override | |
public void onModuleLoad() { | |
// This is required for Gwt-Platform proxy's generator | |
DelayedBindRegistry.bind(ginjector); | |
ginjector.getResources().style().ensureInjected(); | |
ginjector.getBootStrapper().init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MyView extends View { | |
} | |
@ProxyStandard | |
@NameToken(NameTokens.main) | |
public interface MyProxy extends ProxyPlace<MainPresenter> { | |
} | |
@Override | |
protected void revealInParent() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@WithTokenizers({WelcomePlace.Tokenizer.class}) | |
public interface AdminPlaceHistoryMapper extends PlaceHistoryMapper { | |
} | |
public class ContentActivityMapper implements ActivityMapper { | |
private final Provider<WelcomeActivity> appActivityProvider; | |
@Inject | |
public ContentActivityMapper(final Provider<WelcomeActivity> appActivityProvider) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Inject | |
public AppView(final Binder uiBinder, final EventBus eventBus, final ContentActivityMapper contentActivityMapper) { | |
initWidget(uiBinder.createAndBindUi(this)); | |
ActivityManager contentActivityManager = new ActivityManager(contentActivityMapper, eventBus); | |
contentActivityManager.setDisplay(content); | |
} | |
@Provides | |
@Singleton |
OlderNewer